-
Notifications
You must be signed in to change notification settings - Fork 9.1k
OAD schema fix 'parameter object' + in: querystring forbidden fields #4909
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
base: v3.2-dev
Are you sure you want to change the base?
OAD schema fix 'parameter object' + in: querystring forbidden fields #4909
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change is unnecessary. Adding this fail
test case with the current schema fails as expected:
openapi: 3.2.0
info:
title: API
version: 1.0.0
components:
parameters:
querystring-with-schema-not-allowed:
in: querystring
name: json
content:
application/json:
schema:
type: object
explode: true
It also fails with a single one of the other three keywords not allowed with content
.
Side note: schema
is not necessary in the not-required list because having both content
and schema
is already forbidden by the oneOf-required construct in lines 367-371.
I prefer the current style as it is shorter.
Independent of this PR I think we should add a "fail" test case for this exclusion:
@notEthan @ralfhandl actually the entire |
That example fails due to |
oh, @handrews beat me to it while I was typing |
… subschema This subschema would only forbid the presence of all four properties, rather than any of them, but it is superfluous as these properties are caught by `unevaluatedProperties: false`.
40a64d6
to
7bb5630
Compare
updated to remove this subschema |
#4590 introduces parameter object with
in: querystring
, which may not have propertiesschema
,style
,explode
, orallowReserved
. The accompanying schema change only forbids an object with all of those four properties, though. This fixes to forbid any of them.