OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.95k stars 6.59k forks source link

[CSHARP] Is dotnetstandard 1.3 really supported ? #17374

Open morganleroi opened 11 months ago

morganleroi commented 11 months ago

Hello,

I want to generate a client targeting dotnetstandard 1.3, using the targetFramework property of the CSharp generator. Maybe I'm missing something but the following code template is not compatible with the dotnetstandard 1.x specification. The GetMethod property is only available for netstandard version > 2.0

https://github.com/OpenAPITools/openapi-generator/blob/809b3331a95b3c3b7bcf025d16ae09dc0682cd69/modules/openapi-generator/src/main/resources/csharp/modelOneOf.mustache#L262

We could potentially use conditionnal #if directives to support the 1.x specification.

Am I missing something ?

devhl-labs commented 11 months ago

Consider trying the generichost library. If that doesnt work, then please provide yaml and the generate command you are using.