response-write-only-property-enum-value-added

Response write-only property enum value added.

directionresponseareaschemakindvaluesactionadd

Not breaking (level: info)

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

What this check detects

`writeOnly` marks a property that clients send in requests but the server never returns in responses. So a `writeOnly` property inside a response schema is documentation of a field that is not actually sent back.

That is why adding an enum value to it is informational: the value can never reach a client, so no client can break on it. The same change on an ordinary response property is breaking, because the server may then return a value the client was not written to handle.

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 password:9 password:
10 type: string10 type: string
11 writeOnly: true11 writeOnly: true
12 enum: [weak, strong]12 enum: [weak, strong, legacy]

The "legacy" value is added to a write-only property, which the server does not return, so no client can receive it.

Change its severity

oasdiff reports response-write-only-property-enum-value-added 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
response-write-only-property-enum-value-added err

Then pass it to oasdiff:

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

Related schema rules

Browse all 509 checks →