611 lines
19 KiB
Python
611 lines
19 KiB
Python
# Copyright (C) 2022 Entr'ouvert
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify it
|
|
# under the terms of the GNU Affero General Public License as published
|
|
# by the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
import copy
|
|
|
|
BOOLEAN_TYPES = [
|
|
{'type': 'boolean'},
|
|
{
|
|
'type': 'string',
|
|
'pattern': '^([Oo][Uu][Ii]|[Nn][Oo][Nn]|[Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee]|1|0)$',
|
|
'pattern_description': 'Les valeurs "0", "1", "true", "false", "oui" ou "non" sont autorisées (insensibles à la casse).',
|
|
},
|
|
]
|
|
|
|
ID_PROPERTIES = {
|
|
'firstname': {
|
|
'description': 'Prénom',
|
|
'type': 'string',
|
|
},
|
|
'lastname': {
|
|
'description': 'Nom',
|
|
'type': 'string',
|
|
},
|
|
'dateBirth': {
|
|
'description': 'Date de naissance',
|
|
'type': 'string',
|
|
'pattern': '^[0-9]{4}-[0-9]{2}-[0-9]{2}$',
|
|
},
|
|
}
|
|
|
|
LINK_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'Link',
|
|
'description': "Appairage d'un usager Publik à une famille dans Maelis",
|
|
'type': 'object',
|
|
'required': ['family_id', 'firstname', 'lastname', 'dateBirth'],
|
|
'properties': {
|
|
'family_id': {
|
|
'description': 'Numéro DUI',
|
|
'type': 'string',
|
|
},
|
|
},
|
|
'additionalProperties': False,
|
|
}
|
|
LINK_SCHEMA['properties'].update(ID_PROPERTIES)
|
|
|
|
ISEXISTS_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'Exist',
|
|
'description': "Recherche d'un responsable légal ou d'un enfant dans Maelis",
|
|
'type': 'object',
|
|
'required': ['firstname', 'lastname', 'dateBirth'],
|
|
'properties': ID_PROPERTIES,
|
|
'additionalProperties': False,
|
|
}
|
|
|
|
ADDRESS_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'Address',
|
|
'description': 'Informations sur une adresse',
|
|
'type': 'object',
|
|
'required': ['street1', 'town', 'zipcode'],
|
|
'properties': {
|
|
'num': {
|
|
'description': 'numéro',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'numComp': {
|
|
'description': 'Complément du numéro (depuis référentiel)',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'street1': {
|
|
'description': 'Libellé de la voie',
|
|
'type': 'string',
|
|
},
|
|
'street2': {
|
|
'description': 'Complément de la voie',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'town': {
|
|
'description': 'Ville',
|
|
'type': 'string',
|
|
},
|
|
'zipcode': {
|
|
'description': 'Code postal',
|
|
'type': 'string',
|
|
},
|
|
},
|
|
}
|
|
|
|
CONTACT_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'Contact',
|
|
'description': 'Informations sur le contact',
|
|
'type': 'object',
|
|
'properties': {
|
|
'phone': {
|
|
'description': 'Téléphone',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'mobile': {
|
|
'description': 'Portable',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'mail': {
|
|
'description': 'Mail',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'isContactMail': {
|
|
'description': 'Accepte de recevoir des mails',
|
|
'oneOf': BOOLEAN_TYPES,
|
|
},
|
|
'isContactSms': {
|
|
'description': 'Accepte de recevoir des sms',
|
|
'oneOf': BOOLEAN_TYPES,
|
|
},
|
|
'isInvoicePdf': {
|
|
'description': 'Accepte de ne plus recevoir de facture papier',
|
|
'oneOf': BOOLEAN_TYPES,
|
|
},
|
|
},
|
|
}
|
|
|
|
ADDRESSPROF_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'Adresse pro',
|
|
'description': "Informations sur l'adresse professionnelle",
|
|
'type': 'object',
|
|
'properties': {
|
|
'num': {
|
|
'description': "Numéro de l'adresse",
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'street': {
|
|
'description': 'Nom de la voie',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'town': {
|
|
'description': 'Ville',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'zipcode': {
|
|
'description': 'Code postal',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
},
|
|
}
|
|
|
|
PROFESSION_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'Profession',
|
|
'description': 'Informations sur la profession',
|
|
'type': 'object',
|
|
'properties': {
|
|
'codeCSP': {
|
|
'description': 'Catégorie socio-professionnelle (depuis référentiel)',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'profession': {
|
|
'description': 'Profession',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'employerName': {
|
|
'description': "Nom de l'employeur",
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'phone': {
|
|
'description': 'Téléphone',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'addressPro': ADDRESSPROF_SCHEMA,
|
|
},
|
|
}
|
|
|
|
CAFINFO_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'CAF',
|
|
'description': 'Informations sur la CAF',
|
|
'type': 'object',
|
|
'properties': {
|
|
'number': {
|
|
'description': "Numéro d'allocataire",
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'organ': {
|
|
'description': "Nom de l'organisme (depuis référentiel)",
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
},
|
|
}
|
|
|
|
RLINFO_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'RL',
|
|
'description': "Informations sur le responsable légal",
|
|
'type': 'object',
|
|
'required': ['firstname', 'lastname', 'civility', 'quality', 'dateBirth', 'adresse'],
|
|
'properties': {
|
|
'civility': {
|
|
'description': 'civilité (depuis référentiel)',
|
|
'type': 'string',
|
|
'pattern': '.+',
|
|
},
|
|
'quality': {
|
|
'description': 'Qualité (depuis référentiel)',
|
|
'type': 'string',
|
|
'pattern': '.+',
|
|
},
|
|
'adresse': ADDRESS_SCHEMA,
|
|
'contact': {'oneOf': [CONTACT_SCHEMA, {'type': 'null'}]},
|
|
'profession': {'oneOf': [PROFESSION_SCHEMA, {'type': 'null'}]},
|
|
'CAFInfo': {'oneOf': [CAFINFO_SCHEMA, {'type': 'null'}]},
|
|
},
|
|
'additionalProperties': False,
|
|
}
|
|
RLINFO_SCHEMA['properties'].update(ID_PROPERTIES)
|
|
|
|
CHILDBIRTH_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'Child birth',
|
|
'description': "Informations sur la naissance d'un enfant",
|
|
'type': 'object',
|
|
'required': ['dateBirth'],
|
|
'properties': {
|
|
'dateBirth': {
|
|
'description': 'Date de naissance',
|
|
'type': 'string',
|
|
'pattern': '^[0-9]{4}-[0-9]{2}-[0-9]{2}$',
|
|
},
|
|
'place': {
|
|
'description': 'Lieu de naissance',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
},
|
|
}
|
|
|
|
DOCTORADDRESS_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'Doctor address',
|
|
'description': "Informations sur l'adresse du docteur",
|
|
'type': 'object',
|
|
'properties': {
|
|
'street1': {
|
|
'description': 'Libellé de la voie',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'town': {
|
|
'description': 'Ville',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'zipcode': {
|
|
'description': 'Code postal',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
},
|
|
}
|
|
|
|
FAMILYDOCTOR_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'Family doctor',
|
|
'description': "Informations sur le docteur",
|
|
'type': 'object',
|
|
'properties': {
|
|
'name': {
|
|
'description': 'Nom',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'phone': {
|
|
'description': 'Téléphone',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'address': DOCTORADDRESS_SCHEMA,
|
|
},
|
|
}
|
|
|
|
VACCIN_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'Vaccin',
|
|
'description': "Informations sur le vaccin",
|
|
'type': 'object',
|
|
'properties': {
|
|
'code': {
|
|
'description': 'Code du vaccin (depuis référentiel)',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'label': {
|
|
'description': 'Nom du vaccin',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'vaccinationDate': {
|
|
'description': 'Date du vaccin',
|
|
'type': 'string',
|
|
'pattern': '^[0-9]{4}-[0-9]{2}-[0-9]{2}$',
|
|
},
|
|
},
|
|
}
|
|
|
|
MEDICALRECORD_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'Medical record',
|
|
'description': "Informations médicales",
|
|
'oneOf': [
|
|
{
|
|
'type': 'object',
|
|
'properties': {
|
|
'familyDoctor': FAMILYDOCTOR_SCHEMA,
|
|
'vaccinList': {
|
|
'oneOf': [
|
|
{
|
|
'type': 'array',
|
|
'items': VACCIN_SCHEMA,
|
|
},
|
|
{'type': 'null'},
|
|
],
|
|
},
|
|
},
|
|
'additionalProperties': False,
|
|
},
|
|
{'type': 'null'},
|
|
],
|
|
'unflatten': True,
|
|
}
|
|
|
|
PAIINFO_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'PAI',
|
|
'description': "Informations médicales",
|
|
'type': 'object',
|
|
'required': ['code'],
|
|
'properties': {
|
|
'code': {
|
|
'description': 'Code (depuis référentiel)',
|
|
'type': 'string',
|
|
'pattern': '.+',
|
|
},
|
|
'dateDeb': {
|
|
'description': 'Date de début',
|
|
'type': 'string',
|
|
'pattern': '^([0-9]{4}-[0-9]{2}-[0-9]{2}){0,1}$',
|
|
},
|
|
'dateFin': {
|
|
'description': 'Date de fin',
|
|
'type': 'string',
|
|
'pattern': '^([0-9]{4}-[0-9]{2}-[0-9]{2}){0,1}$',
|
|
},
|
|
'description': {
|
|
'description': 'Texte libre de description (max 500 caractères)',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
},
|
|
'additionalProperties': False,
|
|
}
|
|
|
|
CHILD_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'Child',
|
|
'description': "Informations sur la création d'un enfant",
|
|
'type': 'object',
|
|
'required': ['sexe', 'firstname', 'lastname'],
|
|
'oneOf': [
|
|
{'required': ['dateBirth']}, # createFamily
|
|
{'required': ['birth']}, # updateFamily
|
|
],
|
|
'properties': {
|
|
'sexe': {
|
|
'description': 'Sexe (depuis référentiel)',
|
|
'type': 'string',
|
|
'pattern': '.+',
|
|
},
|
|
'birth': CHILDBIRTH_SCHEMA,
|
|
'dietcode': {
|
|
'description': 'Code de régime alimentaire (depuis référentiel)',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'bPhoto': {
|
|
'description': 'Autorisation photo',
|
|
'oneOf': BOOLEAN_TYPES,
|
|
},
|
|
'bLeaveAlone': {
|
|
'description': 'Autorisation à partir seul',
|
|
'oneOf': BOOLEAN_TYPES,
|
|
},
|
|
'medicalRecord': {'oneOf': [MEDICALRECORD_SCHEMA, {'type': 'null'}]},
|
|
'paiInfoBean': {'oneOf': [PAIINFO_SCHEMA, {'type': 'null'}]},
|
|
},
|
|
'additionalProperties': False,
|
|
}
|
|
CHILD_SCHEMA['properties'].update(ID_PROPERTIES)
|
|
|
|
CONTACTLIGHT_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'Contact light',
|
|
'description': "Informations de contact pour les personnes autorisées à récupérer les enfants ou à prévenir en cas d'urgence",
|
|
'type': 'object',
|
|
'properties': {
|
|
'phone': {
|
|
'description': 'Téléphone',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'mobile': {
|
|
'description': 'Portable',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'mail': {
|
|
'description': 'Mail',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
},
|
|
}
|
|
|
|
FAMILYPERSON_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'Family person',
|
|
'description': "Informations sur les personnes autorisées à venir chercher les enfants ou à prévenir en cas d'urgence",
|
|
'type': 'object',
|
|
'required': ['firstname', 'lastname', 'dateBirth', 'quality'],
|
|
'properties': {
|
|
'civility': {
|
|
'description': 'civilité (depuis référentiel)',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'quality': {
|
|
'description': 'Qualité',
|
|
'type': 'string',
|
|
'pattern': '.+',
|
|
},
|
|
'sexe': {
|
|
'description': 'Sexe (depuis référentiel)',
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'contact': {'oneOf': [CONTACTLIGHT_SCHEMA, {'type': 'null'}]},
|
|
},
|
|
'unflatten': True,
|
|
'additionalProperties': False,
|
|
}
|
|
FAMILYPERSON_SCHEMA['properties'].update(ID_PROPERTIES)
|
|
|
|
AUTHORIZEDPERSON_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'Family persons',
|
|
'description': "Informations sur les personnes autorisées à venir chercher les enfants ou à prévenir en cas d'urgence",
|
|
'type': 'object',
|
|
'properties': {
|
|
'personList': {
|
|
'oneOf': [
|
|
{
|
|
'type': 'array',
|
|
'items': FAMILYPERSON_SCHEMA,
|
|
},
|
|
{'type': 'null'},
|
|
],
|
|
},
|
|
},
|
|
}
|
|
|
|
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': ['categorie', 'situation'],
|
|
'properties': {
|
|
'categorie': {
|
|
'description': 'Categorie (depuis référentiel)',
|
|
'type': 'string',
|
|
'pattern': '.+',
|
|
},
|
|
'situation': {
|
|
'description': 'Situation familiale (depuis référentiel)',
|
|
'type': 'string',
|
|
'pattern': '.+',
|
|
},
|
|
'flagCom': {
|
|
'description': 'Hors commune',
|
|
'oneOf': BOOLEAN_TYPES,
|
|
},
|
|
'nbChild': {
|
|
'description': "Nombre d'enfants à charge",
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'nbTotalChild': {
|
|
'description': "Nombre total d'enfants",
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'nbAES': {
|
|
'description': "Nombre d'AES",
|
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
|
},
|
|
'rl1': RLINFO_SCHEMA,
|
|
'rl2': RLINFO_SCHEMA,
|
|
'emergencyPersonList': {
|
|
'oneOf': [
|
|
{
|
|
'type': 'array',
|
|
'items': AUTHORIZEDPERSON_SCHEMA,
|
|
},
|
|
{'type': 'null'},
|
|
],
|
|
},
|
|
'childList': {
|
|
'oneOf': [
|
|
{
|
|
'type': 'array',
|
|
'items': CHILD_SCHEMA,
|
|
},
|
|
{'type': 'null'},
|
|
],
|
|
},
|
|
},
|
|
'unflatten': True,
|
|
'additionalProperties': False,
|
|
}
|
|
|
|
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'][0]['items']
|
|
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']
|
|
del CREATE_RL1_SCHEMA['properties']['emergencyPersonList']
|
|
del CREATE_RL1_SCHEMA['properties']['childList']
|
|
del CREATE_RL1_SCHEMA['properties']['rl1']['properties']['contact']
|
|
del CREATE_RL1_SCHEMA['properties']['rl1']['properties']['profession']
|
|
del CREATE_RL1_SCHEMA['properties']['rl1']['properties']['CAFInfo']
|
|
|
|
UPDATE_RL1_SCHEMA = copy.deepcopy(RLINFO_SCHEMA)
|
|
UPDATE_RL1_SCHEMA['required'] = ['firstname', 'lastname', 'civility', 'quality', 'dateBirth']
|
|
del UPDATE_RL1_SCHEMA['properties']['adresse']
|
|
del UPDATE_RL1_SCHEMA['properties']['contact']
|
|
del UPDATE_RL1_SCHEMA['properties']['profession']
|
|
del UPDATE_RL1_SCHEMA['properties']['CAFInfo']
|
|
|
|
CREATE_RL2_SCHEMA = copy.deepcopy(RLINFO_SCHEMA)
|
|
CREATE_RL2_SCHEMA['unflatten'] = True
|
|
del CREATE_RL2_SCHEMA['properties']['contact']
|
|
del CREATE_RL2_SCHEMA['properties']['profession']
|
|
del CREATE_RL2_SCHEMA['properties']['CAFInfo']
|
|
|
|
UPDATE_RL2_SCHEMA = copy.deepcopy(UPDATE_RL1_SCHEMA)
|
|
|
|
CREATE_CHILD_SCHEMA = copy.deepcopy(CHILD_SCHEMA)
|
|
CREATE_CHILD_SCHEMA['unflatten'] = True
|
|
del CREATE_CHILD_SCHEMA['properties']['dietcode']
|
|
del CREATE_CHILD_SCHEMA['properties']['medicalRecord']
|
|
del CREATE_CHILD_SCHEMA['properties']['paiInfoBean']
|
|
|
|
UPDATE_CHILD_SCHEMA = copy.deepcopy(CREATE_CHILD_SCHEMA)
|
|
|
|
UPDATE_COORDINATE_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'Update coordinate',
|
|
'description': "Mise à jour des coordonnées d'un responsable légal",
|
|
'type': 'object',
|
|
'required': ['adresse'],
|
|
'properties': {
|
|
'adresse': ADDRESS_SCHEMA,
|
|
'contact': {'oneOf': [CONTACT_SCHEMA, {'type': 'null'}]},
|
|
'profession': {'oneOf': [PROFESSION_SCHEMA, {'type': 'null'}]},
|
|
'CAFInfo': {'oneOf': [CAFINFO_SCHEMA, {'type': 'null'}]},
|
|
},
|
|
'unflatten': True,
|
|
'additionalProperties': False,
|
|
}
|
|
|
|
CHILDPERSON_SCHEMA = copy.deepcopy(FAMILYPERSON_SCHEMA)
|
|
CHILDPERSON_SCHEMA['required'] = ['firstname', 'lastname', 'dateBirth']
|
|
del CHILDPERSON_SCHEMA['properties']['quality']
|
|
|
|
PERSONQUALITY_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'Child person quality',
|
|
'description': "Informations sur la qualité des personnes autorisées à venir chercher l'enfant",
|
|
'type': 'object',
|
|
'required': ['code'],
|
|
'properties': {
|
|
'code': {
|
|
'description': 'Le code (depuis référentiel)',
|
|
'type': 'string',
|
|
'pattern': '.+',
|
|
},
|
|
},
|
|
}
|
|
|
|
CHILDPERSON2_SCHEMA = {
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
'title': 'Family persons',
|
|
'description': "Informations sur les personnes autorisées à venir chercher l'enfant avec leur qualité",
|
|
'type': 'object',
|
|
'required': ['personInfo', 'personQuality'],
|
|
'properties': {
|
|
'personInfo': CHILDPERSON_SCHEMA,
|
|
'personQuality': PERSONQUALITY_SCHEMA,
|
|
},
|
|
'unflatten': True,
|
|
}
|