@api3/ois
OIS (or Oracle Integration Specifications) is a JSON object that describes an API specification
You can find the documentation for OIS in the docs.
Installation
To install this package run either:
yarn add @api3/ois
or if you use npm:
npm install @api3/ois --save
Usage
The OIS package defines validation and TypeScript typings that can be used to verify correctness of a full OIS schema or
just a part of it. For example:
const { oisSchema } = require('@api3/ois');
const possibleOis = {
oisFormat: '1.0.0',
version: '1.2.3',
title: 'coinlayer',
apiSpecifications: { ... }
endpoints: [ ... ],
};
const result = oisSchema.safeParse(possibleOis);
if (!result.success) {
throw result.error
} else {
const validOis = result.data
}
Example
An example of a valid OIS can be found here.
Developer documentation
Release
To release a new version follow these steps:
git checkout main && git pull
- ensure you are on a "main" branch with latest changesyarn version
- choose "x.y.z" as the version to be releasedgit show
- verify the changes of the version commityarn build
- only build the package after the "yarn version" command so the bundled "package.json" uses the updated
versionyarn publish --access public
git push --follow-tags
- to push the commits to a "main" branch