ODataTailor 1.0.0 is built (21 November 2026): the workbench for OData services – free, no account, no server. What’s inside → +43 664 1964199Contact →
Command line · Open source

Catch breaking OData API changes before your consumers do.

odatatailor-diff compares two OData $metadata documents, classifies each change as breaking, compatible or annotation only, and exits with code 1 when something would break a client. “Only additive changes within a version” becomes a check in your CI instead of a review guideline.

Get started

One call, one result.

First the version in your repository, then the new one: two files, done. Node.js 20 or newer is enough, nothing to install.

npx odatatailor-diff api/metadata.xml metadata.xml

A service URL works instead of a file; $metadata is appended then. URLs ending in .xml, .edmx or .json are read as is.

This is what the report looks like, here with exit code 1:

$metadata diff: api/metadata.xml → metadata.xml
3 breaking, 3 compatible, 2 annotation only

BREAKING        Orders/customer                MaxLength 80 → 40
BREAKING        Orders/notes                   Property removed (Edm.String)
BREAKING        Orders/priority                Property added (Edm.Int32, Nullable=false)
COMPATIBLE      Orders/cancel                  Operation added
COMPATIBLE      Orders/decline(notify)         Parameter added (Edm.Boolean)
COMPATIBLE      Orders/deliveryDate            Property added (Edm.Date)
ANNOTATION ONLY Orders/notes@Common.Label      Annotation removed: "Notes"
ANNOTATION ONLY Orders/notes@UI.MultiLineText  Annotation removed: true

✗ 3 change(s) at or above “breaking” – failing (--fail-on breaking)
Rules

What counts as breaking.

The same rules as the extension’s $metadata diff. Sets, types and operations are matched by name without namespace, so DEV and QAS with different namespaces still compare cleanly.

  • Breaking.Removed: set, type, property, navigation, operation, parameter, enum member. Changed: type, key, base type, return type, HTTP method, navigation target, multiplicity. Smaller: MaxLength, Precision, Scale. Nullable from true to false. A new required property or parameter (Nullable=false). A change of OData version.
  • Compatible.Added: optional elements, sets, types, navigations, operations, enum members. Larger facets. Nullable from false to true.
  • Annotation only.Annotations such as Common.Label, UI.* or sap:label are reported separately. --no-annotations leaves them out.
  • Formats.OData V2 and V4, EDMX (XML) or CSDL JSON, from files or service URLs – from SAP Gateway, RAP and CAP.

The individual rules are in the rules reference ↗.

In CI

As a step in your build.

Exit code 0 means passed, 1 means changes at or above --fail-on (default: breaking), 2 means the call or the input is wrong. The Markdown report suits a job summary or a PR comment.

GitHub Actions with CAP:

- run: npx cds compile srv --to edmx --service OrderService > metadata.xml
- run: npx odatatailor-diff api/metadata.xml metadata.xml --format markdown --output metadata-diff.md
- if: always()
  run: cat metadata-diff.md >> "$GITHUB_STEP_SUMMARY"

SAP Gateway: the version in Git against the running system:

npx odatatailor-diff api/metadata.xml "https://my-system.example.com/sap/opu/odata/sap/ZAPI_ORDERS_SRV?sap-client=100" --header "Authorization: Basic $ODATA_AUTH"

More recipes for GitLab CI, Azure Pipelines, DEV against QAS and a nightly drift check are in the CI recipes ↗.

Options

The options at a glance.

OptionEffect
--fail-onFrom which classification the call exits with 1: breaking (default), compatible, annotation or never.
--formatOutput as text (CI log), markdown (PR comment, job summary) or json.
--outputWrite the report to a file instead of the console.
--no-annotationsDo not report annotations.
--header "Name: value"Header for service URLs, for example Authorization. The values are never printed, not even in error messages.
--lang en|deReport texts in German, the same as in the extension.

One file, no dependencies, Node.js 20 or newer. No telemetry; network access goes only to the addresses you pass. Apache-2.0, free.

Sources on this page

The superscript numbers in the text point here. Tap one to see the source right where it is used; all sources of this website are listed on one page.

  1. 1

    odatatailor-diff: $metadata diff on the command line ↑Product · odatatailor-diff repository and documentation (rules, CI recipes, FAQ) · checked on 2026-11-23

Frequently asked

Questions about the command line.

What does odatatailor-diff check?
Two $metadata documents of OData V2 or V4 (EDMX or CSDL JSON). Each change is classified as breaking, compatible or annotation only. On changes at or above the --fail-on threshold (default: breaking) the call exits with code 1.
Does it run without a browser and without the extension?
Yes. It is a single file without dependencies for Node.js 20 or newer; npx is enough. It uses the same parser and the same rules as the $metadata diff in the extension, which compares interactively.
How does it reach the service, and the sign-in?
You pass files or service URLs. A service URL gets $metadata appended. With --header "Name: value" you pass, for example, Authorization; the values never appear in the output, not even in error messages. Network access goes only to the addresses you pass, and there is no telemetry.
What does it cost, and under which licence is it?
Nothing. It is open source under Apache-2.0, published on npm, with the source on GitHub.

Your question isn’t here? Talk to me: +43 664 1964199 office@clouddna.at Get in touch

Contact

Service stuck? Talk to us.

ODataTailor is free. If you need help – with an OData service from SEGW, RAP or CAP, with annotations for Fiori elements, with a stubborn error or for a workshop with your team – get in touch. I reply within one working day, personally.

Martin KochManaging Director, CloudDNAI read every request myself and reply personally.