API versioning (ARCH2202)
Esta página aún no está disponible en tu idioma.
Key python.quality.api-versioning · Severity info · Category quality
API routes without an explicit version make it hard to ship breaking changes without disrupting clients. Add the version to the path or an attribute.
Incorrect
Section titled “Incorrect”@app.get("/users")def list_users(): return repo.all()Correct
Section titled “Correct”@app.get("/v1/users")def list_users(): return repo.all()Add an explicit API version (e.g. a /v1 path prefix) to the routes.