I saw a similar answer for Swagger 2.x
here - How do you turn off swagger-ui in production so I was wondering if there is something similar I could do for open API as well? I tried something like :
@Configuration
@Profile("!prod")
public class OpenAPIConfig
{
}
but this doesn't work. Any thoughts/suggestions?
May be you can set the below property in prod yaml,
springdoc.api-docs.enabled=false
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