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
- Host: GitHub
- URL: https://github.com/openactive/models-lib
- Owner: openactive
- License: mit
- Created: 2019-09-24T13:55:05.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-02-25T16:05:27.000Z (over 1 year ago)
- Last Synced: 2025-03-29T20:32:54.772Z (about 1 year ago)
- Topics: implementation-support, php, pre-release, ruby
- Language: JavaScript
- Size: 430 KB
- Stars: 0
- Watchers: 8
- Forks: 4
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# models-lib [](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/
```