-
Notifications
You must be signed in to change notification settings - Fork 9.1k
feat: add tryItOutEnabled configuration #6865
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: add tryItOutEnabled configuration #6865
Conversation
allow users to set tryItOutEnabled: true to display the "Try it out" section by default
Fixes #6528 |
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.
@kyle-apex Thanks for the PR! Functionally looks good, but let's add a "negative" test, where ?tryItOutEnabled=false
still renders properly and doesn't display an expanded view.
parameter behavior add cypress test for tryItOutEnabled=false
…m/kyle-apex/swagger-ui into ft/2805-try-it-out-default-expand
run lint-fix to correct formatting issues
@tim-lai Thanks for the tip. As it turns out, setting tryItOutEnabled=false behaved as if it was true. I fixed the issue for this configuration; however, it's worth mentioning as a future to-do that the previously existing boolean parameter configurations (ex: displayRequestDuration, displayOperationId) would fail the ?parameter=false test. |
@kyle-apex Thanks, good to know about other cases for future PR(s). I made a commit suggestion, to explicitly check for "true". |
update tryItOutEnabled to take === "true" for the query string value or === true if someone implements query string type parsing in the query
@kyle-apex PR merged! Thanks for the contribution! |
@tim-lai Thanks for your help and patience on my first submission! |
Hi, when is this going to be released? And will it be controlled only in URL? Or can it be propagated from Spring config YAML? |
@OndraZizka I think it can be configured via all available config options. |
Hi, I'm using the latest |
allow users to set tryItOutEnabled: true to display
the "Try it out" section by default
Motivation and Context
Addressed #2805
How Has This Been Tested?
Ran in browser by setting ?tryItOutEnabled=true
Added Cypress test.
Checklist
My PR contains...
src/
is unmodified: changes to documentation, CI, metadata, etc.)package.json
)My changes...
Documentation
Automated tests