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

320 views Asked by At

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/'],
]);
2

There are 2 answers

2
DerManoMann On BEST ANSWER

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

0
tschumann On

Run with the --debug parameter and it will log the files it is processing.