-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yml
129 lines (128 loc) · 3.31 KB
/
swagger.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
openapi: 3.0.3
info:
title: Shift Eligibility
contact:
email: [email protected]
license:
name: UNLICENSED
version: 0.0.1
servers:
- url: http://localhost:3000
tags:
- name: Shifts
paths:
/workers/{workerId}/facilities/{facilityId}/open-shifts:
get:
tags:
- Shifts
summary: Find open shifts by worker and facility
description: Returns a list of open shifts grouped by date
operationId: getFacilityOpenShifts
parameters:
- name: workerId
in: path
description: ID of the active worker
required: true
example: 123
schema:
type: integer
format: int64
- name: facilityId
in: path
description: ID of the active Facility
required: true
example: 456
schema:
type: integer
format: int64
- name: start
in: query
description: Start date of the range (yyyy-MM-dd HH:mm:ss)
required: true
schema:
type: string
format: date
example: '2023-12-10 08:00:00'
- name: end
in: query
description: End date of the range (yyyy-MM-dd HH:mm:ss)
required: true
schema:
type: string
format: date
example: '2023-12-10 05:00:00'
responses:
'200':
description: Ok
content:
application/json:
schema:
type: array
items:
type: object
properties:
date:
type: string
format: date
example: '2023-12-10'
shifts:
type: array
items:
$ref: '#/components/schemas/Shift'
'400':
description: Bad Request
content:
application/json:
schema:
properties:
message:
type: string
example: 'Validation Error - end: Invalid date'
statusCode:
type: integer
example: 400
'404':
description: Not Found
content:
application/json:
schema:
properties:
message:
type: string
example: 'Worker not found'
statusCode:
type: integer
example: 404
components:
schemas:
Shift:
type: object
properties:
id:
type: integer
example: 123
facility_id:
type: integer
example: 456
profession:
type: string
enum:
- CNA
- LVN
- RN
example: LVN
is_deleted:
type: boolean
example: false
worker_id:
type: integer
nullable: true
example: null
start:
type: string
format: date-time
example: '2023-12-10T09:00:00.000Z'
end:
type: string
format: date-time
example: '2023-12-10T17:00:00.000Z'