kommentaar
kommentaar copied to clipboard
Allow adding `description` to Responses
Additional information may be useful (we have some use cases) in the description of the Responses
.
I have some preliminary work in a fork on this where I changed the response
regex to allow adding a description after the type of the response, i.e.
However, the status
and meaning
are still replicated, which I'm thinking of taking out and just leaving the description
.
What do you guys think of this as the ResponseHeader regex ?
^Response( (\d+?))?( \((.+?)\))?: ([^\s]+)?(.\s*?\[((.|\s)*?)\])?
It should keep existing response headers working as previously while allowing to also add Description to the spec as such:
Response 400 (text/plain): {data} [some description
can be written here as multiline allowing
for clarification regarding the meaning of this response
]
Response 401 (text/plain): {empty} [or it can be a oneliner]
Response 402 (text/plain): {empty}