An open API service indexing awesome lists of open source software.

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

Supporting code and tooling for OpenActive models, common across all languages
https://github.com/openactive/models-lib

implementation-support php pre-release ruby

Last synced: about 1 year ago
JSON representation

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

Awesome Lists containing this project

README

          

# models-lib [![Model Generation](https://github.com/openactive/models-lib/actions/workflows/generate-models.yaml/badge.svg?branch=master)](https://github.com/openactive/models-lib/actions/workflows/generate-models.yaml)
Supporting code and tooling for OpenActive models, common across all languages

OpenActive aims to support implementers with models written in [PHP](https://github.com/openactive/models-php), [Ruby](https://github.com/openactive/models-ruby), [.NET](https://github.com/openactive/OpenActive.NET) and [JavaScript/TypeScript](https://github.com/openactive/models-ts). 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 v18 (npm v9).
A `.nvmrc` file is provided for clarity.

Install dependencies:
```
npm install
```

## Usage

List languages available:
```bash
npm start -- list
```

Generate language files:
```bash
npm start -- generate --destination
```

### Specific examples

PHP:

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

Ruby:

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

.NET:

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

JavaScript/TypeScript:

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