Support nullable slice elements and map values#2185
Support nullable slice elements and map values#2185mromaszewicz merged 1 commit intooapi-codegen:mainfrom
Conversation
7fd08d0 to
bf89b07
Compare
|
Sorted testcases by nullability. |
|
For nullable types, we have a |
|
Once you rebase and CI runs, this should be submittable. |
bf89b07 to
5f2964f
Compare
|
Regarding, |
|
This appears to cause a regression - rootlyhq/rootly-go#41 is now receiving i.e. type Alert struct {
// AlertFieldValuesAttributes Custom alert field values to create with the alert
- AlertFieldValuesAttributes []struct {
+ AlertFieldValuesAttributes []*struct {When using |
As a follow-up to #2185, we can make sure we generate a Nullable type if required to do so.
As a follow-up to #2185, we can make sure we generate a Nullable type if required to do so.
As a follow-up to #2185, we can make sure we generate a Nullable type if required to do so.
Adds support for nullable slice elements, e.g.
[]*string, ifitemsare declared asnullable: true(analogous tomap[string]*stringifadditionalPropertiesis havingnullable: trueand to fields describing/referencing nullable types), allows handling of values like["a", null, null, "d", ""]and occasionally improves the UX with DTO processing.Closes #158
Based on and re-implements #158-specific portion of #490, also with tests for the map case and none of the unrelated changes.