lockserver/openapi/openapi.yaml

66 lines
1.5 KiB
YAML
Raw Normal View History

2024-04-09 23:18:43 +00:00
openapi: "3.1.0"
info:
version: 0.1.0
title: Lockserver
license:
name: CC-BY-SA-4.0
url: https://creativecommons.org/licenses/by/4.0/
paths:
/locks/{lock}/slots/{slot}:
get:
operationId: get_lock_code_slot
parameters:
- name: lock
in: path
description: ID of lock
required: true
schema:
type: integer
- name: slot
in: path
description: ID of code slot
required: true
schema:
type: integer
responses:
'200':
description: A lock code slot
content:
application/json:
schema:
$ref: '#/components/schemas/LockCodeSlot'
put:
operationId: put_lock_code_slot
parameters:
- name: lock
in: path
description: ID of lock
required: true
schema:
type: integer
- name: slot
in: path
description: ID of code slot
required: true
schema:
type: integer
requestBody:
description: the new value for the slot
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LockCodeSlot'
components:
schemas:
LockCodeSlot:
type: object
required:
- code
- enabled
properties:
code:
type: string
enabled:
type: boolean