-
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
Allow referencing Path Item only via Reference Object (#2635) #2657
Allow referencing Path Item only via Reference Object (#2635) #2657
Conversation
Signed-off-by: Vladimir Gorej <vladimir.gorej@gmail.com>
@char0n @MikeRalphson paths:
$ref: foo.yaml
$ref: bar.yaml |
@gimbimloki YAML does not allow for duplicate keys, so no (and that's not something OAS can change). Duplicate keys in JSON are a more complex topic, but the TL;DR is that most JSON implementations don't support them in a usable way. |
@handrews Thank you for your reply. |
@gimbimloki Keys must be unique in YAML. Non-unique keys in JSON do not have consistent behavior (usually one is discarded). Therefore it is impossible to have two |
This change feels incomplete, as it's now allowing a path-item entry to be a regular reference, but then not changing the definition of a path-item itself to disallow So now (in 3.2.0), this is still legal: paths:
/pets/{petId}:
$ref: "#/components/pathItems/one_pet"
components:
pathItems:
one_pet:
$ref: "#/components/pathItems/more_pet_things"
summary: a single pet
get:
... operation things here
more_pet_things:
$ref: "#/components/pathItems/even_more_pet_things"
description: ...
post:
... operation things here
even_more_pet_things:
put:
... ...which means that when processing a request for To fix this, I think we need to remove the Additionally, the reference under (I can submit a PR to make this change for 3.2.) addendum: I misread the schema in the 3.2 branch -- it did not get the |
See OAI#2657 - this was added to the specification but not the schema.
See OAI#2657 - this was added to the specification but not the schema.
See OAI#2657 - this was added to the specification but not the schema.
Signed-off-by: Vladimir Gorej vladimir.gorej@gmail.com