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
I noticed that when using DTO classes for my controllers' requests and responses, they are not properly labeled with their class names on the generated Swagger documentation. Instead, they are simply labeled as object.
This was seen on the latest version v2.8.5. But when I downgrade to 2.7.0, the request and response schemas are correctly labeled with the DTO class names. I also tested on v2.8.0 and the label was back to object so I assume this behavior is seen on v2.8.0+.
This may not be a bug, but I wanted to confirm just in case.
Also, if this is a regression, I would love to see if this issue is fairly easy for me to pick up and contribute. Thanks!
To Reproduce
I have created a sample application to demonstrate this. Here is the repo.
I am using the following versions:
Spring boot version: 3.4.4
springdoc-openapi-starter-webmvc-ui:2.8.5
Expected behavior
My expectation is that any request/response should be labeled with the class name of the implemented data class rather than ambiguous object labels.
Screenshots
Screenshot of the issue
Screenshot of expectation (using v2.7.0)
The text was updated successfully, but these errors were encountered:
hojoungjang
changed the title
Request/response class schema not accurately described in Swagger UI
Request/response class schema not accurately labeled in Swagger UI
Mar 21, 2025
Describe the bug
I noticed that when using DTO classes for my controllers' requests and responses, they are not properly labeled with their class names on the generated Swagger documentation. Instead, they are simply labeled as
object
.This was seen on the latest version v2.8.5. But when I downgrade to 2.7.0, the request and response schemas are correctly labeled with the DTO class names. I also tested on v2.8.0 and the label was back to
object
so I assume this behavior is seen on v2.8.0+.This may not be a bug, but I wanted to confirm just in case.
Also, if this is a regression, I would love to see if this issue is fairly easy for me to pick up and contribute. Thanks!
To Reproduce
I have created a sample application to demonstrate this. Here is the repo.
I am using the following versions:
Expected behavior
My expectation is that any request/response should be labeled with the class name of the implemented data class rather than ambiguous
object
labels.Screenshots
Screenshot of the issue
Screenshot of expectation (using v2.7.0)
The text was updated successfully, but these errors were encountered: