stac-node-validator
Simple proof-of-concept to validate STAC Items, Catalogs, Collections and core extensions with node.
Versions
Current version: 0.4.0
STAC Node Validator Version | Supported STAC Versions |
---|---|
>= 0.4.0 | >= 1.0.0-beta.2 |
0.3.0 | 1.0.0-beta.2 |
0.2.1 | 1.0.0-beta.1 |
Setup
- Install node and npm - should run with any recent version
npm install -g stac-node-validator
to install the library
Usage
- Validate a single file:
stac-node-validator /path/to/your/file.json
- Validate multiple files:
stac-node-validator /path/to/your/catalog.json /path/to/your/item.json
Instead of paths to local files, you can also use HTTP(S) URLs. Other protocols such as S3 are not supported yet.
- Validate a single folder (considers all
json
files inexamples
folders):stac-node-validator ./stac-spec
Further options to add to the commands above:
- To validate against schemas in a local STAC folder (e.g.
dev
branch):--schemas /path/to/stac/folder
- To not verify SSL/TLS certificates:
--ignoreCerts
Note on API support: Validating lists of STAC items/collections (i.e. GET /collections
and GET /collections/:id/items
) is partially supported.
It only checks the contained items/collections, but not the other parts of the response (e.g. links
).
Development
git clone https://github.com/m-mohr/stac-node-validator
to clone the repocd stac-node-validator
to switch into the new folder created by gitnpm install
to install dependencies- Run the commands as above, but replace
stac-node-validator
withnode bin/cli.js
, for examplenode bin/cli.js /path/to/your/file.json