toulouse_maelis: use create family schema as reference (#69046)
This commit is contained in:
parent
591ecd06e3
commit
110e638a65
|
@ -482,15 +482,6 @@ PAIINFO_SCHEMA = {
|
|||
],
|
||||
}
|
||||
|
||||
"""
|
||||
I was borred with WSDL specificities and provide all field for the 3 concerned endpoints.
|
||||
Ex: on createFamily, "fsl" will be accepted, even if it should not be provided.
|
||||
|
||||
| enpoint | bean | fsl | dietcode | bPhoto | bLeaveAlone | paiInfoBean |
|
||||
| createFamily | ChildBean | | X | | | |
|
||||
| createChild | ChildCreateBean | | | X | X | X |
|
||||
| updateFamily | ChildInfoBean | X | X | X | X | X |
|
||||
"""
|
||||
CHILD_SCHEMA = {
|
||||
'$schema': 'http://json-schema.org/draft-04/schema#',
|
||||
'title': 'Child',
|
||||
|
@ -591,12 +582,12 @@ AUTHORIZEDPERSON_SCHEMA = {
|
|||
},
|
||||
}
|
||||
|
||||
CREATE_FAMILY_SCHEMA = {
|
||||
UPDATE_FAMILY_SCHEMA = {
|
||||
'$schema': 'http://json-schema.org/draft-04/schema#',
|
||||
'title': 'Family',
|
||||
'description': 'Informations pour créer ou mettre à jour une famille',
|
||||
'type': 'object',
|
||||
'required': ['rl1', 'categorie', 'situation'],
|
||||
'required': ['categorie', 'situation'],
|
||||
'properties': {
|
||||
'categorie': {
|
||||
'description': 'Categorie (depuis référenciel)',
|
||||
|
@ -655,12 +646,13 @@ CREATE_FAMILY_SCHEMA = {
|
|||
'unflatten': True,
|
||||
}
|
||||
|
||||
|
||||
UPDATE_FAMILY_SCHEMA = copy.deepcopy(CREATE_FAMILY_SCHEMA)
|
||||
UPDATE_FAMILY_SCHEMA['required'] = ['categorie', 'situation']
|
||||
|
||||
|
||||
# Schemas below describe parameters of Maelis wrapper around updateFamily endpoint
|
||||
CREATE_FAMILY_SCHEMA = copy.deepcopy(UPDATE_FAMILY_SCHEMA)
|
||||
CREATE_FAMILY_SCHEMA['required'] = ['rl1', 'categorie', 'situation']
|
||||
create_family_child_schema = CREATE_FAMILY_SCHEMA['properties']['childList']['oneOf'][1]['items']
|
||||
del create_family_child_schema['properties']['fsl']
|
||||
del create_family_child_schema['properties']['bPhoto']
|
||||
del create_family_child_schema['properties']['bLeaveAlone']
|
||||
del create_family_child_schema['properties']['paiInfoBean']
|
||||
|
||||
CREATE_RL1_SCHEMA = copy.deepcopy(CREATE_FAMILY_SCHEMA)
|
||||
del CREATE_RL1_SCHEMA['properties']['rl2']
|
||||
|
|
Loading…
Reference in New Issue