Closed mleevi closed 1 year ago
I want to return an array of a type, that can also contain null values. But even if I set "nullable": true in the items the generated list always contains non-null type.
"nullable": true
E.g. In the example Pets api if I change findPets response from:
"items": { "$ref": "#/components/schemas/Pet" }
to:
"items": { "nullable": true, "$ref": "#/components/schemas/Pet" }
Even then the resulting code is the same List<Pet> instead of List<Pet?>
List<Pet>
List<Pet?>
I made a change that seems to fix the issue: https://github.com/Carapacik/swagger_parser/compare/main...mleevi:swagger_parser:main
Thanks
I want to return an array of a type, that can also contain null values. But even if I set
"nullable": true
in the items the generated list always contains non-null type.E.g. In the example Pets api if I change findPets response from:
to:
Even then the resulting code is the same
List<Pet>
instead ofList<Pet?>