question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable "try it out" button in springfox 2.8

See original GitHub issue

I know that there are many questions on the way to disable try it out button, but I don’t know how to disable it on version 2.8. I try version 2.7 with this source code and it seems ok

@Bean
UiConfiguration uiConfig()
{
    return new UiConfiguration( null, UiConfiguration.Constants.NO_SUBMIT_METHODS );
}

From my understand, version 2.8 will use UiConfigurationBuilder instead of UiConfiguration, but I didn’t see the method that use to disable the button. Thank you for the reply.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

11reactions
loep85commented, Sep 28, 2018

I use this one with Springfox 2.9.2:

@Configuration
public class SwaggerDocumentationConfig {
    @Bean
    public UiConfiguration tryItOutConfig() {
        final String[] methodsWithTryItOutButton = { "get" };
        return UiConfigurationBuilder.builder().supportedSubmitMethods(methodsWithTryItOutButton).build();
    }
}
1reaction
plmpradeepcommented, Jan 3, 2019

I’m using spring fox 2.8.0. Can someone please help me on how to disable try it out button for all operations except get. (I don’t want to upgrade to 2.9.2).Thanks!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Fox (Swagger-UI) 2.9.2 How to disable the 'Try it out ...
In my Java class, I am doing something like below in an attempt to disable the button, and none of the properties I...
Read more >
Springfox Reference Documentation - GitHub Pages
Springfox works by examining an application, once, at runtime to infer API semantics based on spring configurations, class structure and various ...
Read more >
docs/release-notes.md · serv/springfox - Gitee.com
2.9.2 Release Notes. This is mostly a service release. Predominantly to publish the repository to maven along with minor improvements ...
Read more >
Can "try it out" be disabled/hidden from online editor
Solved: Was curious to know if there is a way to totally hide "Try it now" feature from the documentation?
Read more >
Spring Boot RESTful API Documentation with Swagger 2
However, the best practices on how you document your API, its structure, ... json-path. test. io.springfox. springfox-swagger-ui. 2.8.0.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found