Skip to content

Allow Reference Object for 'tags' property of Swagger Object #677

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

Closed
gobengo opened this issue May 2, 2016 · 3 comments
Closed

Allow Reference Object for 'tags' property of Swagger Object #677

gobengo opened this issue May 2, 2016 · 3 comments
Labels
re-use: ref-everywhere Requests to support referencing in more / all places

Comments

@gobengo
Copy link

gobengo commented May 2, 2016

I have a directory of swagger files to describe all of my APIs, primarily because they are scattered across a few hostnames, and the Swagger Object only supports a single 'host' value.

However, I'd like to be able to share a common set of Tag Objects throughout these other Swagger Files. I looked into creating a distinct 'tags' file, then using a Reference Object in each API spec to point to that.

However, currently the value of SwaggerObject#tags can only be an array of tag objects.

Is there any reason not to allow it to be a Reference Object in the next version of the spec syntax?

FWIW swagger-tools validate doesn't let me add one now. swagger-parser doesn't mind, though, and will resolve the reference object.

@webron
Copy link
Member

webron commented May 2, 2016

I imagine we're going to expand support for references in the next version, covering more locations. One option would be to say where references are not allowed instead of the other way around.

@unional
Copy link

unional commented Mar 2, 2018

I have the same need. In my case, it's about i18n

Redocly/redoc#430

@handrews handrews added $ref re-use: ref-everywhere Requests to support referencing in more / all places and removed $ref labels Jan 27, 2024
@handrews
Copy link
Member

Closing in favor of #2905 which is the same request but has a more thorough use case documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
re-use: ref-everywhere Requests to support referencing in more / all places
Projects
None yet
Development

No branches or pull requests

4 participants