Questions tagged [springdoc-openapi-ui]
365 questions
25
votes
7 answers
springboot swagger3 "Failed to load remote configuration."
Spring Boot 2.6.3 with Springdoc.
org.springdoc
springdoc-openapi-ui
1.6.5
In applicaton.yaml, when I set…

QiangLi
- 251
- 1
- 3
- 3
22
votes
9 answers
Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.getPatterns()" because "this.condition" is null
I'm trying to run Springdoc with Spring Boot 2.6.7.
Configuration:
@Configuration
public class SwaggerConfiguration {
@Bean
public GroupedOpenApi publicApi() {
return GroupedOpenApi.builder()
.group("springshop-public")
…

Peter Penzov
- 1,126
- 134
- 430
- 808
19
votes
6 answers
Wrong "Generated server url" in springdoc-openapi-ui (Swagger UI) deployed behind proxy
Spring Boot 2.2 application with springdoc-openapi-ui (Swagger UI) runs HTTP port.
The application is deployed to Kubernetes with Ingress routing HTTPS requests from outside the cluster to the service.
In this case Swagger UI available at…

Eugene Khyst
- 9,236
- 7
- 38
- 65
18
votes
5 answers
petstore URL not disabled in SpringDoc OpenAPi
I am using SpringDoc 1.4.3 for swagger. I have added the below configuration to disabled the petstore URLs in application.yml
Configuration
springdoc:
swagger-ui:
disable-swagger-default-url: true
tags-sorter: alpha
operations-sorter:…

SSK
- 3,444
- 6
- 32
- 59
14
votes
4 answers
Swagger UI redirecting to /swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config
I am using springdoc-openapi-ui, when I hit http://localhost:8080/swagger-ui.html URL it is always redirecting to http://localhost:8080/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config. Is there any way to stop this redirect and load…

SSK
- 3,444
- 6
- 32
- 59
12
votes
2 answers
springdoc-openapi-ui add JWT header parameter to generated swagger
In my spring boot app I have endpoints which are validated by header parameter in my springboot app.
Current swagger json looks like this:
// part of current swagger.json
...
"paths": {
"/path1/{param1}": {
"get": {
"parameters":…

makozaki
- 3,772
- 4
- 23
- 47
12
votes
3 answers
How to add Header with Authorization for springdoc-openapi endpoint calls
Swagger2 (springfox) worked with:
@Bean
public Docket getDocket() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.withClassAnnotation(RestController.class))
…

akudama
- 121
- 1
- 1
- 5
11
votes
4 answers
springdoc-openapi: How to add example of POST request?
Have the following method of Controller:
@ApiResponses(value = {@ApiResponse(responseCode = "200")})
@GetMapping(value = API_URI_PREFIX + PRODUCTS_URI, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(HttpStatus.OK)
…

user471011
- 7,104
- 17
- 69
- 97
10
votes
7 answers
Invalid mapping pattern detected: /**/swagger-ui/**
I am using springdoc-openapi-ui for spring boot API documentation and facing the following issue -
I have added all the necessary configuration as follows -
The maven dependency -
org.springdoc
…

Babita Bisht
- 385
- 1
- 4
- 18
9
votes
4 answers
Springdoc Swagger UI not using swagger-config
need some help with springdoc-openapi-ui!
I am using springdoc-openapi-ui to render my API schema. This is the version details of it.
Now, i have done some configuration in my spring boot application like below
Now, i was expecting that when i hit…

Arpit Agrawal
- 1,180
- 1
- 10
- 21
8
votes
3 answers
I have installed OpenAPI 3 using springdoc, but the URL is strange. Can I change it to the expected value?
I have installed swagger-ui using the following artifacts in my Java project's pom file:
org.springdoc
springdoc-openapi-ui
1.5.2
…

Dave
- 185
- 1
- 3
- 13
8
votes
2 answers
Failed to connect to MBean server at port 9001: Could not invoke shutdown operation:
Getting error on mvn clean install, trying to generate openapi.json for openAPI spec
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.3.0.RELEASE:start (pre-integration-test) on project abcd: Cou
ld not figure out…

Emilia
- 81
- 1
- 4
8
votes
2 answers
Swagger OpenAPI 3.0 - Springdoc - GroupedOpenApi not working in Spring MVC
My Application is Sping MVC not boot.
I'm using springdoc-openapi-ui 1.4.4
also, I added the following imports to one of my @configuration class;
org.springdoc.core.SpringDocConfigProperties.class,…

onlykalu
- 260
- 2
- 5
- 7
8
votes
1 answer
How to sort the Schemas on Swagger-ui SpringDoc open ui
I want to sort my Schemas generated for my Entity classes, DTO classes in Springdoc UI.
I am able to sort the tags and operations using the below configuration in yml file but my schemas are not in the sorted order.
springdoc:
swagger-ui:
…

SSK
- 3,444
- 6
- 32
- 59
7
votes
1 answer
How to hide "Schema" from "response" and "Request body" using OpenAPI 3 in Spring Boot?
Is there any way to hide Schema from the Responses and Request body parts? We only need to show Example Value. We use OpenAPI 3.
Dependency:
org.springdoc
springdoc-openapi-ui
…

M123
- 1,203
- 4
- 14
- 31