Replies: 1 comment 1 reply
-
We discussed this in the TDC call on Oct 27th. Some questions:
Suggestion: dictionary of examples at the request level that contains request and corresponding response examples. Then have singular example property for response objects. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Current
examples
are described in the media-type and schema object. Since request, response and params(including content-type) are decoupled, there is no way to map the response example with the corresponding param and request example.If examples can be described for the whole operation, it would be easy to write less ambiguous examples and document the API better. Tools like doc generator, mock servers, etc could benefit a lot from this design. Furthermore, even test cases can be generated or run directly based on these documented examples.
PS: We currently resolve this using a unique identifier for each example and stating the purpose in yaml comments.
Beta Was this translation helpful? Give feedback.
All reactions