Using nullable or x-nullable for deepObject parameter properties not supported?
Description
I have a deepObject query parameter called filter. This filter parameter has two different properties: id and name:
…
paths:
/people:
get:
operationId: api.get_names
parameters:
- name: filter
style: deepObject
explode: true
schema:
additionalProperties: false
type: object
properties:
id:
type: integer
x-nullable
nullable: true
name:
type: string
…
I want to accept nullable properties (so not the string 'null' but the actual value null) for the id property, like this:
curl --request GET --url 'http://localhost:5000/people?filter[id]=null'
From what I understand the x-nullable and nullable defined in OpenAPI 3.0 properties support this.
When sending this request however, I would expect to retrieve a Python filter dictionary looking as follows: {"id" : None}. However I get a connexion error stating the following: 'null' is not of type 'integer'.
I came across this post where someone states that x-nullable (and I assume therefore nullable itself) works at the parameter level but not within an object. Is this still the case?
I've also tried modifying my type property as follows:
properties:
id:
type:
- integer
- 'null'
But this gives me an error when starting the server saying that the scheme cannot be validated (makes sense).
Is there another way to pass null values via a deepObject property that will be converted to None in my server?
Expected behaviour
A Python dictionary looking as follows: {"id" : None}
Actual behaviour
A connexion error stating the following: 'null' is not of type 'integer'.
Steps to reproduce
See above
Additional info:
Output of the commands:
python --version: 3.9.1pip show connexion | grep "^Version\:"2.9.0
Thanks for the report @psauxgrep. Can reproduce.