{"id":14986737,"url":"https://github.com/openapistack/openapicmd","last_synced_at":"2025-09-08T18:40:03.355Z","repository":{"id":34158579,"uuid":"167661176","full_name":"openapistack/openapicmd","owner":"openapistack","description":"The CLI for all things OpenAPI and Swagger","archived":false,"fork":false,"pushed_at":"2025-05-30T09:34:54.000Z","size":3141,"stargazers_count":67,"open_issues_count":13,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-04T18:53:37.018Z","etag":null,"topics":["cli","hacktoberfest","openapi","swagger"],"latest_commit_sha":null,"homepage":"https://openapistack.co","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openapistack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"anttiviljami","open_collective":"openapi-stack","custom":["https://buymeacoff.ee/anttiviljami"]}},"created_at":"2019-01-26T07:15:34.000Z","updated_at":"2025-09-03T10:37:49.000Z","dependencies_parsed_at":"2023-11-27T23:02:58.523Z","dependency_job_id":"3e14ed4f-c143-47ea-be6f-9374a72ea564","html_url":"https://github.com/openapistack/openapicmd","commit_stats":{"total_commits":271,"total_committers":11,"mean_commits":"24.636363636363637","dds":0.5756457564575646,"last_synced_commit":"76bf918e94a06f995dabcd2ca0a127610e892c55"},"previous_names":["openapistack/openapicmd","anttiviljami/openapicmd"],"tags_count":94,"template":false,"template_full_name":null,"purl":"pkg:github/openapistack/openapicmd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapistack%2Fopenapicmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapistack%2Fopenapicmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapistack%2Fopenapicmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapistack%2Fopenapicmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openapistack","download_url":"https://codeload.github.com/openapistack/openapicmd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapistack%2Fopenapicmd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274229381,"owners_count":25245189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","hacktoberfest","openapi","swagger"],"created_at":"2024-09-24T14:13:26.783Z","updated_at":"2025-09-08T18:40:03.342Z","avatar_url":"https://github.com/openapistack.png","language":"TypeScript","funding_links":["https://github.com/sponsors/anttiviljami","https://opencollective.com/openapi-stack","https://buymeacoff.ee/anttiviljami"],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eOpenAPI Command Line Tool\u003c/h1\u003e\n\n[![CI](https://github.com/openapistack/openapicmd/workflows/CI/badge.svg)](https://github.com/openapistack/openapicmd/actions?query=workflow%3ACI)\n[![License](http://img.shields.io/:license-mit-blue.svg)](https://github.com/openapistack/openapicmd/blob/main/LICENSE)\n[![npm version](https://img.shields.io/npm/v/openapicmd.svg)](https://www.npmjs.com/package/openapicmd)\n[![npm downloads](https://img.shields.io/npm/dw/openapicmd.svg)](https://www.npmjs.com/package/openapicmd)\n![npm type definitions](https://img.shields.io/npm/types/openapicmd.svg)\n[![Buy me a coffee](https://img.shields.io/badge/donate-buy%20me%20a%20coffee-orange)](https://buymeacoff.ee/anttiviljami)\n\n\u003cp align=\"center\"\u003eopenapicmd - The CLI for all things OpenAPI and Swagger\u003c/p\u003e\n\n# Install\n\n```\nnpm install -g openapicmd\nopenapi help\n```\n\n# Features\n- [x] Read and convert local and remote JSON/YAML OpenAPI definition files\n- [x] Generate TypeScript types from OpenAPI definitions\n- [x] Use as a CLI client to easily call API endpoints\n- [x] Run Local Mock APIs\n- [x] Automate API tests and validate specs\n- [x] Run [Swagger UI](https://github.com/swagger-api/swagger-ui) or [ReDoc](https://github.com/Redocly/redoc) locally\n- [x] Bundle static [Swagger UI](https://github.com/swagger-api/swagger-ui) or [ReDoc](https://github.com/Redocly/redoc) sites\n- [x] Run [Swagger Editor](https://github.com/swagger-api/swagger-editor) locally\n- [x] Convert Swagger to OpenAPI\n\n# Commands\n\u003c!-- commands --\u003e\n* [`openapi auth [DEFINITION]`](#openapi-auth-definition)\n* [`openapi call [DEFINITION]`](#openapi-call-definition)\n* [`openapi help [COMMAND]`](#openapi-help-command)\n* [`openapi info [DEFINITION]`](#openapi-info-definition)\n* [`openapi init`](#openapi-init)\n* [`openapi load DEFINITION`](#openapi-load-definition)\n* [`openapi mock [DEFINITION]`](#openapi-mock-definition)\n* [`openapi read [DEFINITION]`](#openapi-read-definition)\n* [`openapi redoc [DEFINITION]`](#openapi-redoc-definition)\n* [`openapi swagger-editor [DEFINITION]`](#openapi-swagger-editor-definition)\n* [`openapi swagger-ui [DEFINITION]`](#openapi-swagger-ui-definition)\n* [`openapi swagger2openapi [DEFINITION]`](#openapi-swagger2openapi-definition)\n* [`openapi test`](#openapi-test)\n* [`openapi test add [DEFINITION]`](#openapi-test-add-definition)\n* [`openapi typegen [DEFINITION]`](#openapi-typegen-definition)\n* [`openapi unload`](#openapi-unload)\n\n## `openapi auth [DEFINITION]`\n\nAuthenticate with apis (writes to .openapiconfig)\n\n```\nUSAGE\n  $ openapi auth [DEFINITION] [-h] [-V] [-D] [-B] [-R /] [-H \u003cvalue\u003e...] [-S http://localhost:9000...] [-I\n    {\"info\":{\"version\":\"1.0.0\"}}...] [-E x-internal] [-C default|all|openapi_client_axios|openapi_backend] [-U] [-s\n    \u003cvalue\u003e...] [-k \u003cvalue\u003e] [-t \u003cvalue\u003e] [-u \u003cvalue\u003e] [-P \u003cvalue\u003e]\n\nARGUMENTS\n  DEFINITION  input definition file\n\nFLAGS\n  -B, --bundle                                                  resolve remote $ref pointers\n  -C, --strip=default|all|openapi_client_axios|openapi_backend  Strip optional metadata such as examples and\n                                                                descriptions from definition\n  -D, --dereference                                             resolve $ref pointers\n  -E, --exclude-ext=x-internal                                  Specify an openapi extension to exclude parts of the\n                                                                spec\n  -H, --header=\u003cvalue\u003e...                                       add request headers when calling remote urls\n  -I, --inject={\"info\":{\"version\":\"1.0.0\"}}...                  inject JSON to definition with deep merge\n  -P, --password=\u003cvalue\u003e                                        set basic auth password\n  -R, --root=/                                                  override API root path\n  -S, --server=http://localhost:9000...                         override servers definition\n  -U, --[no-]remove-unreferenced                                Remove unreferenced components, you can skip individual\n                                                                component being removed by setting x-openapicmd-keep to\n                                                                true\n  -V, --validate                                                validate against openapi schema\n  -h, --help                                                    Show CLI help.\n  -k, --apikey=\u003cvalue\u003e                                          set api key\n  -s, --security=\u003cvalue\u003e...                                     use security scheme\n  -t, --token=\u003cvalue\u003e                                           set bearer token\n  -u, --username=\u003cvalue\u003e                                        set basic auth username\n\nDESCRIPTION\n  Authenticate with apis (writes to .openapiconfig)\n\nEXAMPLES\n  $ openapi auth\n\n  $ openapi auth --token eyJh...\n\n  $ openapi auth --security ApiKeyAuth --apikey secret123\n\n  $ openapi auth --security BasicAuth --username admin --password password\n```\n\n_See code: [src/commands/auth.ts](https://github.com/openapistack/openapicmd/blob/v2.7.0/src/commands/auth.ts)_\n\n## `openapi call [DEFINITION]`\n\nCall API endpoints\n\n```\nUSAGE\n  $ openapi call [DEFINITION] [-h] [-D] [-B] [-R /] [-H \u003cvalue\u003e...] [-V] [-S http://localhost:9000...] [-I\n    {\"info\":{\"version\":\"1.0.0\"}}...] [-E x-internal] [-C default|all|openapi_client_axios|openapi_backend] [-U]\n    [--interactive] [-o operationId] [-p key=value...] [-d \u003cvalue\u003e] [-i] [-v] [-s \u003cvalue\u003e...] [-k \u003cvalue\u003e] [-t \u003cvalue\u003e]\n    [-u \u003cvalue\u003e] [-P \u003cvalue\u003e]\n\nARGUMENTS\n  DEFINITION  input definition file\n\nFLAGS\n  -B, --bundle                                                  resolve remote $ref pointers\n  -C, --strip=default|all|openapi_client_axios|openapi_backend  Strip optional metadata such as examples and\n                                                                descriptions from definition\n  -D, --dereference                                             resolve $ref pointers\n  -E, --exclude-ext=x-internal                                  Specify an openapi extension to exclude parts of the\n                                                                spec\n  -H, --header=\u003cvalue\u003e...                                       add request headers when calling remote urls\n  -I, --inject={\"info\":{\"version\":\"1.0.0\"}}...                  inject JSON to definition with deep merge\n  -P, --password=\u003cvalue\u003e                                        set basic auth password\n  -R, --root=/                                                  override API root path\n  -S, --server=http://localhost:9000...                         override servers definition\n  -U, --[no-]remove-unreferenced                                Remove unreferenced components, you can skip individual\n                                                                component being removed by setting x-openapicmd-keep to\n                                                                true\n  -V, --validate                                                validate against openapi schema\n  -d, --data=\u003cvalue\u003e                                            request body\n  -h, --help                                                    Show CLI help.\n  -i, --include                                                 include status code and response headers the output\n  -k, --apikey=\u003cvalue\u003e                                          set api key\n  -o, --operation=operationId                                   operationId\n  -p, --param=key=value...                                      parameter\n  -s, --security=\u003cvalue\u003e...                                     use security scheme\n  -t, --token=\u003cvalue\u003e                                           set bearer token\n  -u, --username=\u003cvalue\u003e                                        set basic auth username\n  -v, --verbose                                                 verbose mode\n      --[no-]interactive                                        [default: true] enable CLI interactive mode\n\nDESCRIPTION\n  Call API endpoints\n\nEXAMPLES\n  $ openapi call -o getPets\n\n  $ openapi call -o getPet -p id=1\n\n  $ openapi call -o createPet -d '{ \"name\": \"Garfield\" }'\n```\n\n_See code: [src/commands/call.ts](https://github.com/openapistack/openapicmd/blob/v2.7.0/src/commands/call.ts)_\n\n## `openapi help [COMMAND]`\n\nDisplay help for openapi.\n\n```\nUSAGE\n  $ openapi help [COMMAND...] [-n]\n\nARGUMENTS\n  COMMAND...  Command to show help for.\n\nFLAGS\n  -n, --nested-commands  Include all nested commands in the output.\n\nDESCRIPTION\n  Display help for openapi.\n```\n\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.8/src/commands/help.ts)_\n\n## `openapi info [DEFINITION]`\n\nDisplay API information\n\n```\nUSAGE\n  $ openapi info [DEFINITION] [-h] [-D] [-B] [-R /] [-H \u003cvalue\u003e...] [-V] [-S http://localhost:9000...] [-I\n    {\"info\":{\"version\":\"1.0.0\"}}...] [-E x-internal] [-C default|all|openapi_client_axios|openapi_backend] [-U]\n    [--security] [--operations] [--schemas]\n\nARGUMENTS\n  DEFINITION  input definition file\n\nFLAGS\n  -B, --bundle                                                  resolve remote $ref pointers\n  -C, --strip=default|all|openapi_client_axios|openapi_backend  Strip optional metadata such as examples and\n                                                                descriptions from definition\n  -D, --dereference                                             resolve $ref pointers\n  -E, --exclude-ext=x-internal                                  Specify an openapi extension to exclude parts of the\n                                                                spec\n  -H, --header=\u003cvalue\u003e...                                       add request headers when calling remote urls\n  -I, --inject={\"info\":{\"version\":\"1.0.0\"}}...                  inject JSON to definition with deep merge\n  -R, --root=/                                                  override API root path\n  -S, --server=http://localhost:9000...                         override servers definition\n  -U, --[no-]remove-unreferenced                                Remove unreferenced components, you can skip individual\n                                                                component being removed by setting x-openapicmd-keep to\n                                                                true\n  -V, --validate                                                validate against openapi schema\n  -h, --help                                                    Show CLI help.\n      --operations                                              list operations in document\n      --schemas                                                 list schemas in document\n      --security                                                list security schemes in document\n\nDESCRIPTION\n  Display API information\n\nEXAMPLES\n  $ openapi info https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml\n\n  $ openapi info ./openapi.yml\n```\n\n_See code: [src/commands/info.ts](https://github.com/openapistack/openapicmd/blob/v2.7.0/src/commands/info.ts)_\n\n## `openapi init`\n\nInitialise a definition file from scratch\n\n```\nUSAGE\n  $ openapi init [-h] [-T \u003cvalue\u003e] [-d \u003cvalue\u003e] [-v \u003cvalue\u003e] [--terms \u003cvalue\u003e] [--license mit|apache2] [-S\n    http://localhost:9000...] [-I {\"info\":{\"version\":\"1.0.0\"}}...] [-f json|yaml|yml | --json | --yaml]\n\nFLAGS\n  -I, --inject={\"info\":{\"version\":\"1.0.0\"}}...  inject JSON to definition with deep merge\n  -S, --server=http://localhost:9000...         override servers definition\n  -T, --title=\u003cvalue\u003e                           [default: My API] The title for the API\n  -d, --description=\u003cvalue\u003e                     Description for the API\n  -f, --format=\u003coption\u003e                         [default: yaml] output format\n                                                \u003coptions: json|yaml|yml\u003e\n  -h, --help                                    Show CLI help.\n  -v, --version=\u003cvalue\u003e                         [default: 0.0.1] Version of the API\n      --json                                    format as json (short for -f json)\n      --license=\u003coption\u003e                        The license for the API\n                                                \u003coptions: mit|apache2\u003e\n      --terms=\u003cvalue\u003e                           A URL to the Terms of Service for the API.\n      --yaml                                    format as yaml (short for -f yaml)\n\nDESCRIPTION\n  Initialise a definition file from scratch\n\nEXAMPLES\n  $ openapi init --title 'My API' \u003e openapi.yml\n```\n\n_See code: [src/commands/init.ts](https://github.com/openapistack/openapicmd/blob/v2.7.0/src/commands/init.ts)_\n\n## `openapi load DEFINITION`\n\nSet the default definition file for a workspace (writes to .openapiconfig)\n\n```\nUSAGE\n  $ openapi load DEFINITION [-h] [-V] [-S http://localhost:9000...]\n\nARGUMENTS\n  DEFINITION  input definition file\n\nFLAGS\n  -S, --server=http://localhost:9000...  override servers definition\n  -V, --validate                         validate against openapi schema\n  -h, --help                             Show CLI help.\n\nDESCRIPTION\n  Set the default definition file for a workspace (writes to .openapiconfig)\n\nEXAMPLES\n  $ openapi load ./openapi.yml\n\n  $ openapi load https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml\n```\n\n_See code: [src/commands/load.ts](https://github.com/openapistack/openapicmd/blob/v2.7.0/src/commands/load.ts)_\n\n## `openapi mock [DEFINITION]`\n\nStart a local mock API server\n\n```\nUSAGE\n  $ openapi mock [DEFINITION] [-h] [-p 9000] [--logger] [-S http://localhost:9000...] [-I\n    {\"info\":{\"version\":\"1.0.0\"}}...] [-C default|all|openapi_client_axios|openapi_backend] [-E x-internal] [-H\n    \u003cvalue\u003e...] [-R /] [-U docs] [--validate]\n\nARGUMENTS\n  DEFINITION  input definition file\n\nFLAGS\n  -C, --strip=default|all|openapi_client_axios|openapi_backend  Strip optional metadata such as examples and\n                                                                descriptions from definition\n  -E, --exclude-ext=x-internal                                  Specify an openapi extension to exclude parts of the\n                                                                spec\n  -H, --header=\u003cvalue\u003e...                                       add request headers when calling remote urls\n  -I, --inject={\"info\":{\"version\":\"1.0.0\"}}...                  inject JSON to definition with deep merge\n  -R, --root=/                                                  override API root path\n  -S, --server=http://localhost:9000...                         override servers definition\n  -U, --swagger-ui=docs                                         Swagger UI endpoint\n  -h, --help                                                    Show CLI help.\n  -p, --port=9000                                               [default: 9000] port\n      --[no-]logger                                             [default: true] log requests\n      --[no-]validate                                           [default: true] validate requests according to schema\n\nDESCRIPTION\n  Start a local mock API server\n\nEXAMPLES\n  $ openapi mock ./openapi.yml\n\n  $ openapi mock https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml\n```\n\n_See code: [src/commands/mock.ts](https://github.com/openapistack/openapicmd/blob/v2.7.0/src/commands/mock.ts)_\n\n## `openapi read [DEFINITION]`\n\nRead and manipulate definition files\n\n```\nUSAGE\n  $ openapi read [DEFINITION] [-h] [-D] [-B] [-R /] [-H \u003cvalue\u003e...] [-V] [-S http://localhost:9000...] [-I\n    {\"info\":{\"version\":\"1.0.0\"}}...] [-E x-internal] [-C default|all|openapi_client_axios|openapi_backend] [-U] [-f\n    json|yaml|yml | --json | --yaml]\n\nARGUMENTS\n  DEFINITION  input definition file\n\nFLAGS\n  -B, --bundle                                                  resolve remote $ref pointers\n  -C, --strip=default|all|openapi_client_axios|openapi_backend  Strip optional metadata such as examples and\n                                                                descriptions from definition\n  -D, --dereference                                             resolve $ref pointers\n  -E, --exclude-ext=x-internal                                  Specify an openapi extension to exclude parts of the\n                                                                spec\n  -H, --header=\u003cvalue\u003e...                                       add request headers when calling remote urls\n  -I, --inject={\"info\":{\"version\":\"1.0.0\"}}...                  inject JSON to definition with deep merge\n  -R, --root=/                                                  override API root path\n  -S, --server=http://localhost:9000...                         override servers definition\n  -U, --[no-]remove-unreferenced                                Remove unreferenced components, you can skip individual\n                                                                component being removed by setting x-openapicmd-keep to\n                                                                true\n  -V, --validate                                                validate against openapi schema\n  -f, --format=\u003coption\u003e                                         [default: yaml] output format\n                                                                \u003coptions: json|yaml|yml\u003e\n  -h, --help                                                    Show CLI help.\n      --json                                                    format as json (short for -f json)\n      --yaml                                                    format as yaml (short for -f yaml)\n\nDESCRIPTION\n  Read and manipulate definition files\n\nEXAMPLES\n  $ openapi read https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml\n\n  $ openapi read ./openapi.yml -f json \u003e openapi.json\n```\n\n_See code: [src/commands/read.ts](https://github.com/openapistack/openapicmd/blob/v2.7.0/src/commands/read.ts)_\n\n## `openapi redoc [DEFINITION]`\n\nStart or bundle a ReDoc instance\n\n```\nUSAGE\n  $ openapi redoc [DEFINITION] [-h] [-p 9000] [--logger] [-S http://localhost:9000...] [-I\n    {\"info\":{\"version\":\"1.0.0\"}}...] [-E x-internal] [-C default|all|openapi_client_axios|openapi_backend] [-H\n    \u003cvalue\u003e...] [-R /] [-B outDir]\n\nARGUMENTS\n  DEFINITION  input definition file\n\nFLAGS\n  -B, --bundle=outDir                                           bundle a static site to directory\n  -C, --strip=default|all|openapi_client_axios|openapi_backend  Strip optional metadata such as examples and\n                                                                descriptions from definition\n  -E, --exclude-ext=x-internal                                  Specify an openapi extension to exclude parts of the\n                                                                spec\n  -H, --header=\u003cvalue\u003e...                                       add request headers when calling remote urls\n  -I, --inject={\"info\":{\"version\":\"1.0.0\"}}...                  inject JSON to definition with deep merge\n  -R, --root=/                                                  override API root path\n  -S, --server=http://localhost:9000...                         override servers definition\n  -h, --help                                                    Show CLI help.\n  -p, --port=9000                                               [default: 9000] port\n      --[no-]logger                                             [default: true] log requests\n\nDESCRIPTION\n  Start or bundle a ReDoc instance\n\nEXAMPLES\n  $ openapi redoc\n\n  $ openapi redoc ./openapi.yml\n\n  $ openapi redoc ./openapi.yml --bundle outDir\n```\n\n_See code: [src/commands/redoc.ts](https://github.com/openapistack/openapicmd/blob/v2.7.0/src/commands/redoc.ts)_\n\n## `openapi swagger-editor [DEFINITION]`\n\nStart a Swagger Editor instance\n\n```\nUSAGE\n  $ openapi swagger-editor [DEFINITION] [-h] [-p 9000] [--logger] [-H \u003cvalue\u003e...]\n\nARGUMENTS\n  DEFINITION  input definition file\n\nFLAGS\n  -H, --header=\u003cvalue\u003e...  add request headers when calling remote urls\n  -h, --help               Show CLI help.\n  -p, --port=9000          [default: 9000] port\n      --[no-]logger        [default: true] log requests\n\nDESCRIPTION\n  Start a Swagger Editor instance\n\nEXAMPLES\n  $ openapi swagger-editor\n\n  $ openapi swagger-editor ./openapi.yml\n```\n\n_See code: [src/commands/swagger-editor.ts](https://github.com/openapistack/openapicmd/blob/v2.7.0/src/commands/swagger-editor.ts)_\n\n## `openapi swagger-ui [DEFINITION]`\n\nStart or bundle a Swagger UI instance\n\n```\nUSAGE\n  $ openapi swagger-ui [DEFINITION] [-h] [-p 9000] [--logger] [-S http://localhost:9000...] [-I\n    {\"info\":{\"version\":\"1.0.0\"}}...] [-C default|all|openapi_client_axios|openapi_backend] [-E x-internal] [--expand\n    full|list|none] [--operationids] [--filter] [--deeplinks] [--withcredentials] [--requestduration] [-H \u003cvalue\u003e...]\n    [-R /] [--proxy | -B outDir]\n\nARGUMENTS\n  DEFINITION  input definition file\n\nFLAGS\n  -B, --bundle=outDir                                           bundle a static site to directory\n  -C, --strip=default|all|openapi_client_axios|openapi_backend  Strip optional metadata such as examples and\n                                                                descriptions from definition\n  -E, --exclude-ext=x-internal                                  Specify an openapi extension to exclude parts of the\n                                                                spec\n  -H, --header=\u003cvalue\u003e...                                       add request headers when calling remote urls\n  -I, --inject={\"info\":{\"version\":\"1.0.0\"}}...                  inject JSON to definition with deep merge\n  -R, --root=/                                                  override API root path\n  -S, --server=http://localhost:9000...                         override servers definition\n  -h, --help                                                    Show CLI help.\n  -p, --port=9000                                               [default: 9000] port\n      --[no-]deeplinks                                          [default: true] allow deep linking\n      --expand=\u003coption\u003e                                         [default: list] default expansion setting for the\n                                                                operations and tags\n                                                                \u003coptions: full|list|none\u003e\n      --[no-]filter                                             [default: true] enable filtering by tag\n      --[no-]logger                                             [default: true] log requests\n      --[no-]operationids                                       [default: true] display operationIds\n      --proxy                                                   set up a proxy for the api to avoid CORS issues\n      --[no-]requestduration                                    [default: true] display request durations in \"try it\n                                                                now\"\n      --[no-]withcredentials                                    [default: true] send cookies in \"try it now\"\n\nDESCRIPTION\n  Start or bundle a Swagger UI instance\n\nEXAMPLES\n  $ openapi swagger-ui\n\n  $ openapi swagger-ui ./openapi.yml\n\n  $ openapi swagger-ui ./openapi.yml --bundle outDir\n```\n\n_See code: [src/commands/swagger-ui.ts](https://github.com/openapistack/openapicmd/blob/v2.7.0/src/commands/swagger-ui.ts)_\n\n## `openapi swagger2openapi [DEFINITION]`\n\nConvert Swagger 2.0 definitions to OpenAPI 3.0.x\n\n```\nUSAGE\n  $ openapi swagger2openapi [DEFINITION] [-h] [-D] [-B] [-R /] [-H \u003cvalue\u003e...] [-V] [-S http://localhost:9000...] [-I\n    {\"info\":{\"version\":\"1.0.0\"}}...] [-E x-internal] [-C default|all|openapi_client_axios|openapi_backend] [-U] [-f\n    json|yaml|yml | --json | --yaml]\n\nARGUMENTS\n  DEFINITION  input definition file\n\nFLAGS\n  -B, --bundle                                                  resolve remote $ref pointers\n  -C, --strip=default|all|openapi_client_axios|openapi_backend  Strip optional metadata such as examples and\n                                                                descriptions from definition\n  -D, --dereference                                             resolve $ref pointers\n  -E, --exclude-ext=x-internal                                  Specify an openapi extension to exclude parts of the\n                                                                spec\n  -H, --header=\u003cvalue\u003e...                                       add request headers when calling remote urls\n  -I, --inject={\"info\":{\"version\":\"1.0.0\"}}...                  inject JSON to definition with deep merge\n  -R, --root=/                                                  override API root path\n  -S, --server=http://localhost:9000...                         override servers definition\n  -U, --[no-]remove-unreferenced                                Remove unreferenced components, you can skip individual\n                                                                component being removed by setting x-openapicmd-keep to\n                                                                true\n  -V, --validate                                                validate against openapi schema\n  -f, --format=\u003coption\u003e                                         [default: yaml] output format\n                                                                \u003coptions: json|yaml|yml\u003e\n  -h, --help                                                    Show CLI help.\n      --json                                                    format as json (short for -f json)\n      --yaml                                                    format as yaml (short for -f yaml)\n\nDESCRIPTION\n  Convert Swagger 2.0 definitions to OpenAPI 3.0.x\n\nEXAMPLES\n  $ openapi swagger2openapi --yaml ./swagger.json \u003e openapi.yml\n```\n\n_See code: [src/commands/swagger2openapi.ts](https://github.com/openapistack/openapicmd/blob/v2.7.0/src/commands/swagger2openapi.ts)_\n\n## `openapi test`\n\nRun automated tests against APIs\n\n```\nUSAGE\n  $ openapi test [-h] [-D] [-B] [-R /] [-H \u003cvalue\u003e...] [-V] [-S http://localhost:9000...] [-I\n    {\"info\":{\"version\":\"1.0.0\"}}...] [-E x-internal] [-C default|all|openapi_client_axios|openapi_backend] [-U]\n    [--interactive] [-o operationId...] [-v] [-s \u003cvalue\u003e...] [-k \u003cvalue\u003e] [-t \u003cvalue\u003e] [-u \u003cvalue\u003e] [-P \u003cvalue\u003e]\n\nFLAGS\n  -B, --bundle                                                  resolve remote $ref pointers\n  -C, --strip=default|all|openapi_client_axios|openapi_backend  Strip optional metadata such as examples and\n                                                                descriptions from definition\n  -D, --dereference                                             resolve $ref pointers\n  -E, --exclude-ext=x-internal                                  Specify an openapi extension to exclude parts of the\n                                                                spec\n  -H, --header=\u003cvalue\u003e...                                       add request headers when calling remote urls\n  -I, --inject={\"info\":{\"version\":\"1.0.0\"}}...                  inject JSON to definition with deep merge\n  -P, --password=\u003cvalue\u003e                                        set basic auth password\n  -R, --root=/                                                  override API root path\n  -S, --server=http://localhost:9000...                         override servers definition\n  -U, --[no-]remove-unreferenced                                Remove unreferenced components, you can skip individual\n                                                                component being removed by setting x-openapicmd-keep to\n                                                                true\n  -V, --validate                                                validate against openapi schema\n  -h, --help                                                    Show CLI help.\n  -k, --apikey=\u003cvalue\u003e                                          set api key\n  -o, --operation=operationId...                                filter by operationId\n  -s, --security=\u003cvalue\u003e...                                     use security scheme\n  -t, --token=\u003cvalue\u003e                                           set bearer token\n  -u, --username=\u003cvalue\u003e                                        set basic auth username\n  -v, --verbose                                                 verbose mode\n      --[no-]interactive                                        [default: true] enable CLI interactive mode\n\nDESCRIPTION\n  Run automated tests against APIs\n\nEXAMPLES\n  $ openapi test\n\n  $ openapi test -o getPets\n```\n\n_See code: [src/commands/test/index.ts](https://github.com/openapistack/openapicmd/blob/v2.7.0/src/commands/test/index.ts)_\n\n## `openapi test add [DEFINITION]`\n\nAdd automated tests for API operations\n\n```\nUSAGE\n  $ openapi test add [DEFINITION] [-h] [-D] [-B] [-R /] [-H \u003cvalue\u003e...] [-V] [-S http://localhost:9000...] [-I\n    {\"info\":{\"version\":\"1.0.0\"}}...] [-E x-internal] [-C default|all|openapi_client_axios|openapi_backend] [-U] [--auto]\n    [-o operationId] [-n my test] [-c 2XXStatus...] [-p key=value...] [-d \u003cvalue\u003e] [-v] [--interactive] [-s \u003cvalue\u003e...]\n    [-k \u003cvalue\u003e] [-t \u003cvalue\u003e] [-u \u003cvalue\u003e] [-P \u003cvalue\u003e]\n\nARGUMENTS\n  DEFINITION  input definition file\n\nFLAGS\n  -B, --bundle                                                  resolve remote $ref pointers\n  -C, --strip=default|all|openapi_client_axios|openapi_backend  Strip optional metadata such as examples and\n                                                                descriptions from definition\n  -D, --dereference                                             resolve $ref pointers\n  -E, --exclude-ext=x-internal                                  Specify an openapi extension to exclude parts of the\n                                                                spec\n  -H, --header=\u003cvalue\u003e...                                       add request headers when calling remote urls\n  -I, --inject={\"info\":{\"version\":\"1.0.0\"}}...                  inject JSON to definition with deep merge\n  -P, --password=\u003cvalue\u003e                                        set basic auth password\n  -R, --root=/                                                  override API root path\n  -S, --server=http://localhost:9000...                         override servers definition\n  -U, --[no-]remove-unreferenced                                Remove unreferenced components, you can skip individual\n                                                                component being removed by setting x-openapicmd-keep to\n                                                                true\n  -V, --validate                                                validate against openapi schema\n  -c, --checks=2XXStatus...                                     checks to include in test\n  -d, --data=\u003cvalue\u003e                                            request body\n  -h, --help                                                    Show CLI help.\n  -k, --apikey=\u003cvalue\u003e                                          set api key\n  -n, --name=my test                                            test name\n  -o, --operation=operationId                                   operationId\n  -p, --param=key=value...                                      parameter\n  -s, --security=\u003cvalue\u003e...                                     use security scheme\n  -t, --token=\u003cvalue\u003e                                           set bearer token\n  -u, --username=\u003cvalue\u003e                                        set basic auth username\n  -v, --verbose                                                 verbose mode\n      --auto                                                    auto generate tests for all operations\n      --[no-]interactive                                        [default: true] enable CLI interactive mode\n\nDESCRIPTION\n  Add automated tests for API operations\n\nEXAMPLES\n  $ openapi test add\n\n  $ openapi test add -o getPet --checks all\n```\n\n_See code: [src/commands/test/add.ts](https://github.com/openapistack/openapicmd/blob/v2.7.0/src/commands/test/add.ts)_\n\n## `openapi typegen [DEFINITION]`\n\nGenerate types from openapi definition\n\n```\nUSAGE\n  $ openapi typegen [DEFINITION] [-h] [-D] [-B] [-R /] [-H \u003cvalue\u003e...] [-V] [-S http://localhost:9000...] [-I\n    {\"info\":{\"version\":\"1.0.0\"}}...] [-E x-internal] [-C default|all|openapi_client_axios|openapi_backend] [-U] [-b\n    \u003cvalue\u003e] [--client] [--backend] [-A]\n\nARGUMENTS\n  DEFINITION  input definition file\n\nFLAGS\n  -A, --[no-]type-aliases                                       Generate module level type aliases for schema components\n                                                                defined in spec\n  -B, --bundle                                                  resolve remote $ref pointers\n  -C, --strip=default|all|openapi_client_axios|openapi_backend  Strip optional metadata such as examples and\n                                                                descriptions from definition\n  -D, --dereference                                             resolve $ref pointers\n  -E, --exclude-ext=x-internal                                  Specify an openapi extension to exclude parts of the\n                                                                spec\n  -H, --header=\u003cvalue\u003e...                                       add request headers when calling remote urls\n  -I, --inject={\"info\":{\"version\":\"1.0.0\"}}...                  inject JSON to definition with deep merge\n  -R, --root=/                                                  override API root path\n  -S, --server=http://localhost:9000...                         override servers definition\n  -U, --[no-]remove-unreferenced                                Remove unreferenced components, you can skip individual\n                                                                component being removed by setting x-openapicmd-keep to\n                                                                true\n  -V, --validate                                                validate against openapi schema\n  -b, --banner=\u003cvalue\u003e                                          include a banner comment at the top of the generated\n                                                                file\n  -h, --help                                                    Show CLI help.\n      --backend                                                 Generate types for openapi-backend\n      --client                                                  Generate types for openapi-client-axios (default)\n\nDESCRIPTION\n  Generate types from openapi definition\n\nEXAMPLES\n  $ openapi typegen ./openapi.yml \u003e openapi.d.ts\n```\n\n_See code: [src/commands/typegen.ts](https://github.com/openapistack/openapicmd/blob/v2.7.0/src/commands/typegen.ts)_\n\n## `openapi unload`\n\nUnset the default definition file for a workspace (writes to .openapiconfig)\n\n```\nUSAGE\n  $ openapi unload [-h]\n\nFLAGS\n  -h, --help  Show CLI help.\n\nDESCRIPTION\n  Unset the default definition file for a workspace (writes to .openapiconfig)\n\nEXAMPLES\n  $ openapi unload\n```\n\n_See code: [src/commands/unload.ts](https://github.com/openapistack/openapicmd/blob/v2.7.0/src/commands/unload.ts)_\n\u003c!-- commandsstop --\u003e\n\n## Commercial support\n\nFor assistance with using openapicmd in your company, reach out at support@openapistack.co.\n\n## Contributing\n\n`openapicmd` is Free and Open Source Software. Issues and pull requests are more than welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenapistack%2Fopenapicmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenapistack%2Fopenapicmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenapistack%2Fopenapicmd/lists"}