@bentley/schema-comparer
TypeScript icon, indicating that this package has built-in type declarations

0.2.176 • Public • Published

schema-comparer

Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.

The Schema Comparer is a command-line tool, as well as a public API, that allows the comparison of two EC3.x ECSchema files and reports back all the differences discovered during the comparison.

Quick Overview

npm install -g @bentley/schema-comparer

schema-comparer -i c:\dir1\SchemaA.ecschema.xml -i c:\dir2\SchemaB.ecschema.xml -o c:\Desired\Output\Path\ -ref1 c:\\dir1, c:\\dir2 -ref2 c:\\dir3, c:\\dir4

Getting Started

Installation

Install globally:

npm install -g @bentley/schema-comparer

Comparing ECXml Schema Files

Required Parameters:

-i, --input {path}: The paths to an XML EC Schema files (Ex. '-i c:\dir1\SchemaA.ecschema.xml -i c:\dir2\SchemaB.ecschema.xml').

Optional Parameters:

-o, --output {path}: Directory to put the comparison output file in the format 'SchemaA.compare.log'.

--ref1 {path}: Comma-separated list of paths to search when locating schema 1 references (Ex. '-r1 c:\dir1, c:\dir2').

--ref2 {path}: Comma-separated list of paths to search when locating schema 2 references (Ex. '-r1 c:\dir1, c:\dir2').

For help use the '-h' option.

To compare two ECSchema files, run:

schema-comparer -i c:\dir1\SchemaA.ecschema.xml -i c:\dir2\SchemaB.ecschema.xml -o c:\Desired\Output\Path\ -ref1 c:\\dir1, c:\\dir2 -ref2 c:\\dir3, c:\\dir4

Updating to new version

Since the package is installed globally, updating has a different syntax than normal. To update the package globally, run:

npm update -g @bentley/schema-comparer

Troubleshooting

  • Are you have issues comparing your ECSchema?
    • Check to make sure your ECSchema version is at least EC3.1

Package Sidebar

Install

npm i @bentley/schema-comparer

Weekly Downloads

95

Version

0.2.176

License

MIT

Unpacked Size

45.3 kB

Total Files

12

Last publish

Collaborators

  • aruniverse
  • wgoehrig
  • cshafer
  • colinkerr
  • imodeljs