new-optional-request-default-parameter-to-existing-path

Optional request parameter added at path level.

directionrequestareaparameterskindexistenceactionadd

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 parameter declared directly under a path, above the individual operations, applies to every operation on that path. This check covers a new **optional** one added there.

Because it is optional, existing clients that do not send it stay valid, so the change is informational. The required version of the same change is breaking: it invalidates every call to every method on the path at once.

Example

Before
After
1paths:1paths:
2 /users:2 /users:
3 parameters:
4 - name: verbose
5 in: query
6 required: false
7 schema:
8 type: boolean
3 get:9 get:
4 responses:10 responses:
5 '200':11 '200':
6 description: OK12 description: OK

The optional "verbose" parameter is inherited by GET /users and any other operation on the path. Clients that omit it are unaffected.

Change its severity

oasdiff reports new-optional-request-default-parameter-to-existing-path 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-default-parameter-to-existing-path err

Then pass it to oasdiff:

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

Related parameters rules

Browse all 509 checks →