Commit 3151172b authored by David Foucher's avatar David Foucher

Update schema for remuneration

parent 8439bf0c
Pipeline #2824 passed with stage
in 1 minute and 34 seconds
...@@ -37,7 +37,7 @@ paths: ...@@ -37,7 +37,7 @@ paths:
$ref: '#/components/schemas/request' $ref: '#/components/schemas/request'
examples: examples:
compute-request: compute-request:
$ref: '#/components/examples/compute-request' $ref: '#/components/examples/compute-financement-request'
responses: responses:
200: 200:
description: Calcul effectué avec succès description: Calcul effectué avec succès
...@@ -47,7 +47,7 @@ paths: ...@@ -47,7 +47,7 @@ paths:
$ref: '#/components/schemas/collection' $ref: '#/components/schemas/collection'
examples: examples:
compute-success: compute-success:
$ref: '#/components/examples/compute-success' $ref: '#/components/examples/compute-financement-success'
422: 422:
description: Les informations sont invalides description: Les informations sont invalides
content: content:
...@@ -61,6 +61,7 @@ paths: ...@@ -61,6 +61,7 @@ paths:
schema: schema:
$ref: '#/components/schemas/errors' $ref: '#/components/schemas/errors'
/api-moteur/0.7/financement: *baseendpoint /api-moteur/0.7/financement: *baseendpoint
/api-moteur/0.8/financement: *baseendpoint
/remuneration: &baseremuendpoint /remuneration: &baseremuendpoint
post: post:
summary: Lancer un calcul de remuneration summary: Lancer un calcul de remuneration
...@@ -71,17 +72,17 @@ paths: ...@@ -71,17 +72,17 @@ paths:
$ref: '#/components/schemas/request' $ref: '#/components/schemas/request'
examples: examples:
compute-request: compute-request:
$ref: '#/components/examples/compute-request' $ref: '#/components/examples/compute-remuneration-request'
responses: responses:
200: 200:
description: Calcul effectué avec succès description: Calcul effectué avec succès
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/collection' $ref: '#/components/schemas/remuneration'
examples: examples:
compute-success: compute-success:
$ref: '#/components/examples/compute-success' $ref: '#/components/examples/compute-remuneration-success'
422: 422:
description: Les informations sont invalides description: Les informations sont invalides
content: content:
...@@ -94,7 +95,7 @@ paths: ...@@ -94,7 +95,7 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/errors' $ref: '#/components/schemas/errors'
/api-moteur/0.7/remuneration: *baseremuendpoint /api-moteur/0.8/remuneration: *baseremuendpoint
components: components:
schemas: schemas:
request: request:
...@@ -113,12 +114,16 @@ components: ...@@ -113,12 +114,16 @@ components:
type: array type: array
items: items:
$ref: "#/components/schemas/financement" $ref: "#/components/schemas/financement"
remuneration:
type: array
items:
$ref: "#/components/schemas/remuneration"
errors: errors:
type: object type: object
additionalProperties: additionalProperties:
type: string type: string
examples: examples:
compute-request: compute-financement-request:
summary: Données du bénéfiaire et formation summary: Données du bénéfiaire et formation
value: value:
{ {
...@@ -131,7 +136,7 @@ components: ...@@ -131,7 +136,7 @@ components:
"numero": "03_1702030F" "numero": "03_1702030F"
} }
} }
compute-success: compute-financement-success:
summary: Liste des financements éligible summary: Liste des financements éligible
value: value:
{ {
...@@ -167,4 +172,37 @@ components: ...@@ -167,4 +172,37 @@ components:
} }
] ]
} }
compute-remuneration-request:
summary: Données du bénéfiaire et formation
value:
{
"beneficiaire": {
"age": 40,
"naissance": "1980-01-01",
"allocation": 300,
"type_allocation": "ass",
"th": true,
"a_travaille_douze_mois_sur_24_mois": true,
"a_travaille_douze_mois": true,
"a_travaille_six_mois": true,
"parent_isole": false,
"mere_trois_enfant": false,
"veuve_ou_divorcee": false,
"seule_et_enceinte": false,
},
"formation": {
"codes_financeur": [2],
"region": 27,
}
}
compute-remuneration-success:
summary: Rémunération et aides éligibles
value:
{
"remuneration":910.02,
"fin_remuneration":null,
"indemnite_conges_payes":0,
"intitule_remuneration":"Rémunérations applicables",
"remuneration_texte":"C'est une rémunération minimum en fonction de votre expérience"
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment