-
-
Notifications
You must be signed in to change notification settings - Fork 22.8k
Closed as duplicate of#4134
Closed as duplicate of#4134
Copy link
Labels
Description
Feature Request
It would be extremely helpful if Express provided a built-in /docs endpoint (similar to FastAPI) that automatically generates interactive API documentation.
Motivation
Frameworks like FastAPI provide automatic OpenAPI/Swagger documentation at /docs by default. This significantly improves:
- Developer experience
- Faster API testing
- Quick onboarding for contributors
- Reduced dependency on external tools like Postman for small APIs
Currently in Express, developers need to manually integrate third-party packages such as:
- swagger-ui-express
- swagger-jsdoc
- Redoc
While these solutions work well, having an optional built-in documentation middleware would make Express even more developer-friendly, especially for small projects, prototypes, and teaching environments.
Proposed Solution
Provide an optional built-in middleware that:
- Auto-detects registered routes
- Generates OpenAPI schema automatically
- Serves interactive documentation at
/docs - Can be enabled with something like:
app.enableDocs();Reactions are currently unavailable