Description
OpenAPI 3.0 allows nullable: true on schema definitions independent of the required property list. Currently, nullability is inferred only from whether a property name is in the parent's required set. This means a property that is required but also nullable: true will be generated as non-nullable in Kotlin, which is incorrect.
Note: This topic needs additional research before implementation. The acceptance criteria below are preliminary and should be verified against the OpenAPI 3.0 spec and real-world usage patterns (e.g. how nullable interacts with allOf, oneOf, $ref, etc.). Update this issue with findings before starting work.
Acceptance criteria (preliminary — verify after research)
Description
OpenAPI 3.0 allows
nullable: trueon schema definitions independent of therequiredproperty list. Currently, nullability is inferred only from whether a property name is in the parent'srequiredset. This means a property that isrequiredbut alsonullable: truewill be generated as non-nullable in Kotlin, which is incorrect.Acceptance criteria (preliminary — verify after research)
SpecParserreads thenullableflag from schema definitionsPropertyModel.nullableistruewhen either the property is not inrequiredOR the schema hasnullable: trueTypeRefcarries nullability information where relevantnullable: trueis set on the schema