nelmio/api-doc-bundle
NelmioApiDocBundle generates clean, accurate API documentation for your Symfony applications using PHP 8 attributes and OpenAPI 3.0, with support for FrankenPHP worker mode and long-running workers.
openapi.json is the input to SDK generation, Postman collections, mock servers, and contract tests. Adopting this is really a decision to have one machine-readable source of truth that downstream teams can consume, and it unlocks roadmap items (client SDKs, sandbox) that would otherwise require bespoke work.#[IsGranted] means the published spec reflects which endpoints are authenticated. Useful for security reviews and for answering enterprise prospect questionnaires ("which endpoints require OAuth?") without an engineer doing an audit.type-info. Adopting it is a soft commitment to staying on modern Symfony/PHP — worth sequencing against your platform upgrade roadmap.Adopt when:
Look elsewhere when:
dedoc/scramble (attribute/reflection-driven, zero-config) or darkaonline/l5-swagger (swagger-php based) instead. Choosing this package for a Laravel app means paying an integration tax forever.To executives: This is a free, MIT-licensed, actively maintained component that turns our API code into published API documentation automatically. It removes a recurring manual cost and a recurring accuracy problem — docs generated from code can't silently drift the way a wiki can. It also produces a standard OpenAPI file, which is the thing enterprise buyers, partner integrators, and SDK generators all ask for. Cost is engineering time, not license spend; the realistic alternative is either a paid docs platform or an engineer hand-writing docs quarterly. The strategic value is speed-to-integration for anyone consuming our API.
To engineering: It's the de-facto standard for Symfony API docs and has been for over a decade — 2.4k stars, steady releases through 2026, MIT, documented upgrade paths across every major version. It reads PHP 8 attributes and Symfony Serializer metadata, so schemas come free from your existing models rather than being re-declared. You get Swagger UI / ReDoc / Stoplight / Scalar out of the box, area-based splitting for public vs. internal specs, operation-ID generation control, and #[IsGranted]-derived security schemes. It runs under FrankenPHP worker mode and supports Symfony's type-info. The real cost is discipline: attributes must be updated with the endpoint, and 5.x means PHP 8.1+/Symfony 6.4+ and no going back to annotations. Flag clearly: this is a Symfony bundle — if any of our services are Laravel, we standardize on a different tool there, not this one.
How can I help you explore Laravel packages today?