CHANGE: added autoLogout to Doc + json in struct
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: Arbeitszeitmessung - OpenAPI 3.0
|
||||
description: |-
|
||||
This demos the API for the Arbeitszeitmessung Project
|
||||
description: 'This demos the API for the Arbeitszeitmessung Project '
|
||||
version: 0.1.0
|
||||
externalDocs:
|
||||
description: Git-Repository
|
||||
@@ -28,7 +27,9 @@ paths:
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
description: Update an existent booking in the db. Not all values have to be updated
|
||||
description: >-
|
||||
Update an existent booking in the db. Not all values have to be
|
||||
updated
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@@ -50,6 +51,7 @@ paths:
|
||||
- booking
|
||||
summary: Gets all the bookings limited
|
||||
description: Returns all the bookings optionally filtered with cardID
|
||||
operationId: getBooking
|
||||
parameters:
|
||||
- name: card_uid
|
||||
in: query
|
||||
@@ -57,7 +59,6 @@ paths:
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
operationId: addPet
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
@@ -66,7 +67,7 @@ paths:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Booking'
|
||||
$ref: '#/components/schemas/Booking'
|
||||
'400':
|
||||
description: Invalid cardID
|
||||
/time/new:
|
||||
@@ -75,7 +76,7 @@ paths:
|
||||
- booking
|
||||
summary: Create new Booking
|
||||
description: Creates a new booking with the supplied parameters
|
||||
operationId: createBooking
|
||||
operationId: pcreateBooking
|
||||
parameters:
|
||||
- name: card_uid
|
||||
in: query
|
||||
@@ -108,6 +109,60 @@ paths:
|
||||
$ref: '#/components/schemas/Booking'
|
||||
'409':
|
||||
description: Same booking type as last booking
|
||||
get:
|
||||
tags:
|
||||
- booking
|
||||
summary: Create new Booking
|
||||
description: Creates a new booking with the supplied parameters
|
||||
operationId: gcreateBooking
|
||||
parameters:
|
||||
- name: card_uid
|
||||
in: query
|
||||
description: id of the RFID card scanned
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: geraet_id
|
||||
in: query
|
||||
description: id of the RFID reader scanning the card
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: check_in_out
|
||||
in: query
|
||||
description: booking Type
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
enum:
|
||||
- 1
|
||||
- 2
|
||||
- 255
|
||||
responses:
|
||||
'200':
|
||||
description: successfully created booking
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Booking'
|
||||
'409':
|
||||
description: Same booking type as last booking
|
||||
/logout:
|
||||
get:
|
||||
tags:
|
||||
- booking
|
||||
summary: Logs out all logged in users
|
||||
description: With this call all actively logged in users (last booking today has check_in_out=1) will be logged out automaticly (check_in_out=255)
|
||||
operationId: autoLogout
|
||||
responses:
|
||||
'200':
|
||||
description: Succesful
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/User'
|
||||
components:
|
||||
schemas:
|
||||
Booking:
|
||||
@@ -133,6 +188,22 @@ components:
|
||||
timestamp:
|
||||
type: string
|
||||
format: date-time
|
||||
example: 2024-09-05T08:51:12.670827Z
|
||||
example: '2024-09-05T08:51:12.670Z'
|
||||
xml:
|
||||
name: booking
|
||||
User:
|
||||
type: object
|
||||
properties:
|
||||
card_uid:
|
||||
type: string
|
||||
example: test_card
|
||||
name:
|
||||
type: string
|
||||
example: Mustermann
|
||||
vorname:
|
||||
type: string
|
||||
example: Max
|
||||
hauptbeschäftigungsort:
|
||||
type: integer
|
||||
format: int8
|
||||
example: 1
|
||||
|
||||
Reference in New Issue
Block a user