
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 the openapi-processor-maven plugin it has to
-
implement the
v2.OpenApiProcessorinterfacerecommended is to implement
v1.OpenApiProcessorto be compatible with previous versions of the gradle/maven plugin (it has the same methods, so it is just a matter of adding the interface).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/<package>.OpenApiProcessorproperty file in the resources with the class name of the implementing class for all implemented interfaces (i.e. v2, v1). -
implement the
v2.OpenApiProcessorVersioninterface if you want to support the latest release check. -
implement the
v2.OpenApiProcessorTestinterface to run integration to withopenapi-processor-test(required since 2024.6).
api evolution
| api version | interface (io.openapiprocessor.api..) |
supported by gradle plugin | supported by maven plugin | description |
|---|---|---|---|---|
2024.1 |
|
since 2023.2 |
no API changes, added new |
|
2023.1 |
|
since 2023.2 |
no API changes, added new |
|
2021.1 |
|
since 2021.1 |
yes |
no API changes |
2020.3 (1.3.0) |
|
yes |
yes |
no API changes |
1.2.0 |
|
yes |
yes |
better package name, no other changes |
1.1.0 |
|
yes |
yes |
new package name |
example implementations
For examples see the implementations of
-
SpringService(the entry point of the openapi-processor-spring) implements the api interfaces. -
and the corresponding services property files in the resources.