Created
August 6, 2019 09:38
-
-
Save FFY00/878f59ec427ef05867cc4f57ba0f17a5 to your computer and use it in GitHub Desktop.
Sample OpenAPI specification that uses anyOf in the request parameters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
servers: | |
- url: 'http://localhost:8080' | |
info: | |
version: 0.0.1 | |
title: ratbag-emu | |
license: | |
name: MIT | |
url: 'https://raw.githubusercontent.com/libratbag/ratbag-emu/master/LICENSE' | |
paths: | |
'/devices/{device_id}/phys_props/dpi/{dpi_id}': | |
get: | |
operationId: ratbag_emu.server.get_dpi | |
parameters: | |
- name: device_id | |
in: path | |
required: true | |
schema: | |
type: integer | |
format: int32 | |
- name: dpi_id | |
in: path | |
required: true | |
schema: | |
anyOf: | |
- type: integer | |
format: int32 | |
- type: string | |
responses: | |
'200': | |
description: OK | |
content: | |
application/json: | |
schema: | |
type: integer | |
format: int32 | |
'404': | |
description: Device not found | |
put: | |
summary: Changes the value of the specified DPI setting | |
operationId: ratbag_emu.server.set_dpi | |
parameters: | |
- name: device_id | |
in: path | |
required: true | |
schema: | |
type: integer | |
format: int32 | |
- name: dpi_id | |
in: path | |
required: true | |
schema: | |
anyOf: | |
- type: integer | |
format: int32 | |
- type: string | |
responses: | |
'200': | |
description: OK | |
'404': | |
description: Device not found |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment