我是openAPI 3.0规范的新手,想知道是否可以覆盖status
到somestatus
的键吗?
Response:
type: object
properties:
status: # want to override this key
type: number
format: int32
timestamp:
type: string
format: date-time
ApiResponse:
allOf:
- $ref: '#/components/schemas/Response'
- type: object
properties:
message:
type: string
format: string
响应具有字段状态,因此ApiResponse将对其进行扩展。现在可以在ApiResponse中将键值status
覆盖为something else
了。
我们的模式已经相当完善,因此只提出了这个通用示例。我认为这是不可能的,但我仍然想问清楚。