live-tip-20260606181638-api-contract-version-header: Enforce required request header in API contract and runtime #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/live-tip-20260606181638-api-contract-version-header"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Assigned idea
API contract: Enforce required request header in API contract and runtime
Approach: Add an API contract requirement for a request header named x-client-version on GET /v1/status, update runtime routing to validate it, and add a contract test that expects a 400 response when the header is missing. Update task/instruction.md to include the slug live-tip-20260606181638-api-contract-version-header.
Verification: Assert task/instruction.md contains the exact text live-tip-20260606181638-api-contract-version-header
Assert api/openapi.yaml contains the exact text x-client-version
Assert src/api/routes/status.ts contains the exact text x-client-version
Assert test/api-contract-status-header.test.ts contains the exact text expects 400 when x-client-version is missing
Risk: Live smoke generated task; validate by PR diff and gate result.
Required smoke edit: update task/instruction.md with live-tip-20260606181638-api-contract-version-header.
Agent context
Task slug: live-tip-20260606181638-api-contract-version-header
Branch: task/live-tip-20260606181638-api-contract-version-header
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.