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
Since 2.4.0 we're facing ref errors when declaring schemas using addSchemas in a custom OpenAPI Bean like this:
@Bean
OpenAPI customOpenApi() {
return new OpenAPI()
.components(new Components().addSecuritySchemes("bearerScheme",
new SecurityScheme()
.type(SecurityScheme.Type.HTTP)
.scheme("bearer")
.bearerFormat("JWT"))
.addSchemas("FeedResponse", feedResponseSchema()))
.info(new Info()
.title("Response API")
.description("API for some response")
.version("0.0.1")
.contact(new Contact()
.name("EAlf91")))
.tags(List.of(new Tag()
.name("ResponseTag")
.description("ResponseTag for API"),
new Tag()
.name("ResponseData")
.description("Version 2 ResponseApi")));
}
The resulting spec leads to this error as the whole ResponseData schema is not being generated:
Below is a diff of the generated spec using 2.3.0, which contains the Schema, and 2.4.0, which does not.
To Reproduce
Steps to reproduce the behavior:
What version of spring-boot you are using? 3.2.4
What modules and versions of springdoc-openapi are you using? 2.4.0
What is the actual and the expected result using OpenAPI Description (yml or json)? json
Provide with a sample code (HelloController) or Test that reproduces the problem Showcase Issue #2553 #2552
Expected behavior
schemas declared and referenced in an OpenAPI custom configuration bean should be included as before
Additional context
PR here is showcasing the issue and the thing I changed back to make it work again. I reverted OpenAPIService changes for the object mapper and added app9wrong.json which is being produced by 2.4.0 #2552
The text was updated successfully, but these errors were encountered:
Describe the bug
Since 2.4.0 we're facing ref errors when declaring schemas using addSchemas in a custom OpenAPI Bean like this:
The resulting spec leads to this error as the whole ResponseData schema is not being generated:

Below is a diff of the generated spec using 2.3.0, which contains the Schema, and 2.4.0, which does not.

To Reproduce
Steps to reproduce the behavior:
Showcase Issue #2553 #2552
Expected behavior
Additional context
PR here is showcasing the issue and the thing I changed back to make it work again. I reverted OpenAPIService changes for the object mapper and added app9wrong.json which is being produced by 2.4.0
#2552
The text was updated successfully, but these errors were encountered: