openapi-codegen
openapi-codegen copied to clipboard
Support for nullable types in OAS 3.1
The JSON Schema spec supports multiple values for types which allows a property to be nullable. e.g.
type: object
properties:
foo:
type: [string, "null"]
When generating types with this openapi-codegen it results in a void type.
export type Thing = {
foo?: void;
}
I realise this is differnt from OAS 3.0 where there was a separate nullable property. Does this lib support OAS 3.1?
Reference to the nullable support in OAS 3.1 https://github.com/OAI/OpenAPI-Specification/issues/2244#issuecomment-899084964