Skip to content

Latest commit

 

History

History
97 lines (69 loc) · 4.88 KB

README.md

File metadata and controls

97 lines (69 loc) · 4.88 KB

RailToolKit Schema

License: ISC DOI Build Status All Contributors


About

This repo collects the descriptions of the structure and the validation constraints of tools in the railtoolkit in JSON schemas. It is, therefore, an alternative to RailML. The JSON schemas enable the validation of YAML files in TrainRun.jl and rolling-stock.

Prerequisite

You will need a validator to validate the schema against data. This package provides a helper script that uses the Ajv JSON schema validator. Ajv rquires to have node installed.

$ node --version # test if node is installed

Usage

You will need the schema and some data. The repo contains among others the rolling-stock schema and example data:

$ git clone https://github.com/railtoolkit/schema.git && cd schema

Install all project dependencies:

$ npm install

You can now validate if the data follows the schema:

$ npm run validate:rolling-stock doc/rolling-stock.example.yaml

This will return:

$ doc/rolling-stock.example.yaml valid

Or:

$ npm run validate:running-path doc/running-path.example.yaml

This will return:

$ doc/running-path.example.yaml valid

Documentation

see Rolling-Stock.md and Running-Path.md for information about the used attributes.

Contributors

Martin Scheidt
Martin Scheidt

💻 📖 💡 ⚠️ 🔬
Gregor Wehrle
Gregor Wehrle

🐛
JonathanSchoener
JonathanSchoener

🔬

See CONTRIBUTING.md file if you are interested to contribute.


License

Open Source Initiative Approved License logo

Copyright (c) 2022, Martin Scheidt <[email protected]> (ISC License)

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.