updated yaml file
This commit is contained in:
parent
5544d0126d
commit
161553a84f
@ -18,7 +18,32 @@ servers:
|
|||||||
description: "Test server self-hosted by yours truly"
|
description: "Test server self-hosted by yours truly"
|
||||||
|
|
||||||
paths:
|
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:
|
/shipcalls:
|
||||||
get:
|
get:
|
||||||
@ -108,8 +133,8 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- name: user_id
|
- name: user_id
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: true
|
||||||
description: "**Id of user**. *Example: 2*. User id returned by login call. No parameter returns all participants."
|
description: "**Id of user**. *Example: 2*. User id returned by verify call."
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
responses:
|
responses:
|
||||||
@ -260,6 +285,16 @@ paths:
|
|||||||
$ref: '#/components/responses/503'
|
$ref: '#/components/responses/503'
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
|
credentials:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- username
|
||||||
|
- password
|
||||||
|
properties:
|
||||||
|
username:
|
||||||
|
format : string
|
||||||
|
password:
|
||||||
|
format : string
|
||||||
timesId:
|
timesId:
|
||||||
description: The unique identifier for a times entry
|
description: The unique identifier for a times entry
|
||||||
type: integer
|
type: integer
|
||||||
@ -412,6 +447,27 @@ components:
|
|||||||
city:
|
city:
|
||||||
type: string
|
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:
|
Error:
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user