Instead of defining all routes by hand, let's use tRPC with the trpc-openapi package which gives us the ability to create E2E typesafe APIs while also exporting public facing routes courtesy of the trpc-openapi package.
By doing this we can export OpenAPI schema from the router to use in the docs / swagger endpoint.
Instead of defining all routes by hand, let's use tRPC with the
trpc-openapi
package which gives us the ability to create E2E typesafe APIs while also exporting public facing routes courtesy of thetrpc-openapi
package. By doing this we can export OpenAPI schema from the router to use in the docs / swagger endpoint.