Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.37 KB

README.md

File metadata and controls

57 lines (39 loc) · 1.37 KB

openapi-yup-generator

CLI tool for generating yup definitions from openapi3.yaml

Supports Openapi v3.0.x (depends on openapiv3 library)

Installation

curl

sudo curl -sfL https://raw.githubusercontent.com/igtm/openapi-yup-generator/master/install.sh | sudo sh -s -- -b=/usr/local/bin

if you want to download old version, pass -v argument.

sudo curl -sfL https://raw.githubusercontent.com/igtm/openapi-yup-generator/master/install.sh | sudo sh -s -- -b=/usr/local/bin -v=v0.0.7

brew

brew install igtm/tap/openapi-yup-generator

You can also download old version binary from release.

Usage

Usage: openapi-yup-generator [OPTIONS]

Options:
  -f, --file <FILE>      openapi3 yaml or json file name
  -o, --out <OUT>        output file name
  -c, --config <CONFIG>  config file name
  -h, --help             Print help information
  -V, --version          Print version information

Settings

place openapi-yup-generator-config.jsonc on your working directory

{
  // "description_as_label": false,
  // "file": "openapi3.yaml",
  // "out": "yup-defs.js",
  // "case": "snake" // or "camel"
}

Note

currently not all yup definitions are supported. feel free to send PR or issue :)