rsdl-js

0.4.0 • Public • Published

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

  • [x] create grammar
  • [x] create listener that produces CSDL
  • [x] create CLI
  • [x] use test files from ../rapid-cli/rapid.rdm.transformation.tests/data
  • [x] inheritance
  • [x] annotations
  • [x] flags enumerations
  • [x] create error listener for syntactically incorrect "files"
  • [x] log errors from CLI
  • [x] type definitions
  • [x] doc comments
  • [x] 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

Readme

Keywords

none

Package Sidebar

Install

npm i rsdl-js

Homepage

rapid.rocks/

Weekly Downloads

1

Version

0.4.0

License

Apache-2.0

Unpacked Size

167 kB

Total Files

9

Last publish

Collaborators

  • heikotheissen
  • wtrocki
  • ralfhandl
  • mikepizzo