Replies: 3 comments 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.
-
|
See #90 (comment) for more discussion (but keep future discussion here). A particularly interesting point from @mikekistler is a way to use naming conventions in existing Example Objects to accomplish this, and the idea that we could highlight this in the spec:
|
Beta Was this translation helpful? Give feedback.
-
|
See also OAI/OpenAPI-Specification#859 and OAI/OpenAPI-Specification#3874 ... I should really consolidate these further. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Current
examplesare 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