OIS (or Oracle Integration Specifications) is a JSON object that describes an API specification
You can find the documentation for OIS in the docs.
To install this package run either:
pnpm add @api3/ois
or if you use npm:
npm install @api3/ois --save
We recommend using a pinned version of the OIS package because the validation included in the package enforces the OIS version up to the patch. Pinning the version also ensures your project uses the correct OIS version even if there are other packages depending on a different OIS version.
Internally, we use zod to implement validation and TS typing for the OIS schema. It's possible to have TS issues when multiple different zod versions are used in a project.
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 = {
// Placeholder values. Refer to the Example section below and the documentation.
oisFormat: '1.0.0',
version: '1.2.3',
title: 'coinlayer',
apiSpecifications: { ... } // omitted for brevity
endpoints: [ ... ], // omitted for brevity
};
const result = oisSchema.safeParse(possibleOis);
if (!result.success) {
throw result.error
} else {
const validOis = result.data
}
An example of a valid OIS can be found here.
Releasing is facilitated by GitHub Actions using changesets/action. To release a new version follow these steps:
- Assuming desired changes are present on
main
with changesets, create a GitHub PR to therelease
branch frommain
. - Merge the PR to
release
using a merge commit. - The publish Action workflow will create a release PR.
- Review the release PR and merge it to
release
using squash and merge. - The publish Action workflow will publish a GitHub release and publish the package
to npm with provenance. It will also create a PR for merging the
release
branch back tomain
. - Merge the PR to
main
fromrelease
using a merge commit.
Note that development can continue on main
during the release process, or in other words, main
does not need to be
protected.