CHANGE: updated to correct sql database
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
POSTGRES_USER=arbeit_zeit
|
||||
POSTGRES_PASSWORD=password
|
||||
POSTGRES_PATH=./database
|
||||
POSTGRES_PATH=../Backend/database
|
||||
POSTGRES_DB=arbeitszeitmessung
|
||||
EXPOSED_PORT=8000
|
||||
|
||||
@@ -1,210 +0,0 @@
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "Arbeitszeitmessung - OpenAPI 3.0",
|
||||
"description": "This demos the API for the Arbeitszeitmessung Project ",
|
||||
"version": "0.1.0"
|
||||
},
|
||||
"externalDocs": {
|
||||
"description": "Git-Repository",
|
||||
"url": "https://git.letsstein.de/tom/arbeitszeitmessung"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "http://localhost:8000"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"name": "booking",
|
||||
"description": "all Bookings"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/time": {
|
||||
"put": {
|
||||
"tags": [
|
||||
"booking"
|
||||
],
|
||||
"summary": "Update a existing booking",
|
||||
"description": "Update an existing booking by Id",
|
||||
"operationId": "updateBooking",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "bookingID",
|
||||
"in": "query",
|
||||
"description": "Booking ID to update",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"description": "Update an existent booking in the db. Not all values have to be updated",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Booking"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Booking Updated",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Booking"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid ID supplied"
|
||||
},
|
||||
"500": {
|
||||
"description": "Server Error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"get": {
|
||||
"tags": [
|
||||
"booking"
|
||||
],
|
||||
"summary": "Gets all the bookings limited",
|
||||
"description": "Returns all the bookings optionally filtered with cardID",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "cardID",
|
||||
"in": "query",
|
||||
"description": "CardID to filter for",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"operationId": "addPet",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful operation",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Booking"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid cardID"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/time/new": {
|
||||
"put": {
|
||||
"tags": [
|
||||
"booking"
|
||||
],
|
||||
"summary": "Create new Booking",
|
||||
"description": "Creates a new booking with the supplied parameters",
|
||||
"operationId": "createBooking",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "cardID",
|
||||
"in": "query",
|
||||
"description": "id of the RFID card scanned",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "readerID",
|
||||
"in": "query",
|
||||
"description": "id of the RFID reader scanning the card",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "bookingType",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"Booking": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"example": 100
|
||||
},
|
||||
"cardID": {
|
||||
"type": "string",
|
||||
"example": "test_card"
|
||||
},
|
||||
"readerID": {
|
||||
"type": "string",
|
||||
"example": "test_reader"
|
||||
},
|
||||
"bookingType": {
|
||||
"type": "integer",
|
||||
"example": 1,
|
||||
"enum": [
|
||||
1,
|
||||
2,
|
||||
255
|
||||
]
|
||||
},
|
||||
"loggedTime": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"example": "2024-09-05T08:51:12.670Z"
|
||||
}
|
||||
},
|
||||
"xml": {
|
||||
"name": "booking"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ openapi: 3.0.3
|
||||
info:
|
||||
title: Arbeitszeitmessung - OpenAPI 3.0
|
||||
description: |-
|
||||
This demos the API for the Arbeitszeitmessung Project
|
||||
This demos the API for the Arbeitszeitmessung Project
|
||||
version: 0.1.0
|
||||
externalDocs:
|
||||
description: Git-Repository
|
||||
@@ -21,7 +21,7 @@ paths:
|
||||
description: Update an existing booking by Id
|
||||
operationId: updateBooking
|
||||
parameters:
|
||||
- name: bookingID
|
||||
- name: counterID
|
||||
in: query
|
||||
description: Booking ID to update
|
||||
required: true
|
||||
@@ -40,7 +40,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Booking'
|
||||
$ref: '#/components/schemas/Booking'
|
||||
'400':
|
||||
description: Invalid ID supplied
|
||||
'500':
|
||||
@@ -66,7 +66,7 @@ paths:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Booking'
|
||||
$ref: '#/components/schemas/Booking'
|
||||
'400':
|
||||
description: Invalid cardID
|
||||
/time/new:
|
||||
@@ -83,13 +83,13 @@ paths:
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: readerID
|
||||
- name: geraetID
|
||||
in: query
|
||||
description: id of the RFID reader scanning the card
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: bookingType
|
||||
- name: checkInOut
|
||||
in: query
|
||||
description: booking Type
|
||||
required: true
|
||||
@@ -105,7 +105,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Booking'
|
||||
$ref: '#/components/schemas/Booking'
|
||||
'409':
|
||||
description: Same booking type as last booking
|
||||
components:
|
||||
@@ -113,26 +113,26 @@ components:
|
||||
Booking:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
counterID:
|
||||
type: integer
|
||||
format: int64
|
||||
example: 100
|
||||
cardID:
|
||||
type: string
|
||||
example: test_card
|
||||
readerID:
|
||||
geraetID:
|
||||
type: string
|
||||
example: test_reader
|
||||
bookingType:
|
||||
checkInOut:
|
||||
type: integer
|
||||
example: 1
|
||||
enum:
|
||||
- 1
|
||||
- 2
|
||||
- 255
|
||||
loggedTime:
|
||||
timestamp:
|
||||
type: string
|
||||
format: date-time
|
||||
example: 2024-09-05T08:51:12.670827Z
|
||||
xml:
|
||||
name: booking
|
||||
name: booking
|
||||
|
||||
Reference in New Issue
Block a user