updated yaml file

This commit is contained in:
Daniel Schick 2023-07-11 17:15:49 +02:00
parent 5544d0126d
commit 161553a84f

View File

@ -18,7 +18,32 @@ servers:
description: "Test server self-hosted by yours truly"
paths:
# tutorial: https://idratherbewriting.com/learnapidoc/pubapis_openapi_step4_paths_object.html
# tutorial: https://idratherbewriting.com/learnapidoc/pubapis_openapi_step4_paths_object.html
/login:
post:
summary: Returns a JWT session token and user data if successful
requestBody:
description: Login credentials
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/credentials'
responses:
200:
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/login_result'
400:
$ref: '#/components/responses/400'
403:
$ref: '#/components/responses/403'
500:
$ref: '#/components/responses/500'
503:
$ref: '#/components/responses/503'
/shipcalls:
get:
@ -108,8 +133,8 @@ paths:
parameters:
- name: user_id
in: query
required: false
description: "**Id of user**. *Example: 2*. User id returned by login call. No parameter returns all participants."
required: true
description: "**Id of user**. *Example: 2*. User id returned by verify call."
schema:
type: integer
responses:
@ -260,6 +285,16 @@ paths:
$ref: '#/components/responses/503'
components:
schemas:
credentials:
type: object
required:
- username
- password
properties:
username:
format : string
password:
format : string
timesId:
description: The unique identifier for a times entry
type: integer
@ -412,6 +447,27 @@ components:
city:
type: string
login_result:
type: object
description: result structure of a successful login attempt
properties:
id:
type: integer
participant_id:
type: integer
first_name:
type: string
last_name:
type: string
user_name:
type: string
user_phone:
type: string
exp:
type: float
token:
type: string
Error:
type: object
required: