Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow adding description to Responses #90

Open
adrianlungu opened this issue Mar 22, 2022 · 1 comment
Open

Allow adding description to Responses #90

adrianlungu opened this issue Mar 22, 2022 · 1 comment

Comments

@adrianlungu
Copy link

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.

Screenshot 2022-03-22 at 11 16 20

However, the status and meaning are still replicated, which I'm thinking of taking out and just leaving the description.

@adrianlungu
Copy link
Author

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}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant