Skip to content

A code generation tool for openapi 3 / 3.1 specifications written in typescript, primarily aimed at generating typescript clients and server stubs. Other target languages may be added in future.

License

Notifications You must be signed in to change notification settings

mnahkies/openapi-code-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@nahkies/openapi-code-generator

CI/CD npm

@nahkies/openapi-code-generator is a CLI tool that aims to generate high quality typescript client SDK's, and API server scaffolding (routing, validation, serialization) from api specifications.

Currently, OpenAPI 3.0, OpenAPI 3.1, and TypeSpec are supported as input specifications.

With typescript templates for koa, fetch, axios, and angular currently available.

The fetch and axios templates work great in conjunction with react-query

Documentation

Visit https://openapi-code-generator.nahkies.co.nz/ for detailed documentation including quick start guides and reference material.

The documentation is built using NextJS / Nextra, and deployed using Github pages. You can contribute to it in ./packages/documentation

Project Structure

The repository is structured as a mono repo of several npm packages that work together under ./packages:

The openapi-code-generator package is the main package, whilst the others are supporting packages used at runtime by the code output by some of the templates.

Integration test definitions live in ./integration-tests-definitions and the generated code output to ./integration-tests

Scripts to refresh the test data live in ./scripts

Contributing

Contributing guidelines can be found in ./CONTRIBUTING.md.

License

MIT Licensed, see ./LICENSE