README
RSDL-to-CSDL Compiler
RAPID Schema Definition Language (RSDL) is a language to define Web APIs.
RSDL is based on the RAPID Profile of the OData specification. RAPID provides an easy way to envision, create, and consume a Web API that is compatible with the OData Standard and can evolve over time to support more advanced scenarios.
Installation
Clone or download this repository, go to the rsdl-js
folder and type
npm install
To install globally type
npm install -g
Usage
Assuming you installed the package globally and your RSDL file is MyModel.rsdl
, then
rsdl2csdl -p myModel.rsdl
will create MyModel.json
next to it.
Just type
rsdl2csdl -h
to get usage hints
Usage: rsdl2csdl <options> <source files>
Options:
-h, --help show this info
-p, --pretty pretty-print JSON result
If you installed the script locally, start it via
node lib/cli.js ...
Development Setup
Install
- Java
- VS Code
- ANTLR4 grammar syntax support (workspace recommendation)
TODO
- create grammar
- create listener that produces CSDL
- create CLI
- use test files from ../rapid-cli/rapid.rdm.transformation.tests/data
- inheritance
- annotations
- flags enumerations
- create error listener for syntactically incorrect "files"
- log errors from CLI
- Option
-a
for compiling all files in a folder? - Option
-r
for recursive compilation? - Update to ANTLR 4.9.x