Skip to content

openapi-processor/openapi-processor-api

Repository files navigation

openapi-generatr-api

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.

implementing the api

To make an openapi-generatr available to a consumer (e.g. the openapi-generatr-gradle plugin) it must

  • implement the OpenApiGeneratr interface.
  • and provide a META-INF/services/com.github.hauner.openapi.api.OpenApiGeneratr property file in its resources with the class name of the implementing class.

For an example see the implementation in openapi-generatr-spring: