Questions tagged [springdoc-ui]
27 questions
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
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
6
votes
3 answers
Springdoc OpenAPI ui does not honor context-path in "location"
Setup:
I am using the Java library springdoc-openapi-ui in version 1.4.0 (via Maven) without any customization in a simple spring-boot project.
The Swagger page is generated under
https://my-url.com/my-context-path/swagger-ui/index.html
and the…

schrobe
- 767
- 2
- 8
- 29
5
votes
6 answers
Swagger declaration schema = @Schema(implementation = Map.class) represents Schema as String in swagger-ui
I am trying to create springdoc swagger documentation, and I would like to represent a request body having data type Map in a better readable way for clients. But when I declare…

Prasanth Rajendran
- 4,570
- 2
- 42
- 59
4
votes
1 answer
springdoc-openapi how to display an array of strings as a response
There are no good examples out on the web of how to get the following output using the springdocs-openapi library (1.5.7). I'm looking to get the following output:
[
"A", "B", "C"
]
This is the code based on what examples are…

StevenPG
- 311
- 4
- 16
3
votes
1 answer
SpringDoc Open API using springdoc-openapi-ui vs springdoc-openapi-webmvc-core
Trying to implement spring doc for my microservices at the Spring cloud gateway level.
Came across these two dependencies. Want to know
what is the difference between
springdoc-openapi-ui vs springdoc-openapi-webmvc-core
and
springdoc-openapi-ui…

rolling stone
- 543
- 1
- 8
- 26
2
votes
1 answer
How to hide endpoints based on Profiles in Spring Boot and Spring doc?
I am working on Spring Boot v2.2.2.RELEASE and SpringDoc UI and Open API Specification OAS3 and I found very related question here: https://github.com/springdoc/springdoc-openapi/issues/201.
I've 4 Profiles say Dev, Stage, UAT and Prod and say I've…

Jeff Cook
- 7,956
- 36
- 115
- 186
2
votes
2 answers
Adding Actuator as a groupedOpenApi
Could we add Actuator endpoints as a groupedOpenApi that will be gourped separately ?
ex :
@bean
public GroupedOpenApi actuatorApi() {
return…

Yawyaw1
- 83
- 1
- 8
1
vote
1 answer
After upgrade to Spring Boot 3 Swagger UI is not accessable
I had a Spring Boot 2.7.6 app with Spring Security 5.7.5 running without problems: authentication works, I navigate through the different pages according to roles, Swagger UI is usable, etc. I don't have a deprecated warning for your information.
I…

Nicolas
- 61
- 8
1
vote
2 answers
How to add headers when redirecting to an external url in angular
I have an angular 9 application + spring service which are authenticated against keycloak. The problem is that i want to open the spring swagger link in a new tab from the angular ui. Currently I am trying to add the bearer token to the…

Alexander Mladzhov
- 545
- 8
- 31
1
vote
1 answer
Springdoc endpoints doesn't show up
Hello I have built a project in Thymleaf and wanted to generate the API documentation with swagger.
But for some reason I can't explain, only endpoints annotated with @Rquestboy are documented.
Does anyone have any idea where this might be?
enter…

Sniphs
- 35
- 4
1
vote
1 answer
swagger url problem with springdoc-openapi
This is not the story of springfox
This is the story of springdoc -openapi.
my current dependency
org.springdoc
springdoc-openapi-ui
…

powpow
- 35
- 1
- 5
1
vote
2 answers
Spring Boot OpenAPI 3 with Spring Data REST
I'm failing at documenting my Spring Data REST API with OpenAPI. Nothing show in swagger-ui's homepage (and /v3/api-docs obviously).
Here is an excerpt from my dependencies:
org.springframework.boot
…

Thomas Escolan
- 1,298
- 1
- 10
- 28
1
vote
1 answer
Hide a method in springdoc-openapi based on a condition
We are working on a spring boot project which uses the springdoc-openapi library to generate the swagger document. We have a requirement where we need to hide a few of the APIs in a controller.
Spring boot does provide a way to hide/show a…

Vikram Jain
- 376
- 2
- 12
1
vote
1 answer
Springdoc with multiple api-docs
I want to group three API docs in one swagger-ui. I use Springdoc. Each of the three API-docs has its own url. (They are not in the same project).
Is there a way to do this?
Edit: It's now working this way:
springdoc:
swagger-ui:
path: /
…

Iori Yagami
- 387
- 1
- 3
- 18