phpopenapiswagger-php

Swagger-php: How to enable verbose to check excluded directories?


Using Swagger-php and the following command, how can I make it show the folders/files it searches so that I can check my excudes actually work?

$openapi = \OpenApi\scan('./myfolder', [
    'exclude' => ['/vendor/', '/node_modules/', '/migrations/'],
]);

Solution

  • There is currently no code in swagger-php to log each filename being processed. It's a good idea though... https://github.com/zircote/swagger-php/issues/1410

    As a one-off you could just manually add logging around line 492 in \OpenApi\Generator.php