response-header-type-specialized

Response-header-type-specialized-description.

directionresponseareaheaderskindtypeactionspecialize

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

Narrowing what a response header can contain is the safe direction: every value the server can now return was already valid under the old, wider type, so a client written for the old type still handles it.

A header declared `number` that becomes `integer` now only ever carries whole numbers, which were always valid numbers. oasdiff reports this as informational, not breaking.

Example

Before
After
1responses:1responses:
2 '200':2 '200':
3 description: OK3 description: OK
4 headers:4 headers:
5 X-Rate-Limit:5 X-Rate-Limit:
6 schema:6 schema:
7 type: number7 type: integer

Every integer the server can now return was already a valid number, so a client reading X-Rate-Limit as a number is unaffected.

Change its severity

oasdiff reports response-header-type-specialized 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-type-specialized err

Then pass it to oasdiff:

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

Related headers rules

Browse all 506 checks →