1.1.0 • Published 1 year ago

@hiveio/wax-spec-generator v1.1.0

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
gitlab
Last release
1 year ago

Wax spec generator

Wax library REST API specification generator

No-download example usage:

pnpm dlx @hiveio/wax-spec-generator generate-wax-spec -i data.json

Install

This is a Node.js module available through the npm registry:

pnpm add @hiveio/wax-spec-generator

Before installing, download and install Node.js. Node.js 18 or higher is required.

Installation is done using the npm install command:

If you want to use development versions of our packages, set @hiveio scope to use our GitLab registry:

echo @hiveio:registry=https://gitlab.syncad.com/api/v4/groups/136/-/packages/npm/ >> .npmrc
npm install @hiveio/wax-spec-generator

Running

We currently only support Swagger json files. You should download any schema file, like https://api.syncad.com/hafbe/ and then specify its path to the generate-wax-spec binary.

See the help message using the following command:

npx generate-wax-spec --help

Examples

generate JS and D.TS files only using the hafbe namsepace

npx generate-wax-spec -i data/hafbe.json -N hafbe

Emit entire npm project along the JS and D.TS files

npx generate-wax-spec -i data/hafbe.json -N hafbe -e --npm-name "@hiveio/wax-api-hafbe" --npm-version 1.27.0-rc1

Building

pnpm install

pnpm run build

This shall generate JavaScript files into the dist directory

License

See the license in the LICENSE.md file

1.1.0

1 year ago

1.0.0

1 year ago