This library provides the API any openapi-generatr-? should implement to make it available to an openapi-generatr consumer, for example the openapi-generatr gradle plugin.
A consumer should be able to provide access to any generatr (by the generatr name) that is found on the class path.
For example the gradle plugin will provide a gradle task for each (configured) generatr. The task will find & run the generatr by using this service interface. By using the service interface the plugin itself does not need an explicit dependency on any generatr.
To make an openapi-generatr available to a consumer (e.g. the openapi-generatr-gradle plugin) it must
- implement the
OpenApiGeneratrinterface. - and provide a
META-INF/services/com.github.hauner.openapi.api.OpenApiGeneratrproperty file in its resources with the class name of the implementing class.
For an example see the implementation in openapi-generatr-spring:
SpringGeneratr, the entry point of the generatr.- and the corresponding services property file in the resources.