You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"springdoc-openapi-starter-webflux-ui" for sprint boot 3.x can't parse nested POJO well, but "springdoc-openapi-webflux-ui" for spring boot 2.x works well.
#2949
Closed
softenwareness opened this issue
Mar 26, 2025
· 2 comments
Describe the bug
It was working for nested POJO as openAPI request or response definition before(Spring boot 2.7.18), but upgrade to spring boot 3.x, not working any more, throw exception.
<?xml version="1.0" encoding="UTF-8"?><projectxmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>3.4.4</version><!-- <version>2.7.18</version>--></parent><groupId>com.example</groupId><artifactId>demo</artifactId><version>0.0.1-SNAPSHOT</version><name>demo</name><description>Demo project for Spring Boot</description><properties><java.version>17</java.version></properties><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-webflux</artifactId></dependency><!-- For Spring Boot 3.4.x, throw exception --><dependency><groupId>org.springdoc</groupId><artifactId>springdoc-openapi-starter-webflux-ui</artifactId><version>2.8.6</version></dependency><!-- For Spring Boot 2.7.18, it works well --><!-- <dependency>--><!-- <groupId>org.springdoc</groupId>--><!-- <artifactId>springdoc-openapi-webflux-ui</artifactId>--><!-- <version>1.8.0</version>--><!-- </dependency>--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><scope>provided</scope></dependency></dependencies><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins></build></project>
What version of spring-boot you are using? 3.4.4
What modules and versions of springdoc-openapi are you using? 2.8.6
What is the actual and the expected result using OpenAPI Description (yml or json)?
Throw Exception
Warning
java.lang.StackOverflowError: null
at org.springdoc.core.converters.WebFluxSupportConverter.resolve(WebFluxSupportConverter.java:89) ~[springdoc-openapi-starter-common-2.8.6.jar:2.8.6]
at org.springdoc.core.converters.AdditionalModelsConverter.resolve(AdditionalModelsConverter.java:163) ~[springdoc-openapi-starter-common-2.8.6.jar:2.8.6]
at org.springdoc.core.converters.FileSupportConverter.resolve(FileSupportConverter.java:72) ~[springdoc-openapi-starter-common-2.8.6.jar:2.8.6]
at org.springdoc.core.converters.ResponseSupportConverter.resolve(ResponseSupportConverter.java:84) ~[springdoc-openapi-starter-common-2.8.6.jar:2.8.6]
at org.springdoc.core.converters.SchemaPropertyDeprecatingConverter.resolve(SchemaPropertyDeprecatingConverter.java:95) ~[springdoc-openapi-starter-common-2.8.6.jar:2.8.6]
....
Expected behavior
For below nested POJO, can work well .
It was working well for
Provide with a sample code (HelloController) or Test that reproduces the problem Additional context
Please download below zip file and have a try. demo.zip
The text was updated successfully, but these errors were encountered:
softenwareness
changed the title
ava.lang.StackOverflowError exception for nested POJO as request or response
"springdoc-openapi-starter-webflux-ui" for sprint boot 3.x can't parse nested POJO well, but "springdoc-openapi-webflux-ui" for spring boot 2.x works well.
Mar 26, 2025
Describe the bug
It was working for nested POJO as openAPI request or response definition before(Spring boot 2.7.18), but upgrade to spring boot 3.x, not working any more, throw exception.
To Reproduce
Steps to reproduce the behavior:
pom:
Throw Exception
Warning
java.lang.StackOverflowError: null
at org.springdoc.core.converters.WebFluxSupportConverter.resolve(WebFluxSupportConverter.java:89) ~[springdoc-openapi-starter-common-2.8.6.jar:2.8.6]
at org.springdoc.core.converters.AdditionalModelsConverter.resolve(AdditionalModelsConverter.java:163) ~[springdoc-openapi-starter-common-2.8.6.jar:2.8.6]
at org.springdoc.core.converters.FileSupportConverter.resolve(FileSupportConverter.java:72) ~[springdoc-openapi-starter-common-2.8.6.jar:2.8.6]
at org.springdoc.core.converters.ResponseSupportConverter.resolve(ResponseSupportConverter.java:84) ~[springdoc-openapi-starter-common-2.8.6.jar:2.8.6]
at org.springdoc.core.converters.SchemaPropertyDeprecatingConverter.resolve(SchemaPropertyDeprecatingConverter.java:95) ~[springdoc-openapi-starter-common-2.8.6.jar:2.8.6]
....
Expected behavior
For below nested POJO, can work well .
It was working well for
Additional context
Please download below zip file and have a try.
demo.zip
The text was updated successfully, but these errors were encountered: