# @api3/ois

> > OIS (or Oracle Integration Specifications) is a JSON object that describes an API specification

Latest version **3.0.0** (published 2025-07-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @api3/ois
pnpm add @api3/ois
yarn add @api3/ois
bun add @api3/ois
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; has provenance; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2025-07-27 |
| First published | 2022-06-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 167.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Maintainers | dcroote, bbenligiray, siegrift |

## Links

- npm: https://www.npmjs.com/package/@api3/ois
- Repository: https://github.com/api3dao/ois
- Homepage: https://github.com/api3dao/ois#readme
- Issues: https://github.com/api3dao/ois/issues
- npm.io page: https://npm.io/package/@api3/ois

## Dependencies (2)

- [zod](https://npm.io/package/zod.md) ^4.0.5
- [lodash](https://npm.io/package/lodash.md) ^4.17.21

## Recent versions

- 3.0.0 (latest) — 2025-07-27
- 2.3.2 — 2024-02-03
- 2.3.1 — 2023-11-30
- 2.3.0 — 2023-11-27
- 2.2.1 — 2023-10-06
- 2.2.0 — 2023-09-27
- 2.1.0 — 2023-06-06
- 2.0.0 — 2023-02-15
- 1.4.0 — 2022-12-16
- 1.3.0 — 2022-12-01
- 1.2.0 — 2022-09-22
- 1.1.2 — 2022-09-06
- 1.1.1 — 2022-06-30
- 1.0.1 — 2022-06-30
- 1.1.0 — 2022-06-29
- … 1 more at https://npm.io/package/@api3/ois/versions

## README

# `@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](https://airnode-docs.api3.org/reference/ois/latest/).

## Installation

To install [this package](https://www.npmjs.com/package/@api3/ois) run either:

`pnpm add @api3/ois`

or if you use npm:

`npm install @api3/ois --save`

### Gotchas

#### Use pinned version

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.

#### Make sure only one "zod" version is installed

Internally, we use [zod](https://github.com/colinhacks/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.

## 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:

```js
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
}
```

### Example

An example of a valid OIS can be found [here](https://github.com/api3dao/ois/blob/main/test/fixtures/ois.json).

## Developer documentation

### Release

Releasing is facilitated by GitHub Actions using [changesets/action](https://github.com/changesets/action). To release a
new version follow these steps:

1. Assuming desired changes are present on `main` with changesets, create a GitHub PR to the `release` branch from
   `main`.
2. Merge the PR to `release` **using a merge commit**.
3. The [publish Action workflow](./.github/workflows/publish.yml) will create a release PR.
4. Review the release PR and merge it to `release` using **squash and merge**.
5. The [publish Action workflow](./.github/workflows/publish.yml) 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 to `main`.
6. Merge the PR to `main` from `release` **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.

---
_Source: https://npm.io/package/@api3/ois · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
