Skip to content

Luncher/openapi-generator

Repository files navigation

openapi generator

Build Status Codecov Status David Status

openapi(swagger) spec generator, The integrated swagger-ui is used to generate API documentation

There are usually two ways to generate openapi spec top-down approachand bottom-up approach, ref Getting Started the top-down is too cumbersome . For an existing project I use the bottom-up approach.

Usually everyone's application is not the same, but some things are similar, such as checking the input parameters, return to the client format fixed data content. I try to make the user only need to change the amount of code can be openapi related functions into existing applications.


mainly through the following steps

    1. Define a skeleton according to the openapi specification for generate spec.
    1. Design adapters to fit common frames such as express, koa etc.
    1. Using swagger-codegen generate server and client code stub.
    1. Using swagger-ui generate api document.

How to use

    1. Clone this registry
    1. Refer to the src/adapter folder to implement your own adapter
    1. Refer to the examples folder to learn how to integrate into the application

Todo List

  • Server and client code stub generate
  • Implement feathersjs adapter
  • Design a DSL to implement third-party adapters

License

MIT License