nem

OpenAPI specification for NEM Infrastructure Server (NIS) REST API. The API is implemented in the nis module in this repository.

Canonical API documentation: https://nemproject.github.io/ — use it for endpoint descriptions and verification.

Requirements

YAML style and syntax for files under spec/ are checked by the monorepo Linters job (linters/scripts/lint_yaml.sh -> yamllint with linters/yaml/.yamllint). Run that from the repository root if you need the same check locally:

./linters/scripts/lint_yaml.sh

Installation

  1. Clone the monorepo and enter this package.
git clone https://github.com/NemProject/nem.git
cd nem/openapi
  1. Install dependencies.
npm install

Commands

Build

Compile the specification. The generated output is saved under the _build directory.

npm run build

Test

Checks links in the built specification (_build/openapi3.yml).

npm run test

In CI the flow is split into dedicated stages:

Postman

Generate a Postman collection from the built specification.

npm run postman

Release (monorepo)

Release in monorepo is component-scoped (openapi/) and produces versioned OpenAPI + Postman artifacts.

  1. Bump version in package.json and update CHANGELOG.md.
  2. Run publish script:
scripts/ci/publish.sh

This prepares:

Optional: create a GitHub release with assets (requires authenticated gh CLI):

OPENAPI_RELEASE_CREATE_GH=1 OPENAPI_RELEASE_TAG=openapi/v<version> scripts/ci/publish.sh

Contributing

Before contributing please read this.

License

Licensed under the Apache License 2.0.