@nemtus/symbol-openapi
v1.0.5
Published
OpenAPI Specification of catapult-rest
Readme
Note (nemtus mirror): This package (
@nemtus/symbol-openapi) is a content mirror of the OpenAPI specification fromsymbol/symbol(openapi/). The only change from upstream is the npm package name; the specification content is unmodified. Licensed under Apache-2.0. For the canonical project, see symbol/symbol.
symbol-openapi
OpenAPI specification for catapult-rest.
This project lives in the Symbol monorepo under openapi/.
Requirements
- Node.js 20 LTS or higher
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.shInstallation
- Clone the monorepo and enter this package.
git clone https://github.com/symbol/symbol.git
cd symbol/openapi- Install dependencies.
npm installCommands
Build
Compile the specification. The generated output is saved under the _build directory.
npm run buildTest
Checks links in the built specification (_build/openapi3.yml).
npm run testIn CI the flow is split into dedicated stages:
scripts/ci/lint.sh->npm run lint(OpenAPI lint onspec/openapi.yml)scripts/ci/build.sh->npm run build(bundle to_build/openapi3.yml)scripts/ci/test.sh->npm run test
Postman
Generate a Postman collection from the built specification.
npm run postmanRelease (monorepo)
Release in monorepo is component-scoped (openapi/) and produces versioned OpenAPI + Postman artifacts.
- Bump
versioninpackage.jsonand updateCHANGELOG.md. - Run publish script:
scripts/ci/publish.shThis prepares:
_build/openapi3.yml_build/openapi3.json_build/postman.json_build/v<version>/openapi3.yml_build/v<version>/openapi3.json_build/v<version>/postman.json
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.shContributing
Before contributing please read this.
License
Licensed under the Apache License 2.0.
