
This library provides a simple api for an openapi-processor-* library. By implementing this api it will automatically work with the openapi-processor gradle plugin or the maven plugin.
implementing the api
To make an openapi-processor available to the openapi-processor-gradle plugin or or the openapi-processor-maven plugin it has to
-
implement the
v1.OpenApiProcessorinterface.the plugins use the name provided by
String getName();to configure the processor and to provide the task to run it.the plugins will call
void run(Map<String, ?> options);to run the processor, passing all extra settings in the options map with the property setting name as the key. -
provide a
META-INF/services/io.openapiprocessor.api.OpenApiProcessorproperty file in the resources with the class name of the implementing class.
api evolution
| api version | interface | supported by gradle plugin | supported by maven plugin | description |
|---|---|---|---|---|
2021.1 |
|
since 2021.1 |
no (all processors still use the 1.0.0 API) |
no API changes |
2020.3 (1.3.0) |
|
yes |
no |
no API changes |
1.2.0 |
|
yes |
no |
better package name, no other changes |
1.1.0 |
|
yes |
no |
new package name |
1.0.0 |
|
yes |
yes |
old package name, still used by all processors |
example implementations
| the examples follow the above instructions but use the original interface with a different package name. |
For examples see the implementations of
-
SpringProcessor(the entry point of the openapi-processor-spring) implements the api interface -
and the corresponding services property file in the resources.
-
JsonProcessor(the entry point of the openapi-processor-json) implements the api interface -
and the corresponding services property file in the resources.