response-header-became-not-nullable

Response-header-became-not-nullable-description.

directionresponseareaheaderskindrequirednessactionchange

Not breaking (level: info)

oasdiff records this in the changelog but does not fail CI by default. Clients that worked under the old contract still work, so existing clients are not affected.

What this check detects

A response header becomes not-nullable when its schema stops allowing null. The server’s output is now a strict subset of before, it never returns null, so a client that already handled the old, wider contract is unaffected. oasdiff reports this as informational.

Example

Before
After
1responses:1responses:
2 '200':2 '200':
3 description: OK3 description: OK
4 headers:4 headers:
5 X-Trace-Id:5 X-Trace-Id:
6 schema:6 schema:
7 type: string7 type: string
8 nullable: true

The server no longer returns null for X-Trace-Id. A client that handled the previous nullable contract still works; it just never sees null now.

Change its severity

oasdiff reports response-header-became-not-nullable as informational, so it does not fail CI. To treat it as a warning or an error under your own compatibility policy, or to turn it off, set its level in a severity-levels file:

Put one rule per line; the level can be err, warn, or info, or none to disable the check entirely:

# severity.txt
response-header-became-not-nullable err

Then pass it to oasdiff:

oasdiff changelog base.yaml revision.yaml --severity-levels severity.txt

Related headers rules

Browse all 506 checks →