Related OpenAPITools/openapi-generator#10972
Spec version: 3.0.3
the spec doesn't indicate how to handle model properties in the following case:
required: false
nullable: false
type: xxxxx
required: false means that the property might not exist in the json
nullable: false means that the property doesn't accept null as a value
so what to do when the spec document doesn't specify the default keyword ?
-
assume default is null (works only for properties where nullable: true, otherwise it will break the spec)
-
assume default to be of same type as type, so for non-nullable types that would be
"boolean" => false
"object" => { }
"array" => [ ]
"number"/"integer" => 0
"string" => ""
-
make it required to specify the default keyword when required: false and nullable: false
-
ignore the provided required: false and assume instead required: true