Пример ответа, который я хотел бы добавить в файл yaml, выглядит примерно так:
{
"name": "Element",
"schema": {
"properties": {
"id": {
"type": "string"
},
"extension": {
"type": "array",
"items": {
"$ref": "#/definitions/Extension"
}
}
}
}
}
И ymal этого примера будет:
responses:
200:
description: "successful operation, return the definition of the resource type in the body"
examples:
application/json:
name: Element
schema:
properties:
id:
type: string
extension:
type: array
items:
$ref: '#/definitions/Extension'
Как видите, последняя строка «$ ref: '# / Definations / Extension'», поэтому Swagger считает, что это ссылка, которую он не может найти нигде в файле ymal.
Можно ли избежать этого, чтобы стать эталоном?