Skip to content

Documenting return properties in openapi3 emitter #3074

Answered by timotheeguerin
LadyCailin asked this question in Q&A
Discussion options

You must be logged in to vote

I do think we cannot do that today inline as you want, you have 2 options:

  1. Create a seperate response model and the doc on the model will be used on the repsonse
  2. Use @returns/@errors doc comment tags(or @returnsDoc, @errorsDoc decorators) to specify the doc for success and error cases. However those will be providing the doc for all success and all errors respectively so if you want more granular doc you'll have to go with option 1

Playground Example

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by LadyCailin
Comment options

You must be logged in to vote
1 reply
@timotheeguerin
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants