Skip to content
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

$ref to path_items and properties inheritance #1842

Closed
bjne opened this issue Feb 18, 2019 · 2 comments
Closed

$ref to path_items and properties inheritance #1842

bjne opened this issue Feb 18, 2019 · 2 comments

Comments

@bjne
Copy link

bjne commented Feb 18, 2019

When a path_items object includes a $ref to path_items, should the properties defined in the
parent path_items object be propagated to the $ref as with other path_items?

@kojidev
Copy link

kojidev commented Mar 12, 2019

https://swagger.io/specification/#pathItemObject

A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object's components/parameters.

It says you can use ref but it also says that a ref ?shoud? point to components.
So if you have your parameters listed in components the answer to me seems clear that yes, parameters propagate.

What is hazy for me is whether you can use external refs here

@handrews
Copy link
Member

Per #2111, yes, you can (and perhaps must) use an external ref. I'm going to close this, please follow up in #2111 if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants