response-required-property-removed

Response required property removed.

directionresponseareaschemakindexistenceactionremove

Breaking change (level: error)

It removes something the response used to include, so a client that reads it no longer receives it.

What this check detects

A property that the response was guaranteed to include, it was listed under `required`, has been removed. Clients that read that field and rely on it always being present break when it disappears.

Removing a required response property is breaking. Removing an optional one is reported as a warning instead, because a well-written client should already tolerate its absence, though not all do.

Example

Before
After
1responses:1responses:
2 '200':2 '200':
3 description: OK3 description: OK
4 content:4 content:
5 application/json:5 application/json:
6 schema:6 schema:
7 type: object7 type: object
8 properties:8 properties:
9 id:9 id:
10 type: string10 type: string
11 email:
12 type: string
13 required:11 required:
14 - id12 - id
15 - email

The guaranteed "email" field is gone. A client that reads response.email now finds it missing.

How to handle this change

When oasdiff flags response-required-property-removed, you have a few ways to respond:

  • Find a backward-compatible alternative. Redesign the change so clients that followed the old contract keep working, and agree on the approach with whoever introduced it.
  • Release it in a new API version. Keep the current contract and introduce the change in a new version, then deprecate the old one with a sunset date so clients have time to migrate.
  • Accept it as a deliberate breaking change. Sometimes a breaking change is unavoidable, such as an urgent or security fix. Approve it knowingly, document it in your release notes, and tell affected clients. This should be the exception, not a routine way of working.

If oasdiff's verdict does not match your API's compatibility policy, you can also change how it treats response-required-property-removed with 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-required-property-removed warn

Then pass it to oasdiff:

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

Related schema rules

Browse all 509 checks →