erasys/openapi-php
Erasys OpenAPI PHP lets you build OpenAPI 3 specifications directly in PHP using typed classes and fluent builders for schemas, paths, operations, parameters, and responses. Keep API documentation close to your code and easy to generate.
Consider it when:
Look elsewhere when:
For executives: This is a small MIT-licensed PHP library that helps us produce valid OpenAPI specs and enforce them in CI. It reduces documentation drift, shortens partner onboarding, and lowers API support costs. It is not a strategic platform purchase and should be treated as a tactical tool: low cost, low lock-in, but also low community momentum, so we should not make it a single point of failure for an external developer platform.
For engineering: It gives us a Composer-installable OpenAPI 3.0 builder and validator that fits Laravel CI. We can keep the API contract in the repo, validate it on every build, and feed it to docs or SDK tooling. It does not introspect routes or render documentation, so we will pair it with our existing docs stack and a thin internal wrapper to isolate maintenance risk.
For product: Use it to make API contracts testable and releasable, not to replace the developer portal. The product win is fewer broken specs and faster partner integration; the product risk is dependency staleness. Approve it for internal or moderate-risk APIs, with a fallback plan and validation coverage, before using it on a flagship public API.
How can I help you explore Laravel packages today?