説明
desc は OpenAPI 2.0 の本文パラメーターで定義されているフィールドではありません。
想定される影響
ツールがこのフィールドを無視したり、定義を拒否したりすることがあります。
対処方法
説明は description に、本文の型は schema に記述します。独自の拡張には x- を付け、ツールが対応しているか確認します。
例
修正例では limit から desc を削除し、件数を表す本文の型を文字列から整数に変更しています。
変更前
json
{
"name": "limit",
"in": "body",
"description": "max records to return",
"required": true,
"schema": {
"type": "string"
},
"desc": {
"type": "string"
}
}
変更後
json
{
"name": "limit",
"in": "body",
"description": "max records to return",
"required": true,
"schema": {
"type": "integer"
}
}