Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new dictionaries on OpenApi.Components (Parameters, RequestBodies, Responses) #128

Open
perkops opened this issue Oct 5, 2021 · 0 comments
Assignees

Comments

@perkops
Copy link
Member

perkops commented Oct 5, 2021

Support new dictionaries on OpenApi.Components (Parameters, RequestBodies, Responses)

Today we only support the "Schemas" dictionary beneath OpenApi.Components.

But - it is now a possibility to define specific RequestBodies, Response or Parameters (Query, Path, Header, Cookie) in their own sections.

Example yaml for response:

/devices/status:
get:
summary: Retrieve devices and module status
description: Retrieve devices and module status
operationId: getDevicesStatus
responses:
'200':
$ref: '#/components/responses/DevicesResponse'
parameters: []

responses:
DevicesResponse:
description: Example response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Device'

Device:
  title: Device
  type: object
  properties:
    deviceId:
      type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants