I have a JSON schema file where one of the properties is defined as string or null :
"type":["string", "null"]
When converting to YAML (for use with OpenAPI / Swagger) it becomes:
type: - 'null' - string
but the Swagger editor shows an error:
A key of type "schema" must be a string
What is the correct way to define a nullable property in OpenAPI?
source share