0

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?

linuxNoob
  • 504
  • 10
  • 23

1 Answers1

3

May be you can set the below property in prod yaml,

springdoc.api-docs.enabled=false