Эта ошибка выглядит как ограничение / ошибка, но, как следует из описания ошибки, вы можете встроить определение, чтобы обойти ее. Вот пример встраивания ссылок в документ Swagger.
В следующем документе Swagger есть $ref
"responses": {
"200": {
"description": "Task retrieved",
"schema": {
"$ref": "#/definitions/Task"
}
},
"404": {
"description": "Task not found"
}
}
...
"definitions": {
"Task": {
"type": "object",
"required": [
"deadline",
"description",
"status"
],
"properties": {
"description": {
"type": "string",
"example": "Make an app for Demo"
},
"status": {
"type": "string",
"example": "Created"
},
"deadline": {
"type": "string",
"format": "date",
"example": "01/15/16"
}
}
}
После встраивания определения $ref
документ Swagger будет выглядеть так:
"responses": {
"200": {
"description": "Task retrieved",
"schema": {
"type": "object",
"required": [
"deadline",
"description",
"status"
],
"properties": {
"description": {
"type": "string",
"example": "Make an app for Demo"
},
"status": {
"type": "string",
"example": "Created"
},
"deadline": {
"type": "string",
"format": "date",
"example": "01/15/16"
}
}
}
},
"404": {
"description": "Task not found"
}
}
person
Navid Shakibapour
schedule
25.02.2016