Comment by 9dev
1 day ago
An API documentation generator for Laravel apps: https://github.com/Radiergummi/laravel-openapi
In contrast to most other libraries in this space, it knows about Laravel conventions and its ecosystem, and tries to infer as much as possible without explicit annotations, using type hints and doc comments and static analysis. Where automatic inference isn't possible, you can use targeted attributes to annotate your route handlers.
The result is written as an OpenAPI specification, and (by default) served using a Scalar playground.
We also include a linter command that checks whether all API routes are documented properly, typed correctly, and following your style - this also supports dirty files only, reporting coverage in standard formats, and even automatically fixing some classes of errors!
I've also written tooling to regularly test the library against a set of open source Laravel applications with a published OpenAPI spec. This has proven very solid in detecting improvements and regressions, so much so that I can delegate new features to an AI agent and rest confident that it can verify on its own whether a change breaks anything.
No comments yet
Contribute on Hacker News ↗