Search code examples
javaspring-bootswagger

Swagger Operation_ID Issue


I actually want to display the operation_Id field that is provided by JSON in my Swagger-UI and for this particular case we are using customize Swagger-ui.html file and below are the approaches I have Used.

  • set displayOperationId: true in swagger-ui.html
  • declare bean for UI coonfiguration in swagger config java file

    @Bean
    UiConfiguration uiConfig() {
      return UiConfigurationBuilder.builder() 
          .deepLinking(true)
          .displayOperationId(true)
          .defaultModelsExpandDepth(1)
          .defaultModelExpandDepth(1)
          .defaultModelRendering(ModelRendering.EXAMPLE)
          .displayRequestDuration(false)
          .docExpansion(DocExpansion.NONE)
          .filter(false)
          .maxDisplayedTags(null)
          .operationsSorter(OperationsSorter.ALPHA)
          .showExtensions(true)
          .tagsSorter(TagsSorter.ALPHA)
          .validatorUrl(null)
          .build();
    }
    

    above bean, the approach is working fine for default swagger-UI.html, but not working on custom swagger

any help related to this is appreciated


Solution

  • closing as there is no further investigation on same.