|
1 | | -# openapi-generatr-api |
| 1 | +# openapi-processor-api |
2 | 2 |
|
3 | | -This library provides the API any openapi-generatr-? should implement to make it available to an |
4 | | -openapi-generatr consumer, for example the openapi-generatr [gradle plugin][generatr-gradle]. |
| 3 | +This library provides a simple api for any openapi-processor-* library. By implementing this api it |
| 4 | +will automatically work with the openapi-processor [gradle plugin][oap-gradle]. |
5 | 5 |
|
6 | | -A consumer should be able to provide access to any generatr (by the generatr name) that is found on |
7 | | -the class path. |
8 | 6 |
|
9 | | -For example the gradle plugin will provide a gradle task for each (configured) generatr. The task |
10 | | -will find & run the generatr by using this service interface. By using the service interface the plugin |
11 | | -itself does not need an explicit dependency on any generatr. |
12 | | - |
13 | 7 | # implementing the api |
14 | 8 |
|
15 | | -To make an openapi-generatr available to a consumer (e.g. the openapi-generatr-gradle plugin) it must |
16 | | -- implement the [`OpenApiGeneratr`][generatr-api] interface. |
17 | | -- and provide a `META-INF/services/com.github.hauner.openapi.api.OpenApiGeneratr` property file in its |
18 | | - resources with the class name of the implementing class. |
19 | | - |
20 | | -For an example see the implementation in [openapi-generatr-spring][generatr-spring]: |
21 | | -- [`SpringGeneratr`][generatr-spring-api-impl], the entry point of the |
22 | | -generatr. |
23 | | -- and the corresponding [services property][generatr-spring-api-props] file in the resources. |
24 | | - |
25 | | -[generatr-gradle]: https://github.com/hauner/openapi-generatr-gradle |
26 | | -[generatr-spring]: https://github.com/hauner/openapi-generatr-spring |
27 | | -[generatr-spring-api-impl]: https://github.com/hauner/openapi-generatr-spring/blob/master/src/main/groovy/com/github/hauner/openapi/spring/generatr/SpringGeneratr.groovy |
28 | | -[generatr-spring-api-props]: https://github.com/hauner/openapi-generatr-spring/blob/master/src/main/resources/META-INF/services/com.github.hauner.openapi.api.OpenApiGeneratr |
29 | | -[generatr-api]: https://github.com/hauner/openapi-generatr-api/tree/master/src/main/java/com/github/hauner/openapi/api/OpenApiGeneratr.java |
| 9 | +To make an openapi-processor available to the openapi-processor-gradle plugin it has to |
| 10 | + |
| 11 | +- implement the [`OpenApiProcessor`][oap-api] interface. |
| 12 | + |
| 13 | + The gradle plugin uses the name provided by the api to configure the processor and to provide a |
| 14 | + task to run it. |
| 15 | + |
| 16 | +- and provide a `META-INF/services/com.github.hauner.openapi.api.OpenApiProcessor` property file in |
| 17 | + the resources with the class name of the implementing class. |
| 18 | + |
| 19 | +# example implementations |
| 20 | + |
| 21 | +For examples see the implementations of |
| 22 | + |
| 23 | +*[openapi-processor-spring][oap-spring]* |
| 24 | + |
| 25 | +- [`SpringProcessor`][oap-spring-api-impl] (the entry point of the openapi-processor-spring) |
| 26 | + implements the api interface |
| 27 | +- and the corresponding [services property][oap-spring-api-props] file in the resources. |
| 28 | + |
| 29 | +*[openapi-processor-json][oap-json]* |
| 30 | + |
| 31 | +- [`JsonProcessor`][oap-json-api-impl] (the entry point of the openapi-processor-json) |
| 32 | + implements the api interface |
| 33 | +- and the corresponding [services property][oap-json-api-props] file in the resources. |
| 34 | + |
| 35 | + |
| 36 | +[oap-api]: https://github.com/hauner/openapi-processor-api/tree/master/src/main/java/com/github/hauner/openapi/api/OpenApiGeneratr.java |
| 37 | +[oap-gradle]: https://github.com/hauner/openapi-generatr-gradle |
| 38 | + |
| 39 | +[oap-spring]: https://github.com/hauner/openapi-generatr-spring |
| 40 | +[oap-spring-api-impl]: https://github.com/hauner/openapi-generatr-spring/blob/master/src/main/groovy/com/github/hauner/openapi/spring/generatr/SpringGeneratr.groovy |
| 41 | +[oap-spring-api-props]: https://github.com/hauner/openapi-generatr-spring/blob/master/src/main/resources/META-INF/services/com.github.hauner.openapi.api.OpenApiGeneratr |
| 42 | + |
| 43 | +[oap-json]: https://github.com/hauner/openapi-generatr-json |
| 44 | +[oap-spring-api-impl]: https://github.com/hauner/openapi-generatr-json/blob/master/src/main/groovy/com/github/hauner/openapi/spring/generatr/JsonGeneratr.groovy |
| 45 | +[oap-spring-api-props]: https://github.com/hauner/openapi-generatr-json/blob/master/src/main/resources/META-INF/services/com.github.hauner.openapi.api.OpenApiGeneratr |
| 46 | + |
0 commit comments