Skip to content

Commit 676fc88

Browse files
committed
added antora docs
1 parent 8182d92 commit 676fc88

File tree

4 files changed

+68
-0
lines changed

4 files changed

+68
-0
lines changed

docs/antora.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: api
2+
title: oap-api
3+
version: master
4+
nav:
5+
- modules/ROOT/nav.adoc
10.6 KB
Loading

docs/modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* xref:index.adoc[Documentation]

docs/modules/ROOT/pages/index.adoc

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
:author: Martin Hauner
2+
:page-title: openapi-processor-api
3+
:page-layout: default
4+
:page-aliases: current@api:ROOT:index.adoc, latest@api:ROOT:index.adoc
5+
:badge-license: https://img.shields.io/badge/License-Apache%202.0-blue.svg?labelColor=313A42
6+
:badge-ci: https://github.com/hauner/openapi-processor-api/workflows/ci/badge.svg
7+
:oapa-ci: https://github.com/hauner/openapi-processor-api/actions?query=workflow%3Aci
8+
:oapa-license: https://github.com/hauner/openapi-processor-api/blob/master/LICENSE
9+
//
10+
:oap-api: https://github.com/hauner/openapi-processor-api/blob/master/src/main/java/com/github/hauner/openapi/api/OpenApiProcessor.java
11+
:oap-spring-api-impl: https://github.com/hauner/openapi-processor-spring/blob/master/src/main/groovy/com/github/hauner/openapi/spring/processor/SpringProcessor.groovy
12+
:oap-spring-api-props: https://github.com/hauner/openapi-processor-spring/blob/master/src/main/resources/META-INF/services/com.github.hauner.openapi.api.OpenApiProcessor
13+
:oap-json-api-impl: https://github.com/hauner/openapi-processor-json/blob/master/src/main/groovy/com/github/hauner/openapi/spring/processor/JsonProcessor.groovy
14+
:oap-json-api-props: https://github.com/hauner/openapi-processor-json/blob/master/src/main/resources/META-INF/services/com.github.hauner.openapi.api.OpenApiProcessor
15+
16+
17+
//
18+
// content
19+
//
20+
image:openapi-processor-api$$@$$1280x200.png[openapi-processor-json]
21+
22+
// badges
23+
//todo link:{oapa-ci}[image:{badge-ci}[]]
24+
link:{oapa-license}[image:{badge-license}[]]
25+
26+
27+
This library provides a simple api for an openapi-processor-* library. By implementing this api
28+
it will automatically work with the openapi-processor xref:gradle::index.adoc[gradle plugin].
29+
30+
31+
== implementing the api
32+
33+
To make an openapi-processor available to the
34+
xref:gradle::index.adoc[openapi-processor-gradle plugin] it has to
35+
36+
- implement the link:{oap:api}[`OpenApiProcessor`] interface.
37+
+
38+
the gradle plugin uses the name provided by `String getName();` to configure the processor and to
39+
provide the task to run it.
40+
+
41+
the gradle plugin will call `void run(Map<String, ?> options);` to run the processor, passing all
42+
extra settings in the options map with the property setting name as the key.
43+
44+
- provide a `META-INF/services/com.github.hauner.openapi.api.OpenApiProcessor` property file in
45+
the resources with the class name of the implementing class.
46+
47+
48+
== example implementations
49+
50+
For examples see the implementations of
51+
52+
*xref:spring::index.adoc[openapi-processor-spring]*
53+
54+
- link:{oap-spring-api-impl}[`SpringProcessor`] (the entry point of the openapi-processor-spring)
55+
implements the api interface
56+
- and the corresponding link:{oap-spring-api-props}[services property] file in the resources.
57+
58+
*xref:json::index.adoc[openapi-processor-json]*
59+
60+
- link:{oap-json-api-impl}[`JsonProcessor`] (the entry point of the openapi-processor-json)
61+
implements the api interface
62+
- and the corresponding link:{oap-json-api-props}[services property] file in the resources.

0 commit comments

Comments
 (0)