Skip to content

Commit

Permalink
Minor fixes for pre-release version (prior v0.1.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbru87 committed Jan 29, 2024
1 parent 956d2ee commit 745bfa6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private async Task AddGeneratedCodeAsync(string metadata, string outputDirectory
await MessageLogger.WriteMessageAsync(LogMessageCategory.Information, "Generating Client Proxy for OData V4...");
ODataT4CodeGenerator t4CodeGenerator = CodeGeneratorFactory.Create();
t4CodeGenerator.MetadataDocumentUri = metadata;
t4CodeGenerator.UseDataServiceCollection = serviceConfiguration.UseDataServiceCollection;
t4CodeGenerator.UseDataServiceCollection = true; // serviceConfiguration.UseDataServiceCollection;
t4CodeGenerator.TargetLanguage =
languageOption == LanguageOption.GenerateCSharpCode
? ODataT4CodeGenerator.LanguageOption.CSharp
Expand Down
5 changes: 5 additions & 0 deletions src/Microsoft.OData.CodeGen/Common/MetadataReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ public static Version GetMetadataVersion(ServiceConfiguration serviceConfigurati
{
var webRequest = (HttpWebRequest)WebRequest.Create(metadataUri);

if (!string.IsNullOrWhiteSpace(serviceConfiguration.CustomHttpHeaders))
{
webRequest.Headers.Add(serviceConfiguration.CustomHttpHeaders);
}

if (serviceConfiguration.IncludeWebProxy)
{
var proxy = new WebProxy(serviceConfiguration.WebProxyHost);
Expand Down

0 comments on commit 745bfa6

Please sign in to comment.