This repository contains OpenAPI (Swagger) definitions for Invotra API.
The API client for JavaScript is generated automatically using OpenAPI Generator. A build is ran using GitHub Actions:
- test builds are generated for PRs for testing/developing with new APIs;
- production builds are generated for releases and published at GitHub Packages private NPM repository.
In order to access package builds, please configure yarn/npm to access Invotra private registry first.
NOTE: These steps are same for all private NPM packages hosted at GitHub.
- Create a new GitHub personal access token. Open GitHub personal access tokens page,
click
Generate a new token, input a token name (e.g. 'my token for NPM registry') and checkread:packages. Do not select any other scopes. Create a token and store it in a safe place. - Create an
.npmrcfile in your home directory with following contents, replacingYOUR_TOKENwith an actual token string:
//npm.pkg.github.com/:_authToken=YOUR_TOKEN
The build bot adds a PR comment with a yarn command once build is complete.
- Create a new
.yarnrcfile in your project directory:
"@invotra:registry" "https://npm.pkg.github.com/"
This will tell yarn where to get @invotra/* packages.
- Add a project dependency:
yarn add @invotra/api@VERSION
Replace VERSION with the actual version string, e.g. 4.48.0. A list of versions may be found at
GitHub Packages page.