Nullable keyword still exists for objects after converting from 3.0.0 schema to 3.1.0
Hi!
Really useful library for converting specs from 3.0.0 to 3.1.0. Just wanted to highlight that Nullable = true still exists when next to type=object, which makes it an invalid 3.1.0 schema
hi @LeoWesterberg
I was not aware and will have a look into this case.
Do you have an example that you can share so I can reproduce it?
hi @LeoWesterberg
I tried to create a repo case.
When I have this input:
openapi: 3.0.0
components:
schemas:
MyObject:
type: object
nullable: true
properties:
foo:
type: string
After the conversion to 3.1, openapi-format returns this:
openapi: 3.1.0
components:
schemas:
MyObject:
type:
- object
- 'null'
properties:
foo:
type: string
In 3.1 the old nullable: true flag is gone, and OpenAPI expects the schema may be null, by adding "null" to the type array.
Can you share some more info, about what is the result you are experiencing?