@craigmcc/openapi-builders
TypeScript icon, indicating that this package has built-in type declarations

3.0.0-alpha.15 • Public • Published

openapi-builders

Typescript based module to facilitate programatically creating REST API description files compatible with the Open API Specification. This can be very useful for larger APIs, because the amount of possible detail is large, and in many cases repetitive. Typically, your application would be set up to create the description file once (upon first request), and cache a static copy for subsequent requests.

This module was inspired by the openapi3-ts project, but with a goal of a more comprehensive use of the Builder Pattern to assemble the fairly complicated nested object structures that are possible using OpenAPI.

The initial version of this module is targeted towards Version 3.0 of the Open API specification. The organizational structure will easily allow expansion to future versions (if desired or needed).

Installation

npm install @craigmcc/openapi-builders

Example

A fleshed out example of using this module is the openapi-builders-example, where a variety of techniques are employed to document a fairly simple REST API for CRUD services against two different models (User and Post). See the README file for this module for more details.

/@craigmcc/openapi-builders/

    Package Sidebar

    Install

    npm i @craigmcc/openapi-builders

    Weekly Downloads

    10

    Version

    3.0.0-alpha.15

    License

    Apache-2.0

    Unpacked Size

    2.05 MB

    Total Files

    433

    Last publish

    Collaborators

    • craigmcc