Effortlessly create OpenAPI clients from the fiery furnace of our forge

The Open API specification has become an industry standard for describing RESTful web APIs. The machine-readable specification makes it easy to generate API documentation and forms a common language for describing web services. However, most people who consume APIs still hand-craft the code that interacts with them, creating their own HTTP requests, serializing and deserializing model objects and more.

The goal of Open API Forge is to generate high-quality, simple and effective client libraries directly from the Open API specification, in a range of languages. These simplifying the process of consuming REST APIs, providing strongly-typed interfaces, error handling and more.

Simplicity

The generated output is as simple as possible, just code that relates to the task of communicating with an API endpoint.

Opinionated

We'll support just one 'official' generator per language.

Favour runtime configuration

To keep the generation process as simple as possible, we favour runtime configuration, e.g. pluggable networking adaptors, logging etc.

Extensively tested

This repo contains a BDD test suite that is executed against each generator to ensure that it faithfully implements the OpenAPI specification.

Quick start

Install openapi-forge as a global package, execute the forge command, providing an API specification, a language-specific generator and an output folder. Your endpoints and model objects will be forged from the fiery furnace.

$ npm install openapi-forge --global
$ openapi-forge forge
\ https://petstore3.swagger.io/api/v3/openapi.json
\ https://github.com/ScottLogic/openapi-forge-typescript.git
\ -o api
$ npm install openapi-forge --global
$ openapi-forge forge
\ https://petstore3.swagger.io/api/v3/openapi.json
\ https://github.com/ScottLogic/openapi-forge-typescript.git
\ -o api