-
Notifications
You must be signed in to change notification settings - Fork 9k
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: request snippets plugin #6910
feat: request snippets plugin #6910
Conversation
3a7b55e
to
b7ca9dd
Compare
b7ca9dd
to
d4efcf7
Compare
0e194db
to
d6c8e19
Compare
failing due to webpack |
@mathis-m I think this is a great feature. Some comments:
|
@tim-lai |
the old curlify is not cleaned. So bundle size will be reduced by 5.97 KB + x for jsx. |
@tim-lai what do you think of creating group by eg. ( cURL > bash | powershell | cmd, node.js > native | node-fetch, powershell > Invoke-WebRequest | Invoke-RestMethod | HttpClient from .Net Namespace) |
Not sure I understand the question... can you clarify/rephrase the question? Thanks! |
Ok, thanks. In a separate PR, I am inclined to bump the bundlesize limit by a small amount. |
I thought it might look better if we add the opportunity to group several request snippets under a drop-down menu. cURL
Node
|
I think adding dropdowns at this time adds additional ux considerations. So for now, I suggest keeping a flat tab menu. |
f19d652
to
f1e5cb8
Compare
Signed-off-by: mathis-m <mathis.michel@outlook.de>
f1e5cb8
to
4427f02
Compare
@tim-lai
Should we add tests for new snippet generator functions(curl powershell, curl cmd, nodejs native)? |
4427f02
to
90f0ef9
Compare
Signed-off-by: mathis-m <mathis.michel@outlook.de>
Signed-off-by: mathis-m <mathis.michel@outlook.de>
836f7ff
to
62a9551
Compare
Signed-off-by: mathis-m <mathis.michel@outlook.de>
From documentation perspective, would it be possible to post a complete working example configuration or step by step recipe to demo how to enable
|
Have a look at swagger ui docs Tested is working. |
Description
Swagger ui internally stores the body some times as string e.g. when application/json.
If this is the case and the stored string is parsable to a JSON object or array it will use the parsed version for the request.
This sounds little bit weird so I removed the util and conditional path to parse the input, before creating the request.
This is to ensure that the user entered request body is NEVER overridden with the parsed value of itself.
I have refactored
curlify.js
to a snippets plugin (#6256):mmwkQVxRhq.mp4
TODO:
add tests for snippet plugin clean curlify leftovers.
Default Configuration for plugin:
Motivation and Context
Fixes #6908
Fixes #6256
How Has This Been Tested?
Screenshots (if appropriate):
Checklist
My PR contains...
src/
is unmodified: changes to documentation, CI, metadata, etc.)package.json
)My changes...
Documentation
Automated tests