Generates Swagger API specifications from Phoenix routers and controllers with validation and UI serving.
PhoenixSwagger is a library that integrates Swagger (OpenAPI) tooling into the Phoenix web framework for Elixir. It automatically generates API specifications from Phoenix routers and controllers, serves Swagger UI for interactive documentation, and provides validation for requests and responses. It solves the problem of maintaining separate API documentation by deriving it directly from application code.
Elixir developers building RESTful APIs with the Phoenix framework who need automated API documentation, validation, and interactive testing capabilities.
Developers choose PhoenixSwagger because it seamlessly bridges Phoenix and Swagger, reducing manual documentation effort, ensuring API consistency through validation, and providing a built-in UI for exploration—all while staying integrated with the Phoenix ecosystem.
Swagger integration to Phoenix framework
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Generates OpenAPI specifications directly from Phoenix router and controller definitions, eliminating manual documentation maintenance and reducing errors.
Serves a built-in Swagger UI from the application for interactive API testing and exploration, enhancing developer and consumer experience.
Validates incoming requests and API responses against schemas, ensuring data integrity and contract compliance during development and testing.
Designed specifically for Phoenix, leveraging its conventions and ecosystem for straightforward setup and usage as per the getting started guide.
Only works with the Phoenix framework, making it incompatible with other Elixir web frameworks or non-Phoenix projects.
The code-first approach may not support advanced OpenAPI features or allow fine-grained spec control compared to manual, spec-first workflows.
Enabling request validation in production could introduce latency, especially for complex schemas or high-traffic endpoints.