I am using swagger/openAPI 3.0.0 to generate a python3-flask API. This API gives JSON responses. If the value for a property of my JSON response is None
I need it to come out as null
in the response. Instead, the property is getting completely dropped from the response. I understand that this is a dumb requirement, but I do not have a choice in the matter.
In my swagger definition I have:
my_property:
type: number
nullable: true
I have also tried
my_property:
type: number
nullable: true
default: null
but the results were the same.
How do I make it so that my_property
is not dropped from the response when the value is None
?