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
{{ message }}
Repository navigation
defineRouteMeta is ignored in nitro v3 (OpenAPI meta missing) #3899
In nitro commit fb6b85d (installed via https://pkg.pr.new/nitrojs/nitro@fb6b85d), route metadata defined via defineRouteMeta() is not reflected in OpenAPI output. When building with Vite, OpenAPI generation appears to be broken entirely (no openapi.json is generated). Non‑Vite builds still generate the file.
The OpenAPI spec is generated at /_docs/openapi.json and includes route metadata (tags/summary/responses) plus any $global components defined via defineRouteMeta.
Actual
When using Vite to build, no openapi.json is generated at all. (Non‑Vite builds still generate it.)
changed the title [-]defineRouteMeta is ignored in nitro@fb6b85d (OpenAPI meta missing)[/-][+]defineRouteMeta is ignored in nitro v3 (OpenAPI meta missing)[/+]on Jun 5, 2026
Thank you for your continued attention to this issue. I've now reverted to writing my own Vite plugin and using Zod's registries to generate the openapi.json file. I really hope Nitro can fix this soon, and I recall there was a proposal for a dynamic value marriage proposal; it would be fantastic if Nitro could work with Zod to develop OpenAPI.
Thank you for your continued attention to this issue
Happy to help! I am waiting on it as well.
I've opened a PR to fix the issue, easy fix in the Rollup/Rolldown plugin. Every other plugin intercepting import specifiers (virtual, raw) already uses order: "pre" for the same reason.
Activity
medz commentedon Jan 22, 2026
This feature was restored in version v3.0.1-alpha.2 (verified, it now functions correctly).Therefore, I will close this issue. ❤️kyjus25 commentedon Feb 26, 2026
Same here with 3.0.1-alpha.2
Swagger/Scalar working with Vite + Rolldown (8.0.0-beta.13) here, but defineRouteMeta is ignored :(
krthr commentedon Mar 13, 2026
Same here with
3.0.260311-betadefineRouteMetais ignoredjuane1000 commentedon Apr 12, 2026
Same here. Completely ignored.
kyjus25 commentedon May 6, 2026
Ignored in
3.0.260429-betakyjus25 commentedon Jun 5, 2026
Ignored in
3.0.260603-beta[-]defineRouteMeta is ignored in nitro@fb6b85d (OpenAPI meta missing)[/-][+]defineRouteMeta is ignored in nitro v3 (OpenAPI meta missing)[/+]medz commentedon Jun 5, 2026
Thank you for your continued attention to this issue. I've now reverted to writing my own Vite plugin and using Zod's registries to generate the openapi.json file. I really hope Nitro can fix this soon, and I recall there was a proposal for a dynamic value marriage proposal; it would be fantastic if Nitro could work with Zod to develop OpenAPI.
kyjus25 commentedon Jun 5, 2026
Happy to help! I am waiting on it as well.
I've opened a PR to fix the issue, easy fix in the Rollup/Rolldown plugin. Every other plugin intercepting import specifiers (virtual, raw) already uses
order: "pre"for the same reason.