-
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
Extend V3 "examples" spec to include names (or IDs) and more data #1265
Comments
Your wish, is my command... All kidding aside, at one point For examples that show both the request and corresponding response, Microsoft have created an specification extension called |
Since the "group request and response" is tracked in #859 and the other requests were addressed in 3.0, I'm going to close this as resolved / tracked elsewhere. |
[as first discussed in #245]
The V3 spec introduces the concept of examples which is a great addition. For now, it looks like you can only provide an array of un-named request bodies or response payloads. It would be nice to extend it to:
Ideally I'd like to update https://www.npmjs.com/package/supersamples to generate OpenAPI-compatible entries that can be injected in an OpenAPI spec document. The benefit is generating these examples when running a unit-test suite: no need to keep examples up to date manually.
It could also be nice to group requests/responses together to show full end-to-end example, e.g. "here's a full example of an invalid payload and its response". However that would be a bigger change (route-level examples) and could potentially be achieved by matching the user-friendly name of the different request & response examples.
The text was updated successfully, but these errors were encountered: