@influxdata/oats
TypeScript icon, indicating that this package has built-in type declarations

0.7.0 • Public • Published

An opinionated OpenAPI doc to TypeScript HTTP client generator.

In comparison to openapi-generator:

  • Strives to generate readable output
  • Supports enums, oneOf, and allOf
  • Does not require Java runtime
  • Generates fetch-based HTTP client with typed error responses
  • Does not support significant portions of the OpenAPI spec

Installation

yarn add -D @influxdata/oats

Usage

$ yarn run oats --help
Usage: oats [options] <openApiSpec...>

An opinionated OpenAPI doc to TypeScript HTTP client generator

Options:
  -V, --version                output the version number
  -i, --include <parts>        comma sepated list of code parts to generate (all by default: "types,request,operations")
  -p, --prettier [true/false]  prettier output code (default: true)
  --withDoc [true/false]       document generated types (default: true)
  --patchScript <file>         apply script that modifies openapi document (example: https://github.com/influxdata/influxdb-client-js/blob/master/packages/apis/scripts/patchSwagger.js)
  --storeOperations <file>     store operations to file
  -h, --help                   output usage information

Contributing

See CONTRIBUTING.md.

Readme

Keywords

none

Package Sidebar

Install

npm i @influxdata/oats

Weekly Downloads

101

Version

0.7.0

License

MIT

Unpacked Size

53.6 kB

Total Files

25

Last publish

Collaborators

  • bednar.b
  • srebhan
  • mrpowersj
  • wdoconnell
  • blegesse
  • chunyellow
  • influxdata-ci
  • mavarius
  • bnelson_influx
  • monono
  • zoesteinkamp