Bug Report Checklist
Description
When building a generated client using the csharp-netcore generator with a targetFramework of netcoreapp2.0, there are many compilation warning detected. When using the test yaml from here: https://github.com/OpenAPITools/openapi-generator/blob/v4.1.0/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml, 70 warnings are detected.
Most of the warnings are of the form:
PetApi.cs(713, 17): [CS0472] The result of the expression is always 'false' since a value of type 'long' is never equal to 'null' of type 'long?'
Expected behavior is for no warnings to be generated.
openapi-generator version
4.1.0
OpenAPI declaration file content or url
I used the test yaml here: https://github.com/OpenAPITools/openapi-generator/blob/v4.1.0/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
Command line used for generation
openapi-generator generate -g csharp-netcore -i ./petstore-with-fake-endpoints-models-for-testing.yaml --additional-properties targetFramework=netcoreapp2.0 -o ./netcoreapp2.0
Steps to reproduce
Run the command line above and build the project. Look at the compiler warnings.
Related issues/PRs
Suggest a fix
Bug Report Checklist
Description
When building a generated client using the csharp-netcore generator with a targetFramework of netcoreapp2.0, there are many compilation warning detected. When using the test yaml from here: https://github.com/OpenAPITools/openapi-generator/blob/v4.1.0/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml, 70 warnings are detected.
Most of the warnings are of the form:
Expected behavior is for no warnings to be generated.
openapi-generator version
4.1.0
OpenAPI declaration file content or url
I used the test yaml here: https://github.com/OpenAPITools/openapi-generator/blob/v4.1.0/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
Command line used for generation
openapi-generator generate -g csharp-netcore -i ./petstore-with-fake-endpoints-models-for-testing.yaml --additional-properties targetFramework=netcoreapp2.0 -o ./netcoreapp2.0
Steps to reproduce
Run the command line above and build the project. Look at the compiler warnings.
Related issues/PRs
Suggest a fix