swagger yaml でオブジェクトの配列を定義する際に問題が発生しています。yaml の type: array 部分を定義しようとするたびに、Swagger エディターでエラーが発生します。私はそれを定義しましたが、エラーを出しているので正しくありません。以下は、swagger yaml で定義しようとしている json です。
{
"CountryCombo": {
"options": {
"option": [{
"id": "GB",
"value": "GB Great Britain"
}, {
"id": "US",
"value": "US United States"
}, {
"id": "AD",
"value": "AD Andorra, Principality of"
}]
}
}
}
このjsonをこのようにswagger yamlに定義しましたが、エラーが発生しています:
CountryCombo:
type: object
properties:
options:
type: object
properties:
option:
type: array
items:
- id:
type: string
description: GB
value:
type: string
description: GB Great Britain
- id:
type: string
description: US
value:
type: string
description: US United States
- id:
type: string
description: AD
value:
type: string
description: AD Andorra, Principality of
swagger仕様に従って、yamlでこのjsonをどのように定義すればよいか教えてもらえますか?