Open IhnatKlimchuk opened 2 years ago
I agree, it would be nice to have such a feature
+1
That would be nice feature 👍
When
What is the status of this issue? It seems like a bug, not like a "nice to have feature". Please relate to this. I have a similar problem to the issue author. In my API endpoint request object we have property:
bool include_content = true
and the generated code produces
bool? include_content = null
swagger.json
{ "name": "include_content", "in": "query", "schema": { "type": "boolean", "default": true } },
So two things are inconsistent in the generated client code: **1. The type. Nullable Bool instead of Bool
Originally posted by @damian5996 in https://github.com/RicoSuter/NSwag/issues/4010#issuecomment-1947552146
Api description in bi-swagger.json:
Nswag file bi-client.nswag:
Command line:
Actual result:
Changing description to
required: false
results in:Expected result:
... string api_version = "2.0" ...
Env: NSwag command line tool for .NET Core Net50, toolchain v13.13.2.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v12.0.0.0))