-
Notifications
You must be signed in to change notification settings - Fork 284
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
feat(curl): optionally display cURL snippet before try #851
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see only showSnippet
attribute being added, but don't find the code which is using it.
Can you re-check the PR on your end
also if you are modifying the PR, can you rename the attribute showSnippet
to showCurlBeforeTry : true | false
.
All our attributes starting with show-
or allow-
are of boolean type
fb1c411
to
248c8ac
Compare
Sorry I messed with splitting my branch by commits. I just pushed force the changes, taking into account your feedbacks. It is all fixed now. |
I see that you have changed the attribute name to |
I am not sure why you don't see changes but they are visible here https://github.com/rapi-doc/RapiDoc/pull/851/files, this is mainly
|
Hi @mrin9, Sure I can revert the text wrapping to the previous behavior. |
Thanks for contributing to include this awesome feature, also nice work to update documentation and fix some of the typos in code !!! |
Need this feature. When will it be available for general use? |
@guideloom the attribute to set to true is |
@sroucheray |
Yes, that's exactly it. Would be great to just have the "curl" example showing, without the try button. I had assumed by using the following combination of options that this would be achievable:
However, it seems the curl display is completely dependent of "allow-try" being set to true. |
@guideloom I suggest you open a new ticket for that for better discussions (I am not the maintainer though :) ). |
This PR had the capability to show cURL snippet before clicking on the TRY button.
show-snippet
to the component accepting as a valuedefault
|before-try
When setting
before-try
the cURL snippet box is displayed after the request body and before the response. In this case the cURL tab in the response is not shown.The cURL snippet is updated when user changes values in forms.