Skip to content
generated from railtoolkit/template

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.

License

Notifications You must be signed in to change notification settings

railtoolkit/schema

Repository files navigation

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.

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.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •