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

How To Show The Description Field Of @Schemas witch has a same "ref" field

Open Sahalaqj opened this issue 3 years ago • 0 comments

image image

Hey! I have a question and hope someone can help! When I user more than one @Schema with same "ref" field ,how can I show the description. Thanks for any answers!

Sahalaqj avatar Apr 29 '22 02:04 Sahalaqj

Have you ever found a solution for this ? I'm bumping into the same problem.

robin-xyzt-ai avatar Aug 29 '22 12:08 robin-xyzt-ai

Have you ever found a solution for this ? I'm bumping into the same problem.

No solution!I think it's a bug or a scene has not been considered

Sahalaqj avatar Sep 02 '22 02:09 Sahalaqj

What you are trying to achieve is something not supported by OAS 2.0 (swagger) or 3.0 and JSON Schema Draft 4: in these versions a schema declaring a $ref has all other fields ignored.

Siblings alongside a defined $ref are part of OAS 3.1, and support for 3.1 is on its way in Swagger Core, but not yet finalized.

frantuma avatar Sep 08 '22 07:09 frantuma

@robin-xyzt-ai Here's the reply, hope help u!

What you are trying to achieve is something not supported by OAS 2.0 (swagger) or 3.0 and JSON Schema Draft 4: in these versions a schema declaring a $ref has all other fields ignored.

Siblings alongside a defined $ref are part of OAS 3.1, and support for 3.1 is on its way in Swagger Core, but not yet finalized.

Sahalaqj avatar Sep 14 '22 08:09 Sahalaqj