unjs / nitro

Next Generation Server Toolkit. Create web servers with everything you need and deploy them wherever you prefer.
https://nitro.unjs.io
MIT License
5.89k stars 496 forks source link

Routes Typescript Codegen / OpenApi #2717

Closed ivan-angjelkoski closed 2 weeks ago

ivan-angjelkoski commented 2 weeks ago

Describe the feature

Hey, im using Nuxt for my projects and i want to use the same API for multiple Nuxt projects, but there is a problem, i dont have type safety in my other projects and i need to create and validate the types with zod... this problem can be avoided if i can generate the types from my project that servers the api routes, so i can import the types in my other projects.

maybe something like OpenApi specs, or Zod and Typescript types?

also if there is a way to bind these types to 'useFetch' in the other projects, that would be awesome!

Additional information