added ship endpoint
This commit is contained in:
parent
d44671dfa9
commit
a833863761
@ -21,19 +21,19 @@ paths:
|
||||
# tutorial: https://idratherbewriting.com/learnapidoc/pubapis_openapi_step4_paths_object.html
|
||||
/verify:
|
||||
get:
|
||||
summary: Get the user id if successful
|
||||
summary: Returns a session key if successful
|
||||
responses:
|
||||
200:
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
title: Verify user token
|
||||
type: integer
|
||||
title: Session key
|
||||
type: string
|
||||
400:
|
||||
$ref: '#/components/responses/400'
|
||||
401:
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
$ref: '#/components/responses/403'
|
||||
500:
|
||||
$ref: '#/components/responses/500'
|
||||
503:
|
||||
@ -102,6 +102,25 @@ paths:
|
||||
503:
|
||||
$ref: '#/components/responses/503'
|
||||
|
||||
/ships:
|
||||
get:
|
||||
summary: gets a list of registered shipcalls
|
||||
responses:
|
||||
200:
|
||||
description: list of ships
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ship_list'
|
||||
400:
|
||||
$ref: '#/components/responses/400'
|
||||
401:
|
||||
$ref: '#/components/responses/401'
|
||||
500:
|
||||
$ref: '#/components/responses/500'
|
||||
503:
|
||||
$ref: '#/components/responses/503'
|
||||
|
||||
/participant:
|
||||
get:
|
||||
summary: gets a particular participant entry corresponding to user id
|
||||
@ -343,6 +362,36 @@ components:
|
||||
items:
|
||||
$ref: '#/components/schemas/berth'
|
||||
|
||||
ship:
|
||||
type: object
|
||||
description: a ship
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
name:
|
||||
type: string
|
||||
imo:
|
||||
type: integer
|
||||
callsign:
|
||||
type: string
|
||||
length:
|
||||
type: number
|
||||
format: float
|
||||
width:
|
||||
type: number
|
||||
format: float
|
||||
created:
|
||||
type: string
|
||||
format: date-time
|
||||
modified:
|
||||
type: string
|
||||
format: date-time
|
||||
|
||||
ship_list:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ship'
|
||||
|
||||
notification:
|
||||
type: object
|
||||
description: a notification created by the engine if a times entry violates a rule
|
||||
|
||||
@ -20,6 +20,7 @@ def GetTimes(options):
|
||||
"shipcall_id": "<integer>",
|
||||
"start_actual": "<date-time>",
|
||||
"start_planned": "<date-time>",
|
||||
"remark":"<string>"
|
||||
}]), 200
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user