openapi.yaml is a snapshot of the Platform API's published contract,
https://compositecode.github.io/substratalapps.com/openapi.yaml. The C# client in
src/Substratal.Hub.Core/Api/Generated is generated from it by scripts/gen-api.sh.
| Current | |
|---|---|
info.version (contract revision) |
1.0.0-draft.9, 124 operations |
Substratal-Version (API version) |
1 (ApiVersion.Current) |
| Server | https://api.substratalapps.com, the host root with no version in the path |
Substratal-Versionis the API version, a whole number sent as a request header on every call. It changes only for a breaking change. The old version keeps working for at least 6 months, and responses to it carryDeprecationandSunsetheaders. See Conventions → Versioning.info.versioninopenapi.yamlis the contract revision. It moves with every additive change: new endpoints, new optional fields, new enum values. None of those need a newSubstratal-Version.
Additive changes (most of them). api-sync.yml runs daily, regenerates the client when the published contract changes, and opens a pull request. CI builds the app against it. Merge when it's green. To do it by hand:
scripts/gen-api.sh --fetchA new Substratal-Version. This needs a person:
- Read the API Changelog entry for what broke.
- Regenerate from that version's
openapi.yaml, and fix whatever no longer compiles. - Bump
ApiVersion.Currentinsrc/Substratal.Hub.Core/Api/ApiVersioning.cs. - Ship before the old version's
Sunsetdate. Builds still on the old version show "Update available" until then, and "Update required" after it.
Unknown enum values must never be an error (NFR → Versioning). Handle them generically.