api-versioning.md
docs/api-versioning.md
1# API versioning23All application endpoints use the `/api/v1` prefix, including registration and login.4For example, register at `POST /api/v1/users`, log in at `POST /api/v1/auth/login`,5and list documents at `GET /api/v1/documents`.67The OpenAPI paths include the version prefix; the server URL remains the server origin.8Generated Spring interfaces therefore define the same paths as the published contract.9Creation responses return versioned `Location` headers.10Swagger UI and the OpenAPI documentation remain at `/swagger-ui.html` and `/v3/api-docs`.1112Breaking changes require a new major URL version (for example `/api/v2`). Additive,13backward-compatible changes stay in v1. Unsupported versions and unversioned application14paths have no controller mapping and return 404 to authenticated clients. The bearer15security filter still returns 401 first for unauthenticated requests outside public routes.16