You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is the whole /server/api of Nuxt 3 mostly handled by nuxt or nitro? ...if nitro only has access to the routes and url arguments but not the return type or similar it would make little sense to implement it inside nitro.
Or generally: Is there any access to the route definitions and types during runtime in either nitro or nuxt? I would think so as nuxt generates .d.ts file on the fly based on my understanding so far but I might be wrong. If that is the case than that could be used to generate them and potentially expose them on a special endpoint, kinda like FastAPI does.
Is there any more work being done on this? Could it be possible to export a json schema or zod type to reflect what the endpoint is returning in the OpenAPI spec?
Activity
pi0 commentedon Apr 6, 2022
Not a periority(reopened following up #170)Related:
BracketJohn commentedon Jun 1, 2022
Quoting from https://github.com/nuxt/framework/discussions/4582:
So would really love to see this - with the correct pointers I'd even try myself on it, but am unsure if this is a good first issue.
septatrix commentedon Oct 25, 2022
Is the whole
/server/apiof Nuxt 3 mostly handled by nuxt or nitro? ...if nitro only has access to the routes and url arguments but not the return type or similar it would make little sense to implement it inside nitro.Or generally: Is there any access to the route definitions and types during runtime in either nitro or nuxt? I would think so as nuxt generates
.d.tsfile on the fly based on my understanding so far but I might be wrong. If that is the case than that could be used to generate them and potentially expose them on a special endpoint, kinda like FastAPI does.sannajammeh commentedon Nov 2, 2023
Is there any more work being done on this? Could it be possible to export a json schema or zod type to reflect what the endpoint is returning in the OpenAPI spec?
pi0 commentedon Nov 2, 2023
Currently it is exposed via experimental flag as
/_nitro/openapi.json. So you can use it already.It is in our roadmap after introducing route meta support to improve this feature and iterate.
mrloldev commentedon Jan 6, 2024
how can you modify the tags?
chenyuncai commentedon Mar 8, 2024
is there any way to support nested route. Api need to be grouped in most case.
pi0 commentedon Mar 8, 2024
@chenyuncai feel free to open new individual issue for it 👍🏼 (or any other idea related to openapi)