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
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Using the csharp emitter the required properties should not get a default value and they must then come first in the ordering.
Currently, it does not order the constructor doc or parameters based on being required flag. Additionally, the required properties are given a default value in the constructor. This is present in existing generated code which have required properties and optional properties.
I am currently trying to cover it manually by using 2 blocks of readWriteVars {{#readWriteVars}}, with {{#required}}, then with {{^required}}. But I have big problems with adding commas, since {{#hasMore}} is checking all the list of varsity, not only required/notRequired
Bug Report Checklist
Description
Using the csharp emitter the required properties should not get a default value and they must then come first in the ordering.
Currently, it does not order the constructor doc or parameters based on being required flag. Additionally, the required properties are given a default value in the constructor. This is present in existing generated code which have required properties and optional properties.
openapi-generator version
OpenAPI declaration file content or url
samples/client/echo_api/csharp/restsharp/net8/EchoApi/src/Org.OpenAPITools/Model/Pet.cs
Generation Details
./bin/generate-samples.sh ./bin/configs/csharp-restsharp-net8-echo-api.yaml
Steps to reproduce
view the Pet.cs file ctor and param documentation
Related issues/PRs
Suggest a fix
Sort order should be done before the template generation for the readWriteVars. not sure where this logic is though.
The text was updated successfully, but these errors were encountered: