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

To Allow specify (at least) description in response definition when $ref is used #2089

Closed
ratermir opened this issue Jan 8, 2020 · 5 comments
Assignees
Labels
re-use: traits/merges Selective or modified re-use

Comments

@ratermir
Copy link

ratermir commented Jan 8, 2020

It would be very useful to be able to add (at least) description to the $ref in case of (at least) response part of the API specification.

It would allow me to specify generic reusable response that could be refined for every concrete use case. Because there are a lot of cases of responses that have the same structure, only the difference is the information why / when the error occurred.

Oxample of the use case:
image

In more generic perspective, it could be useful to allow to "override" some parts of references (examples, parameters ...).

@handrews
Copy link
Member

handrews commented Jan 8, 2020

For Schema Objects, this is addressed by PR #1977 for OAS 3.1

I'm not sure what the plan is for $ref outside of Schema Objects.

@handrews
Copy link
Member

This should probably be tracked in #2099. While not technically a JSON Schema issue, it is an example of the sort of question that will come up once JSON Schema keywords are allowed adjacent to $ref in OAS 3.1.

@ratermir
Copy link
Author

Originally I posted this request to the swagger editor group, but they redirected me here - they can't make such changes to this tool (= editor) if the schema says things different. That's why I posted it also here.

@handrews
Copy link
Member

@ratermir yes, this is the correct repo.

@whitlockjc @webron more $ref fun that we should track for OAS 3.1. I think it falls under things we're already talking about.

@handrews handrews added the $ref label Feb 24, 2020
@MikeRalphson MikeRalphson self-assigned this Mar 19, 2020
@MikeRalphson
Copy link
Member

PR: #2181

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
re-use: traits/merges Selective or modified re-use
Projects
None yet
Development

No branches or pull requests

4 participants