Questions tagged [springdoc-openapi-ui]
365 questions
7
votes
1 answer
Spring Boot REST API: SpringDoc + OpenAPI 3 (springdoc-openapi-ui) or Swagger2 v3 (springfox-boot-starter)
There are 2 ways to add OpenAPI 3 to a Spring Boot…

Grigory Kislin
- 16,647
- 10
- 125
- 197
7
votes
2 answers
CSRF Support in springdoc-openapi swagger-ui
Is there a way to automatically include a CSRF header to requests made from swagger ui, when using the one bundled with springdoc-openapi?
A similar solution appears to be implemented in springfox (GitHub), but I find no information about whether…

starman
- 356
- 1
- 4
- 11
6
votes
1 answer
Springdoc Openapi - Add Response Example Value
I'm trying to add example response values to my springdoc-openapi swagger documentation.
Like replace the "string" with "Mark Twain" etc.
I tried using this solution - springdoc-openapi: How to add example of POST request?
I'm already using…

Rabin Mallilck
- 431
- 6
- 13
6
votes
0 answers
Spring Boot Openapi composite schema (Inheritance)
I have one abstract class and three other subclass. I would like those three subclasses as example on the Swagger/OpenAPI interface.
But the Swagger/OpenApi interface show just the abstract class and the first subclass…

Pickles Dog
- 155
- 2
- 11
6
votes
3 answers
@Parameter(required = false) not working in swagger open api v3
my project is java spring boot 2 with maven . I use springdoc-openapi-ui dependency. problem is
@Parameter(required = false) not working on my api params.

Bashir Zamani
- 100
- 1
- 2
- 6
6
votes
1 answer
Enable /oauth/token endpoint springdoc-openapi-ui
I'm upgrading from springfox-swagger2 to springdoc-openapi-ui. I use the swagger definitions on the frontend to autogenerate types. The /oauth/token endpoint is missing in springdoc-openapi-ui. This is my…

yasgur99
- 756
- 2
- 11
- 32
6
votes
2 answers
Springdoc GroupedOpenApi not following global parameters set with OperationCustomizer
When using GroupedOpenApi to define an API group, the common set of parameters that are added to every endpoint is not present in the parameters list.
Below are the respective codes
@Bean
public GroupedOpenApi v1Apis() {
return…

Debargha Roy
- 2,320
- 1
- 15
- 34
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
6
votes
1 answer
Default response class in springdoc
I am trying to add a default error model to all endpoints in my API, for some error codes.
I found a partial solution by reading the following issues:
Springfox -> Springdoc: How to expose additional…

pedro_silva
- 143
- 2
- 6
5
votes
1 answer
Spring boot Swagger UI exception at startup
I'm trying to get Swagger UI to work in my project and I'm following these docs, but whatever I try my application instantly crashes with the following exception:
Exception encountered during context initialization - cancelling
refresh…

KittyCat
- 415
- 4
- 9
- 26
5
votes
2 answers
How to annotate DTO so that it shows up in SwaggerUI Schema?
I have a controller with a @RequestBody DTO. I need to show the DTO's schema instead of the default string in the RequestBody Schema in Swagger.
By using @Operation above the API and @Parameter within, I've been able to describe the DTO in two…

81n0n4b1bK
- 51
- 1
- 1
- 3
5
votes
1 answer
springdoc-openapi-webflux-ui issue with java.time.Duration (ISO 8601 duration format)
Swagger documentation display the duration as
"duration": {
"seconds": 0,
"nano": 0,
"zero": true,
"negative": true,
"units": [
{
"dateBased": true,
"timeBased": true,
"durationEstimated": true
…

PRAJIN PRAKASH
- 1,366
- 1
- 15
- 31
5
votes
3 answers
How do I remove "api-resource-controller" from my openapi swagger
I'm currently using the below openapi-ui dependency.
org.springdoc
springdoc-openapi-ui
1.4.4
How to remove the…

shaik fazeel
- 51
- 1
- 3
5
votes
2 answers
How to Customise example value of request body and execute it on swagger-ui with springdoc-open-api
I have created rest webservice using springboot
and added springdoc-open-api for ducumentation of webservice,
Now i have 2 question
1-how to add custom test value into request which displying on swagger-ui document page?
2-how to execute the request…

Rubeena
- 171
- 1
- 3
- 11
5
votes
2 answers
OpenAPI3 show methods based on Basic Authentication via Spring Boot
I added this dependency to my Spring Boot application
org.springdoc
springdoc-openapi-ui
1.4.3
pom.sha512
I then…

trilogy
- 1,738
- 15
- 31