Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OKTA-745408 mergeconfigurations set useproxy #741

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion API_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Allows customers to easily access the Okta Management APIs
This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 5.1.0
- SDK version: 8.1.2
- SDK version: 8.1.3
- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen
For more information, please visit [https://developer.okta.com/](https://developer.okta.com/)

Expand Down
2 changes: 1 addition & 1 deletion openapi3/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"packageName" : "Okta.Sdk",
"outputDir" : "../",
"inputSpec" : "./management.yaml",
"packageVersion" : "8.1.2",
"packageVersion" : "8.1.3",
"packageDescription" : "Official .NET SDK for the Okta API",
"packageTitle" : "Official .NET SDK for the Okta API",
"packageCompany" : "Okta, Inc.",
Expand Down
1 change: 1 addition & 0 deletions openapi3/templates/Configuration.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,7 @@ namespace {{packageName}}.Client
PrivateKey = second.PrivateKey ?? first.PrivateKey,
DisableOktaDomainCheck = second.DisableOktaDomainCheck ?? first.DisableOktaDomainCheck,
DisableHttpsCheck = second.DisableHttpsCheck ?? first.DisableHttpsCheck,
UseProxy = second.UseProxy ?? first.UseProxy,
};
return config;
}
Expand Down
18 changes: 18 additions & 0 deletions src/Okta.Sdk.UnitTest/Client/OktaConfigurationShould.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,5 +216,23 @@ public void NotFailWhenAccessTokenProvidedAndAuthorizationModeIsOAuthAccessToken
action.Should().NotThrow();
}

[Fact]
public void MergeConfigurations()
{
var firstConfig = new Configuration
{
};
firstConfig.UseProxy.Should().BeTrue();
firstConfig.Proxy.Should().BeNull();
var secondConfig = new Configuration
{
UseProxy = false,
Proxy = new ProxyConfiguration()
};

var config = Configuration.MergeConfigurations(firstConfig, secondConfig);
config.UseProxy.Should().BeFalse();
config.Proxy.Should().NotBeNull();
}
}
}
5 changes: 3 additions & 2 deletions src/Okta.Sdk/Client/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class Configuration : IReadableConfiguration
/// Version of the package.
/// </summary>
/// <value>Version of the package.</value>
public const string Version = "8.1.2";
public const string Version = "8.1.3";

/// <summary>
/// Identifier for ISO 8601 DateTime Format
Expand Down Expand Up @@ -766,7 +766,7 @@ public static string ToDebugReport()
report += " OS: " + System.Environment.OSVersion + "\n";
report += " .NET Framework Version: " + System.Environment.Version + "\n";
report += " Version of the API: 5.1.0\n";
report += " SDK Package Version: 8.1.2\n";
report += " SDK Package Version: 8.1.3\n";

return report;
}
Expand Down Expand Up @@ -837,6 +837,7 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration
PrivateKey = second.PrivateKey ?? first.PrivateKey,
DisableOktaDomainCheck = second.DisableOktaDomainCheck ?? first.DisableOktaDomainCheck,
DisableHttpsCheck = second.DisableHttpsCheck ?? first.DisableHttpsCheck,
UseProxy = second.UseProxy ?? first.UseProxy,
};
return config;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Okta.Sdk/Okta.Sdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Description>Official .NET SDK for the Okta API</Description>
<Copyright>Okta, Inc.</Copyright>
<RootNamespace>Okta.Sdk</RootNamespace>
<Version>8.1.2</Version>
<Version>8.1.3</Version>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Okta.Sdk.xml</DocumentationFile>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
Expand Down