PhynanxPhynanx

Versioning

  • /v1 prefix. Every route of the API is under /v1 (except /health).
  • One campaign per calculator. The year is part of the slug: impot-revenu-2025 and impot-revenu-2026 are two calculators, each with the rules of its campaign. incomeYear gives the year of the income.
  • Closed years kept apart. A calculation for a past campaign applies the rules of that campaign, never those of a more recent one.
  • version (in GET /v1/calculators and in each calculation response) is the semantic version of the DEFINITION of the calculator (form, graph, outputs); it changes when the definition changes.
  • rulesVersion (in each calculation response) lists the calculation modules applied with their version: it is the record of the exact rule that produced the result. Keep it with any result you store.
  • The OpenAPI document is served by GET /v1/openapi.json. It is generated from the schemas of the routes and checked by the tests at every change: it always describes the API of the deployment that serves it. Its descriptions are in French, and GET /v1/openapi.json?locale=en serves the same document with English descriptions.

The deprecation policy and the public changelog will be set before the API opens to developers (phase 5 of the roadmap).