request-property-type-changed
Request property type changed.
Breaking change (level: error)
It changes the type the request must use, so requests in the previous type are rejected.
What this check detects
The declared type of a request body property changed so that values a client previously sent are no longer valid. In a JSON body the type is enforced on the wire (`123` and `"123"` are different values), so, for example, changing a property from `string` to `integer` rejects a client that sends `"12ab"` or even a quoted number.
Narrowing a request type is breaking; widening it (accepting everything the old type did, plus more) is reported as a safe generalization instead.
Example
A client sending "age": "42" (a string) is now invalid; the server expects the integer 42.
How to handle this change
When oasdiff flags request-property-type-changed, you have a few ways to respond:
- Find a backward-compatible alternative. Redesign the change so clients that followed the old contract keep working, and agree on the approach with whoever introduced it.
- Release it in a new API version. Keep the current contract and introduce the change in a new version, then deprecate the old one with a sunset date so clients have time to migrate.
- Accept it as a deliberate breaking change. Sometimes a breaking change is unavoidable, such as an urgent or security fix. Approve it knowingly, document it in your release notes, and tell affected clients. This should be the exception, not a routine way of working.
If oasdiff's verdict does not match your API's compatibility policy, you can also change how it treats request-property-type-changed with 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-type-changed warnThen pass it to oasdiff:
oasdiff changelog base.yaml revision.yaml --severity-levels severity.txt