-
-
Notifications
You must be signed in to change notification settings - Fork 554
Closed
Labels
incompleteincomplete description: Make sure you Provide a Minimal, Reproducible Example - with HelloControllerincomplete description: Make sure you Provide a Minimal, Reproducible Example - with HelloController
Description
Describe the bug
Per #358 , I expected the disabling of /api-docs url to be disabled since I am hosting my own swagger file at the UI however , the disable functionality is not working and it still shows auto generated swagger file on /v3/api-docs , I am trying to disable it however it does not seem to respond to my config changes. I have added an example below.
To Reproduce
Steps to reproduce the behavior:
- What version of spring-boot you are using? - 2.7.5
- What modules and versions of springdoc-openapi are you using? - 1.6.12
- What is the actual and the expected result using OpenAPI Description (yml or json)? - The url is still hosting the auto generated swagger
My spring config ->
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/swagger-ui/").setViewName("forward:/swagger-ui/index.html");
registry.addRedirectViewController("/swagger-ui", "/swagger-ui/");
registry.addViewController("/api-docs").setViewName("forward:/v3/api-docs");
}
@Bean
SpringDocConfigProperties springDocConfigProperties() {
SpringDocConfigProperties docConfigProperties = new SpringDocConfigProperties();
docConfigProperties.getApiDocs().setEnabled(false);
return docConfigProperties;
}
}
My yaml config ->
springdoc:
swagger-ui:
url: /swagger.yaml
Expected behavior
- the disable api-docs feature is not working , it still shows an autogenerated swagger when I am providing one myself in resources static folder.
Screenshots
None
ilya40umov
Metadata
Metadata
Assignees
Labels
incompleteincomplete description: Make sure you Provide a Minimal, Reproducible Example - with HelloControllerincomplete description: Make sure you Provide a Minimal, Reproducible Example - with HelloController