-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
specify RESPONSE codes #16
Comments
I think it is a great ideia! |
I'm thinking of ways to implement this. Perhaps something like this could work: <!-- RESPONSE 200 -->
<!-- ENDRESPONSE -->
<!-- RESPONSE 401 -->
<!-- ENDRESPONSE -->
and for backwards-compatibility:
<!-- RESPONSE -->
<!-- ENDRESPONSE --> a regular expression could match either of these and capture both the example response and the status code |
Good news, everyone! I've added support for this :) You can have as many responses as you want now and you can also specify the status code for each and every one of them! The old The color of the header and the border will indicate the type of request:
Here's what it looks like in action: The description of the new section in the demo looks like this:
Hope you guys find it useful and if you have any questions or suggestions, feel free to comment on this issue! |
Great! I loved it and really appreciate that. But I have one recommendation here. For API, most of the requests are,
Did you get my point? I've just got 3 colors so far you know. Instead of getting the colors programmatically from the specified status code, you can make those variables (blue, green, brown, orange, red, etc) user-defined. Something like this,
In that way, users will have more freedom. 🙂 |
Hey guys, first of all thanks for the awesome documenter! I have a question, where do i put this tags with the response to show the block in my documentation? Is it in the json archive? In the docs in insomnia before exporting? I couldnt find where i put the tags, every place i tried it didnt work. Thanks for the help!
|
Even though this is a bit late. For whoever's wondering where to put the example responses. |
To document example response, we rely with the tags:
<! --RESPONSE -->
<! -- ENDRESPONSE -->
However, we may add specific responses, like 200 response, 401 response, 404 response.
Is it possible to add custom tags like:
The text was updated successfully, but these errors were encountered: