diff --git a/misc/index.yaml b/misc/index.yaml index 7445e1a..e66cf85 100644 --- a/misc/index.yaml +++ b/misc/index.yaml @@ -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 diff --git a/src/server/BreCal/impl/times.py b/src/server/BreCal/impl/times.py index f7e03bf..dd45f03 100644 --- a/src/server/BreCal/impl/times.py +++ b/src/server/BreCal/impl/times.py @@ -20,6 +20,7 @@ def GetTimes(options): "shipcall_id": "", "start_actual": "", "start_planned": "", + "remark":"" }]), 200