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

Document tryItOutEnabled parameter #3678

Closed
f3l1x opened this issue Sep 18, 2017 · 9 comments
Closed

Document tryItOutEnabled parameter #3678

f3l1x opened this issue Sep 18, 2017 · 9 comments

Comments

@f3l1x
Copy link

f3l1x commented Sep 18, 2017

Q A
Bug or feature request? Feature
Which Swagger/OpenAPI version? dev-master
Which Swagger-UI version? dev-master
How did you install Swagger-UI? Manually
Which browser & version? Chrome
Which operating system? OSX

Hi.

We would like to enable try-it-button, but there's no info in README.

I have to figure that out, there is an option tryItOutEnabled you should place to your config.

Should I prepare PR?

@webron
Copy link
Contributor

webron commented Sep 18, 2017

I don't follow, the try it out button is enabled by default. What are you looking for?

@jjohs
Copy link

jjohs commented Sep 20, 2017

Per https://github.com/swagger-api/swagger-ui/blob/master/docs/version-detection.md, try it out is not enabled by default.

I am using swagger-ui v3.2.1 and binding to OpenApi spec v3.0, and the try it out button is not displaying. Are there v3.0 spec requirements/properties that must be set in order for try it out button to render?

UPDATE: after deploying our app that is hosting swagger-ui to the remote host, the server drop-down and try it out buttons are now displaying. Running locally, it is hidden

@webron
Copy link
Contributor

webron commented Sep 26, 2017

@jjohs there are two separate things. The 'try it out' not being enabled by default - I need to reword that - what I meant there was that the try it out is a two-step process. Clicking the button opens up the form, and only then you can execute the call.

In 3.1, when we introduced OAS3 support, the try it out functionality was just not available to OAS3 at all - it wasn't just 'disabled', it didn't even show the button. In 3.2 that has changed. If you're using 3.2 and you're seeing weird behavior - please file a separate ticket with details to help us investigate.

@L-Key
Copy link

L-Key commented Sep 27, 2017

I'm using the latest version and the "try-it-out" button is enabled by default. How do I disable it?

@webron
Copy link
Contributor

webron commented Sep 27, 2017

@L-Key that option is not available yet. See #3314.

@curtisdf
Copy link

curtisdf commented Oct 7, 2017

I see a number of references to a tryItOutEnabled option in the source code, but when I add tryItOutEnabled: false into my const ui = SwaggerUIBundle({ ... }); declaration, it seems to have no effect: the Try It Out buttons still appear.

@shockey
Copy link
Contributor

shockey commented Oct 7, 2017

@curtisdf, good thought, but tryItOutEnabled is an internal prop that is shared between a few of Swagger-UI's components, not a configuration option 😄

@webron
Copy link
Contributor

webron commented Oct 9, 2017

Closing as there's nothing to document at the moment.

@webron webron closed this as completed Oct 9, 2017
@curtisdf
Copy link

curtisdf commented Oct 9, 2017

Thanks for the clarification, @shockey. I understand.

@lock lock bot locked and limited conversation to collaborators Jul 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants