SIGN IN SIGN UP

request-body-enum-value-removed is breaking, not optional/info (#1118)

* request-body-enum-value-removed is breaking, not optional/info

Removing a value from a request body enum rejects input a client used to
send, so it is breaking, the same as request-property-enum-value-removed
and request-parameter-enum-value-removed, which are both ERR. It was left
at INFO in the (now legacy) optional-checks set, so oasdiff breaking passed
it silently: a false negative.

- Promote it to ERR in GetAllRules and remove it from GetOptionalRules.
- TestBreaking_ReqBodyEnumRemoved now asserts ERR on the default path (no
  WithOptionalCheck).
- TestBreaking_ReqBodyEnumValueAdded was mislabeled: its fixture removed a
  value while claiming to add one, and passed only because the check was
  INFO. Point it the other direction so it actually adds a value.
- Optional-rule count 7 -> 6.

* drop redundant comment on the default-path enum test

* Assert the correctly-INFO optional checks at their real severity

The tests for response-non-success-status-removed, api-operation-id-removed,
response-property-enum-value-removed, api-tag-removed,
response-mediatype-enum-value-removed, and api-schema-removed force-promoted
each to ERR via WithOptionalCheck and asserted breaking. These checks are
genuinely informational, so assert them via the changelog
(CheckBackwardCompatibilityUntilLevel INFO) at their real INFO severity, and
fix the stale '... is breaking (optional)' comments.
R
Reuven Harrison committed
d8dca4058bd22d8edef71ba9aee99bfd69565a86
Parent: 26f1a12
Committed by GitHub <noreply@github.com> on 7/25/2026, 9:36:02 AM