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.
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
git clone https://github.com/NemProject/nem.git
cd nem/openapi
npm install
Compile the specification. The generated output is saved under the _build directory.
npm run build
Checks links in the built specification (_build/openapi3.yml).
npm run test
In CI the flow is split into dedicated stages:
scripts/ci/lint.sh -> npm run lint (OpenAPI lint on spec/openapi.yml)scripts/ci/build.sh -> npm run build (bundle to _build/openapi3.yml)scripts/ci/test.sh -> npm run testGenerate a Postman collection from the built specification.
npm run postman
Release in monorepo is component-scoped (openapi/) and produces versioned OpenAPI + Postman artifacts.
version in package.json and update CHANGELOG.md.scripts/ci/publish.sh
This prepares:
_build/openapi3.yml_build/openapi3.json_build/postman.json_build/v<version>/openapi3.yml_build/v<version>/openapi3.json_build/v<version>/postman.jsonOptional: 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
Before contributing please read this.
Licensed under the Apache License 2.0.