zircote/swagger-php
swagger-php generates OpenAPI 3.0/3.1/3.2 documentation from your PHP 8.2+ code using attributes (preferred) or optional Doctrine annotations. Use it via CLI or programmatically, with helpful error reporting and a full documentation site.
Generator iterates over the given sources (Symfony Finder, file/directory list, etc.)AnalyserInterface) reads the files and builds an Analysis object.
Default (as of v4) is the ReflectionAnalyser. Alternatively, there is the TokenAnalyser which was the default in v3.TokenAnalyser was removed in v5.Analysis object and its annotations are then processed by the configured processors.OpenApi annotation then contains all annotations and is serialized into YAML/JSON.ContextEach annotation is associated with a unique Context instance. This contains details, collected by the parser/analyser,
about the PHP context where the annotation was found.
Typically, there will be a processor that uses the data to augment/enrich the annotation.
Examples of the data collected:
Contains all detected annotations and other relevant meta-data.
It uses a SplObjectStorage instance to store the parsed annotations.
This documentation is generated with VitePress
cd docs
npm install
.md files in the docs folderlocalhost:3000)mastergh-pages workflow to update the online docs.The last step requires committing rights on zircote/swagger-php.
How can I help you explore Laravel packages today?