398 questions
1
vote
1
answer
65
views
CSRF acting strange with springdoc in stateless service
Let's consider that I have a stateless service with an authentication mechanism that makes the browser automatically send the credentials which then makes even a stateless service vulnerable. I want ...
0
votes
1
answer
91
views
ClassNotFoundException: org.springframework.web.servlet.resource.LiteWebJarsResourceResolver when running Spring Boot 3.3 best practices recipe
I am running org.openrewrite.java.spring.boot3.SpringBoot33BestPractices recipe of OpenRewrite on a Spring Boot v3.3.8 project that uses SpringDoc Api v2.6.0. OpenRewrite is upgrading correctly the ...
0
votes
1
answer
49
views
Specifying schema attributes descriptions
Can I describe schema attributes somehow, similar to how I can describe request parameters? In my case, I want to tell the clients that identifier means either a username, email, or phone. Obviously, ...
1
vote
1
answer
116
views
springdoc.swagger-ui.path property doesn't generate corresponding endpoint
It's extremely weird. I made no changes at all, and now suddenly spring-doc Swagger UI doesn't work.
First, I had this error.
Then, after updating the version of the artifact from 2.6.0 to 2.8.8, I ...
0
votes
1
answer
46
views
exclude spring-boot @AuthenticatedUser argument from swagger ui mask?
We have an old service that used to run on an older spring-boot version and springfox-swagger-ui. Everything worked fine there.
Since we've upgraded to spring-boot 2.7 and springdoc-openapi-ui 1.8.0, ...
0
votes
0
answers
12
views
Springdoc Mobile Compatibility
I have started using springdoc in java.
Everything works as expected but if i load the the webpage on mobile it is not compatible. The proportions do not look correct. I have investigated the ...
0
votes
0
answers
273
views
Springdoc Swagger UI 404 Issue with Version 2.5.0 and 2.8.6
I’m facing an issue with Springdoc in my Spring Boot app and could use some help. Here’s the situation:
When I use Springdoc version 2.5.0, everything works fine until I add a @ControllerAdvice to my ...
0
votes
0
answers
56
views
Spring Boot Maven Plugin does not pickup test properties or ansible properties for integration tests
I am trying to run openapi springdoc for my application for which I am using
<groupId>org.springdoc</groupId>`
<artifactId>springdoc-openapi-maven-plugin</artifactId>`
<...
0
votes
1
answer
158
views
Set up OpenAPI (Swagger) UI 3 in Spring Framework 6
Tried a few suggestions in existing stackoverflow discussions but I can't even get the html page to serve, and almost all information on the web uses Spring Boot instead, does anyone have an article, ...
0
votes
0
answers
89
views
I am using SpringDoc, version <= 2.6.0 with Spring Boot 3.x and getting following error while accessing http://localhost:8080/v3/api-docs
I am using SpringDoc, version <= 2.6.0 with Spring Boot 3.x and getting following error while accessing http://localhost:8080/v3/api-docs
There was an unexpected error (type=Internal Server Error, ...
0
votes
1
answer
277
views
Spring Boot: Combine multiple applications SwaggerUI?
Having about 6 Spring Boot applications with REST APIs running with Actuator and Prometheus support.
These are running on Docker, but the actuator port is not exposed.
Although we can connect each ...
0
votes
1
answer
1k
views
SpringDoc 2.8.0: Failed to introspect Class [SwaggerConfig] - IllegalStateException
After updating SpringDoc to version 2.8.0, my Spring Boot application fails to start with the following error:
Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springdoc....
0
votes
0
answers
20
views
Point Springdoc Swagger-UI to customized YML
Having moved to springdoc openapi, the generated UI was very much different and not as comfortable. I'm currently working with a base.yml that creates several tags without their operations. Base.yml ...
3
votes
0
answers
44
views
How to display in swagger dynamically registered routes in a java webflux applicaiton?
I am creating a demo applicaiton where I register my endpoints dynamically using an endpoint registrar based on controller beans I have instanciated. Thus there are no annotations for the spring-doc ...
0
votes
1
answer
579
views
OpenApi maven-plugin-generator attributes error
I'm using SpringBoot 3.4.1, Java 21 and I'm trying to generate Spring server classes (Api plus Model).
I have this maven config on the generator project module:
<dependency>
<groupId>...
1
vote
1
answer
250
views
Unable to disable POST methods in Springdoc swagger UI
I am using springdoc UI to generate the documentation of my Java API and want to disable the try it out button (which should actually be the default behavior according to the docs)
I have tried both:
...
0
votes
0
answers
43
views
Recursively defined collection fields are omitted in superclass generated api doc
Recursively defined collection fields are omitted in superclass generated api doc.
i think similar to this issue 'https://github.com/springdoc/springdoc-openapi/issues/1158'.
Here is my code.
@Data
...
0
votes
1
answer
192
views
Omit super class fields in spring doc open api docs
I'm on java 8, spring-boot 1.5.1 release and I've got the dependency
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
...
0
votes
0
answers
94
views
Swagger UI giving 404 error with Springboot2
I'm migrating a springboot 2.7.18 application from springfox-swagger to springdoc-openapi.
Did configuration and added properties etc., but getting the below in catalina logs when trying to access /...
43
votes
2
answers
22k
views
Springdoc: ClassNotFoundException: org.springframework.web.servlet.resource.LiteWebJarsResourceResolver
I've just upgraded springdoc from version 2.6.0 to 2.7.0 (nothing else was changed) and now I get a
ClassNotFoundException: org.springframework.web.servlet.resource.LiteWebJarsResourceResolver
I'm ...
0
votes
0
answers
77
views
Open API definition empty with Sprint boot 3 and spring security
I have setup a spring boot project using spring boot version 3.3.5 and added springdoc version 2.6.0, this project also includes spring security and my Security config is as follow:
@Bean
public ...
0
votes
1
answer
202
views
Springdoc with Boot 3, no explicit OpenAPI bean declaration
I have trouble creating Swagger/Open API endpoints for my app. There was a previous app where such an endpoint was created automatically. I want to avoid explicitly declaring an OpenAPI bean. My ...
1
vote
2
answers
259
views
A very specific spring boot actuator / swagger integration question
I'm launching my springboot webapp and navigating to localhost/api/myservice/swagger-ui/index.html, but getting a 401 Unauthorized. I've done all the usual things from now countless answers on SO, but ...
0
votes
0
answers
791
views
Swagger why is #/components/schemas/ missing for some of my $ref?
I'm generating an OpenAPI spec using org.springdoc:openapi-gradle-plugin:1.9.0 and org.springdoc:springdoc-openapi-ui:1.8.0 in a project using Boot 2.
All of the referenced schemas are defined at the ...
0
votes
1
answer
80
views
SwaggerUI with SpringDoc not converting multi value parameter
We recently migrated our application from Spring Boot 2.x to Spring Boot 3.x and replaced springdoc-openapi-ui dependency with springdoc-openapi-starter-webmvc-ui.
After this migration, Swagger UI for ...
1
vote
0
answers
78
views
Compatable Springdoc openapi ui version with spring 5.2.0.RELEASE
My project dependencies are here
<log4j.version>1.2.17</log4j.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler....
2
votes
3
answers
3k
views
No static resource swagger-ui/index.html with springboot 3.2.10 and springdoc-openapi 2.2.0
Unable to load swagger UI and getting the below error after upgrading to spring boot 3.2.10 and springdoc-openapi-starter-webflux-ui 2.2.0 :
org.springframework.web.servlet.resource....
0
votes
1
answer
488
views
Springdoc apidocs display yaml by default instead of json
I have a Spring Boot 3.x application using Springdoc to generate Swagger and OpenAPI documentation. When I access /api-docs, it returns the schema in JSON format. To get the YAML format, I have to ...
0
votes
1
answer
362
views
OpenAPI Generator Maven Plugin: How to generate Tags and Servers from OpenAPI YAML into SpringDocConfiguration?
Given the following OpenAPI YAML extract ...
openapi: 3.0.3
info:
title: Customer API
description: |
Through this API, the platform can communicate with the application which manages customer ...
0
votes
1
answer
113
views
Spring Cloud Gateway API exposure of united OpenAPI specification
Our application use microservice architecture and we use Java/Spring for the implementation. Recently we started the integration with other systems. The requirement is to provide an OpenAPI ...
0
votes
0
answers
55
views
openapi dependency is not getting resolved in spring boot3
I have the below pom.xml with spring-boot-3.2.0 and spring-doc open-api-2.6.0. The dependency is not getting resolved from maven central. Is there something that I am missing here?
<parent>
...
1
vote
0
answers
936
views
upgrading OpenAPI 3.1 causes generator and swagger problem for query parameters
`We tried to upgrade our openapi version from 3.0.3 to 3.1.0.
But we faced issues that swagger ui does not render query parameters as object style.
We use:
<java.version>17</java.version>
...
0
votes
0
answers
126
views
Swagger springdoc-openapi-ui dependency throwing 'Not Found' error
I am working on a Spring project 5.3 version (not spring boot) with Java 11 and I tried to include springdoc-openapi-ui dependency and created an OpenApiConfig class and this project uses spring ...
0
votes
0
answers
138
views
swagger ui not generated using WebFluxConfigurer
I am upgrading spring boot version 2.x to 3.x with Java 17. The swagger OpenApi that is generated is unusable as follows:
<!-- HTML for static distribution bundle build --> <!DOCTYPE html> ...
1
vote
1
answer
867
views
Is springdoc-openapi-gradle-plugin compatible with id("org.springframework.boot") version "3.2.5"?
I'm trying to use springdoc-openapi-gradle-plugin to generate OpenAPI documentation on my Spring Boot app. However it does not seem to work.
I've added to application-test.yml:
(...)
oauth:
...
1
vote
0
answers
781
views
spring 3 with springdoc 2 - Failed to load remote configuration
I'm using spring boot 3.2.5 with org.springdoc:springdoc-openapi-starter-webflux-ui:2.5.0 to power a simple API based on the OpenAPI spec.
My API is running fine (at /api/v1/mystuff), but when I try ...
0
votes
2
answers
463
views
Hosting swagger-ui behind nginx proxy
we have a setup where we have deployed springdoc-openapi-starter-webmvc-ui with Spring Boot 3.1.5. The spring boot server is running on port 8080. We have setup nginx so that all requests that start ...
0
votes
1
answer
489
views
Springdoc OpenAPI -No operations defined in spec
I am migrating my project from swagger to springdoc openapi and seeing the following error when I use swagger-ui/index.html endpoint:
My POM file:
<dependency>
<groupId>org....
0
votes
1
answer
689
views
How does Swagger UI create default request body JSON?
I have a Spring Boot application with configured OpenAPI and able to show the Swagger UI. I see all the endpoints with all the supported HTTP verbs in that UI and many of those endpoints have example ...
0
votes
0
answers
494
views
Swagger schema not generating securitySchemes under components
I am generating openAPI schema but it is not generating securitySchemes eventhough I added relevent code in my spring boot application.
As you can see below, the JSON section under compoments is not ...
2
votes
0
answers
854
views
springdoc-openapi-ui doesn't work with an application using Spring 6 and not Spring Boot
Recently, I have upgraded my application from Spring 5 to Spring 6. I am not using Spring Boot in my application due to legacy issues.
For API documentation, I was using SpringFox earlier but after ...
1
vote
2
answers
1k
views
Springdoc Whitelabel Error Page with Spring V3
I'm trying to get swagger to run in my spring boot project. I'm currently using the spring verion 3.1.9. I looked up so many guides that told me to just add implementation "org.springdoc:...
2
votes
1
answer
1k
views
Mark OpenAPI schema enum value as deprecated
Is there a possibility to mark specific enum values as deprecated in OpenAPI defintion?
For example, how can I mark Value1 as deprecated?
type: string
title: CustomEnum
enum:
- Value1
- Value2
0
votes
2
answers
5k
views
Customizing Springdocs/Swagger UI paths in Spring Boot 3
I have a very basic Spring Boot 3 service with OpenAPI documentation using Spring Initializr.
plugins {
java
id("org.springframework.boot") version "3.2.4"
id("io.spring....
0
votes
1
answer
1k
views
Why can i not generate spring api docs with Spring Boot 3 and OpenAPI spec?
So this issue has been discussed several times, but none of the fixes suggested in these work for me:
Spring Boot 3 springdoc-openapi-ui doesn't work
Spring Boot 3.0.0 and Springdoc incompatible?
...
2
votes
1
answer
79
views
Is SPRINGDOC compatible with AWS Lambda?
I wanted to know if SpringDoc is compatibile with AWS Lambda.
I tried multiple versions when hosting springdoc to AWS but what I get is 404 not found, when on localhost works perfectly.
PS: I need ...
2
votes
1
answer
497
views
Upgrading to open api 3 rendering more than required entities and apis
I am using open api with spring boot application. Recently the application was upgraded to use java 17 from java 11 and since then the api stopped working. I upgraded it to open api 3 following ...
5
votes
4
answers
26k
views
Trouble configuring springdoc-openapi with Spring Boot 3.2.2
I am working on a Spring Boot project which has Rest APIs. It's a backend project.
I am configuring OpenAP I3.0 as per the documentation here https://springdoc.org/#Introduction
I have included this ...
0
votes
1
answer
288
views
Title: Unable to Display Example Value for LocalDateTime Field in Spring Boot OpenAPI Documentation
I am using Spring Boot 3 with the following OpenApi dependencies:
<version.springdoc.openapi>2.1.0</version.springdoc.openapi>
<dependency>
<groupId>org.springdoc</...
1
vote
0
answers
491
views
Custom OpenAPI yml file is not found
To play around with Spring Boot Reactive and functional programming, I've made a working example application. I've added the OpenApi library and made my own custom yaml file for API definition in ...