This tool validates an iModel's Schemas.
npm install @bentley/imodel-schema-validatorrush install.
sh
npm install -g @bentley/imodel-schema-validator
`
$3
Following are the arguments required by this tool:
- --verifyIModelSchemas: This argument confirms that the user first want to get the launchcodes.
- -u, --userName: The username for connecting with HUB using OIDC Auth.
- -p, --password: The password for connecting with HUB using OIDC Auth.
- -r, --projectId: The id of a project on connect portal.
- -i, --iModelName: The name of an imodel present in the project mentioned in projectid.
- -e, --environment: The environment where imodel is present. This tool supports three enviroments: DEV, QA and PROD.
- -b, --baseSchemaRefDir: Root directory of all released schemas (root of BisSchemas repo).
- -o, --output: The path where output files will be generated.
- -c, --checkReleaseDynamicSchema: Check all dynamic schemas within provided iModel. Default value is false.
- -m, --imjs_uri: The default imjs url.
$3
`sh
imodel-schema-validator --verifyIModelSchemas -u "testuser@bentley.com" -p "password" -r rewqkjhg-pocd-abcd-5874-254136987412 -i sample -e QA -b D:\\\\dir1\\\\BisSchemas -o D:\\\\dir2 -m "*.com"
`
Updating to newer version
Since the package is installed globally, updating has a different syntax than normal. To update the package globally, run:
`sh
npm update -g @bentley/imodel-schema-validator
`
How to build and test locally
1. Clone bis-schema-validation repository (first time) or pull updates to the repository (subsequent times) with git pull.
2. Open command prompt and navigate to the imodel-schema-validator directory e.g cd /d D:\bis-schema-validation\imodel-schema-validator
3. Install rush
`sh
npm install -g @microsoft/rush
`
4. Install dependencies:
`sh
rush install
`
5. Build the project
`sh
rush build
`
6. Run Tests
- Set following four environment variables before running the tests:
- oidcUserName: The username for connecting with HUB.
- oidcPassword: The password for connecting with HUB.
- BisSchemaRepo: Root path of the bis-schemas repository.
- ProjectId_QA: The project id for QA environment.
- ProjectId_DEV: The project id for DEV environment.
- ProjectId_PROD: The project id for PROD environment.
- Run following command:
`sh
npm run test
``