request-property-became-optional

Request property became optional.

directionrequestareaschemakindrequirednessactionchange

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 request property that was required is now optional. Relaxing a requirement is safe for existing clients: everything they sent before is still valid, they simply have the option to omit the property now.

oasdiff reports this as informational. The reverse, a property becoming required, is breaking.

Example

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

"email" is no longer required. Existing requests that included it are still valid, and clients may now omit it.

Change its severity

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

Then pass it to oasdiff:

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

Related schema rules

Browse all 509 checks →