I want set default scheme by url /v3/api-docs/, but there are empty url and error "No API definition provided.".
Which settings properties I should use?
Current code in project:
application.properties
springdoc.swagger-ui.disable-swagger-default-url=true
springdoc.swagger-ui.use-root-path=true
SwaggerConfig.java
@Configuration
public class SwaggerConfig {
@Bean
public GroupedOpenApi applicationApi() {
String packagesToScan[] = {"ru.vetrf.ecert.web.application"};
return GroupedOpenApi.builder()
.group("application")
.pathsToMatch("/rest-api/application/**")
.packagesToScan(packagesToScan)
.build();
}
@Bean
public OpenAPI eCertOpenAPI() {
return new OpenAPI()
.info(new Info().title("ECert API")
.description("ECert API")
.version("v1.0.0"))
;
}
}
pom.xml
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.5.9</version>
</dependency>


For all upgrade to swagger-ui 4.1.3, pls check below:
https://github.com/swagger-api/swagger-ui/releases/tag/v4.1.3
Note: to re-enable the functionality of reading config params from URL, set new queryConfigEnabled core parameter to true. More info in documentation.
This Configuration worked for me. @tatka
springdoc.swagger-ui.disable-swagger-default-url=true
springdoc.swagger-ui.urlsPrimaryName=myGroup
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