Laravel-Swagger is a fully automate tool which allows to generate and save swagger-based documentation after successful completing your application's feature tests.
The documentation generates only for the single test case. So the final documentation.json file contains information from the last test case. The reason is the incorrect event of PHPUnit. I changed PHPUnit\Event\Test\AfterLastTestMethodFinished to PHPUnit\Event\Application\Finished and as a result, a subscriber will run only when all tests finish.
Type of change
[x] Bug fix (non-breaking change which fixes an issue)
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] Any dependent changes have been merged and published in downstream modules
Description
The documentation generates only for the single test case. So the final
documentation.json
file contains information from the last test case. The reason is the incorrect event of PHPUnit. I changedPHPUnit\Event\Test\AfterLastTestMethodFinished
toPHPUnit\Event\Application\Finished
and as a result, a subscriber will run only when all tests finish.Type of change
Checklist: