Native API versioning and OpenAPI contract
0267c458207082337d9baf1130deeb65f43c9d4a. Version 1.0.1. License MIT. Status: implemented-and-automatically-verified candidate; not published, deployed or production-qualified. This is the component's committed documentation, not proof of a distribution release or production qualification.
The native API is versioned by URL major version (/api/v1) and by Semantic
Versioning for release and contract metadata. The first official release baseline
is 1.0.1 (the independent-review remediation candidate; 1.0.0 was never published); the ecosystem policy is recorded in
ADR 0010.
Current release baseline
The authoritative machine-readable contract is checked in at
openapi/v1/openapi.json and is served at
GET /api/v1/openapi.json (no authentication) with:
X-Melodee-API-Version: 1.0.1ETag: "openapi-1.0.1"Content-Type: application/json
| Item | Value |
|---|---|
| Contract version | 1.0.1 |
| URL major | 1 |
| SHA-256 | 9241a9ab0606c30518d4d904d4dae1d1ea968414daf2d313c9eb9aaedf8d5281 |
| Artifact bytes | 440,301 |
| Paths / operations | 159 / 183 |
| Administrative operations | 76 |
| Schemas | 214 |
| Source development revision | f77dba9ea1b85bece26cb72b19088f3f41087371 |
1.0.0 is preserved unchanged as the prepared baseline. 1.0.1 is the
independent-review remediation candidate and changes only public-share pagination
(opaque composite string cursors) and playback authorization (metadata opens start
a bounded playback window, reported as playbackExpiresAtMillis). See the
remediation report.
Full provenance is recorded in
openapi/v1/PROVENANCE.json. The runtime version
(/healthz, /api/v1/capabilities, /api/v1/admin/metrics and
melodee-api --version) is the same Cargo package version.
The release baseline is not published and not production-qualified. No
container image, package, GitHub release or API release tag has been created for
it. openapi/v1/PROVENANCE.json records that state explicitly.
Versioning rules
info.version is MAJOR.MINOR.PATCH and equals the melodee-api release
version:
- PATCH — backward-compatible corrections.
- MINOR — backward-compatible additions such as new optional fields, optional parameters or operations.
- MAJOR — breaking API contract changes. A MAJOR change requires a new URL
major (
/api/v2); published operations are never removed or redefined in place under an existing URL major.
x-melodee-api-major is the URL major (1). The /api/v1 namespace is preserved.
A release candidate may be built as an artifact version 1.0.0-rc.N for
verification; the OpenAPI contract baseline remains 1.0.0. An RC is not a
supported release and is not published as one.
Development-era history
Before the first official release, the native contract was revised repeatedly
while the backend was implemented: 1.0.1, 1.1.0, 1.6.0–1.6.2, 1.7.0 and
finally 1.8.0. These were internal pre-release engineering revisions. They
were never published as supported public API versions, and no API release tag
exists for them. They remain preserved in Git history, the changelog,
design/evidence/implementation/ and the comparison below.
The 1.8.0 development artifact (source revision
99148fd3fb5b76ea63e3c65ad60fe618e7037148, SHA-256
95ef6337e5167d46989d2ada9ac82481e40fa85f7dfdd51914991e43d7ae05b0) is not the
authoritative baseline. The reset changes only release metadata:
The comparison proves that all 159 paths, 183 operations, 214 schemas, security,
pagination, error and streaming behavior are unchanged. Clients pinned to a
development-era revision must adopt the 1.0.0 artifact explicitly. A client must
not auto-select the numerically highest version, reject 1.0.0 because
1.0.0 < 1.8.0, or add a permanent arbitrary downgrade bypass.
Compatibility and client negotiation
Clients should fetch /api/v1/openapi.json (or consume the pinned artifact) and
compare the URL major with /api/v1/capabilities.apiVersion before using an
operation. They should pin the release baseline and its SHA-256, and declare the
supported API contract range and required capabilities independently of their own
(application) version.
Unknown response fields must be ignored; missing optional fields and null are
meaningful. Additive fields and new optional parameters may appear in a later
minor release without changing the URL major. Removed operations and incompatible
schema changes never appear under /api/v1.
Applications are versioned with Calendar Versioning; see release process and downstream handoff.
Validation and publication
python3 scripts/do-prechecks.py runs:
- the
openapicheck: OpenAPI 3.1, semantic contract version, major marker, bearer scheme, versioned path namespace, unique operationIds, responses and required native-client paths; - the
versioncheck:VERSION, Cargo workspace/packages,Cargo.lock, OpenAPIinfo.version,PROVENANCE.jsondigest/counts, runtime derivation, container labels and primary documentation must agree; tests/contract_api.rs: the artifact served by the binary is byte-for-byte the checked-in artifact, the version header and ETag match, and every published operation is mounted and every mounted/api/v1route is published (both drift directions).
CI runs the same gate (.github/workflows/ci.yml). A tag-triggered release
workflow validates the tag against VERSION and the artifact, but does not publish
from this repository state; see release process.
The artifact is published with the API release; do not hand-edit it in a client
repository. A contract change requires review and a changelog entry under the
released contract version. Use scripts/openapi-baseline.py only for a deliberate
release-baseline metadata reset; it refuses to change the functional surface.
Scoped test credential for initial CLI integration
The circular S1-06/S3-03 dependency is resolved for the initial C3 slice by an explicit, test-only automation credential against a disposable API. See CLI bootstrap. Full native CLI authentication remains S3-03/C4 and is not replaced by this test path.