久しぶりにSwagger書くとはまるので、 配列とオブジェクトを書いておく
1 2 3 4 5 |
type: object properties: $ref: "./parts/shop.yaml" example: $ref: "./example/shop.yaml" |
/parts/shop.yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
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
1 2 3 4 5 6 |
draft: - id: 1 shop_id: 1 production: - id: 1 shop_id: 1 |
…