Newer
Older
openapi: 3.0.0
info:
version: 1.0.0
title: REPP Backend
description: ''
security:
- BearerAuth: []
tags:
- name: Auth
- name: Parser
- name: Calculation
- name: Parameters
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
paths:
/login:
post:
tags:
- Auth
summary: Login to get an access token
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UserCredentials'
responses:
'200':
description: Ok.
security: []
/sheetParser:
post:
tags:
- Parser
summary: Given a sheet returns SheetParserResponse
requestBody:
content:
application/octet-stream:
schema:
format: binary
required: true
responses:
'200':
description: Ok.
security:
- BearerAuth: []
/repCalculator:
summary: Given population data calculates its energetic requirement
requestBody:
content:
application/json:
schema:
required: true
responses:
'200':
description: Ok.
security:
- BearerAuth: []
/parameters:
tags:
- Parameters
summary: Get all parameters
responses:
'200':
description: Ok.
'400':
description: Bad request.
security:
- BearerAuth: []
/parameters/weights:
tags:
- Parameters
summary: Get all default weights
responses:
'200':
description: Ok.
'400':
description: Bad request.
security:
- BearerAuth: []
/parameters/extraData:
tags:
- Parameters
summary: Get all extra data
responses:
'200':
description: Ok.
'400':
description: Bad request.
security:
- BearerAuth: []
/parameters/parameterUpdate:
put:
tags:
- Parameters
summary: Update a certain parameter. The array contains exactly one item, unless the parameters to be updated are a trio, in which case all three parameters must be included, or have the TEE/BMR parameter type in which case all equation constants must be included.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Parameter'
required: true
responses:
'200':
description: Ok.
'400':
description: Bad request.
security:
- BearerAuth: []
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
schemas:
Menores:
properties:
edad:
type: integer
peso:
type: integer
Mayores:
properties:
edad:
type: integer
peso:
type: integer
talla:
type: integer
SheetParserResponse:
properties:
hombresMenores:
type: array
items:
$ref: '#/components/schemas/Menores'
mujeresMenores:
type: array
items:
$ref: '#/components/schemas/Menores'
hombres:
type: array
items:
$ref: '#/components/schemas/Mayores'
mujeres:
type: array
items:
$ref: '#/components/schemas/Mayores'
UserCredentials:
properties:
user:
type: string
pass:
type: string
AgeGroupJSON:
properties:
type: string
type: string
type: number
type: number
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
required:
- age
- sex
- medianWeight
- population
MinorPAL:
properties:
lowPALPrevalence:
type: number
moderatePALPrevalence:
type: number
intensePALPrevalence:
type: number
required:
- lowPALPrevalence
- moderatePALPrevalence
- intensePALPrevalence
AdultPAL:
properties:
urbanPercentage:
type: number
activeUrbanPAL:
type: number
lowUrbanPAL:
type: number
ruralPercentage:
type: number
activeRuralPAL:
type: number
lowRuralPAL:
type: number
required:
- urbanPercentage
- activeUrbanPAL
- lowUrbanPAL
- ruralPercentage
- activeRuralPAL
- lowRuralPAL
IndividualMaternity:
properties:
pregnantWomen:
type: number
lactatingWomen:
type: number
required:
- pregnantWomen
- lactatingWomen
PopulationMaternity:
properties:
countryBirthRate:
type: number
countryPopulation:
type: number
required:
- countryBirthRate
- countryPopulation
ExtraData:
properties:
minorPAL:
$ref: '#/components/schemas/MinorPAL'
adultPAL:
$ref: '#/components/schemas/AdultPAL'
maternity18to29:
oneOf:
- $ref: '#/components/schemas/IndividualMaternity'
- $ref: '#/components/schemas/PopulationMaternity'
maternity30to59:
oneOf:
- $ref: '#/components/schemas/IndividualMaternity'
- $ref: '#/components/schemas/PopulationMaternity'
ReqCalculation:
properties:
groups:
type: array
items:
$ref: '#/components/schemas/AgeGroupJSON'
extraData:
$ref: '#/components/schemas/ExtraData'
required:
- groups
- extraData
Parameter:
properties:
parameters:
type: array
items:
oneOf:
- $ref: '#/components/schemas/WeightParameter'
- $ref: '#/components/schemas/ExtraDataParameter'
- $ref: '#/components/schemas/EquationConstantParameter'
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
WeightParameter:
properties:
parameterType:
type: string
ageRange:
type: string
sex:
type: string
value:
type: number
required:
- parameterType
- ageRange
- sex
- value
ExtraDataParameter:
properties:
parameterType:
type: string
id:
type: string
value:
type: number
description:
type: string
required:
- parameterType
- id
- value
EquationConstantParameter:
properties:
parameterType:
type: string
ageRange:
type: string
sex:
type: string
order:
type: number
value:
type: number
description:
type: string
required:
- parameterType
- ageRange
- sex
- order
- value