adjusted csharp codegen to allow for nullable properties#20299
adjusted csharp codegen to allow for nullable properties#20299BryanAldrich wants to merge 2 commits intoOpenAPITools:masterfrom
Conversation
99d050f to
b56aa31
Compare
|
Looks good, but embedding the question mark in the data type is something we should try to remove eventually. We can use the nullable property, x-is-value-type, or x-is-nullable-type (true for value or nrt enabled). I've already handled it for generichost. |
|
So, you're saying to add |
|
Yes, that is one way. We could also add a vendor extension to concat the data type and the ? if we like. This is just a suggestion for a future pr though, you can leave this alone if you want. |
|
have you tried enabling |
b56aa31 to
5a97cf0
Compare
|
@wing328 that flag seems to set the IsNullable to true if it truly is, however, the csharp template still wasn't writing out the nullable ? to the .cs files. |
5a97cf0 to
b9db531
Compare
b9db531 to
2181f62
Compare
…pes only unless nullable reference types is enabled). Edited tests to compensate for the actual data types. They were optional/not-required in the yaml, but came back with non-nullable types.
fix warning with netstandard targets and System.Web
2181f62 to
140bae8
Compare
For value types only unless nullable reference types is enabled.
Edited tests to compensate for the actual data types. They were optional/not-required in the yaml, but came back with non-nullable types.
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master(upcoming7.x.0minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)