Skip to content

Generate nodejs, typescript client and Angular client methods from an OpenApi document.

License

Notifications You must be signed in to change notification settings

sngular/openapi-nodejs-cli

Repository files navigation

README

License: MPL 2.0 npm version Codacy Badge

Summary · Getting started · Support · License

📜 Summary

openapi-nodejs-cli is a typescript code generator from an OpenApi document.

openapi-nodejs-cli can generate nodejs, typescript client and Angular client methods from an OpenApi document.

🚀 Getting Started

Node version

This generator requires the Node version >=17.7.1 to run properly

How to install

npm i @sngular/openapi-nodejs-cli --global

🧑🏻‍💻 Usage

npx openapi-nodejs-cli -i input/schema.yaml

You can retrieve an option list with this command:

npx openapi-nodejs-cli --help
Usage: openapi-nodejs-cli [options]

Options:
  -V, --version             output the version number
  -i, --input <string...>   OpenAPI spec URLs or directories
  -o, --output <string...>  Output folder
  --client                  only generate client code
  --server                  only generate server code
  --angular                 generate client code for Angular
  --javascript              generate the code as plain JavaScript instead of TypeScript
  -h, --help                shows this help

🧰 Support

We’ll be glad to talk and discuss how openapi-nodejs-cli can help you 😊

Reach us through GitHub issues, email or Twitter.

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. License: MPL 2.0