1. The problem
In one sentence
The spec says a field is required in the request, and the server accepts a request that does not have it.
A story
The spec says POST /lenient/missing-field needs a body with a name. A client forgets the field and sends {}. The server answers 201 Created and saves a record with no name. Weeks later, a report shows rows with an empty name, and nobody can say which client created them.
Why it hurts
Validation at the door is what keeps bad data out. A server that skips it moves the problem into the database, and every later reader has to cope with data the spec said could not exist.
- For developers: the check was forgotten, or only types are checked and presence is not. Rows without a required value break later code that trusts the spec.
- For managers: bad data is the most expensive kind: it is found late, and it takes a clean-up as well as a fix. It can also block features that rely on the field.
- For DevOps: add negative tests (requests that must be refused) to the pipeline. A passing happy path does not show that validation exists.
Example
The spec requires name:
NameBody:
type: object
required: [name]
properties:
name: { type: string }
The two servers in the sandbox, asked with an empty body {}:
lenient/missing-field POST {} -> 201 Created
strict/missing-field POST {} -> 400 Bad Request
How to detect it without clrsig
- Send the request with the field left out, with
curl -X POST -d '{}' URL. A correct server answers400or422. - In a review, ask: “where is presence checked, and is it the same place for every route?”
How to fix it
There are two usual causes:
- The code is wrong (more likely). Validate required fields before the handler runs, using the same schema as the spec. A framework validator that reads the spec is better than hand-written checks.
- The spec is wrong. The field is really optional. Remove it from
required.
To tell which: ask whether the system can work with the field missing. Never rely on the client alone to send it.
Related problems
AC-029 A field of the wrong type is accepted, AC-030 A missing required parameter is accepted, AC-005 A required field is missing from the body. Failure-catalog demos: FM-022-07 (an empty string accepted for a required field) and FM-022-08 (a conditional required field not enforced).
Words used on this page are explained once in the glossary.
2. How clrsig helps
Check
CS-PROBE-001 Missing required field accepted. State: caught. Severity today: failure (exit code 1). With --negative, clrsig sends a body without one required field and expects 400 or 422. For a oneOf or anyOf body, every branch is probed with its own required fields.
Command
Each probe sends a deliberately wrong request and passes when the server refuses it with an expected status (here 400 or 422). It fails when the server accepts the bad request. These probes are POST requests, so a lenient server creates data:
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 \
--negative --paths /lenient/missing-field --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 /lenient/missing-field
PASS POST /lenient/missing-field 201 14ms
PASSED 76 operations · 1 passed · 0 failed · 75 skipped 16ms
Negative conformance probes — conform-fail API 1.0.0
FAIL POST /lenient/missing-field — missing required field 'name' (expect 400/422)
server accepted invalid request with 201
PASS POST /lenient/missing-field — wrong type for field 'name' (expect 400/422) 400 1ms
FAILED 2 probes · 1 passed · 1 failed · 0 skipped · 0 errors 3ms
1 probe: the server accepted a request it should have rejected — fix server validation
How to read it: the first part is the normal valid request, which passes. The probes follow. The probe “missing required field ‘name’” fails because the server answered 201. The probe “wrong type for field ‘name’” passes: this server does check types.
For the strict control (--paths /strict/missing-field) both probes pass: PASSED 2 probes · 2 passed.
Where to look
- Desktop app: the Check Conformance page has a “Get CLI command” button that shows the command for a run, so you can add
--negativeto it. - Reports:
--format jsonlists the probes underprobes, and--format junithas one test case per probe. A failed probe fails them, as it does the exit code. - GitHub Action: the
negativeinput turns it on.
How clrsig helps you fix it
It names the field, the answer it got and the answer it expected, and the closing line says “fix server validation”. It cannot tell you where in the code the check should be.
Limits
- Only these probe kinds are generated: a missing required field, a wrong field type, a missing required query parameter or header, and missing credentials. Empty strings, conditional rules and other custom validation are not probed (AC-033).
- Another
4xxpasses with a warning (CS-PROBE-007), and a429leaves the probe not checked (CS-PROBE-008);--fail-on warningfails the run on both. A pass is still no proof that the request was refused for this fault, so read the status printed beside it. The probe does not check the error body.
More ways
Nothing yet.
3. Video brief for Google NotebookLM
VIDEO BRIEF — AC-028 · A request without a required field is accepted
Length: 5 to 7 minutes. Language: English. Audience: developers, with a line each for managers and DevOps.
One idea: a server must refuse a request that breaks the spec; if it accepts it, the problem moves into your data.
Open with this story: The spec says an operation needs a body with a name. A client forgets the field and sends an empty body. The server answers 201 Created and saves a record with no name. Weeks later a report shows rows with an empty name, and nobody can say which client created them.
Say these facts, in this order:
1. The spec requires name. The lenient server accepts an empty body with 201. The strict server answers 400.
2. Validation at the door keeps bad data out; skipping it moves the problem into the database.
3. A passing happy path does not show that validation exists; you need requests that must be refused.
4. clrsig conform with negative sends a body without one required field and expects 400 or 422.
5. The probe fails when the server accepts it; the output says the server accepted an invalid request with 201 and tells you to fix server validation.
6. The probe for a wrong field type passes on this server, so only presence is missing.
7. Two usual causes: the code is wrong (validate before the handler, using the same schema as the spec), or the spec is wrong because the field is really optional.
8. For managers: bad data is found late and costs a clean-up as well as a fix.
9. For DevOps: add negative tests to the pipeline.
Show on screen: the NameBody schema, the two server answers, the command (clrsig conform specs/conform-fail.yaml -b http://localhost:8080/conform-fail --env clrsig/environments/conform-fail.yaml --negative --paths /lenient/missing-field --explain), and the output block, copied exactly from the card.
Name the check: CS-PROBE-001, Missing required field accepted. Say the clrsig version: v0.21.0.
Explain these words once: negative probe (a request that is wrong on purpose, which the server must refuse); 4xx (a status that says the request was refused); validation (checking input before using it); exit code (0 clean, 1 a finding, 2 setup or spec broken).
Say what clrsig does not see here: custom rules such as empty strings or conditional fields are not probed; a probe refused with another 4xx passes with a warning, a 429 is reported as not checked, and even an expected status is no proof the request was refused for that fault; it does not check the error body.
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 should a server answer to a body without a required field? (400 or 422.)
2. Why is a passing happy path not enough? (It does not show that validation exists.)
3. What does the probe do when the server accepts the bad request? (It fails.)
Tease the next video: AC-029 · A field of the wrong type is accepted.
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.