This service emits its OpenAPI 3.1 spec via springdoc at
/api/v1/api-docs. The spec is committed to
client-spec/openapi/agents-api.json and used to publish Java, Kotlin,
and TypeScript clients through the shared API client workflow. CI fails
any PR that lets the committed spec or the live springdoc output drift
apart, and runs the shared client workflow in dry-run mode against the
committed spec.
client-spec/openapi/agents-api.json— pinned spec (committed).- Shared workflow
JorisJonkers-dev/github-workflows/.github/workflows/publish-api-clients.yml@v0.8.0— generates and publishes TypeScript package@jorisjonkers-dev/agents-api-clientplus Maven clientsdev.jorisjonkers:agents-api-client-javaanddev.jorisjonkers:agents-api-client-kotlin. OpenApiSpecExportTest(integration tier, tagcontract-export) — boots the full Spring context and dumps the spec to the committed path.- Gradle task
:api:exportOpenApiSpec— runs only the tagged test; the defaultintegrationTesttask excludes the tag. .github/workflows/ci.yml— theAPI Contractjob runsapi-contract-checks, the Gradle export drift gate, andoasdiffbreaking-change checks onclient-spec/openapi/agents-api.json. TheClient Dry Runjob calls the shared client workflow withdry-run: true. All gates feed thePipeline Completeaggregator..github/workflows/release.yml— release-please feeds the release tag into the shared client workflow, which publishes all generated clients after generation and build checks pass.
./gradlew :api:exportOpenApiSpec
git add client-spec/openapi/agents-api.jsonCommit the spec alongside the controller / DTO change in the same PR.
openapi.jsondrift. The Gradle export step in theAPI Contractjob overwrites the committed file with the live springdoc output, thengit diff --exit-codeflags the change. Resolve by running./gradlew :api:exportOpenApiSpeclocally and committing the result.- Breaking API drift.
oasdiffcompares the PR spec againstorigin/main:client-spec/openapi/agents-api.jsonand fails on warnings. - Generated client failure. The shared workflow generates Java, Kotlin, and TypeScript clients from the committed spec. Resolve by fixing the OpenAPI contract or the shared generator inputs.
The JorisJonkers-dev runner image is default@2. A change to the
default runner image, pull policy, or other provisioning behavior must
publish a new default@N setup version and migrate/default-select it
with a new Flyway migration. Do not edit the historical default@1
definition in place.
MockK can throw ClassCastException when a mocked value-class property
returns a raw primitive. Tests should construct real AgentSetupId,
AgentSetupVersion, WorkspaceId, and related value objects in stubs.