Automate API Development in Vapor 4 using Swagger/OpenAPI Codegen

Just released swagger codegen for Vapor 4: GitHub - thecheatah/vapor-server-codegen: Generates a Vapor server interface given a OpenAPI or Swagger spec. Can be used to quickly start a new API project.

Use a docker image to produce a SwiftPM package that defines API protocols, models and routes. Your Vapor 4 can create a dependency on the generated package and implement the interfaces and call the route configuration function. It is well documented and tested. Please take a look at the github project for more information.

8 Likes