Skip to content

MOXA-ISD/oapi-doc

Repository files navigation

oapi-doc

ThingsPro OAPI document

OAPI URL

Development

Dependencies

  • node >= v8
  • yarn

Setup

yarn

Add New Swagger Document

# name must be gateway, server or edge
mkdir -p packages/oapi-tp-<name>/schema/<name>
touch packages/oapi-tp-<name>/schema/index.yaml

Note: after create document, remember to add reference in packages/oapi-tp-gateway/schema/index.yaml

Validation

yarn lint <name> # name must be gateway, server or edge

Preview

yarn build <name> && yarn start <name> # name must be gateway, server or edge