OpenAPI, Scalar, and Swagger routes are not found
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 11.2k
- Forks
- 899
- Avg merge
- 2d 24m
- Merged PRs (30d)
- 40
Description
Environment
I've tried setting custom routes and using the default routes, and I simply cannot find the page that hosts the OpenAPI spec or the swagger or scalar UI. Help?
Reproduction
See here for example: https://stackblitz.com/edit/github-l8fjbbyh
Describe the bug
I believe this is the file that is checking the config and creating the routes: https://github.com/nitrojs/nitro/blob/v2/src/core/config/resolvers/open-api.ts
As far as I can tell, no handler is being created.
Additional context
No response
Logs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/core/config/resolvers/open-api.ts and run the linked StackBlitz reproduction to compare custom and default routes. Trace how the OpenAPI configuration is resolved and whether the spec, Swagger, or Scalar routes are created. Done means the configured or default routes serve the OpenAPI spec and the requested UI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100