udpate openapi spec

This commit is contained in:
2026-08-04 15:28:33 +02:00
parent e4acb6918a
commit fa7835c7e6
32 changed files with 2946 additions and 229 deletions

View File

@@ -272,6 +272,46 @@ paths:
summary: Delete Group
tags:
- Group
/api/v1/cards/:
delete:
operationId: del_card_api_v1_cards__delete
responses:
"200":
content:
application/json:
schema: {}
description: Successful Response
security:
- OAuth2PasswordBearer: []
summary: Del Card
tags:
- Card
post:
operationId: add_card_api_v1_cards__post
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CardCreate"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/Card"
description: Successful Response
"422":
content:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"
description: Validation Error
security:
- OAuth2PasswordBearer: []
summary: Add Card
tags:
- Card
/api/v1/cards/{group_id}:
get:
operationId: get_cards_api_v1_cards__group_id__get
@@ -306,17 +346,24 @@ paths:
summary: Get Cards
tags:
- Card
post:
operationId: add_card_api_v1_cards__group_id__post
/api/v1/cards/{card_id}:
patch:
operationId: update_card_api_v1_cards__card_id__patch
parameters:
- explode: false
in: path
name: group_id
name: card_id
required: true
schema:
title: Group Id
title: Card Id
type: integer
style: simple
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CardUpdate"
required: true
responses:
"200":
content:
@@ -332,21 +379,7 @@ paths:
description: Validation Error
security:
- OAuth2PasswordBearer: []
summary: Add Card
tags:
- Card
/api/v1/cards/delete:
get:
operationId: del_card_api_v1_cards_delete_get
responses:
"200":
content:
application/json:
schema: {}
description: Successful Response
security:
- OAuth2PasswordBearer: []
summary: Del Card
summary: Update Card
tags:
- Card
/api/v1/aa/:
@@ -579,7 +612,7 @@ paths:
- Door
/api/v1/door/close:
put:
operationId: open_door_api_v1_door_close_put
operationId: close_door_api_v1_door_close_put
responses:
"200":
content:
@@ -588,7 +621,21 @@ paths:
description: Successful Response
security:
- OAuth2PasswordBearer: []
summary: Open Door
summary: Close Door
tags:
- Door
/api/v1/door/status:
put:
operationId: is_door_open_api_v1_door_status_put
responses:
"200":
content:
application/json:
schema: {}
description: Successful Response
security:
- OAuth2PasswordBearer: []
summary: Is Door Open
tags:
- Door
/api/v1/door/test:
@@ -618,27 +665,43 @@ paths:
summary: Test Access
tags:
- Door
/api/v1/debug/addcard/{groupid}/{card_key}:
get:
/api/v1/debug/addcard/:
put:
description: Add cards manually (you also have to delete them manually)
operationId: add_card_manually_api_v1_debug_addcard__groupid___card_key__get
operationId: add_card_manually_api_v1_debug_addcard__put
parameters:
- explode: false
in: path
- explode: true
in: query
name: groupid
required: true
schema:
title: Groupid
type: integer
style: simple
- explode: false
in: path
style: form
- explode: true
in: query
name: card_key
required: true
schema:
title: Card Key
type: string
style: simple
style: form
- explode: true
in: query
name: name
required: true
schema:
title: Name
type: string
style: form
- explode: true
in: query
name: enabled
required: true
schema:
title: Enabled
type: boolean
style: form
responses:
"200":
content:
@@ -656,16 +719,16 @@ paths:
summary: Add Card Manually
tags:
- Debug items - maybe dont show this in UI
/api/v1/debug/rmcard/{card_key}:
/api/v1/debug/rmcard/{card_id}:
get:
operationId: remove_card_manually_api_v1_debug_rmcard__card_key__get
operationId: remove_card_manually_api_v1_debug_rmcard__card_id__get
parameters:
- explode: false
in: path
name: card_key
name: card_id
required: true
schema:
title: Card Key
title: Card Id
type: string
style: simple
responses:
@@ -704,6 +767,7 @@ components:
AccessAuthorizationCreate:
example:
name: name
type: timetable
is_active: true
timetables:
- weekday: 0
@@ -712,33 +776,49 @@ components:
- weekday: 0
starttime: starttime
duration: 867
oneshot: ""
properties:
name:
title: Name
type: string
type:
enum:
- timetable
- oneshot
- somefuturespec
title: Type
type: string
is_active:
title: Is Active
type: boolean
timetables:
default: []
items:
$ref: "#/components/schemas/TimetableCreate"
title: Timetables
type: array
default: null
oneshot:
allOf:
- $ref: "#/components/schemas/OneShotAccessBase"
nullable: true
required:
- is_active
- name
- timetables
- type
title: AccessAuthorizationCreate
AccessAuthorizationDB:
example:
name: name
type: type
is_active: true
id: 5
properties:
name:
title: Name
type: string
type:
title: Type
type: string
is_active:
title: Is Active
type: boolean
@@ -748,10 +828,12 @@ components:
required:
- is_active
- name
- type
title: AccessAuthorizationDB
AccessAuthorizationResponse:
example:
name: name
type: timetable
is_active: true
id: 0
timetables:
@@ -765,6 +847,7 @@ components:
duration: 211
id: 5
accessauth_id: 5
oneshot: ""
groups:
- name: name
id: 2
@@ -774,6 +857,13 @@ components:
name:
title: Name
type: string
type:
enum:
- timetable
- oneshot
- somefuturespec
title: Type
type: string
is_active:
title: Is Active
type: boolean
@@ -781,11 +871,15 @@ components:
title: Id
type: integer
timetables:
default: []
items:
$ref: "#/components/schemas/Timetable"
title: Timetables
type: array
default: null
oneshot:
allOf:
- $ref: "#/components/schemas/OneShotAccessBase"
nullable: true
groups:
items:
$ref: "#/components/schemas/GroupDB"
@@ -797,11 +891,12 @@ components:
- id
- is_active
- name
- timetables
- type
title: AccessAuthorizationResponse
AccessAuthorizationUpdate:
example:
name: name
type: timetable
is_active: true
timetables:
- weekday: 0
@@ -810,10 +905,18 @@ components:
- weekday: 0
starttime: starttime
duration: 867
oneshot: ""
properties:
name:
nullable: true
type: string
type:
enum:
- timetable
- oneshot
- somefuturespec
nullable: true
type: string
is_active:
nullable: true
type: boolean
@@ -823,6 +926,10 @@ components:
nullable: true
type: array
default: null
oneshot:
allOf:
- $ref: "#/components/schemas/OneShotAccessBase"
nullable: true
title: AccessAuthorizationUpdate
Body_login_for_access_token_api_v1_token_post:
properties:
@@ -854,21 +961,74 @@ components:
Card:
example:
id: 6
uuid: uuid
key: key
card_serial: card_serial
enabled: true
name: name
group_id: 1
properties:
id:
nullable: true
type: integer
uuid:
title: Uuid
key:
title: Key
type: string
card_serial:
title: Card Serial
type: string
enabled:
default: true
title: Enabled
type: boolean
name:
maxLength: 32
title: Name
type: string
group_id:
nullable: true
type: integer
required:
- uuid
- card_serial
- key
- name
title: Card
CardCreate:
example:
name: name
enabled: true
group_id: 0
properties:
name:
maxLength: 32
title: Name
type: string
enabled:
default: true
title: Enabled
type: boolean
group_id:
title: Group Id
type: integer
required:
- group_id
- name
title: CardCreate
CardUpdate:
example:
name: name
enabled: true
group_id: 0
properties:
name:
nullable: true
type: string
enabled:
nullable: true
type: boolean
group_id:
nullable: true
type: integer
title: CardUpdate
GroupCreate:
example:
name: name
@@ -899,16 +1059,24 @@ components:
id: 0
cards:
- id: 6
uuid: uuid
key: key
card_serial: card_serial
enabled: true
name: name
group_id: 1
- id: 6
uuid: uuid
key: key
card_serial: card_serial
enabled: true
name: name
group_id: 1
accessauths:
- name: name
type: type
is_active: true
id: 5
- name: name
type: type
is_active: true
id: 5
properties:
@@ -961,6 +1129,19 @@ components:
type: array
default: null
title: HTTPValidationError
OneShotAccessBase:
properties:
uses:
default: 1
title: Uses
type: integer
ends_at:
format: date-time
title: Ends At
type: string
required:
- ends_at
title: OneShotAccessBase
Timetable:
example:
weekday: 3