openapicmd
Command line tools for openapi-enabled APIs
Last updated 2 months ago by anttiviljami .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install openapicmd 
SYNC missed versions from official npm registry.

OpenAPICMD

Build Status Dependencies npm version License Sponsored

Command line tools for openapi-enabled APIs

Features

  • [x] Read local and remote JSON/YAML OpenAPI specification files
  • [ ] Use as CLI client to call API operations
  • [x] Mock APIs locally with OpenAPI specification
  • [x] Run Swagger UI locally
  • [x] Run Swagger Editor locally

Usage

$ npm install -g openapicmd
$ openapi COMMAND
running command...
$ openapi (-v|--version|version)
openapicmd/0.0.13 darwin-x64 node-v10.12.0
$ openapi --help [COMMAND]
USAGE
  $ openapi COMMAND
...

Commands

openapi help [COMMAND]

display help for openapi

USAGE
  $ openapi help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

openapi mock

start a local mock API server

USAGE
  $ openapi mock

OPTIONS
  -U, --swagger-ui=docs           Swagger UI endpoint
  -d, --definition=./openapi.yml  (required) openapi definition file
  -h, --help                      show CLI help
  -p, --port=9000                 [default: 9000] port

EXAMPLES
  $ openapi mock -d ./openapi.yml
  $ openapi mock -d https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml

See code: src/commands/mock.ts

openapi read

read, parse and convert OpenAPI definitions

USAGE
  $ openapi read

OPTIONS
  -D, --dereference               resolve $ref pointers
  -V, --validate                  validate against openapi schema
  -d, --definition=./openapi.yml  (required) openapi definition file
  -f, --format=(json|yaml|yml)    [default: yaml] output format
  -h, --help                      show CLI help
  --json                          format as json (short for -f json)
  --yaml                          format as yaml (short for -f yaml)

EXAMPLES
  $ openapi read -d ./openapi.yml -f json > openapi.json
  $ openapi read -d https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml

See code: src/commands/read.ts

openapi swagger-editor

start a local Swagger UI instance

USAGE
  $ openapi swagger-editor

OPTIONS
  -d, --definition=./openapi.yml  openapi definition file
  -h, --help                      show CLI help
  -p, --port=9000                 [default: 9000] port

EXAMPLES
  $ openapi swagger-editor
  $ openapi swagger-editor -d ./openapi.yml

See code: src/commands/swagger-editor.ts

openapi swagger-ui

start a local Swagger UI instance

USAGE
  $ openapi swagger-ui

OPTIONS
  -d, --definition=./openapi.yml  openapi definition file
  -h, --help                      show CLI help
  -p, --port=9000                 [default: 9000] port

EXAMPLES
  $ openapi swagger-ui
  $ openapi swagger-ui -d ./openapi.yml

See code: src/commands/swagger-ui.ts

Contributing

OpenAPI Backend is Free and Open Source Software. Issues and pull requests are more than welcome!

The Chilicorn

Current Tags

  • 0.0.13                                ...           latest (2 months ago)

13 Versions

  • 0.0.13                                ...           2 months ago
  • 0.0.12                                ...           2 months ago
  • 0.0.11                                ...           2 months ago
  • 0.0.10                                ...           2 months ago
  • 0.0.9                                ...           2 months ago
  • 0.0.8                                ...           2 months ago
  • 0.0.7                                ...           2 months ago
  • 0.0.6                                ...           2 months ago
  • 0.0.5                                ...           2 months ago
  • 0.0.4                                ...           2 months ago
  • 0.0.3                                ...           2 months ago
  • 0.0.2                                ...           2 months ago
  • 0.0.1                                ...           2 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 13
Last Day 0
Last Week 13
Last Month 66
Dependencies (15)
Dev Dependencies (18)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |