Skip to content

igtm/openapi-yup-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 :)