@welldefined/cli

0.2.2 • Public • Published

Well Defined 🧼

NPM Version

Command line utilities for creating well-defined OpenAPI specs.

Usage

npx @welldefined/cli [command] path-to-spec.yaml

Alternatively, install it globally with npm:

npm install @welldefined/cli -g

Then you can use it as welldefined [command] [options].

Utilities

merge

Merges two or more YAML files. It treats $ref objects as distinct items in an array.

npx @welldefined/cli merge a.yml b.yml --output c.yaml

change-method

Change HTTP methods in a YAML OpenAPI spec.

npx @welldefined/cli change-method path-to-spec.yaml --from post --to patch --endpoints "*/{id}" --output c.yaml

add-parameter

Adds a parameter to endpoints in a YAML OpenAPI spec.

npx @welldefined/cli add-parameter path-to-spec.yaml --parameter '\$ref: "#/components/parameters/IdempotencyKey"' --methods post,patch,put

Dependents (0)

Package Sidebar

Install

npm i @welldefined/cli

Weekly Downloads

2

Version

0.2.2

License

MIT

Unpacked Size

31.8 kB

Total Files

19

Last publish

Collaborators

  • mtso0