Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. REST
  3. NelmioApiDocBundle

NelmioApiDocBundle

MITPHPv5.10.3

Generates OpenAPI documentation for Symfony REST APIs using PHP 8 attributes.

GitHubGitHub
2.4k stars904 forks0 contributors

What is NelmioApiDocBundle?

NelmioApiDocBundle is a Symfony bundle that automatically generates OpenAPI documentation for REST APIs by parsing PHP 8 attributes in your code. It solves the problem of maintaining accurate API documentation by keeping it synchronized with your actual implementation through code annotations.

Target Audience

Symfony developers building RESTful APIs who need automated, standards-compliant documentation generation integrated into their Symfony projects.

Value Proposition

Developers choose NelmioApiDocBundle because it provides seamless Symfony integration with zero manual documentation effort, generates interactive OpenAPI specs with Swagger UI, and ensures documentation accuracy through direct code extraction.

Overview

Generates documentation for your REST API from attributes

Use Cases

Best For

  • Symfony projects needing automated API documentation
  • Teams wanting interactive API exploration with Swagger UI
  • Projects using PHP 8 attributes for metadata
  • Maintaining OpenAPI 3.0 compliant specifications
  • Reducing documentation maintenance overhead
  • Integrating API documentation into Symfony's development workflow

Not Ideal For

  • Projects not using the Symfony framework (e.g., Laravel or standalone PHP applications)
  • Teams maintaining legacy codebases with PHP versions below 8.1 or relying on PHP annotations instead of attributes
  • Developers preferring to write and manage OpenAPI specifications manually outside the codebase for full control

Pros & Cons

Pros

Code-First Documentation

Uses PHP 8 attributes to embed API definitions directly in controllers and models, ensuring documentation stays synchronized with implementation as per the project philosophy of reducing maintenance overhead.

Automatic Schema Inference

Leverages Symfony's serializer and validator components to automatically detect request/response models and validation rules, minimizing manual configuration for common use cases.

Interactive API Explorer

Includes a built-in Swagger UI interface, allowing developers to test and explore API endpoints directly from the generated documentation without external tools.

Seamless Symfony Integration

Integrates tightly with Symfony's routing, validation, and serialization systems, requiring minimal setup and configuration for Symfony-based projects.

Cons

Breaking Changes

Version 5.0 dropped support for annotations in favor of PHP 8 attributes, requiring significant codebase updates as highlighted in the migration guides, which can be disruptive for existing projects.

Strict Dependencies

Requires PHP 8.1 or higher and Symfony 6.4 or above for version 5.x, limiting adoption in environments with older technology stacks or slower upgrade cycles.

Limited Portability

Tied exclusively to the Symfony ecosystem, making it unsuitable for projects that might migrate to other frameworks or need framework-agnostic documentation solutions.

Frequently Asked Questions

Quick Stats

Stars2,355
Forks904
Contributors0
Open Issues57
Last commit4 days ago
CreatedSince 2012

Tags

#api#rest-api#swagger#redoc#php8#bundle#api-testing#openapi#symfony-integration#api-documentation#symfony-bundle#swagger-ui#php#symfony#php-attributes

Built With

P
PHP
S
Symfony
O
OpenAPI

Included in

REST3.9kSymfony1.6k
Auto-fetched 5 hours ago

Related Projects

API Platform frameworkAPI Platform framework

🕸️ Create REST and GraphQL APIs, scaffold Jamstack webapps, stream changes in real-time.

Stars9,168
Forks972
Last commit22 days ago
FOSRestBundleFOSRestBundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

Stars2,798
Forks690
Last commit5 months ago
LexikJWTAuthenticationBundleLexikJWTAuthenticationBundle

JWT authentication for your Symfony API

Stars2,607
Forks616
Last commit22 days ago
DunglasApiBundleDunglasApiBundle

The server component of API Platform: hypermedia and GraphQL APIs in minutes

Stars2,566
Forks972
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub