diff --git a/swagger.yaml b/swagger.yaml index 1adc477fc20beebe342c36d78a08df80e30b3a9f..b962cde77b72b3448bfcec6ef3421e5da3d72013 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -9,6 +9,7 @@ tags: - name: Auth - name: Parser - name: Calculation + - name: Parameters paths: /login: @@ -63,6 +64,60 @@ paths: description: Bad request. security: - BearerAuth: [] + /parameters: + post: + tags: + - Parameters + summary: Get all parameters + responses: + '200': + description: Ok. + '400': + description: Bad request. + security: + - BearerAuth: [] + /parameters/weights: + post: + tags: + - Parameters + summary: Get all default weights + responses: + '200': + description: Ok. + '400': + description: Bad request. + security: + - BearerAuth: [] + /parameters/extraData: + post: + 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 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Parameter' + required: true + responses: + '200': + description: Ok. + '400': + description: Bad request. + security: + - BearerAuth: [] components: securitySchemes: BearerAuth: @@ -114,9 +169,9 @@ components: sex: type: string medianWeight: - type: string + type: number population: - type: string + type: number required: - age - sex @@ -197,4 +252,64 @@ components: $ref: '#/components/schemas/ExtraData' required: - groups - - extraData \ No newline at end of file + - extraData + Parameter: + properties: + parameter: + oneOf: + - $ref: '#/components/schemas/WeightParameter' + - $ref: '#/components/schemas/ExtraDataParameter' + - $ref: '#/components/schemas/EquationConstantParameter' + 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 + + + + \ No newline at end of file