0.0.8 • Published 2 years ago

ility v0.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

master master

ility

Multilingual code generation from OpenAPI

CLI Usage

The generator is available using the ility command:

ility -i path/to/your/schema.json -l typescript

Input file

Use -i, --input to supply the input file path:

ility --input path/to/your/schema.json

Or pipe contents in via stdio:

cat path/to/your/schema.json | ility

Output file

Use -o, --output to supply the output folder:

ility --output path/to/your/output/folder

Language

Use -t, --title to supply the target language:

ility --lauguage typescript

Available laguages are currently typescript and ruby-sorbet

Programatic Usage

The generator is available by importing the generate function.

import { readFileSync } from 'fs';
import { generate } from 'ility';

const schema = readFileSync('path/to/your/schema.json').toString('utf8');
const title = 'widget service';
const language = 'ruby-sorbet';

const files = generate(schema, title, language);

How to:

Run this project

  1. Build the code: npm run build
  2. Run it! npm start

Note that the lint script is run prior to build. Auto-fixable linting or formatting errors may be fixed by running lint:fix.

Create and run tests

  1. Add tests by creating files with the .tests.ts suffix
  2. Run the tests: npm t
  3. Test coverage can be viewed at /coverage/lcov-report/index.html

Publish a new version to NPM

Publishing is automated via a workflow. To run this workflow:

  1. Checkout main and pull latest changes.
  2. Run npm version [major|minor|patch] to create a new version commit and tag
  3. Run git push origin main --follow-tags to push the tag (and version commit) and start the workflow
  4. Wait for the workflow to detect the tag and publish the package.

Generated with generator-ts-console

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago