-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nullable is problematic for query and path parameters #1915
Comments
OpenAPI V3 introduced the |
Okay ... I should have studied up on this more. From a quick reading of RFC-6570, I see
So for a And for a Is this a correct reading of that standard and how it should be applied for query and path parameters? |
I'm not sure, https://tools.ietf.org/html/rfc6570#section-3.2.8 makes it look like the parameter is omitted? But I'm having a bit of trouble understanding what, if any, difference there is between a special |
|
I believe the
nullable: true
designation in the schema of a query or path parameter is problematic, or at the very least under-specified. According to the OpenAPI 3.0.2 spec,nullable: true
means:If
param
is a query parameter of typestring
that is defined asnullable: true
, does?param=null
meanparam
is the null value or thatparam
has the string value"null"
? Or perhaps it means that users can specify?param=
with no value?Likewise, if
pet_id
is a path parameter of typestring
that is defined asnullable: true
, how would a user construct a path that specifiespet_id = null
? I don't think it could be/api/pets/null
. Likewise, I don't think it could be/api/pets/
.I believe the spec should be clarified to describe what it means to "send null" for a query or path parameter, or simply disallow
nullable: true
for these schemas.The text was updated successfully, but these errors were encountered: