1. The problem
In one sentence
The server refuses a request unless it carries something the spec never mentions, for example a header such as X-Tenant.
A story
A multi-tenant service needs to know which customer is calling. The server reads an X-Tenant header and answers 400 with {"code":"missing_header","message":"the X-Tenant header is required"} when it is missing. The spec declares POST /requires-extra-header with a 201 answer, and no header, and no 400. A partner follows the spec exactly and cannot make one successful call.
Why it hurts
A hidden requirement is a secret that every client has to discover by trial and error. It is usually added by a gateway, a middleware or a library, and never reaches the spec.
- For developers: the requirement is often outside the handler (a gateway rule, a tenant middleware), so reading the handler does not show it.
- For managers: every new partner pays an onboarding cost to find the “unwritten rules”. The cost goes into support, not into the product.
- For DevOps: a requirement added at the gateway needs an update to the spec in the same change.
Example
The spec fragment declares no header and no 400:
/requires-extra-header:
post:
summary: The server needs a header the spec never mentions
responses:
"201":
$ref: "#/components/responses/Created"
The server, when asked directly:
POST /conform-fail/requires-extra-header -> 400 {"code":"missing_header","message":"the X-Tenant header is required"}
POST /conform-fail/requires-extra-header (X-Tenant: acme) -> 201 {"id":1}
How to detect it without clrsig
- Make the call exactly as the spec says, and read the
4xxbody. - Search the code, middleware and gateway configuration for headers they require.
How to fix it
There are two usual causes:
- The spec is incomplete (more likely). Declare the header as a required parameter and the
400it produces. - The requirement should not exist. Remove it, or derive it from something the client already sends (for example the credentials).
To tell which: ask whether every client can send it. If yes, document it. Never silence the check.
Related problems
AC-023 A path parameter has a different type than the spec says, AC-003 A required response header is missing, AC-031 A request without credentials is accepted.
Words used on this page are explained once in the glossary.
2. How clrsig helps
Check
CS-RESP-001 Undeclared response status. State: caught. Severity today: failure (exit code 1). The undeclared 400 is the signal.
Command
--paths limits the run to this one operation. It is a POST built from the spec, so it can write data if the server accepts it:
Safety. Run this against a test server, never production.
clrsig conformsendsPOST,PUTandDELETErequests built from the spec: start with--read-only, and take secrets from the environment (${NAME}), never from files in the repository.
clrsig conform specs/conform-fail.yaml \
-b http://localhost:8080/conform-fail \
--env clrsig/environments/conform-fail.yaml \
--paths /requires-extra-header --explain
Exit code: 0 clean, 1 a finding, 2 the spec or the setup is broken. Here it is 1.
What you see
Output from clrsig v0.21.0, recorded on 2026-11-30. The lines for the 75 operations that --paths skipped are left out by grep -v '^ SKIP'; no line is edited.
conform-fail API 1.0.0
Base URL: http://localhost:8080/conform-fail
Limited by --paths /requires-extra-header
FAIL POST /requires-extra-header 400 14ms
✗ POST /requires-extra-header answered 400, but the spec declares only 201
→ [CS-RESP-001] Status 400 is not declared for POST /requires-extra-header. Why: The spec lists the responses POST /requires-extra-header may return (201) and 400 is not one of them. The server refused the request; the reason is usually in the response body (shown under Got), and it may be a missing header, a value it does not accept or a rule the spec does not describe. The server's answer: {"code":"missing_header","message":"the X-Tenant header is required"}. Where: response status 400 (spec: POST /requires-extra-header → responses). Fix: Read the response body under Got to see why the request was refused. Fix what the server objects to (the request this check sends is built from the spec and the environment), or add 400 (or a default response) to POST /requires-extra-header → responses in the spec if the refusal is expected.
FAILED 76 operations · 0 passed · 1 failed · 75 skipped 15ms
How to read it: clrsig reports the 400 and prints the server’s answer: {"code":"missing_header","message":"the X-Tenant header is required"}. That names the header.
Where to look
- Desktop app: Check Conformance shows the failure under “undeclared status”.
- Reports: with
--format json, the finding carries"checkId": "CS-RESP-001".
How clrsig helps you fix it
It proves that a request built as the spec says is refused, which is the evidence the spec is incomplete, and it prints what the server said, which names the missing header here. It cannot add the requirement to the spec.
Limits
- The cause is only as clear as the server’s answer. A server that only says “bad request” leaves you to find the header yourself.
- Adding the header to the environment would make the check pass without fixing the spec.
More ways
Nothing yet.
3. Video brief for Google NotebookLM
VIDEO BRIEF — AC-024 · The server needs something the spec never mentions
Length: 5 to 7 minutes. Language: English. Audience: developers, with a line each for managers and DevOps.
One idea: a requirement that is not in the spec is a secret every client has to discover by trial and error.
Open with this story: A multi-tenant service needs to know which customer is calling. The server reads an X-Tenant header and answers 400 when it is missing. The spec declares a POST with a 201 answer, and no header, and no 400. A partner follows the spec exactly and cannot make one successful call.
Say these facts, in this order:
1. The spec declares a 201 and no header. The server answers 400 and says the X-Tenant header is required.
2. With the header X-Tenant set, the same call answers 201.
3. clrsig sends a request built from the spec. The 400 is not declared, so it reports CS-RESP-001.
4. The finding prints the server's answer, which names the missing header.
5. Two usual causes: the spec is incomplete (declare the header and the 400), or the requirement should not exist.
6. Such requirements are often added by a gateway or middleware, outside the handler.
7. For managers: every new partner pays an onboarding cost to find the unwritten rules.
8. For DevOps: a requirement added at the gateway needs a spec update in the same change.
Show on screen: the spec fragment, the two server answers, the command (clrsig conform specs/conform-fail.yaml -b http://localhost:8080/conform-fail --env clrsig/environments/conform-fail.yaml --paths /requires-extra-header --explain), and the output block, copied exactly from the card.
Name the check: CS-RESP-001, Undeclared response status. Say the clrsig version: v0.21.0.
Explain these words once: header (a named value sent with a request or a response); multi-tenant (one service used by many customers); middleware (code that runs before the handler); exit code (0 clean, 1 a finding, 2 setup or spec broken).
Say what clrsig does not see here: it can only show what the server says; adding the header to the test environment would hide the problem.
Safety line (if a write is shown): Run this against a test server, never production. clrsig conform sends POST, PUT and DELETE requests built from the spec: start with --read-only, and take secrets from the environment (${NAME}), never from files in the repository.
Finish with three recap questions:
1. What did the server require that the spec did not say? (An X-Tenant header.)
2. Where is the reason found? (In the 400 response body.)
3. What is the usual fix? (Declare the header and the 400 in the spec.)
Tease the next video: AC-025 · The wrong API version answers.
Do not: say "contract testing" alone; say clrsig "catches everything"; invent flags, IDs or numbers; read tables aloud; use any fact that is not in the card.