new-optional-request-property

Optional property added to request.

directionrequestareaschemakindexistenceactionadd

Not breaking (level: info)

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

What this check detects

A new optional property was added to the request body. Existing clients that do not send it stay valid, so this is a safe, additive change.

The required counterpart is breaking: a new required property invalidates requests that omit it.

Example

Before
After
1schema:1schema:
2 type: object2 type: object
3 properties:3 properties:
4 name:4 name:
5 type: string5 type: string
6 nickname:
7 type: string
6 required:8 required:
7 - name9 - name

"nickname" is optional, so clients that do not send it are unaffected.

Change its severity

oasdiff reports new-optional-request-property 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
new-optional-request-property err

Then pass it to oasdiff:

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

Related schema rules

Browse all 509 checks →