mtrajano / laravel-swagger

Auto generates the swagger documentation of a laravel project based on best practices and simple assumptions
167 stars 71 forks source link

Add ability to override Generator class with a custom implementation #63

Closed MaFx closed 2 years ago

MaFx commented 2 years ago

This PR adds ability to set a custom generator class for the documentation generator. The exact same functionality is still happenning during the generation command execution and no changes to process itself is made.

Config value for generator class is added and this config value is used to implement generation. Generator is backed by GeneratorContract interface which provides all necessities.

To make binding and dependency injection a bit cleaner a setRouteFilter() method has been added that handles route filter passing to the generator