
# Moving from 4.x to 5.0

You run a 4.x instance and want to move to 5.0. 5.0 adds no new break: it removes what 4.x kept to give you time to move to the new names, and tightens the API contract. This page says, removal by removal, what you have to do.

## Before upgrading

1. Go through the latest 4.x first and read its startup log: every old name still read leaves a warning there, and that is the list of what 5.0 will no longer read.
2. Make a [backup](sauvegarde-et-restauration.md#2-sauvegarder-à-la-main). The schema only moves forward: a database migrated to 5.0 does not go back under a 4.x image.
3. An instance still on 3.x moves to 4.x first ([Moving from 3.x to 4.0](passer-a-la-4-0.md)): 5.0 can no longer read what 3.x wrote.
4. Read the "⚠️ Attention" entry of the 5.0 release notes, then the sections below.

## What changes

Each paragraph says *before*, *after* and *what you do*.

### Environment variables: the old names are no longer read

- **Before (4.x)**: the twenty-two `BRANDING_*` and `LEGAL_*` variables that 4.0 had grouped were still read, with one startup warning per variable, the grouped key winning. The variables retired in 4.0 (`REMOTE_USER_*`, `SOLVER_WORKER_HOOK_URL`, `SOLVER_WORKER_HOOK_SECRET`, `SOLVER_WORKER_INSTANCE`, `SOLVER_WORKER_START_TIMEOUT`, `SOLVER_WORKER_IDLE_TIMEOUT`, `SOLVER_UNIMPROVED_SECONDS_LIMIT_MAX`) no longer had any effect and the startup named them.
- **After (5.0)**: only the four grouped variables are read (`BRANDING_IMAGES`, `BRANDING_COLORS`, `LEGAL_MENTIONS`, `LEGAL_ACCESSIBILITE`), with `BRANDING_PRODUCT_NAME`, `BRANDING_ORGANISATION`, `BRANDING_SUPPORT_EMAIL` and `LEGAL_DEMO_INSTANCE`, which did not change. An old name still set no longer has any effect: the startup names it in a warning, with the key that replaces it, and goes on; it never refuses to start over it. The warning of the variables retired in 4.0 is gone: they are ignored silently.
- **What you do**: before upgrading, read the startup log of your 4.x and replace each old variable with its key. **One trap**: on a public instance, the five required notices are now read from `LEGAL_MENTIONS` alone; if you still set them through `LEGAL_EDITEUR`, `LEGAL_HEBERGEUR`, `LEGAL_CONTACT`, `LEGAL_BASE_LEGALE` and `LEGAL_CONSERVATION`, 5.0 refuses to start until the grouped variable carries them. On any other instance, the legal notice page, the logo and the palette fall back to their defaults.

| Old variable, no longer read | Grouped variable, key |
| --- | --- |
| `BRANDING_LOGO_URL`, `BRANDING_MASCOT_URL`, `BRANDING_MASCOT_ICON_URL` | `BRANDING_IMAGES`: `logo`, `mascot`, `mascot-icon` |
| `BRANDING_PDF_LOGO`, `BRANDING_PDF_STRIP` | `BRANDING_IMAGES`: `pdf-logo`, `pdf-strip` |
| `BRANDING_ACCENT_COLOR` | `BRANDING_COLORS`: `accent` |
| `BRANDING_PDF_HEADLINE`, `BRANDING_PDF_MUTED`, `BRANDING_PDF_ACCENT`, `BRANDING_PDF_HIGHLIGHT`, `BRANDING_PDF_PILL` | `BRANDING_COLORS`: `pdf-headline`, `pdf-muted`, `pdf-accent`, `pdf-highlight`, `pdf-pill` |
| `LEGAL_EDITEUR`, `LEGAL_HEBERGEUR`, `LEGAL_CONTACT`, `LEGAL_BASE_LEGALE`, `LEGAL_CONSERVATION`, `LEGAL_RESPONSABLE_TRAITEMENT`, `LEGAL_DIRECTEUR_PUBLICATION` | `LEGAL_MENTIONS`: `editeur`, `hebergeur`, `contact`, `base-legale`, `conservation`, `responsable-traitement`, `directeur-publication` |
| `LEGAL_ACCESSIBILITE_ETAT`, `LEGAL_ACCESSIBILITE_DATE_AUDIT`, `LEGAL_ACCESSIBILITE_CONTENUS`, `LEGAL_ACCESSIBILITE_SIGNALEMENT` | `LEGAL_ACCESSIBILITE`: `etat`, `date-audit`, `contenus`, `signalement` |

The detail and an example are in [the environment variables](variables-environnement.md#marque-et-documents) and [the legal notices](mentions-legales.md).

### The old rule names are no longer read

- **Before (4.x)**: a rule name merged or retired in 4.0 was read, with a warning, under the name that replaced it: in the `contraintes` section of a YAML, in `planning.constraint-weights.<old name>`, in the `PUT /api/constraints/{name}…` routes and in the MCP tool `modifier_contrainte`. `maxJoursConsecutifsTravaillesDur` was read as a level: switching it on made `maxJoursConsecutifsTravailles` mandatory.
- **After (5.0)**: only the names of the catalogue (`GET /api/constraints`) exist. An old name is an unknown rule, everywhere:

| Where | What 5.0 answers to an old name |
| --- | --- |
| `contraintes` section of a YAML (`desactivees`, `activees`, `poids`, `niveaux`) | the import is refused (`400`), the message quotes the name |
| `PUT /api/constraints/{name}`, `…/poids`, `…/niveau` | `404` |
| MCP tool `modifier_contrainte` | refused, "Contrainte inconnue" (unknown rule) |
| `planning.constraint-weights.<old name>` | ignored, without a warning: the rule takes its default weight |

- **What you do**: rename before upgrading, from the table below. Your saved editions have nothing to convert, the migrations of 4.0 did it. For the hard form of the run of days, write the level: `niveaux: {maxJoursConsecutifsTravailles: OBLIGATOIRE}` in a YAML, `PUT /api/constraints/maxJoursConsecutifsTravailles/niveau` through the API.

| Old name | Now written |
| --- | --- |
| `dureeQuotidienneMaxMajeur`, `dureeQuotidienneMaxMineur` | `dureeQuotidienneMax` |
| `travailContinuMaxMajeur`, `travailContinuMaxMineur` | `travailContinuMax` |
| `dureeHebdomadaireMaxMineur` | `dureeHebdomadaireMax` |
| `reposHebdomadaireMineur` | `reposHebdomadaireMinimal` |
| `maxJoursConsecutifsTravaillesDur` | `maxJoursConsecutifsTravailles`, at the `OBLIGATOIRE` level |
| `animateurVerrouilleFige`, `indisponibiliteForcee`, `affectationForcee` | nothing: the rule no longer exists, remove the key |

### Scenario YAML: the format of 3.x is no longer read

- **Before (4.x)**: the application wrote `schemaVersion: 7` and still read the format of 3.x (the `schemaVersion` key absent or equal to 1) through a chain of conversions. It also converted on reading, whatever the version, what 4.0 had retired: the merged rule names, the locks of type `ANIMATEUR`, `STAND` and `CRENEAU` of the `plan:` section, the `INDISPONIBILITE_FORCEE` and `AFFECTATION_FORCEE` exceptions, the `ninja` key of the game categories.
- **After (5.0)**: a file without `schemaVersion`, or with `schemaVersion: 1`, is **refused** at import, at validation and by the MCP tools, with a message that says how to convert it; it is never half read. `schemaVersion` becomes required. A file in the current format that still carries an old lock type, a forced exception, an old rule name or the `ninja` key is refused too, the message naming the value or the key. The shipped scenarios are all in `schemaVersion: 7`.
- **What you do**: convert your 3.x files **before upgrading**, while you still have a 4.x: import each one into an edition (Files, "Import"), then export it ("Export the current data as a scenario"); the resulting file reads in 5.0. This applies to your hand-written scenarios, the exports you kept as a way back and the `scenario.yaml` of your end-of-event archives. A file you write by hand now starts with `schemaVersion: 7`. If you no longer have a 4.x, start one for the time of the conversion ([the image of the last 4.x](versioning.md) stays published).

### API: the `ninja`, `ouvertures`, `indisponibilites` and `exclusions` keys are removed

- **Before (4.x)**: a stand still returned and accepted `ouvertures` and `indisponibilites`, the same windows as `plages` split by mode. The `ninja` key was read as `polyvalent` in the body of a game category or of a staff member. A publication that still received `exclusions` ignored it and said so in `avertissements`.
- **After (5.0)**: `GET /api/stands` only returns `plages`, each window saying its `mode` (`OUVERTURE` or `FERMETURE`). A stand body that carries `ouvertures` or `indisponibilites` is refused (`400`, the message names the key) rather than saved without opening hours. The `ninja` key is no longer an alias: a game category that carries it is refused (`400`, the message names the key). `POST /api/planning/publication` refuses `exclusions` likewise, and its answer no longer carries `avertissements`.
- **What you do**: a script that reads the opening hours of a stand filters `plages` by `mode`; a script that writes them sends a single `plages` list, each entry with its `mode`. Replace `ninja` with `polyvalent` in any body sent to `/api/typologies`: a game category written with `ninja` is refused. A script that sent `exclusions` removes the key, and goes through `cibles` to notify only a few people: a publication that still carries `exclusions` is refused and writes to nobody.

### The 4.0 archives are dropped

- **Before (4.x)**: the 4.0 migrations kept under an archive name what they removed from the model, for a return to 3.x on a copy of the database. The application neither read nor exported these tables; they stayed in the nightly backup.
- **After (5.0)**: migration `V171` drops them all, rows included. **This is irreversible**: the schema does not go back, and only a backup taken before the upgrade gives them back.

  | Dropped table | What it kept |
  | --- | --- |
  | `declaration_coequipier_avant_4_0` | carpool requests rejected or cancelled in 3.x, **free-text reason included** |
  | `solve_budget_avant_4_0` | solve duration and plateau set per edition |
  | `kpi_historique_avant_4_0`, `kpi_realise_avant_4_0` | the two tables `mesure_edition` replaced, already copied |
  | `ponderation_contrainte_historique_avant_4_0` | weight history from before the action journal |
  | `exclusion_publication_avant_4_0` | people a 3.x publication had deferred |
  | `contrainte_ad_hoc_avant_4_0` | forced assignments and unavailabilities, free-text reason included |
  | `journee_type_avant_4_0` | day templates the generator could not apply |
  | `gel_referentiel` | the 3.x per-family freeze, replaced by the phase of the edition |
  | `machine_calcul` | machines of the on-demand launcher, removed in 4.0 |

- **What you do**: nothing for the application, which read none of these tables. If one of them still serves you (an unconverted day template to enter again, a reason to read back), export it **before** upgrading; the full backup asked for above is enough. After the upgrade, remove these archives from your record of processing: their retention period ended with 5.0 ([retention periods](conservation-des-donnees.md)). They remain in the backups taken before the upgrade, until those rotate out.

### The 3.x copies before a wipe are deleted

- **Before (4.x)**: a copy before a wipe stored by a 3.x release kept its planning in a column of its own (`plan`), next to a scenario in the 3.x format. 4.x read it on the fly as a recent file: it stayed restorable and downloadable.
- **After (5.0)**: that reading is removed, along with the reading of the 3.x format. Migration `V171` **deletes the copies stored by a 3.x release**, then the `plan` column of `sauvegarde_avant_vidage`; it writes their number to the startup log. **This is irreversible.** The copies taken under 4.x, which carry their planning as the last section of the file, are not touched. A "before restoration" copy that pointed at a deleted copy stays, without that reference.
- **What you do**: **before** upgrading, under 4.x, count these copies:

  ```sql
  SELECT edition_id, id, origine, cree_le FROM sauvegarde_avant_vidage WHERE plan IS NOT NULL ORDER BY cree_le;
  ```

  No row: nothing to do. Otherwise, for each one you still need, restore it (`POST /api/planning/sauvegardes-avant-vidage/{id}/restauration`: the state it replaces is backed up in the recent format) or download it (`GET /api/planning/sauvegardes-avant-vidage/{id}`): the file you get is a complete YAML export, its planning in the `plan:` section, to keep like the database ([the copies before a wipe](rgpd-limites-a-consigner.md#les-copies-avant-vidage)). Imported again by hand, that file restores only the scenario. The others disappear at the upgrade; note it in your record as a purge.

### The old MCP tool names are no longer published

- **Before (4.x)**: the MCP server published 82 names of the 3.x beside the current tools, each with a description starting with "Former name, kept until 5.0: use …". An assistant, a prompt or a script could still call them.
- **After (5.0)**: only the current tools are published. A call under an old name is refused by the server as an unknown tool, with no redirection. The grouped tools do, with an argument (`vue`, `section`, `mode`, `decision`, `source`), what several old names did ([ADR 0127](repo:docs/decisions/0127-un-outil-mcp-par-objet-et-par-verbe.md)); their answer carries the part asked for under a key named like the argument's value, where the old tool returned it bare. The old day-template tools returned their 3.x keys (`journeesTypes`, `journeeTypeId`): the generator's tools say `gabarits`, and a date of the calendar names its `gabarit` there.
- **What you do**: an assistant that reconnects reads the tool list again and has nothing to change. Look for the names of the first column in your prompts, your system instructions and your scripts, and replace them with the tool of the second one and the argument of the third. The tools of the referential freeze and of the day validation, already removed in 4.0, stay replaced by `modifier_phase_edition` and `modifier_etat_journee`.

| Removed name | 5.0 tool | What becomes an argument |
| --- | --- | --- |
| `accepter_demande_echange` | `modifier_demande_echange` | `decision`: `accepter` |
| `activer_contrainte` | `modifier_contrainte` | `actif`: `true` |
| `activer_edition` | `modifier_edition` | `active`: `true` |
| `affecter_journee_type` | `modifier_gabarit` | `dates` argument |
| `affecter_poste` | `modifier_affectation` | `mode`: `affecter` |
| `analyser_effectifs` | `consulter_besoin` | `section`: `borne` |
| `analyser_enchainements` | `consulter_repas_pauses` | `section`: `enchainements` |
| `analyser_faisabilite` | `consulter_besoin` | `section`: `faisabilite` |
| `analyser_marge` | `consulter_besoin` | `section`: `marge`; the former `tension` mode: `consulter_risques`, `section`: `tension` |
| `analyser_pauses` | `consulter_repas_pauses` | `section`: `pauses` |
| `analyser_typologies` | `consulter_besoin` | `section`: `typologie` |
| `appliquer_declaration_disponibilite` | `modifier_declaration_disponibilite` | `decision`: `appliquer` |
| `arreter_solveur` | `arreter_calcul` | same arguments |
| `changements_journee` | `comparer_journee` | same arguments |
| `configurer_collecte_disponibilites` | `modifier_collecte_disponibilites` | same arguments |
| `configurer_foire_echanges` | `modifier_foire_echanges` | same arguments |
| `consulter_animateur` | `lister_animateurs` | `id` argument |
| `consulter_collecte_disponibilites` | `consulter_disponibilites` | `section`: `collecte` |
| `consulter_parametres_legaux` | `consulter_parametres` | `section`: `legal` |
| `consulter_parametres_notifications` | `consulter_parametres` | `section`: `notifications` |
| `consulter_parametres_qualite` | `consulter_parametres` | `section`: `organisation` |
| `consulter_parametres_solveur` | `consulter_parametres` | `section`: `calcul` |
| `consulter_stand` | `lister_stands` | `id` argument |
| `creer_creneaux_recurrents` | `appliquer_generateur_creneaux` | `source`: `recurrence` |
| `creer_stand_complet` | `creer_stand` | same arguments |
| `definir_journee_type` | `modifier_gabarit` | same arguments |
| `definir_prereglage_consigne` | `modifier_prereglage_consigne` | same arguments |
| `deplacer_affectation` | `modifier_affectation` | `mode`: `deplacer` |
| `desactiver_contrainte` | `modifier_contrainte` | `actif`: `false` |
| `desactiver_edition` | `modifier_edition` | `active`: `false` |
| `diagnostiquer_grille_creneaux` | `diagnostiquer_creneaux` | `section`: `grille` |
| `dupliquer_edition` | `creer_edition` | `source` argument |
| `edition_courante` | `lister_editions` | the line whose `active` is true |
| `equite_planning` | `consulter_charge` | `vue`: `equite` |
| `etat_edition` | `consulter_edition` | same arguments |
| `etat_planning` | `consulter_planning` | `vue`: `etat` |
| `etat_publication` | `consulter_publication` | `vue`: `etat` |
| `etat_sauvegardes` | `consulter_sauvegardes` | same arguments |
| `expliquer_affectation` | `analyser_affectation` | same arguments |
| `expliquer_echec_contraintes_dures` | `diagnostiquer_plan` | `ecartsDurs` argument |
| `generer_creneaux_depuis_stands` | `appliquer_generateur_creneaux` | `source`: `stands` |
| `heures_travaillees` | `consulter_charge` | `vue`: `heures` |
| `importer_scenario_yaml` | `importer_scenario` | `yaml` argument |
| `lancer_solveur` | `lancer_calcul` | `deZero`: `true` replaces `reamorcage`: `AUCUN` |
| `lever_consigne` | `supprimer_consigne` | same arguments |
| `lister_affectations` | `consulter_planning` | `vue`: `affectations` |
| `lister_declarations_disponibilite` | `consulter_disponibilites` | `section`: `declarations` |
| `lister_demandes_covoiturage` | `consulter_disponibilites` | `section`: `covoiturage` |
| `lister_destinataires_publication` | `consulter_publication` | `vue`: `destinataires` |
| `lister_jobs` | `consulter_calcul` | `historique` argument |
| `lister_journees_types` | `lister_gabarits` | same arguments |
| `materialiser_journees_types` | `appliquer_generateur_creneaux` | `source`: `gabarits` |
| `modifier_parametres_legaux` | `modifier_parametres` | `section`: `legal` |
| `modifier_parametres_notifications` | `modifier_parametres` | `section`: `notifications` |
| `modifier_parametres_qualite` | `modifier_parametres` | `section`: `organisation` |
| `modifier_poids_contrainte` | `modifier_contrainte` | `poids` argument |
| `plan_formation` | `consulter_risques` | `section`: `former` |
| `previsualiser_application_journees_types` | `previsualiser_generateur_creneaux` | `source`: `gabarits` |
| `previsualiser_creneaux_recurrents` | `previsualiser_generateur_creneaux` | `source`: `recurrence` |
| `previsualiser_derivation_creneaux` | `previsualiser_generateur_creneaux` | `source`: `stands` |
| `previsualiser_reconnaissance_journees_types` | `previsualiser_generateur_creneaux` | `source`: `grille` |
| `reconnaitre_journees_types` | `appliquer_generateur_creneaux` | `source`: `grille` |
| `refuser_declaration_disponibilite` | `modifier_declaration_disponibilite` | `decision`: `refuser` |
| `refuser_demande_echange` | `modifier_demande_echange` | `decision`: `refuser` |
| `reinitialiser_donnees` | `supprimer_donnees_edition` | same arguments |
| `relancer_animateurs` | `envoyer_relance_animateurs` | same arguments |
| `renommer_edition` | `modifier_edition` | `nom` argument |
| `resoudre_incremental` | `lancer_correction` | same arguments |
| `resultats_animateur` | `consulter_planning` | `vue`: `affectations`, with `animateurId` |
| `retirer_dates_journee_type` | `supprimer_gabarit` | `dates` argument |
| `simuler_deplacement` | `simuler_affectation` | `mode`: `deplacer` |
| `simuler_swap` | `simuler_affectation` | `mode`: `affecter` |
| `statut_solveur` | `consulter_calcul` | same arguments |
| `suggerer_reparations` | `simuler_affectation` | `mode`: `candidats` |
| `supprimer_creneau` | `supprimer_creneaux` | `ids` argument |
| `supprimer_job` | `supprimer_calcul` | same arguments |
| `supprimer_journee_type` | `supprimer_gabarit` | `nom` argument |
| `synthese_affectations` | `consulter_planning` | `vue`: `synthese` |
| `synthese_confirmations` | `consulter_publication` | `vue`: `confirmations` |
| `valider_creneaux` | `diagnostiquer_creneaux` | `section`: `controle` |
| `valider_scenario_yaml` | `diagnostiquer_scenario` | same arguments |
| `volumes` | `consulter_besoin` | `section`: `volumetrie` |

### The 3.x routes and fields leave the API

- **Before (4.x)**: the 3.x routes still answered beside the new ones, marked deprecated in the OpenAPI contract, and a few 3.x fields were still read or returned. The CSV imports removed in 4.0 answered `410 Gone` with a message.
- **After (5.0)**: these routes no longer exist; the published contract only describes the current routes. Three fields go with them: `exclusions` (body of `POST /api/planning/publication`, refused with `400`), `avertissements` (answer of the same route) and `automatique` (a version of the plan: read `origine`, which is `AVANT_CALCUL`). Four replacements are not plain renames:
  - a settings section refuses with `400` a field of another section, and its `PUT` reads `modifieLe`: send back the one of the `GET`, or send none (`409 MODIFICATION_CONCURRENTE` on a stale read);
  - the state of a day is declared as a whole (`A_RELIRE`, `RELUE`, `FIGEE`): `RELUE` and `A_RELIRE` remove the day's lock, where the old validation never removed a lock;
  - the phase freezes or reopens the four referential families together, and only a published edition unblocks its structure;
  - the timeslot generator takes the source in the body (`{"source": "GABARITS"}`, `"RECURRENCE"` with `recurrence`, `"STANDS"` with `derivation`), names `gabarits` and `gabaritId` what the day templates named `journeesTypes` and `journeeTypeId`, and returns the report of an application under `application`.
- **What you do**: look for the paths of the first column in your scripts and your integrations, and move to those of the second. Check that no client reads `avertissements` or `automatique`. The screens of the application already called none of these routes.

| Removed route | 5.0 route |
| --- | --- |
| `GET /api/validations`, `POST /api/validations`, `DELETE /api/validations/{id}` | `GET /api/etats-journee`, `PUT /api/etats-journee/{jour}` |
| `PUT /api/editions/courant/gel/{famille}`, `DELETE /api/editions/courant/gel/{famille}` | `PUT /api/editions/courant/phase`; in a published edition, `PUT` and `DELETE /api/editions/courant/deblocage-structure` |
| `GET /api/kpi/historique`, `DELETE /api/kpi/historique/{id}` | `GET /api/mesures-edition/indicateurs`, `DELETE /api/mesures-edition/indicateurs/{id}` |
| `GET /api/planning/realise`, `/detail`, `/export`, `/precedente` | `GET /api/mesures-edition/realise`, same suffixes |
| `/api/planning/snapshots` and everything under it | `/api/planning/versions`, same suffixes |
| `GET /api/journees-types`, `PUT /api/journees-types/calendrier` | `GET /api/generateur-creneaux`, `PUT /api/generateur-creneaux/calendrier` |
| `POST /api/journees-types`, `PUT` and `DELETE /api/journees-types/{id}` | `POST /api/generateur-creneaux/gabarits`, `PUT` and `DELETE /api/generateur-creneaux/gabarits/{id}` |
| `POST /api/journees-types/application`, `/application/apercu` | `POST /api/generateur-creneaux/application`, `/apercu`, source `GABARITS` |
| `POST /api/journees-types/reconnaissance`, `/reconnaissance/apercu` | `POST /api/generateur-creneaux/reconnaissance`, `/reconnaissance/apercu` |
| `POST /api/creneaux/recurrence`, `/recurrence/apercu` | `POST /api/generateur-creneaux/application`, `/apercu`, source `RECURRENCE` |
| `POST /api/creneaux/derivation`, `/derivation/apercu` | `POST /api/generateur-creneaux/application`, `/apercu`, source `STANDS` |
| `GET` and `PUT /api/parametres-legaux` | `GET` and `PUT /api/parametres/legal` |
| `GET` and `PUT /api/parametres-qualite` | `GET` and `PUT /api/parametres/organisation` |
| `GET` and `PUT /api/parametres-solveur` | `GET` and `PUT /api/parametres/calcul` |
| `GET` and `PUT /api/parametres-notifications` | `GET` and `PUT /api/parametres/notifications` |
| `POST /api/postes/{posteId}/simulation-swap` | `GET /api/postes/{posteId}/simulation?animateur=`, on the saved plan, without a body |
| `POST /api/postes/{posteId}/deplacement/simulation` | `GET /api/postes/{posteId}/simulation`, same parameters |
| the CSV imports of game categories, locations, stands, timeslots and day templates, and the stand matrix (`410` in 4.x) | none: `POST /api/reference-data/import-scenario-fichier` |

### The API contract says what may be null

The application answers exactly as it did in 4.x: it is its description, `/q/openapi` and [`openapi.json`](repo:docs/schema/openapi.json), that becomes exact on two points, whether a field is there and whether it holds `null`.

- **Before (4.x)**: the contract declared nearly every field optional and no `null` at all. A client generated from it still received `null` in fields announced as a string, a number or an object (a date not set yet, the code of a location, a staff member's e-mail), and a response validation tool reported them as violations.
- **After (5.0)**: a response field is declared `required` when it is always written, and its type admits `null` (`"type": ["string", "null"]`, or `anyOf` with `{"type": "null"}` for an object) when it may hold it. A field the server leaves out instead of writing `null` stays optional and carries `x-absent-when-null`. In a request body, `required` keeps its meaning: the server refuses the request without that field.
- **What you do**: if you generate a client from the contract, generate it again and recompile what reads it. Fields that became required are read without a presence test; those that admit `null` need the test the type did not ask for until now. If you call the API without a generated client, you have nothing to change.

### Old screen addresses no longer redirect

- **Before (4.x)**: the address of a screen that was grouped or renamed (by 4.0, or by a 3.x version before it) still led to the screen that replaced it, and an old address parameter (`?axe=`, `?vue=calendrier`, `?onglet=fragilite`) was translated on arrival.
- **After (5.0)**: these redirections are removed. An old screen address is an unknown address: it opens the home page. An old parameter is ignored like any unknown parameter: the page opens on its default view or tab, with no message. Three addresses are still read, because e-mails already sent carry them: `/problemes` (the end-of-solve e-mail), `/jour-j` (the report of an absence) and `/parametres?onglet=globaux` (a failed backup); the e-mails of 5.0 write the current addresses. The links of the staff space, of the calendar subscription and of the wall display do not change.
- **What you do**: before upgrading, go through your bookmarks, your internal help pages, your message templates and the links pinned in your team tools with the table below. Nothing is to be done for the data, the variables or the API.

| Old address | Current address |
| --- | --- |
| `/solveur`, `/solver` | `/journee?onglet=calculer` |
| `/solveur?onglet=versions`, `/versions`, `/instantanes`, `/comparateur`, `/kpi` | `/journee?onglet=versions` (`&editions=toutes` for `/kpi?edition=*`) |
| `/journee?onglet=versions&comparer=a,b` | `/comparer?vue=versions&comparer=a,b` |
| `/editions/comparer?a=…&b=…` | `/comparer?vue=editions&a=…&b=…` |
| `/day-calendar`, `/journee?vue=calendrier` | `/journee?vue=jour&mode=tableau` |
| `/rail-jour`, `/calendar`, `/journee?vue=rail` | `/journee` (the rail's lines in `lignes`, no longer `vue`) |
| `/carte-jour`, `/graphe` | `/journee?vue=carte` |
| `/heatmap`, `/journee?axe=stand` | `/journee?vue=stand` |
| `/repartition-heures`, `/journee?axe=stand&vue=treemap` | `/journee?vue=stand&rendu=treemap` (the day in `jourTreemap`) |
| `/repos`, `/heatmap?view=animateur`, `/journee?axe=personne` | `/journee?vue=personne` (`&rendu=frise` for the timeline) |
| `/hours`, `/equite`, `/journee?vue=personne&rendu=synthese` | `/diagnostic?onglet=charge` (the `q` filter is written `nom`) |
| `/equite?vue=fiche&animateur=X` | `/animateurs/X?section=equite` |
| `/timeline?animateur=X` | `/animateurs/X?section=timeline` |
| `/staffing`, `/marge` | `/diagnostic?onglet=besoin` |
| `/typologies-planning`, `/journee?axe=typologie` | `/diagnostic?onglet=besoin&section=typologie` |
| `/fragilite`, `/marge?mode=apres\|tension`, `/diagnostic?onglet=fragilite\|former\|tension`, `/diagnostic?onglet=besoin&section=former` | `/diagnostic?onglet=risques&section=fragilite\|former\|tension` |
| `/pauses`, `/intendance`, `/journee?vue=pauses` | `/diagnostic?onglet=repas-pauses` (the day in `jour`) |
| `/journee?vue=changements` | `/publication` (the day in `jour`) |
| `/banc-de-touche`, `/diagnostic?onglet=banc` | `/journee?creneau=…&stand=…` |
| `/notifications` | `/?type=messages#a-traiter` |
| `/realise`, `/aujourdhui?onglet=realise` | `/mesures` |
| `/creneaux`, `/decoupage` | `/calendrier` |
| `/ouvertures`, `/calendrier?onglet=horaires` | `/stands/<id>` (the stand's page), or `/stands` |
| `/emplacements` | `/stands?onglet=lieux` |
| `/typologies` | `/stands?onglet=typologies` |
| `/competences` | `/animateurs?onglet=competences` |
| `/disponibilites` | `/animateurs?onglet=disponibilites` (`covoiturage` for car sharing) |
| `/consignes-solveur`, `/ad-hoc-constraints` | `/regles` |
| `/verrouillages` | `/regles?onglet=verrouillages` |
| `/consignes` | `/regles?onglet=consignes` |
| `/constraints`, `/constraints#<règle>` | `/regles?onglet=regles`, `/regles?regle=<règle>` |
| `/regles?onglet=calcul` | `/parametres?onglet=calcul` |
| `/parametres?onglet=legaux` | `/parametres?onglet=legal` |
| `/parametres?onglet=emails`, `/parametres#emails` | `/parametres?onglet=notifications` |
| `/historique` | `/parametres?onglet=historique` (`connexions` for the logins) |
| `/mcp-client` | `/parametres?onglet=mcp` |
| `/data-transfer`, `/data-setup` | `/parametres` |
| `/debug?focus=date-du-jour` | `/parametres?onglet=instance&focus=date-du-jour` |
| `/imports`, `/imports?onglet=animateurs` | `/fichiers`, `/fichiers?cible=animateurs` |
| `/exports`, `/export-csv` | `/fichiers?onglet=exporter` |
| `/exports#archive-evenement`, `/fichiers#archive-evenement` | `/fichiers?onglet=archive` |
| `/validateur-yaml`, `/debug?onglet=yaml` | `/fichiers?cible=verifier` |
| `/debug?onglet=donnees` | `/fichiers?cible=exemples` |
