I have a requirement to support swagger 2 & 3 in my spring boot API.
I have created swagger 2 using docket object & for swagger 3 just added maven dependency springdoc-openapi-ui
. Able to check swagger 2 & 3 documentation.
how do I disable/enable only swagger 3 or swagger 2? I mean how do I disable swagger 3 configurations?
I don't have swagger 3 configuration class to enable/disable by using @profile
. Just adding springdoc-openapi-ui
maven dependency swagger 3 worked.
Here's the answer copied from this comment
The following property is available since: v1.1.16
springdoc.api-docs.enabled=false This property helps you disable springdoc-openapi endpoints.
If you want to expose the api-docs endpoints without using the swagger-ui, you can use the core dependency:
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-core</artifactId>
<version>1.1.16</version>
</dependency>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With