swagger-parser
swagger-parser copied to clipboard
Parser ignore the description if it's a $ref
As said in the title, latest stable release ignores the description if it's a $ref. It looks like a regression to me because it was working properly a few versions back (can't be sure when, I found at using a code generator).
[main] INFO o.o.codegen.DefaultCodegen - debugging Cateogry: class Schema {
type: null
format: null
$ref: #/components/schemas/Category
description: null
title: null
multipleOf: null
maximum: null
exclusiveMaximum: null
minimum: null
exclusiveMinimum: null
maxLength: null
minLength: null
pattern: null
maxItems: null
minItems: null
uniqueItems: null
maxProperties: null
minProperties: null
required: null
not: null
properties: null
additionalProperties: null
nullable: null
readOnly: null
writeOnly: null
example: null
externalDocs: null
deprecated: null
discriminator: null
xml: null
}
description
is null even though I put down something as follows:
category:
$ref: '#/definitions/Category'
description: "description testing"
For info: Having any property set next to $ref
is not a valid OpenAPI document. See https://github.com/OAI/OpenAPI-Specification/issues/556 for details. (you will see my comments and a lot of other telling that $ref
+ description
would make sense)
Hi, please check https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#reference-object
This object cannot be extended with additional properties and any properties added SHALL be ignored.
I have the same problem, how can I get the description?