jlalmes / trpc-openapi

OpenAPI support for tRPC 🧩
https://www.npmjs.com/package/trpc-openapi
MIT License
2.18k stars 147 forks source link

`createOpenApiNuxtHandler` should also export `createOpenApiNitroHandler` #422

Open sannajammeh opened 11 months ago

sannajammeh commented 11 months ago

Nitro is the underlying engine behind Nuxt. Nitro can be used standalone as well. Consider having these exports for compatibility and to avoid developer confusion:

export const createOpenApiNuxtHandler = ...;
export const createOpenApiNitroHandler = createOpenApiNuxtHandler;

For developers working on a nitro only codebase, having Nuxt in the code is a little confusing when there is no Nuxt dependency.

Happy to make a pr! :)