Skip to content

Supporting code and tooling for OpenActive models, common across all languages

License

Notifications You must be signed in to change notification settings

openactive/models-lib

Repository files navigation

models-lib Model Generation

Supporting code and tooling for OpenActive models, common across all languages

OpenActive aims to support implementers with models written in PHP, Ruby, .NET and JavaScript/TypeScript. This repository is intended to hold resources (e.g. generators, tests) shared across all of the above.

Installation

Clone this project:

git clone https://github.com/openactive/models-lib.git

This project requires Node v14 (npm v6). A .nvmrc file is provided for clarity.

Install dependencies:

npm install

Usage

List languages available:

npm start -- list

Generate language files:

npm start -- generate <language> --destination <folder>

Specific examples

PHP:

npm start -- generate PHP --destination ../models-php/src/

Ruby:

npm start -- generate Ruby --destination ../models-ruby/lib/openactive/

.NET:

npm start -- generate .NET --destination ../OpenActive.NET/OpenActive.NET/

JavaScript/TypeScript:

npm start -- generate TypeScript --destination ../models-ts/src/