Search code examples
swagger-uispringdoc

How to disable Swagger UI syntax highlighting in Springdoc?


I'm using springdoc-swagger-ui. It is a known issue that Swagger UI is unable to handle large responses, and the suggested workaround is to disable syntax highlighting in Swagger UI.

I tried to add the following configuration in application.yaml for my Spring Boot application but it has no effect. I still see response is highlighted.

springdoc:
  swagger-ui:
    syntax-highlight:
      activated: false

Any leads on how to disable syntax highlighting in Swagger UI using Springdoc configs or application.properties?


Solution

  • Using SpringBoot v2.7.4 and org.springdoc:springdoc-openapi-ui-v1.6.8, I was able to change it by modifying the

    src/main/resources/application.properties

    springdoc.swagger-ui.syntax-highlight.activated=false