All Projects → anttiviljami → openapicmd

anttiviljami / openapicmd

Licence: MIT license
The CLI for all things OpenAPI and Swagger

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to openapicmd

awesome-integration
A curated list of awesome system integration software and resources.
Stars: ✭ 117 (+387.5%)
Mutual labels:  openapi
php-pesa
Open payment integration toolkit for PHP
Stars: ✭ 26 (+8.33%)
Mutual labels:  openapi
twitter-trend-analyzer
The trend analysis engine for a specific keyword of Twitter by using a graphical chart and geographical chart.
Stars: ✭ 20 (-16.67%)
Mutual labels:  openapi
cube
Common LISP Kubernetes Client
Stars: ✭ 33 (+37.5%)
Mutual labels:  openapi
daf-dataportal-backend
Backend per il nuovo frontend (in sviluppo) di dati.gov.it
Stars: ✭ 17 (-29.17%)
Mutual labels:  openapi
sbt-lagom-descriptor-generator
Lagom API code generator
Stars: ✭ 23 (-4.17%)
Mutual labels:  openapi
aliyun-openapi-sdk-net-core
aliyun open api sdk for .net core 2.0
Stars: ✭ 17 (-29.17%)
Mutual labels:  openapi
intellij-openapi-generator
Intellij Plugin for openapi-generator
Stars: ✭ 73 (+204.17%)
Mutual labels:  openapi
openapi-viewer
Browse and test a REST API described with the OpenAPI 3.0 Specification
Stars: ✭ 85 (+254.17%)
Mutual labels:  openapi
nestjs-asyncapi
NestJS AsyncAPI module - generate the documentation of your event-based services using decorators
Stars: ✭ 88 (+266.67%)
Mutual labels:  openapi
symmetric
A powerful tool to enable super fast module-to-API transformations. Learn in minutes, implement in seconds. Batteries included.
Stars: ✭ 65 (+170.83%)
Mutual labels:  openapi
loopback-next
LoopBack makes it easy to build modern API applications that require complex integrations.
Stars: ✭ 4,412 (+18283.33%)
Mutual labels:  openapi
arrest
Swagger REST framework for Node.js, with support for MongoDB and JSON-Schema
Stars: ✭ 17 (-29.17%)
Mutual labels:  openapi
reedelk-runtime
Reedelk Runtime Platform Community Edition
Stars: ✭ 25 (+4.17%)
Mutual labels:  openapi
openapi-filter
Filter internal paths, operations, parameters, schemas etc from OpenAPI/Swagger/AsyncAPI definitions
Stars: ✭ 112 (+366.67%)
Mutual labels:  openapi
arcus.webapi
Web API development with Microsoft Azure in a breeze.
Stars: ✭ 19 (-20.83%)
Mutual labels:  openapi
yaml-include
Valid, modular YAML documents with js-yaml. Seriously.
Stars: ✭ 39 (+62.5%)
Mutual labels:  openapi
starlite
Light, Flexible and Extensible ASGI API framework
Stars: ✭ 1,525 (+6254.17%)
Mutual labels:  openapi
minos
Tool to test OpenAPI spec files VS real implementations
Stars: ✭ 17 (-29.17%)
Mutual labels:  openapi
apispots-extension
Chrome extensions for discovering and interacting with Open APIs
Stars: ✭ 41 (+70.83%)
Mutual labels:  openapi

OpenAPI Command Line Tool

CI npm version License Sponsored Buy me a coffee

openapicmd - The CLI for all things OpenAPI and Swagger

Install

npm install -g openapicmd
openapi help

Features

  • Read and convert local and remote JSON/YAML OpenAPI definition files
  • Use as CLI client to easily call API endpoints
  • Run Swagger UI locally
  • Bundle static Swagger UI sites
  • Run Swagger Editor locally
  • Convert Swagger 2.0 to OpenAPI 3.0.x
  • Run Local Mock APIs

Commands

openapi auth [DEFINITION]

Authenticate with apis (writes to .openapiconfig)

Authenticate with apis (writes to .openapiconfig)

USAGE
  $ openapi auth [DEFINITION]

ARGUMENTS
  DEFINITION  input definition file

OPTIONS
  -B, --bundle                               resolve remote $ref pointers
  -D, --dereference                          resolve $ref pointers
  -H, --header=header                        add request headers when calling remote urls
  -I, --inject={"info":{"version":"1.0.0"}}  inject JSON to definition with deep merge
  -R, --root=/                               override API root path
  -S, --server=http://localhost:9000         override servers definition
  -V, --validate                             validate against openapi schema
  -h, --help                                 show CLI help
  -k, --apikey=apikey                        set api key
  -p, --password=password                    set basic auth password
  -s, --security=security                    use security scheme
  -t, --token=token                          set bearer token
  -u, --username=username                    set basic auth username

EXAMPLES
  $ openapi auth
  $ openapi auth --token eyJh...
  $ openapi auth --security ApiKeyAuth --apikey secret123
  $ openapi auth --security BasicAuth --username admin --password password

See code: src/commands/auth.ts

openapi call [DEFINITION]

Call API endpoints

Call API endpoints

USAGE
  $ openapi call [DEFINITION]

ARGUMENTS
  DEFINITION  input definition file

OPTIONS
  -B, --bundle                               resolve remote $ref pointers
  -D, --dereference                          resolve $ref pointers
  -H, --header=header                        add request headers when calling remote urls
  -I, --inject={"info":{"version":"1.0.0"}}  inject JSON to definition with deep merge
  -R, --root=/                               override API root path
  -S, --server=http://localhost:9000         override servers definition
  -V, --validate                             validate against openapi schema
  -d, --data=data                            request body
  -h, --help                                 show CLI help
  -i, --include                              include status code and response headers the output
  -k, --apikey=apikey                        set api key
  -o, --operation=operationId                operationId
  -p, --param=key=value                      parameter
  -p, --password=password                    set basic auth password
  -s, --security=security                    use security scheme
  -t, --token=token                          set bearer token
  -u, --username=username                    set basic auth username
  -v, --verbose                              verbose mode

EXAMPLES
  $ openapi call -o getPets
  $ openapi call -o getPet -p id=1
  $ openapi call -o createPet -d '{ "name": "Garfield" }'

See code: src/commands/call.ts

openapi help [COMMAND]

display help for openapi

display help for <%= config.bin %>

USAGE
  $ openapi help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

openapi info [DEFINITION]

Display API information

Display API information

USAGE
  $ openapi info [DEFINITION]

ARGUMENTS
  DEFINITION  input definition file

OPTIONS
  -B, --bundle                               resolve remote $ref pointers
  -D, --dereference                          resolve $ref pointers
  -H, --header=header                        add request headers when calling remote urls
  -I, --inject={"info":{"version":"1.0.0"}}  inject JSON to definition with deep merge
  -R, --root=/                               override API root path
  -S, --server=http://localhost:9000         override servers definition
  -V, --validate                             validate against openapi schema
  -h, --help                                 show CLI help
  --operations                               list operations in document
  --schemas                                  list schemas in document
  --security                                 list security schemes in document

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

See code: src/commands/info.ts

openapi init

Initialise a definition file from scratch

Initialise a definition file from scratch

USAGE
  $ openapi init

OPTIONS
  -I, --inject={"info":{"version":"1.0.0"}}  inject JSON to definition with deep merge
  -S, --server=http://localhost:9000         override servers definition
  -T, --title=title                          [default: My API] The title for the API
  -d, --description=description              Description for the API
  -f, --format=(json|yaml|yml)               [default: yaml] output format
  -h, --help                                 show CLI help
  -v, --version=version                      [default: 0.0.1] Version of the API
  --json                                     format as json (short for -f json)
  --license=mit|apache2                      The license for the API
  --terms=terms                              A URL to the Terms of Service for the API.
  --yaml                                     format as yaml (short for -f yaml)

EXAMPLE
  $ openapi init --title 'My API' > openapi.yml

See code: src/commands/init.ts

openapi load DEFINITION

Set the default definition file for a workspace (writes to .openapiconfig)

Set the default definition file for a workspace (writes to .openapiconfig)

USAGE
  $ openapi load DEFINITION

ARGUMENTS
  DEFINITION  input definition file

OPTIONS
  -V, --validate  validate against openapi schema
  -h, --help      show CLI help

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

See code: src/commands/load.ts

openapi mock [DEFINITION]

Start a local mock API server

Start a local mock API server

USAGE
  $ openapi mock [DEFINITION]

ARGUMENTS
  DEFINITION  input definition file

OPTIONS
  -H, --header=header                        add request headers when calling remote urls
  -I, --inject={"info":{"version":"1.0.0"}}  inject JSON to definition with deep merge
  -R, --root=/                               override API root path
  -S, --server=http://localhost:9000         override servers definition
  -U, --swagger-ui=docs                      Swagger UI endpoint
  -h, --help                                 show CLI help
  -p, --port=9000                            [default: 9000] port
  --[no-]logger                              [default: true] log requests
  --[no-]validate                            [default: true] validate requests according to schema

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

See code: src/commands/mock.ts

openapi read [DEFINITION]

Read and manipulate definition files

Read and manipulate definition files

USAGE
  $ openapi read [DEFINITION]

ARGUMENTS
  DEFINITION  input definition file

OPTIONS
  -B, --bundle                               resolve remote $ref pointers
  -D, --dereference                          resolve $ref pointers
  -H, --header=header                        add request headers when calling remote urls
  -I, --inject={"info":{"version":"1.0.0"}}  inject JSON to definition with deep merge
  -R, --root=/                               override API root path
  -S, --server=http://localhost:9000         override servers definition
  -V, --validate                             validate against openapi schema
  -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 https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml
  $ openapi read ./openapi.yml -f json > openapi.json

See code: src/commands/read.ts

openapi swagger-editor [DEFINITION]

Start a Swagger Editor instance

Start a Swagger Editor instance

USAGE
  $ openapi swagger-editor [DEFINITION]

ARGUMENTS
  DEFINITION  input definition file

OPTIONS
  -H, --header=header  add request headers when calling remote urls
  -h, --help           show CLI help
  -p, --port=9000      [default: 9000] port
  --[no-]logger        [default: true] log requests

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

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

openapi swagger-ui [DEFINITION]

Start or bundle a Swagger UI instance

Start or bundle a Swagger UI instance

USAGE
  $ openapi swagger-ui [DEFINITION]

ARGUMENTS
  DEFINITION  input definition file

OPTIONS
  -B, --bundle=outDir                        bundle a static site to directory
  -H, --header=header                        add request headers when calling remote urls
  -I, --inject={"info":{"version":"1.0.0"}}  inject JSON to definition with deep merge
  -R, --root=/                               override API root path
  -S, --server=http://localhost:9000         override servers definition
  -h, --help                                 show CLI help
  -p, --port=9000                            [default: 9000] port
  --[no-]deeplinks                           [default: true] allow deep linking
  --expand=full|list|none                    [default: list] default expansion setting for the operations and tags
  --[no-]filter                              [default: true] enable filtering by tag
  --[no-]logger                              [default: true] log requests
  --[no-]operationids                        [default: true] display operationIds
  --proxy                                    set up a proxy for the api to avoid CORS issues
  --[no-]requestduration                     [default: true] display request durations in "try it now"
  --[no-]withcredentials                     [default: true] send cookies in "try it now"

EXAMPLES
  $ openapi swagger-ui
  $ openapi swagger-ui ./openapi.yml
  $ openapi swagger-ui ./openapi.yml --bundle outDir

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

openapi swagger2openapi [DEFINITION]

Convert Swagger 2.0 definitions to OpenAPI 3.0.x

Convert Swagger 2.0 definitions to OpenAPI 3.0.x

USAGE
  $ openapi swagger2openapi [DEFINITION]

ARGUMENTS
  DEFINITION  input definition file

OPTIONS
  -B, --bundle                               resolve remote $ref pointers
  -D, --dereference                          resolve $ref pointers
  -H, --header=header                        add request headers when calling remote urls
  -I, --inject={"info":{"version":"1.0.0"}}  inject JSON to definition with deep merge
  -R, --root=/                               override API root path
  -S, --server=http://localhost:9000         override servers definition
  -V, --validate                             validate against openapi schema
  -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)

EXAMPLE
  $ openapi swagger2openapi --yaml ./swagger.json > openapi.yml

See code: src/commands/swagger2openapi.ts

openapi unload

Unset the default definition file for a workspace (writes to .openapiconfig)

Unset the default definition file for a workspace (writes to .openapiconfig)

USAGE
  $ openapi unload

OPTIONS
  -h, --help  show CLI help

EXAMPLE
  $ openapi unload

See code: src/commands/unload.ts

Contributing

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

The Chilicorn

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].