Skip to content

Latest commit

 

History

History
 
 

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Specs

Collection of code/annotation examples and their corresponding OpenAPI specs generated using swagger-php.

Custom processors

Processors implement the various steps involved in converting the annotations collected into an OpenAPI spec.

Writing a custom processor is the recommended way to extend swagger-php in a clean way.

Processors are expected to implement the __invoke() method expecting the current Analysis object as single parameter:

<?php
...
use OpenApi\Analysis;
...

class MyCustomProcessor
{
    public function __invoke(Analysis $analysis)
    {
        // custom processing
    }
}