schemas: add Scrutin schemas

parent 37036092
Pipeline #5742 passed with stages
in 3 minutes and 3 seconds
......@@ -112,7 +112,7 @@ qa:
- /bin/true
script:
- set -x
- for project in AMO30_tous_acteurs_tous_mandats_tous_organes_historique_nettoye Dossiers_Legislatifs_XIV_nettoye Dossiers_Legislatifs_XV_nettoye Amendements_XV_nettoye Agenda_XIV_nettoye Agenda_XV_nettoye ; do
- for project in AMO30_tous_acteurs_tous_mandats_tous_organes_historique_nettoye Dossiers_Legislatifs_XIV_nettoye Dossiers_Legislatifs_XV_nettoye Amendements_XV_nettoye Agenda_XIV_nettoye Agenda_XV_nettoye Scrutins_XIV_nettoye Scrutins_XV_nettoye ; do
- curl --request POST --form "token=$DATA_TRICOTEUSES_FR_TRIGGER_TOKEN" --form ref=master --form "variables[PROJECT]=$project" https://git.en-root.org/api/v4/projects/59/trigger/pipeline # tricoteuses/tricoteuses-assemblee-qa
- done
- curl --request POST --form "token=$DATA_SITE_TRIGGER_TOKEN" --form ref=master https://git.en-root.org/api/v4/projects/9/trigger/pipeline # tricoteuses/data-site
......@@ -184,6 +184,7 @@ npx babel-node --extensions .ts -- src/scripts/validate_json.ts --repository=$(g
npx babel-node --extensions .ts -- src/scripts/validate_json.ts --repository=$(git rev-parse --show-toplevel) -s dossier/DossierLegislatif.json -r "dossier/*.json" -r "document/*.json" --data "../data/assemblee-nettoye/Dossiers_Legislatifs_{XIV,XV}_nettoye/dossiers/**/*.json"
npx babel-node --extensions .ts -- src/scripts/validate_json.ts --repository=$(git rev-parse --show-toplevel) -s amendement/Amendement.json -r 'amendement/*.json' --data '../data/assemblee-nettoye/Amendements_XV_nettoye/**/*.json'
npx babel-node --extensions .ts -- src/scripts/validate_json.ts --repository=$(git rev-parse --show-toplevel) -s agenda/Agenda.json -r 'agenda/*.json' --data '../data/assemblee-nettoye/Agenda_{XIV,XV}_nettoye/**/*.json'
npx babel-node --extensions .ts -- src/scripts/validate_json.ts --repository=$(git rev-parse --show-toplevel) -s scrutin/Scrutin.json -r 'scrutin/*.json' --data '../data/assemblee-nettoye/Scrutins_{XIV,XV}_nettoye/**/*.json'
```
If an error occurs and the schema must be fixed:
......
{
"title": "Decompte des voix",
"description": "",
"type": "object",
"additionalProperties": false,
"properties": {
"abstentions": {
"type": "string"
},
"contre": {
"type": "string"
},
"nonVotants": {
"type": "string"
},
"nonVotantsVolontaires": {
"type": "string"
},
"pour": {
"type": "string"
}
},
"required": [
],
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "DecompteVoix.json",
"$$target": "DecompteVoix.json"
}
{
"title": "Dysfonctionnement",
"description": "",
"type": "object",
"additionalProperties": false,
"properties": {
"abstentions": {
"items": {
"$ref": "Votant.json"
},
"type": "array"
},
"contre": {
"items": {
"$ref": "Votant.json"
},
"type": "array"
},
"nonVotants": {
"items": {
"$ref": "Votant.json"
},
"type": "array"
},
"nonVotantsVolontaires": {
"items": {
"$ref": "Votant.json"
},
"type": "array"
},
"pour": {
"items": {
"$ref": "Votant.json"
},
"type": "array"
}
},
"required": [
],
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "Dysfonctionnement.json",
"$$target": "Dysfonctionnement.json"
}
{
"title": "Mise au point",
"description": "",
"type": "object",
"additionalProperties": false,
"properties": {
"abstentions": {
"items": {
"$ref": "Votant.json"
},
"type": "array"
},
"contre": {
"items": {
"$ref": "Votant.json"
},
"type": "array"
},
"dysfonctionnement": {
"$ref": "Dysfonctionnement.json"
},
"nonVotants": {
"items": {
"$ref": "Votant.json"
},
"type": "array"
},
"nonVotantsVolontaires": {
"items": {
"$ref": "Votant.json"
},
"type": "array"
},
"pour": {
"items": {
"$ref": "Votant.json"
},
"type": "array"
}
},
"required": [
],
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "MiseAuPoint.json",
"$$target": "MiseAuPoint.json"
}
{
"title": "Organe votant",
"description": "",
"type": "object",
"additionalProperties": false,
"properties": {
"groupes": {
"items": {
"properties": {
"nombreMembresGroupe": {
"type": "string"
},
"organeRef": {
"type": "string"
},
"vote": {
"properties": {
"decompteNominatif": {
"properties": {
"abstentions": {
"items": {
"$ref": "Votant.json"
},
"type": "array"
},
"contre": {
"items": {
"$ref": "Votant.json"
},
"type": "array"
},
"nonVotants": {
"items": {
"$ref": "Votant.json"
},
"type": "array"
},
"pour": {
"items": {
"$ref": "Votant.json"
},
"type": "array"
}
},
"type": "object"
},
"decompteVoix": {
"$ref": "DecompteVoix.json"
},
"positionMajoritaire": {
"enum": [
"abstention",
"contre",
"pour"
],
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"type": "array"
},
"organeRef": {
"type": "string"
}
},
"required": [
],
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "OrganeVotant.json",
"$$target": "OrganeVotant.json"
}
{
"title": "Scrutin",
"description": "",
"type": "object",
"additionalProperties": false,
"properties": {
"schemaVersion": {
"type": "string"
},
"uid": {
"type": "string"
},
"dateScrutin": {
"format": "date-time",
"type": "string"
},
"demandeur": {
"properties": {
"texte": {
"type": "string"
}
},
"type": "object"
},
"legislature": {
"type": "string"
},
"miseAuPoint": {
"$ref": "MiseAuPoint.json"
},
"modePublicationDesVotes": {
"enum": [
"DecompteDissidentsPositionGroupe",
"DecompteNominatif"
],
"type": "string"
},
"numero": {
"type": "string"
},
"objet": {
"properties": {
"libelle": {
"type": "string"
}
},
"type": "object"
},
"organeRef": {
"type": "string"
},
"quantiemeJourSeance": {
"type": "string"
},
"schemaVersion": {
"type": "string"
},
"seanceRef": {
"type": "string"
},
"sessionRef": {
"type": "string"
},
"sort": {
"properties": {
"code": {
"enum": [
"adopté",
"rejeté"
],
"type": "string"
},
"libelle": {
"enum": [
"L'Assemblée nationale n'a pas adopté",
"l'Assemblée nationale a adopté"
],
"type": "string"
}
},
"type": "object"
},
"syntheseVote": {
"properties": {
"annonce": {
"enum": [
"L'Assemblée nationale n'a pas adopté",
"l'Assemblée nationale a adopté"
],
"type": "string"
},
"decompte": {
"$ref": "DecompteVoix.json"
},
"nbrSuffragesRequis": {
"type": "string"
},
"nombreVotants": {
"type": "string"
},
"suffragesExprimes": {
"type": "string"
}
},
"type": "object"
},
"titre": {
"type": "string"
},
"typeVote": {
"properties": {
"codeTypeVote": {
"enum": [
"MOC",
"SAT",
"SPO",
"SPS"
],
"type": "string"
},
"libelleTypeVote": {
"enum": [
"motion de censure",
"scrutin public ordinaire",
"scrutin public solennel",
"scrutin à la tribune"
],
"type": "string"
},
"typeMajorite": {
"enum": [
"majorité absolue des suffrages exprimés",
"majorité des membres composant l'Assemblée nationale",
"majorité des membres composants composant l'Assemblée",
"majorité des membres composants composant l'Assemblée nationale"
],
"type": "string"
}
},
"type": "object"
},
"ventilationVotes": {
"$ref": "OrganeVotant.json"
}
},
"required": [
"uid"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "Scrutin.json",
"$$target": "Scrutin.json"
}
{
"title": "Votant",
"description": "",
"type": "object",
"additionalProperties": false,
"properties": {
"acteurRef": {
"type": "string"
},
"causePositionVote": {
"enum": [
"MG",
"PAN",
"PSE"
],
"type": "string"
},
"mandatRef": {
"type": "string"
},
"parDelegation": {
"type": "boolean"
}
},
"required": [
],
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "Votant.json",
"$$target": "Votant.json"
}
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