This version is in beta. Some features may change before release.

Versioning

Opt-in API versioning - URL-path (/api/v1/...) and accept-header (Accept; version=v2) schemes, allowed/default versions, and reading the resolved version on the request context.

API versioning lets one deployment serve several wire contracts at once - v1 for old clients, v2 for new ones - without forking the app. umbral-rest offers two versioning schemes.

Versioning is opt-in and off by default. A RestPlugin with no .versioning(...) call serves the unversioned API exactly as before: routes mount at /api/<table>/, no version is required, and RequestContext::version is always None.

Info
Once resolved, the version is exposed on the request context (`RequestContext::version` for the CRUD handlers, `ActionContext::version` for `@action` endpoints) as `Option`. Handlers - and, later, `transform` / `computed` callbacks - can branch on it.

The two schemes

restversioningapi