Commit c4275c6 1 parent d7b6d9a commit c4275c6 Copy full SHA for c4275c6
File tree 3 files changed +819
-1983
lines changed
3 files changed +819
-1983
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "$schema" : " https://json.schemastore.org/apibuilder.json" ,
3
+ "name" : " horahora" ,
4
+ "description" : " Simple mobile application to keep track of worked hours." ,
5
+ "models" : {
6
+ "healthcheck" : {
7
+ "fields" : [
8
+ {
9
+ "name" : " status" ,
10
+ "type" : " string"
11
+ }
12
+ ]
13
+ },
14
+ "error" : {
15
+ "fields" : [
16
+ {
17
+ "name" : " code" ,
18
+ "type" : " string"
19
+ },
20
+ {
21
+ "name" : " message" ,
22
+ "type" : " string"
23
+ }
24
+ ]
25
+ },
26
+ "job" : {
27
+ "fields" : [
28
+ {
29
+ "name" : " _id" ,
30
+ "type" : " string"
31
+ },
32
+ {
33
+ "name" : " name" ,
34
+ "type" : " string"
35
+ }
36
+ ]
37
+ },
38
+ "job_form" : {
39
+ "fields" : [
40
+ {
41
+ "name" : " name" ,
42
+ "type" : " string"
43
+ }
44
+ ]
45
+ },
46
+ "record" : {
47
+ "fields" : [
48
+ {
49
+ "name" : " _id" ,
50
+ "type" : " string"
51
+ },
52
+ {
53
+ "name" : " start" ,
54
+ "type" : " date-time-iso8601"
55
+ },
56
+ {
57
+ "name" : " end" ,
58
+ "type" : " date-time-iso8601"
59
+ },
60
+ {
61
+ "name" : " userId" ,
62
+ "type" : " string"
63
+ },
64
+ {
65
+ "name" : " jobId" ,
66
+ "type" : " string"
67
+ }
68
+ ]
69
+ },
70
+ "record_form" : {
71
+ "fields" : [
72
+ {
73
+ "name" : " start" ,
74
+ "type" : " date-time-iso8601"
75
+ },
76
+ {
77
+ "name" : " end" ,
78
+ "type" : " date-time-iso8601"
79
+ },
80
+ {
81
+ "name" : " jobId" ,
82
+ "type" : " string"
83
+ }
84
+ ]
85
+ },
86
+ "session" : {
87
+ "fields" : [
88
+ {
89
+ "name" : " _id" ,
90
+ "type" : " string"
91
+ },
92
+ {
93
+ "name" : " start" ,
94
+ "type" : " date-time-iso8601"
95
+ },
96
+ {
97
+ "name" : " userId" ,
98
+ "type" : " string"
99
+ },
100
+ {
101
+ "name" : " jobId" ,
102
+ "type" : " string"
103
+ }
104
+ ]
105
+ },
106
+ "session_form" : {
107
+ "fields" : [
108
+ {
109
+ "name" : " jobId" ,
110
+ "type" : " string"
111
+ }
112
+ ]
113
+ },
114
+ "user" : {
115
+ "fields" : [
116
+ {
117
+ "name" : " _id" ,
118
+ "type" : " string"
119
+ },
120
+ {
121
+ "name" : " token" ,
122
+ "type" : " string"
123
+ }
124
+ ]
125
+ }
126
+ },
127
+ "resources" : {
128
+ "healthcheck" : {
129
+ "path" : " /_internal_/healthcheck" ,
130
+ "operations" : [
131
+ {
132
+ "method" : " GET" ,
133
+ "responses" : {
134
+ "200" : {
135
+ "type" : " healthcheck"
136
+ },
137
+ "500" : {
138
+ "type" : " [error]"
139
+ }
140
+ }
141
+ }
142
+ ]
143
+ },
144
+ "job" : {
145
+ "path" : " /jobs" ,
146
+ "operations" : [
147
+ {
148
+ "method" : " GET" ,
149
+ "responses" : {
150
+ "200" : {
151
+ "type" : " [job]"
152
+ }
153
+ }
154
+ },
155
+ {
156
+ "method" : " POST" ,
157
+ "body" : {
158
+ "type" : " job_form"
159
+ },
160
+ "responses" : {
161
+ "201" : {
162
+ "type" : " job"
163
+ },
164
+ "400" : {
165
+ "type" : " [error]"
166
+ }
167
+ }
168
+ },
169
+ {
170
+ "method" : " PUT" ,
171
+ "path" : " /:id" ,
172
+ "body" : {
173
+ "type" : " job_form"
174
+ },
175
+ "responses" : {
176
+ "200" : {
177
+ "type" : " job"
178
+ },
179
+ "400" : {
180
+ "type" : " [error]"
181
+ },
182
+ "404" : {
183
+ "type" : " unit"
184
+ }
185
+ }
186
+ },
187
+ {
188
+ "method" : " DELETE" ,
189
+ "path" : " /:id" ,
190
+ "responses" : {
191
+ "204" : {
192
+ "type" : " unit"
193
+ },
194
+ "404" : {
195
+ "type" : " unit"
196
+ }
197
+ }
198
+ }
199
+ ]
200
+ },
201
+ "record" : {
202
+ "path" : " /records" ,
203
+ "operations" : [
204
+ {
205
+ "method" : " GET" ,
206
+ "path" : " /:from/:to" ,
207
+ "parameters" : [
208
+ {
209
+ "name" : " jobId" ,
210
+ "type" : " string" ,
211
+ "required" : false
212
+ }
213
+ ],
214
+ "responses" : {
215
+ "200" : {
216
+ "type" : " [record]"
217
+ }
218
+ }
219
+ },
220
+ {
221
+ "method" : " POST" ,
222
+ "body" : {
223
+ "type" : " record_form"
224
+ },
225
+ "responses" : {
226
+ "201" : {
227
+ "type" : " record"
228
+ },
229
+ "400" : {
230
+ "type" : " [error]"
231
+ }
232
+ }
233
+ }
234
+ ]
235
+ },
236
+ "session" : {
237
+ "path" : " /sessions" ,
238
+ "operations" : [
239
+ {
240
+ "method" : " GET" ,
241
+ "responses" : {
242
+ "200" : {
243
+ "type" : " [session]"
244
+ }
245
+ }
246
+ },
247
+ {
248
+ "method" : " POST" ,
249
+ "path" : " /start" ,
250
+ "body" : {
251
+ "type" : " session_form"
252
+ },
253
+ "responses" : {
254
+ "201" : {
255
+ "type" : " session"
256
+ },
257
+ "404" : {
258
+ "type" : " [error]"
259
+ },
260
+ "409" : {
261
+ "type" : " [error]"
262
+ }
263
+ }
264
+ },
265
+ {
266
+ "method" : " POST" ,
267
+ "path" : " /stop" ,
268
+ "body" : {
269
+ "type" : " session_form"
270
+ },
271
+ "responses" : {
272
+ "200" : {
273
+ "type" : " session"
274
+ },
275
+ "404" : {
276
+ "type" : " [error]"
277
+ },
278
+ "409" : {
279
+ "type" : " [error]"
280
+ }
281
+ }
282
+ }
283
+ ]
284
+ }
285
+ }
286
+ }
You can’t perform that action at this time.
0 commit comments