Bỏ qua để đến nội dung

API conventions

Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.

  • Most HTTP routes: /api/v1/<controller-path> (see setGlobalPrefix in bootstrap-http.ts).
  • UI: default GET /docs — override with SWAGGER_PATH (no leading slash).
  • JSON: GET /docs-json by default (path follows {SWAGGER_PATH}-json).
  • These paths are excluded from the api/v1 prefix so URLs stay stable.
  • Bearer JWT: authorize in Swagger UI (persistAuthorization: true).

Replace with your public API origin when known:

EnvironmentBase URL (example)
Local devhttp://localhost:3000 → Swagger UI at /docs
Staging / productionhttps://<your-api-host>TBD — set here when the hostname is fixed

Full Swagger UI URL: {base}/docs (or /{SWAGGER_PATH} if overridden). OpenAPI JSON: {base}/{SWAGGER_PATH}-json.

  • Send Authorization: Bearer <token> for protected routes.
  • Prefer generated or hand-maintained clients from the OpenAPI document rather than duplicating fields in this docs site.
  • SWAGGER_ENABLED — set to false to disable Swagger entirely.