Skip to content

Commit 7af0a2e

Browse files
committed
improve/fix documentation
1 parent 83cc886 commit 7af0a2e

File tree

1 file changed

+38
-35
lines changed

1 file changed

+38
-35
lines changed

docs/modules/ROOT/pages/index.adoc

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@
88
:oap-central: https://search.maven.org/search?q=io.openapiprocessor
99
:badge-central: https://img.shields.io/maven-central/v/io.openapiprocessor/openapi-processor-api?label=Maven%20Central
1010
//
11-
:oap-api: https://github.com/openapi-processor/openapi-processor-api/blob/master/src/main/java/io/openapiprocessor/api/v1/OpenApiProcessor.java
11+
:processor-v2: https://github.com/openapi-processor/openapi-processor-api/blob/master/src/main/java/io/openapiprocessor/api/v2/OpenApiProcessor.java
12+
:version-v2: https://github.com/openapi-processor/openapi-processor-api/blob/master/src/main/java/io/openapiprocessor/api/v2/OpenApiProcessorVersion.java
1213

13-
:oap-spring-api-impl: https://github.com/openapi-processor/openapi-processor-spring/blob/master/src/main/groovy/com/github/hauner/openapi/spring/processor/SpringProcessor.groovy
14-
:oap-spring-api-props: https://github.com/openapi-processor/openapi-processor-spring/blob/master/src/main/resources/META-INF/services/com.github.hauner.openapi.api.OpenApiProcessor
15-
16-
:oap-json-api-impl: https://github.com/openapi-processor/openapi-processor-json/blob/master/src/main/groovy/com/github/hauner/openapi/spring/processor/JsonProcessor.groovy
17-
:oap-json-api-props: https://github.com/openapi-processor/openapi-processor-json/blob/master/src/main/resources/META-INF/services/com.github.hauner.openapi.api.OpenApiProcessor
14+
:processor-v1: https://github.com/openapi-processor/openapi-processor-api/blob/master/src/main/java/io/openapiprocessor/api/v1/OpenApiProcessor.java
1815

16+
:oap-spring-api-impl: https://github.com/openapi-processor/openapi-processor-spring/blob/master/src/main/kotlin/io/openapiprocessor/spring/processor/SpringService.kt
17+
:oap-spring-api-props: https://github.com/openapi-processor/openapi-processor-spring/tree/master/src/main/resources/META-INF/services
1918

2019
//
2120
// content
@@ -34,57 +33,67 @@ it will automatically work with the openapi-processor xref:gradle::index.adoc[gr
3433
== implementing the api
3534

3635
To make an openapi-processor available to the
37-
xref:gradle::index.adoc[openapi-processor-gradle plugin] or or the xref:maven::index.adoc[openapi-processor-maven plugin] it has to
36+
xref:gradle::index.adoc[openapi-processor-gradle plugin] or the xref:maven::index.adoc[openapi-processor-maven plugin] it has to
3837

39-
- implement the link:{oap:api}[`v1.OpenApiProcessor`] interface.
38+
- implement the link:{processor-v2}[`v2.OpenApiProcessor`] interface
39+
+
40+
recommended is to implement link:{processor-v1}[`v1.OpenApiProcessor`] to 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).
4041
+
4142
the plugins use the name provided by `String getName();` to configure the processor and to provide the task to run it.
4243
+
4344
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.
4445

45-
- provide a `META-INF/services/io.openapiprocessor.api.OpenApiProcessor` property file in the resources with the class name of the implementing class.
46+
- provide a `META-INF/services/<package>.OpenApiProcessor` property file in the resources with the class name of the implementing class for all implemented interfaces (i.e. v2, v1).
47+
48+
- implement the link:{version-v2}[`v2.OpenApiProcessorVersion`] interface if you want to support the latest release check.
4649

4750
== api evolution
4851

4952
[cols="5*",options="header"]
5053
|===
5154
| api version
52-
| interface
55+
| interface (`io.openapiprocessor.api`..)
5356
| supported by gradle plugin
5457
| supported by maven plugin
5558
| description
5659

60+
| 2023.1
61+
| `..v2.OpenApiProcessor`, `..v2.OpenApiProcessorVersion`
62+
| since 2023.2
63+
| todo
64+
a| no API changes, added new `Version` api
65+
5766
| 2021.1
58-
| `io.openapiprocessor.api.v1.OpenApiProcessor`
67+
| `..v1.OpenApiProcessor`
5968
| since 2021.1
60-
| no (all processors still use the 1.0.0 API)
69+
| yes
6170
a| no API changes
6271

6372
| 2020.3 (1.3.0)
64-
| `io.openapiprocessor.api.v1.OpenApiProcessor`
73+
| `..v1.OpenApiProcessor`
74+
| yes
6575
| yes
66-
| no
6776
a| no API changes
6877

6978
| 1.2.0
70-
| `io.openapiprocessor.api.v1.OpenApiProcessor`
79+
| `..v1.OpenApiProcessor`
80+
| yes
7181
| yes
72-
| no
7382
a| better package name, no other changes
7483

7584
| 1.1.0
76-
| `io.openapiprocessor.api.OpenApiProcessor`
77-
| yes
78-
| no
79-
a| new package name
80-
81-
//4+| &darr; old (deprecated)
82-
83-
| 1.0.0
84-
| `com.github.hauner.openapi.api.OpenApiProcessor`
85+
| `..OpenApiProcessor`
8586
| yes
8687
| yes
87-
a| old package name, still used by all processors
88+
a| new package name
89+
//
90+
// 5+| &darr; old (deprecated)
91+
//
92+
// | 1.0.0
93+
// | `com.github.hauner.openapi.api.OpenApiProcessor`
94+
// | yes
95+
// | yes
96+
// a| original package name, still supported by all processors
8897

8998
|===
9099

@@ -96,12 +105,6 @@ For examples see the implementations of
96105

97106
*xref:spring::index.adoc[openapi-processor-spring]*
98107

99-
- link:{oap-spring-api-impl}[`SpringProcessor`] (the entry point of the openapi-processor-spring)
100-
implements the api interface
101-
- and the corresponding link:{oap-spring-api-props}[services property] file in the resources.
102-
103-
*xref:json::index.adoc[openapi-processor-json]*
104-
105-
- link:{oap-json-api-impl}[`JsonProcessor`] (the entry point of the openapi-processor-json)
106-
implements the api interface
107-
- and the corresponding link:{oap-json-api-props}[services property] file in the resources.
108+
- link:{oap-spring-api-impl}[`SpringService`] (the entry point of the openapi-processor-spring)
109+
implements the api interfaces.
110+
- and the corresponding link:{oap-spring-api-props}[services property] files in the resources.

0 commit comments

Comments
 (0)