0.4.0 • Published 2 years ago

rsdl-js v0.4.0

Weekly downloads
11
License
Apache-2.0
Repository
github
Last release
2 years ago

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

Done

  • 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
  • type definitions
  • doc comments
  • migrate to ANTLR 4.9.2 and switch from CommonJS modules to ES modules

TODO

  • Model validation
  • Option -a for compiling all files in a folder?
  • Option -r for recursive compilation?
  • Update to ANTLR 4.9.x
0.3.2

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.2.0

3 years ago

0.1.4

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago