@haimkastner/open-api-based-sdk-boilerplate
TypeScript icon, indicating that this package has built-in type declarations

1.0.20 • Public • Published

OpenAPI based SDK boilerplate

open-api-based-sdk-boilerplate

Produce an SDK from API Server OpenAPI spec, easily.

API Spec fetched from the node-api-spec-boilerplate artifactory.

SDK built by openapi-generator-cli tool with custom api.mustache template based on typescript-fetch template.

📦 Example SDK package at NPM open-api-based-sdk-boilerplate


📙 For all info of how to create and build it, see Perfect API Server - Generating SDK article in my blog 📙


Explorer the API Spec on SwaggerHub


Goal

This boilerplate project used to demonstrate how easy and powerfull generating SDK can be. Show how once a new API operation added to the server, a new version of SDK with the new operation generated and published without any manual actions.


Includes

This project used to be a boilerplate for building an SDK following parts:

Configuration

All config by env vars, see for all options in ./env.example:

  • API_SERVER_URL: The API Server URL, as default it's http://127.0.0.1:8080
  • API_SERVER_SPEC_PATH: As default Api spec will be fetched from SwaggerHub, set this env var to copy from machine file-system instead, used for local debug and build.

Readme

Keywords

none

Package Sidebar

Install

npm i @haimkastner/open-api-based-sdk-boilerplate

Weekly Downloads

18

Version

1.0.20

License

ISC

Unpacked Size

57.3 kB

Total Files

14

Last publish

Collaborators

  • haimkastner