The rule, not an opinion
Every change comes with the rule that classified it and the sections of the specification behind it, mostly 5.5. If you disagree, you are disagreeing with a sentence you can read.
Tools · Keep it compatible · v0.2.0
restep-diffDid you break it?Compares two discovery documents and sorts every change into breaking, deprecation or compatible, with the rule that says so. Exits with 1 when something breaks.
Node 18 or later · npm install -g restep-diff
Every change comes with the rule that classified it and the sections of the specification behind it, mostly 5.5. If you disagree, you are disagreeing with a sentence you can read.
A sort that disappears after its sunset in deprecations is the retirement 5.5 allows. The same sort gone without notice, or before the date, is breaking, and the message says which.
Each side is a JSON file or the root URL of an API. Compare what is deployed with what you are about to deploy, or two commits of a committed discovery document.
It exits with 1 when something breaks. --markdown gives a changelog or a pull request comment; --json, something for your own scripts.
GET to the root and, if that is not a discovery document, the first rel="service-desc" link that leads to one (4.2). --header credentials only go to each API’s own origin.restep (with the grammar and the suffix of 1.1), version, profiles (with core implied), extensions, batch, idempotency (ttl and anonymous, true when missing), events, status, reasons, singletons and deprecations. In each collection: path, parent, description, methods, item_methods, id_from ("server" when missing), filter, named_filters, collations ("codepoint" for a field that is not listed), sort, max_limit, count, relations, include_depth (1 when missing), sync, actions, language_maps, inherit and deprecations. In each singleton (5.9): path, description, methods, its item and update schemas and deprecations; a singleton with a template or a parent counts as absent, because clients ignore it. Two path templates that only rename their variables are the same URL.schemas.item are what clients receive; those of schemas.create, schemas.update and each action’s input are what they send. So a type that accepts more is compatible on input, while any type change on output is breaking. anyOf and oneOf are flattened: {"anyOf": [s, {"type": "null"}]} reads as “s or null”.kind that fits it, in the place 5.5 puts it: at the root for a profile, an extension, a collection, a singleton or a reason; in the collection or the singleton for the rest. A notice of another kind, or out of place, does not count. A field notice also covers the filters, sorts, includes and input fields of the same name and the dotted paths that start with it, and retiring a profile or an extension also retires those that need it (1.2).--fail-on level.A collection’s sync only counts if profiles announces sync (10). If a whole profile or extension goes, profile.removed or extension.removed says so once, not again for each collection. Members starting with x- are ignored (4.2). Any other unknown member that changes shows up under other changes, so nothing slips by in silence.
Node 18 or later, no dependencies. Run it with npx, or install it with npm install -g restep-diff (or npm install --save-dev restep-diff in a project).
npx restep-diff old.json new.json
npx restep-diff https://api.example.com/ http://localhost:8080/
npx restep-diff --rules # the rule table, in the terminal
Its messages are in Spanish for now, on this page too. Rule ids, severities in --json, pointers and section numbers are the same in any language.
The discovery document of a bookshop on main, against the one in a pull request. Someone moved it to a newer minor version of Restep while it still announces experimental parts, made category required on create, lowered max_limit without notice, removed the title sort (announced, with a sunset that has passed) and announced that rating is going away.
$ npx restep-diff main.json pr.json
restep-diff: main.json → pr.json
Incompatibles (3)
- Restep pasa de "1.0" a "1.1" y se anuncian partes experimentales (sync, batch): solo las usa el cliente que implementa el texto de 1.1 (§1.2)
/restep [restep.experimental; §1.2]
- «category» pasa a ser obligatorio en el cuerpo del POST de «books»
/collections/books/schemas/create/properties/category [input.now-required; §5.5]
- max_limit de «books» pasa de 50 a 25 sin aviso previo en deprecations
/collections/books/max_limit [max-limit.lower; §5.5, §6.4]
Retiradas y avisos (2)
- «books» deja de admitir ordenar por «title»: retirada tras su sunset (2026-06-01T00:00:00Z), como permite §5.5 [sort.removed]
/collections/books/sort [deprecation.retired; §5.5, §12]
- Se anuncia la retirada de field «rating» de «books», con sunset 2027-09-01T00:00:00Z
/collections/books/deprecations [deprecation.announced; §5.5]
Compatibles (6)
- Restep pasa de "1.0" a "1.1"
/restep [restep.minor-up; §1.1]
- Colección nueva «shelves» en "/shelves"
/collections/shelves [collection.added; §5.5]
- «books» tiene un campo nuevo, «year»
/collections/books/schemas/item/properties/year [field.added; §5.5, §3]
- El cuerpo del POST de «books» admite «year»
/collections/books/schemas/create/properties/year [input.added-optional; §5.5]
- «books» admite el filtro «year» (eq, lt, gt)
/collections/books/filter/year [filter.added; §5.5, §6.1]
- «authors» admite PATCH en sus elementos
/collections/authors/item_methods [method.added; §4.3, §5.5]
Otros cambios (2)
- Cambia la descripción de «books»
/collections/books/description [description.changed; §4.3, §5.6]
- Cambia la descripción de la acción «reserve» de «books»
/collections/books/actions/reserve/description [description.changed; §4.3, §5.6]
Resumen: 3 incompatibles, 2 retiradas y avisos, 6 compatibles, 2 otros.
$ echo $?
1
The minor version going up is compatible in itself, but a client that implemented the experimental sync and batch of 1.0 may not use them under 1.1, hence restep.experimental. The three breaking changes make it exit with 1. The retired sort does not: it was announced and its date has passed. With --fail-on deprecation the retirement and the new notice would fail too; with --fail-on none, nothing does.
The document saved from main, against the reference server running locally with this branch’s code. One sort and some room in max_limit are gone, without notice; the rating filter gained null; and categories now accepts ids chosen by the client.
$ npx restep-diff discovery-main.json http://localhost:8080/
restep-diff: discovery-main.json → http://localhost:8080/
Incompatibles (2)
- «books» deja de admitir ordenar por «author» sin aviso previo en deprecations
/collections/books/sort [sort.removed; §5.5, §6.2]
- max_limit de «books» pasa de 100 a 50 sin aviso previo en deprecations
/collections/books/max_limit [max-limit.lower; §5.5, §6.4]
Compatibles (1)
- El filtro «rating» de «books» admite null
/collections/books/filter/rating/ops [filter.op-added; §5.5, §6.1]
Otros cambios (1)
- id_from de «categories» pasa de (sin declarar) a "either"
/collections/categories/id_from [id-from.either; §5.5, §5.1]
Resumen: 2 incompatibles, 0 retiradas y avisos, 1 compatibles, 1 otros.
The id_from change is compatible only if the server tells apart every id the collection has had (5.1), which the document cannot show, so it goes under other changes.
If the API needs credentials, add --header "Authorization: Bearer $TOKEN". Descriptions can change with the language (5.6), so if you compare two live APIs, pin it with --language en.
$ npx restep-diff main.json pr.json --markdown
## Cambios en la API
Comparación de `main.json` con `pr.json` según las reglas de evolución de [Restep 1](https://restep.wubytes.com/es/1/#versiones).
**3** incompatibles · **2** retiradas y avisos · **6** compatibles · **2** otros
### Incompatibles
- Restep pasa de "1.0" a "1.1" y se anuncian partes experimentales (sync, batch): solo las usa el cliente que implementa el texto de 1.1 (§1.2) (`/restep`; [§1.2](https://restep.wubytes.com/es/1/#dependencias))
- «category» pasa a ser obligatorio en el cuerpo del POST de «books» (`/collections/books/schemas/create/properties/category`; [§5.5](https://restep.wubytes.com/es/1/#versiones))
- max\_limit de «books» pasa de 50 a 25 sin aviso previo en deprecations (`/collections/books/max_limit`; [§5.5](https://restep.wubytes.com/es/1/#versiones), [§6.4](https://restep.wubytes.com/es/1/#paginacion))
…
Paste it into the pull request, or let restep-action do it and keep the comment up to date.
$ npx restep-diff main.json pr.json --json
{
"old": "main.json",
"new": "pr.json",
"date": "2026-11-20T00:00:00.000Z",
"summary": { "breaking": 3, "deprecation": 2, "compatible": 6, "info": 2 },
"changes": [
{
"rule": "restep.experimental",
"severity": "breaking",
"sections": ["1.2"],
"location": "/restep",
"message": "Restep pasa de \"1.0\" a \"1.1\" y se anuncian partes experimentales (sync, batch): solo las usa el cliente que implementa el texto de 1.1 (§1.2)",
"links": ["https://restep.wubytes.com/es/1/#dependencias"]
},
…
]
}
If the repository keeps its discovery document in a file, compare the base branch with the pull request. The job fails on a breaking change.
# .github/workflows/restep-diff.yml (one job)
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- run: git show "origin/${{ github.base_ref }}:api/discovery.json" > base.json
- run: npx -y restep-diff@0.2 base.json api/discovery.json --markdown >> "$GITHUB_STEP_SUMMARY"
Or compare what is deployed with the API the job has just started: npx restep-diff https://api.example.com/ http://localhost:8080/ --markdown.
This is what --rules prints. Each rule says which severity it gives and which sections back it; most rest on 5.5 and its table of changes. Where the specification says nothing, the text says what was decided and why.
What 5.5 says a server MUST NOT do within a version, except by retiring it, and the changes of Restep version after which 1.1 and 1.2 say a client can no longer assume what it did. Exit code 1 by default.
| Rule | What it detects | § |
|---|---|---|
restep.major | Restep’s major version changes: “a breaking change will be Restep 2, with new URIs”, and a Restep 1 client MUST NOT treat a document of another major version as its own. | §1.1 |
restep.prerelease | Restep’s version changes and one of the two carries a suffix (-draft.N or -rc.N): a draft or a candidate may differ incompatibly from the published version and from any other draft, and the client MUST NOT assume its guarantees. | §1.1 |
restep.experimental | Restep’s version changes and experimental profiles or extensions are still announced: a client MUST NOT use them except under a version whose text of them it implements, so one that implemented the previous text stops using them. | §1.2 |
restep.invalid | The new restep does not follow the grammar of §1.1 (major.minor[-draft.N|-rc.N], no leading zeros): a Restep 1 client MUST NOT treat it as a discovery document. | §1.1 |
version.changed | The API’s major version changes: “each version is a separate API root”, only created for a breaking change. | §5.5 |
profile.removed | A profile is no longer announced: “removing […] a profile” is breaking; it is retired with a profile notice, or with that of a profile it needs (§5.5). | §5.5 |
extension.removed | An extension is no longer announced: “removing […] an extension” is breaking; it is retired with an extension notice (§5.5). | §5.5, §11 |
batch.path | batch.path changes: “changing […] the URLs of resources” is breaking. | §5.5, §11.2 |
batch.max-operations.lower | batch.max_operations goes down: a batch that used to fit now gets 413, and “tightening validation” is breaking. | §5.5, §11.2 |
idempotency.ttl-too-low | idempotency.ttl goes below 86400 s: it misses the minimum of §7.1, and the table in §5.5 only makes it compatible if it meets it. | §5.5, §7.1 |
idempotency.anonymous-refused | idempotency.anonymous becomes false: “starting to refuse Idempotency-Key without credentials” tightens validation, and is breaking. | §5.5, §7.1 |
events.changed | events changes or disappears: “removing […] the API’s events” and “changing […] the URLs of resources” are breaking. | §5.5, §10 |
reasons.undeclared | reasons stops being declared: “removing reasons once declared” is breaking. | §5.5, §5.4 |
reason.removed | A reason disappears from reasons: “removing a reason” is breaking; it is retired with a reason notice (§5.5). | §5.5, §5.4 |
reason.code | A reason’s code changes: “changing the code of a reason” is breaking. | §5.5, §5.4 |
collection.removed | A collection disappears: “removing […] a collection” is breaking. | §5.5 |
collection.path | A collection’s path changes: “changing […] the URLs of resources” is breaking. | §5.5 |
collection.parent | A subcollection’s parent changes or disappears: it hangs from another collection, or stops saying which. | §4.2, §5.5 |
singleton.removed | A singleton disappears, or gains a template or a parent that make clients ignore it (§5.9): “removing […] a singleton” is breaking. | §5.5, §5.9 |
singleton.path | A singleton’s path changes: “changing […] the URLs of resources” is breaking. | §5.5, §5.9 |
method.removed | A declared method is removed: “removing […] a method” is breaking. | §5.5, §4.3 |
id-from.changed | Any other change of id_from: breaking according to the table in §5.5. | §5.5, §5.1 |
field.removed | A field disappears from the representation: “removing or renaming a field” is breaking. | §5.5 |
field.type | A field of the representation changes type: “changing its type” is breaking. | §5.5 |
field.optional | A field that always came is no longer required in the item schema: it may be missing, as if removed. | §5.5 |
input.added-required | New required input field: “making an input field […] required when it was not” is breaking. | §5.5 |
input.now-required | An input field becomes required: breaking. | §5.5 |
input.removed | An input field disappears: “removing or renaming a field” is breaking. | §5.5 |
input.type-narrowed | An input field’s type changes or narrows: “changing its type” and “tightening validation” are breaking. | §5.5 |
input.enum-removed | An input field stops accepting an enum value: “tightening validation” is breaking. | §5.5 |
input.constraint-tightened | A constraint on an input field tightens or appears (pattern, format, lengths, ranges, enum): “tightening validation” is breaking. | §5.5 |
input.default-changed | The default of a POST field changes: the same create without that field now stores another value (§4.3), a change of meaning that §5.5 makes breaking. | §4.3, §5.5 |
input.default-removed | A POST field loses its default: a create without it leaves it empty instead of setting the value it used to (§4.3). | §4.3, §5.5 |
input.closed | The body becomes additionalProperties: false: it rejects members it used to accept (“tightening validation”). | §5.5, §4.3 |
filter.removed | A filter disappears: “removing a filter” is breaking; it now gives unsupported_parameter. It is retired with a filter or field notice. | §5.5, §6.1, §5.3 |
filter.op-removed | A filter loses an operator: “removing an […] operator” is breaking; it is retired with an operator notice. | §5.5, §6.1, §5.3 |
filter.type | A filter’s type changes: the server compares by the declared type (§6.1); changing the type is breaking. | §5.5, §6.1 |
filter.values-removed | An enum filter stops accepting a value: “removing […] a value from a declared enumeration” is breaking; it is retired with a value notice. | §5.5, §6.1 |
collation.changed | Any other declaration or change of collations on a field whose filter or sort already existed: “changing […] the collation of a field” is breaking. | §5.5, §6.1 |
named-filter.removed | A named filter disappears: removing a filter (a named one too) is breaking; it now gives unsupported_parameter. | §5.5, §6.1, §5.3 |
named-filter.type | A named filter’s type changes, or it goes from a switch to taking a value or back: what used to be accepted gives invalid_parameter. | §5.5, §6.1 |
named-filter.values-removed | An enum named filter stops accepting a value: it now gives invalid_parameter, and “tightening validation” is breaking. | §5.5, §6.1 |
sort.removed | A sort key disappears: “removing […] a sort key” is breaking; it now gives unsupported_parameter. | §5.5, §6.2 |
max-limit.lower | max_limit goes down: it is retired with a max_limit notice whose value is the new limit (table in §5.5). | §5.5, §6.4 |
max-limit.removed | max_limit stops being declared: breaking according to the table in §5.5, because without it limit is not accepted (§6.4). | §5.5, §6.4 |
count.removed | count stops being declared: “removing […] a count” is breaking; it is retired with a count notice without value. | §5.5, §6.5 |
count.estimated | count goes from exact to estimated: it is retired with a count notice with "estimated" in value (table in §5.5). | §5.5, §6.5 |
relation.removed | A relationship disappears: “removing […] a relationship” is breaking. | §5.5, §9 |
relation.to | A relationship’s target collection changes, it loses one of its targets, or it goes from one target to several or back (the link gains or loses type, §3): “changing its meaning” is breaking. | §5.5, §9 |
relation.many | A relationship goes from to-one to to-many or back: the field changes type (object or list, §3). | §5.5, §3 |
relation.include-removed | A relationship can no longer be included: “removing […] an include” is breaking; it is retired with an include notice. | §5.5, §9 |
relation.path | A relationship’s path changes or disappears: “changing […] the URLs of resources” is breaking. | §5.5, §9 |
include-depth.lower | include_depth goes down: a path that used to work gives unsupported_parameter. | §5.5, §9 |
sync.removed | The collection stops declaring sync: “removing […] a collection’s sync” is breaking, and :changes now gives 404. | §5.5, §10 |
sync.retention-too-low | sync.retention goes below 7 days, the minimum of §10: the table in §5.5 only makes it compatible if it meets it. | §5.5, §10 |
action.removed | An action disappears: “removing […] an action” is breaking. | §5.5, §11.1 |
action.on | An action moves from item to collection or back: its URL changes. | §5.5, §11.1 |
action.method | An action changes method (POST or GET): a method is removed. | §5.5, §11.1 |
action.weaker | An action is no longer safe or idempotent: breaking according to the table in §5.5; the action is retired and another name declared. | §5.5, §11.1 |
language-map.retyped | A field that already existed becomes a language map: its type changes. | §3, §5.5 |
language-map.removed | A field stops being a language map: “the type of a language map MUST NOT change”. | §3, §5.5 |
inherit.writable | Inheritance on a field that could be written: “turning into an effective field one that could be written until now is not”. | §11.6, §5.5 |
inherit.removed | An inherit declaration disappears: the own field stops existing or changes meaning. | §11.6, §5.5 |
inherit.own | The name of the own field changes: “removing or renaming a field” is breaking. | §5.5, §11.6 |
inherit.default-removed | The inheritance loses its default: the effective field, which was never empty, can now have no value. | §11.6, §5.5 |
deprecation.announced-changed | A deprecation notice’s announced changes: it “MUST NOT change afterwards”. | §5.5 |
New or changed notices in deprecations, and what disappears after a sunset that has passed.
| Rule | What it detects | § |
|---|---|---|
deprecation.announced | New deprecation notice in deprecations: responses that use what it retires MUST carry Deprecation. | §5.5 |
deprecation.short-notice | A deprecation notice with less than six months between its announced (or --date, if it has none) and its sunset: “at least six months SHOULD pass”. | §5.5 |
deprecation.sunset-changed | A deprecation notice’s sunset date changes. | §5.5 |
deprecation.retired | Something announced in deprecations disappears after its sunset: the retirement §5.5 allows. | §5.5, §12 |
What a server MAY do at any time. Some rows of the table in 5.5 are compatible on a condition the document does not show; the message recalls it.
| Rule | What it detects | § |
|---|---|---|
restep.minor-up | Restep’s minor version goes up, with no suffix on either side: “a minor version only adds”, and what conforms to 1.0 still conforms to 1.1. | §1.1 |
profile.added | A new profile is announced: “adding profiles or extensions” is compatible. | §5.5, §1.2 |
extension.added | A new extension is announced: “adding profiles or extensions” is compatible. | §5.5, §11 |
batch.max-operations.higher | batch.max_operations goes up: everything accepted before is still accepted. | §5.5, §11.2 |
idempotency.ttl-higher | idempotency.ttl goes up: compatible according to the table in §5.5. | §5.5, §7.1 |
idempotency.ttl-lower | idempotency.ttl goes down, not below 86400 s: compatible if the server keeps the old period for keys already stored (table in §5.5), which the document does not say. | §5.5, §7.1 |
idempotency.anonymous-accepted | idempotency.anonymous stops being false: keys without credentials that used to get 400 are now accepted. | §7.1 |
events.added | events is declared: adding a resource is compatible. | §5.5, §10 |
reasons.declared | reasons is declared: “declaring reasons or adding reasons to it” is compatible. | §5.5, §5.4 |
reason.added | New reason in reasons: “adding reasons to it” is compatible. | §5.5, §5.4 |
collection.added | New collection: “adding […] collections” is compatible. | §5.5 |
singleton.added | New singleton: “adding […] singletons” is compatible. | §5.5, §5.9 |
method.added | One more method is supported: the list is exact (§4.3), and a client that does not know it ignores it. | §4.3, §5.5 |
methods.undeclared | methods or item_methods stops being declared: compatible according to the table in §5.5 if the API behaves the same, because without the list it is “unknown” (§4.3). | §5.5, §4.3 |
schema.removed | A schema stops being declared: compatible according to the table in §5.5 if the API behaves the same; its fields cannot be compared. | §5.5, §4.3 |
field.added | New field in the representation: “adding fields to a representation” is compatible. | §5.5, §3 |
field.enum-added | New enum value in a representation: “adding […] enum values” is compatible; clients tolerate them (§3). | §5.5, §3 |
input.added-optional | New optional input field: adding optional parameters is compatible. | §5.5 |
input.now-optional | An input field is no longer required: everything accepted before is still accepted. | §5.5 |
input.type-widened | An input field accepts more types: everything accepted before is still accepted. | §5.5 |
input.enum-added | An input field accepts a new enum value: “adding […] enum values” is compatible. | §5.5 |
input.constraint-relaxed | A constraint on an input field relaxes or goes away: everything accepted before is still accepted. | §5.5 |
input.opened | The body stops being closed: everything accepted before is still accepted. | §5.5, §4.3 |
filter.added | New filter: “supporting new filters […]” is compatible. | §5.5, §6.1 |
filter.op-added | New operator on a filter: supporting new filters is compatible. | §5.5, §6.1 |
filter.values-added | An enum filter accepts a new value: adding enum values is compatible. | §5.5, §6.1 |
collation.named | collations goes from "server" to another value: compatible if it names the equality and order it already used (table in §5.5), which restep-diff cannot check. | §5.5, §6.1 |
named-filter.added | New named filter: “supporting new filters […]” is compatible. | §5.5, §6.1 |
named-filter.values-added | An enum named filter accepts a new value: adding enum values is compatible. | §5.5, §6.1 |
sort.added | New sort key: “supporting […] new sorts” is compatible. | §5.5, §6.2 |
max-limit.higher | max_limit goes up: compatible according to the table in §5.5. | §5.5, §6.4 |
max-limit.added | max_limit starts being declared: limit is now accepted, a new capability. | §6.4 |
count.added | count is declared: a new capability is compatible. | §5.5, §6.5 |
count.exact | count goes from estimated to exact: compatible according to the table in §5.5. | §5.5, §6.5 |
relation.added | New relationship: adding fields is compatible. | §5.5, §9 |
relation.include-added | A relationship can now be included: “supporting […] new includes” is compatible. | §5.5, §9 |
include-depth.higher | include_depth goes up: more includes are accepted. | §5.5, §9 |
sync.added | The collection becomes synced (it declares sync and the profile is announced): a new capability is compatible. | §5.5, §10 |
sync.retention-higher | sync.retention goes up: compatible according to the table in §5.5. | §5.5, §10 |
sync.retention-lower | sync.retention goes down, not below 7 days: compatible if the server keeps the old period for states already issued (table in §5.5), which the document does not say. | §5.5, §10 |
action.added | New action: “adding […] actions” is compatible. | §5.5, §11.1 |
action.stronger | An action becomes safe or idempotent: compatible according to the table in §5.5. | §5.5, §11.1 |
language-map.added | New field that is a language map: adding fields is compatible. | §5.5, §3 |
inherit.added | Inheritance on a new piece of data or on a read-only field: “adding inheritance to new data, or to a field that was already read-only, is compatible”. | §11.6 |
inherit.default-added | The inheritance gains a default: the effective field is never empty any more. | §11.6 |
What the specification does not classify, or what cannot be judged from the document alone.
| Rule | What it detects | § |
|---|---|---|
restep.minor-down | Restep’s minor version goes down: the specification does not cover it; the other rules flag whatever disappears. | §1.1 |
restep.fixed | The old restep did not follow the grammar of §1.1 and the new one does. | §1.1 |
idempotency.ttl-declaration | idempotency.ttl starts or stops being declared: it SHOULD be declared (§7.1); the 24-hour minimum applies either way. | §7.1 |
status.changed | The status link changes: the service status is not an API resource (§4.4). | §4.4 |
collection.parent-declared | A subcollection declares parent with the same path: draft 6 requires it of every subcollection; no URL changes. | §4.2 |
description.changed | A description changes: it is text for people, and may even vary with Accept-Language (§5.6). | §4.3, §5.6 |
methods.declared | methods or item_methods starts being declared: before it was “unknown”, now the list is exact. | §4.3 |
id-from.either | id_from goes from undeclared or "server" to "either": compatible only if the server tells apart every id the collection has had (table in §5.5); the document does not say. | §5.5, §5.1 |
schema.added | A schema that was not there is declared: it describes, it does not promise (§4.3). | §4.3 |
schema.link | A schema that is a link changes (or becomes one): restep-diff does not download schemas, so it does not compare their fields. | §4.3 |
field.enum-removed | A representation stops using an enum value: §5.5 does not classify it. | §5.5 |
input.default-added | A POST field gains a default: a create without it no longer leaves it empty, but sets that value (§4.3). §5.5 does not classify it. | §4.3, §5.5 |
named-filter.description | A named filter’s description changes, and it is what says which items it returns: if what it returns changes, the change is breaking even though discovery does not show it. | §6.1 |
sync.retention-declaration | sync.retention starts or stops being declared: it SHOULD be declared (§10). | §10 |
inherit.unknown | Inheritance on an existing field, with no input schemas to tell whether it was writable: review it (§11.6, Evolution). | §11.6 |
relation.to-added | A relationship that already pointed to several collections gains a target: its links may carry a new type. §5.5 does not classify it; §3 asks clients to tolerate new values only in enums. | §9, §3 |
relation.path-declared | A relationship declares path: the template of the subcollection it leads to (§9). No URL changes. | §9 |
inherit.from | An inheritance’s from chain changes: where the value comes from changes, not its type. | §11.6 |
deprecation.unknown-kind | New notice with a kind that does not exist in that place (root, collection or singleton): clients MUST NOT use it, and restep-diff does not count it either. | §5.5, §4.2 |
deprecation.withdrawn | A deprecation notice disappears and what it announced is still there: a change of mind. | §5.5 |
member.changed | Another discovery member that restep-diff does not classify changes. | §4.2 |
restep-diff <old> <new> [options], where each side is a JSON file with a discovery document or the root URL of an API. Or restep-diff --rules [--json | --markdown].
| Option | What it does |
|---|---|
--json | JSON output: old, new, date, summary by severity and changes, each with rule, severity, sections, location (a JSON Pointer into the new or the old document), message and links |
--markdown | Markdown output, for a changelog or a pull request comment |
--fail-on breaking|deprecation|none | When to exit with 1: on breaking changes (the default), also on deprecations and retirements, or never |
--date <instant> | The instant (RFC 3339) used to decide whether a sunset has passed and, for a notice without announced, whether it gives six months. Defaults to now |
--header "Name: value" | Header for fetching the documents over HTTP, such as Authorization. Repeatable. It goes to both sides, but only to each API’s own origin |
--language <tag> | Accept-Language for those requests: descriptions can change with it (5.6) |
--rules | Lists the rules with their severity and sections; with --json or --markdown, in that format |
--version, --help | The version, and a short help |
Exit codes: 0, nothing at the --fail-on level; 1, something is; 2, a usage error or a document that could not be loaded.
Deprecation, Sunset, successor-version), error codes, the default order and the format of ids are also protected by 5.5, but they are not in the document. restep-check checks the headers of a retirement.enum, required, additionalProperties and the constraints pattern, format, const, multipleOf, lengths, ranges and item counts. It does not follow $ref or allOf, nor compare nested objects.announced, that a subcollection declares parent…): that is restep-check’s job.--header and --language apply to both sides.The six months of 5.5 count from the notice’s announced; if a notice does not carry it, from --date. Some changes neither 5.5 nor its table classify: a new Restep version with a suffix, or experimental parts after a version change (both treated as breaking), declaring collations as "codepoint" on a field that already was (not flagged), lowering a period below its minimum (breaking), changing an inheritance’s from. The rule table says what was decided for each one. Some things still have no notice kind that could retire them (include_depth, batch.max_operations, events, a collection’s sync, a subcollection’s parent), so removing or lowering them is always breaking within a version.
A reverse proxy that checks real traffic against the contract: 64 rules, live log, JSON report, and a strict mode for CI.
A GitHub Action: starts your API, runs restep-check and restep-diff, and keeps one comment on the pull request up to date.