request-required-property-became-read-only

Request required property became read-only.

directionrequestareaschemakindmutabilityactionchange

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

`readOnly` means a property is returned by the server but not sent by clients. OpenAPI resolves the combination with `required` in the client’s favour: a property that is both required and read-only is required in responses only, never in requests.

So marking a required request property read-only relaxes the request contract, clients no longer need to send it. That is why it is informational rather than breaking.

Example

Before
After
1schema:1schema:
2 type: object2 type: object
3 properties:3 properties:
4 id:4 id:
5 type: string5 type: string
6 readOnly: true
6 name:7 name:
7 type: string8 type: string
8 required: [id, name]9 required: [id, name]

"id" stays in required, but because it is read-only the requirement applies to responses only. Requests that omit it are still valid.

Change its severity

oasdiff reports request-required-property-became-read-only 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-required-property-became-read-only err

Then pass it to oasdiff:

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

Related schema rules

Browse all 509 checks →