Questions tagged [springdoc-openapi-ui]

365 questions
4
votes
1 answer

Not able to access swagger UI with spring webflux anymore

My springboot webflux application was working and I was able to access swagger ui on url: http://localhost:8080/webjars/swagger-ui/index.html. Note: For me Tomcat initialized with port(s): 8080 (http) POM contains the below dependency …
4
votes
2 answers

Spring Doc Open API shows invalid field name on swagger ui

There is an invalid model shown on swagger UI when there is only one lowercase letter at the beginning of the field name. My Kotlin model: class TrendEvaluationModel( val xAxisValue: Int, val yAxisValue: Int, val customValue:…
4
votes
0 answers

How to set the value null instead of "null" in the example of a schema in Springdoc-openapi?

I am using Springdoc-openapi and have a dto like this: @Schema(title = "Financial Conditions") @JsonIgnoreProperties(ignoreUnknown = true) public class CurrentFinancialConditions { @Schema(title = "Rate", example = "null") …
4
votes
1 answer

Show multiple descriptions for a response code using springdoc-openapi for a spring Rest Api

I am working on a rest api using java spring boot framework, and I tried using springdoc-openapi to generate endpoints documentation, I followed this tutorial and made a documentation, the only problem is when I try to set multiple descriptions for…
Isu
  • 330
  • 1
  • 4
  • 16
4
votes
2 answers

How to ask Swagger UI to add bearer token field for each endpoint globally?

Because of the issue described here I am migrating to Springdoc. And now in Swagger UI I don't have a field for bearer token for each endpoint but it is expected because those endpoints are secured. I have the following configuration: @Bean public…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
4
votes
1 answer

How do I control tag order in Springdoc OpenAPI 3.0?

I'm switching from Springfox 3.0 to OpenAPI 3.0 + Springdoc-openapi. In Springfox the tag order is alphabetical, but in Springdoc's Swagger UI, the order appears to be random. How do I control the Tag order on the UI? I'd prefer an ordering of my…
ScrappyDev
  • 2,307
  • 8
  • 40
  • 60
4
votes
3 answers

How can have springdoc-openapi use the @JsonValue enum format without changing toString?

I have a Spring Boot application using springdoc-openapi to generate Swagger API documentation for my controllers. One of the enums used in the JSON request/response has a different JSON representation than its value/toString(). This is achieved…
M. Justin
  • 14,487
  • 7
  • 91
  • 130
4
votes
1 answer

OpenApi documentation converts byte[] in array of byte[]

I generate a Java class from a YAML file describing the model with openapi-generator-maven-plugin. org.openapitools openapi-generator-maven-plugin 4.3.1
Andrei Ion
  • 41
  • 1
  • 2
4
votes
7 answers

How set default API definition url in openapi?

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…
tatka
  • 301
  • 1
  • 3
  • 9
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…
4
votes
2 answers

How to set description to a field using swagger OpenAPI annotations

To improve our api documentation I want to add a description to a field of a response body as an example see the default petstore spec here: https://editor.swagger.io/ In the POST /pet in the pet response, status has the description "pet status in…
Viktor Baert
  • 686
  • 8
  • 22
4
votes
2 answers

springdoc multiple 404 responses using @ApiResponse (java annotations)

How to create multiple 404 responses (or more broadly, multiple same HTTP code responses) using java annotations. I've tried: @ApiResponse( responseCode = "404", description = "Not Found 1" ) @ApiResponse( responseCode = "404", …
soulshined
  • 9,612
  • 5
  • 44
  • 79
4
votes
1 answer

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webHandler' defined in class path resource

Adding open API to the Spring cloud gateway project cause the error as org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webHandler' defined in class path resource…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
3
votes
1 answer

How to config springdoc-openapi-starter-webflux-ui to enable Authorization/Bearer on protected resources

I'm developing a webflux app containing some public and protected resources. My dependencies: org.springframework.boot
SoT
  • 898
  • 1
  • 15
  • 36
3
votes
2 answers

openapi-generator duplicates the endpoint in swagger-ui

The openapi-generator-maven-plugin (version 6.3.0) is configured as follows in a Spring-Boot 3 application: org.openapitools
1 2
3
24 25