You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ x ] Have you provided a full/minimal spec to reproduce the issue?
[ n/a ] Have you validated the input using an OpenAPI validator (example)?
[ x ] What's the version of OpenAPI Generator used?
[ x ] Have you search for related issues/PRs?
[ n/a ] What's the actual output vs expected output?
[ n/a ] [Optional] Bounty to sponsor the fix (example)
Description
The configuration property ClientCertificates added with #5328 is lost in most of the api constructors. These constructors calls method Client.Configuration.MergeConfigurations() to merge the given configuration object with the global configuration. As this method does not handle the ClientCertificates property, the given configuration's certificate collection is lost.
var config = new Configuration { ClientCertificates = new X509CertificateCollection { new X509Certificate2() } };
var api = new SomeApi(config);
Assert.NotNull(api.Configuration.ClientCertificates);
Related issues/PRs
Suggest a fix
Add merging of the ClientCertificates property in line 411 of modules/openapi-generator/src/main/resources/csharp-netcore/Configuration.mustache: ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
The text was updated successfully, but these errors were encountered:
Looks like this can be closed as it appears to have been addressed in 6.0.0 (see #11711). Tested locally and found that the ClientCertificates parameter has been added.
Bug Report Checklist
Description
The configuration property ClientCertificates added with #5328 is lost in most of the api constructors. These constructors calls method Client.Configuration.MergeConfigurations() to merge the given configuration object with the global configuration. As this method does not handle the ClientCertificates property, the given configuration's certificate collection is lost.
openapi-generator version
4.3.1
OpenAPI declaration file content or url
n/a
Command line used for generation
openapi-generator generate -i SomeApi.json -o SomeApi\output -g csharp-netcore --package-name SomeApi
Steps to reproduce
Related issues/PRs
Suggest a fix
Add merging of the ClientCertificates property in line 411 of modules/openapi-generator/src/main/resources/csharp-netcore/Configuration.mustache:
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
The text was updated successfully, but these errors were encountered: