私はyamlでswagger定義を書いています。このような定義があるとします。
paths:
/payloads:
post:
summary: create a payload
...
parameters:
- in: body
name: payload
description: New payload
required: true
schema:
$ref: "#/definitions/payload"
put:
summary: update a payload
...
parameters:
- in: body
name: payload
description: Updated existing payload
required: true
schema:
$ref: "#/definitions/payload"
...
definitions:
payload:
properties:
id:
type: string
someProperty:
type: string
...
ペイロードの id プロパティが PUT 操作に必要であり、POST 操作ではオプション (またはまったく表示されない) であることを示す方法はありますか?