We have an application with multiple API definitions in the same codebase. Therefore we would like to be able to generate multiple specifications with different settings. This is doable but I think this flow could be improved by removing the configuration or specification layer. Let me explain.
Currently the library uses global settings which are defined in the Configuration class. Then some local configuration can be passed to the Specification class but not everything can be overwritten. Next to this, the parsing is depending on the configuration settings which makes the dependency tree quite complex.
My proposal is therefore to make merge the Configuration and Specification class. This object then defines all the settings needed throughout the modules. The Swagger and OpenAPI classes should then receive an instance of this class as an argument which completely defines all parsing and processing settings.
@nicksieger Do you think it's worth it to spend the time on this?
We have an application with multiple API definitions in the same codebase. Therefore we would like to be able to generate multiple specifications with different settings. This is doable but I think this flow could be improved by removing the configuration or specification layer. Let me explain.
Currently the library uses global settings which are defined in the
Configuration
class. Then some local configuration can be passed to theSpecification
class but not everything can be overwritten. Next to this, the parsing is depending on the configuration settings which makes the dependency tree quite complex.My proposal is therefore to make merge the
Configuration
andSpecification
class. This object then defines all the settings needed throughout the modules. TheSwagger
andOpenAPI
classes should then receive an instance of this class as an argument which completely defines all parsing and processing settings.@nicksieger Do you think it's worth it to spend the time on this?