0.27.1 • Published 9 months ago

@yobta_test/generator v0.27.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

OpenAPI Typescript Codegen

NPM License Downloads Build

Node.js library that generates Typescript clients based on the OpenAPI specification.

Why?

  • Frontend ❤️ OpenAPI, but we do not want to use JAVA codegen in our builds
  • Quick, lightweight, robust and framework-agnostic 🚀
  • Supports OpenAPI specification v2.0 and v3.0
  • Supports JSON and YAML files for input
  • Supports generation through CLI, Node.js and NPX
  • Supports tsc and @babel/plugin-transform-typescript
  • Supports external references using json-schema-ref-parser

Install

npm install @yobta/generator --save-dev

Usage

$ generate-yobta --help

  Usage: generate-yobta [options]

  Options:
    -V, --version             output the version number
    -i, --input <value>       OpenAPI specification, can be a path, url or string content (required)
    -o, --output <value>      Output directory (required)
    -f, --factories <value>   Path to file with factories functions (required)
    --useUnionTypes <value>   Use union types instead of enums (default: true)
    --exportSchemas <value>   Write schemas to disk (default: false)
    --indent <value>          Indentation options [4, 2, tab] (default: "4")
    --postfixModels           Model name postfix
    -h, --help                display help for command

  Examples
    $ generate-yobta --input ./spec.json --output ./generated --factories ./src/factories

Documentation

Support

0.27.1

9 months ago

0.27.0

9 months ago

0.26.7

9 months ago

0.26.6

9 months ago

0.26.5

9 months ago

0.26.4

9 months ago

0.26.3

9 months ago

0.26.2

9 months ago