Arka /api/v1 Stability & Backward-Compatibility Contract
Effective Version: v1.0.0 (GA)
Arka exposes a single, Code-First OpenAPI 3.1 management API surface under /api/v1/*, derived directly from strongly-typed Go DTOs in pkg/api/ via Huma v2 and published in api/openapi.json.
1. Compatibility Guarantees (All v1.x Releases)
Within the v1.x release line, Arka guarantees strict backward compatibility for all documented /api/v1/* endpoints:
- No Breaking Removals or Renames: Existing paths, HTTP methods, query parameters, path parameters, and JSON response field names will not be removed or renamed.
- Additive Evolution Only:
- New endpoints may be added under
/api/v1/*. - New optional request fields may be added with backward-compatible defaults.
- New fields may be added to JSON response objects (clients MUST ignore unknown JSON fields).
- New enum values may be added to extensible status/kind fields (e.g.
AsyncJob.kind,FormatDescriptor.name).
- New endpoints may be added under
- Canonical Envelopes:
- All collection endpoints return
{ "items": [...], "total": N }(never bare JSON arrays). - All error responses return a single RFC 9457 Problem Details envelope (
type,title,status,code,detail,requestId) with canonicaldomain.ErrorCodevalues.
- All collection endpoints return
- Zero Secret Leakage Guarantee:
- Credential fields (
passwordHash,tokenHash,clientSecret,bindPassword,privateKeyPem, upstream passwords/tokens, webhook secrets) are never serialized in any response DTO. Write-only status is communicated exclusively via boolean flags (hasPassword,hasClientSecret,hasBindPassword,hasPrivateKey,hasSecret).
- Credential fields (
- Data-Plane Protocol Compatibility:
/repository/{name}/{path...}(Nexus 3 drop-in compatible) and/v2/{name}/...(OCI Distribution v2) remain stable across all 26 registered format plugins.
2. Automated Enforcement
Contract stability is continuously verified on every commit by make verify via internal/archtest/openapi_compat_test.go:
- Verifies all management routes remain exclusively under
/api/v1/*(no/api/v2/*or preview routes). - Verifies all GA core endpoints remain present in
api/openapi.json. - Verifies all
*Listresponse schemas exposeitemsandtotal. - Verifies zero secret fields appear in any response schema.
- Verifies
api/openapi.jsonand generated Console TypeScript/Zod clients (console/src/client/*) remain 100% synchronized with Go DTOs.
3. Deprecation Policy
If a /api/v1/* field or endpoint is ever deprecated in a future v1.x minor release:
- It will be marked
deprecated: trueinapi/openapi.jsonand documented in release notes. - It will continue functioning without behavioral breakage for the entire
v1.xlifecycle. - Any breaking contract changes would occur only in a future major version with a minimum 12-month dual-support migration window.