sanic-openapi
sanic-openapi copied to clipboard
OpenAPI ref attribute
Hi.
Is there a way to emulate the behaviour of this ref attribute $ref: "#/definitions/Response" (in BuildingsResponse)? I need a way to add all the fields of Response inside other responses
Response:
required:
- application
- version
- api_version
- contact
- status
properties:
application:
type: string
version:
type: string
api_version:
type: string
contact:
type: string
status:
type: integer
BuildingsResponse:
type: object
allOf:
- $ref: "#/definitions/Response"
- type: object
properties:
data:
type: array
items:
$ref: "#/definitions/Building"
metadata:
type: object
properties:
building_id:
type: integer
Don't think this is possible currently, would have to do some work to support it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is incorrect, please respond with an update. Thank you for your contributions.