You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
be able to provide a user-friendly name for the request/response
include request/response headers
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:
All kidding aside, at one point examples was just an array, but in a very late change it was updated to be a map with summary and description fields. The sample documents in the v3 branch still haven't been fixed though.
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: