久しぶりにSwagger書くとはまるので、
配列とオブジェクトを書いておく
type: object properties: $ref: "./parts/shop.yaml" example: $ref: "./example/shop.yaml"
/parts/shop.yaml
draft: type: array items: type: object description: 下書き properties: id: type: integer shop_id: type: integer description: shop id production: type: array items: type: object description: 本番 properties: id: type: integer shop_id: type: integer description: shop id
/example/shop.yaml
draft: - id: 1 shop_id: 1 production: - id: 1 shop_id: 1
type: array items: properties: user_id: type: integer type: user id user_name: type: string description: 名前 type: object properties: user_id: type: integer type: user id user_name: type: string description: 名前
type: array items: properties: $ref: "./parts/mail_template_type_add_member_by_console.yaml" type: object properties: $ref: "./parts/mail_template_id.yaml"