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 approach
and 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.
-
- Define a skeleton according to the openapi specification for generate spec.
-
- Design adapters to fit common frames such as express, koa etc.
-
- Using swagger-codegen generate server and client code stub.
-
- Using swagger-ui generate api document.
-
- Clone this registry
-
- Refer to the
src/adapter
folder to implement your own adapter
- Refer to the
-
- Refer to the
examples
folder to learn how to integrate into the application
- Refer to the
- Server and client code stub generate
- Implement
feathersjs
adapter - Design a DSL to implement third-party adapters