swagger-ui icon indicating copy to clipboard operation
swagger-ui copied to clipboard

OpenApi 3.1 Data Type support

Open JCamargo-onlocation opened this issue 1 year ago • 1 comments

Content & configuration

Display the data types as previously. We have a lot of DTOs that may be similar in structure, and different DTOs tailored to each endpoint to improve performance, so missing the data type, specially in arrays makes it difficult to quickly find the DTO as not we need to first find the endpoint and then the response object. We have the $ref object in the yaml, so the data should be there as previously.

Feel free to point me to an existing issue, I couldn't find if this was already reported.

Swagger/OpenAPI definition:

"requestBody": {
         "content": {
           "application/json": {
             "schema": {
               "$ref": "#/components/schemas/ResaleEventDto"
             }
           }
         },
         "required": true
       }

Is your feature request related to a problem?

Frustrating problem to identify the object type provided. Reported here: https://github.com/springdoc/springdoc-openapi/issues/3024 https://github.com/springdoc/springdoc-openapi/issues/2867

Describe the solution you'd like

Add the $ref name to the objects, including arrays.

Describe alternatives you've considered

Reverted to 2.0 as it is more useful.

JCamargo-onlocation avatar Jun 17 '25 13:06 JCamargo-onlocation

Hey @JCamargo-onlocation ... Can i Carry on with the contribution of the solution for the above issue.. ping me for a green signal.

Sumedh-6504 avatar Jan 16 '26 12:01 Sumedh-6504