Skip to content

Commit 9f5d68f

Browse files
committed
update docs
1 parent b34d89c commit 9f5d68f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

docs/modules/ROOT/pages/mapping/annotation.adoc

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ and a `mapping.yaml` with annotation type mappings:
108108

109109
[source,yaml]
110110
----
111-
openapi-processor-mapping: v2
111+
openapi-processor-mapping: v2.1 # <1>
112112
113113
options:
114114
package-name: io.openapiprocessor.openapi
@@ -118,12 +118,12 @@ options:
118118
119119
map:
120120
types:
121-
- type: Bar @ io.openapiprocessor.samples.validations.Sum(24) # <1>
121+
- type: Bar @ io.openapiprocessor.samples.validations.Sum(24) # <2>
122122
123123
parameters:
124-
- type: Foo @ io.openapiprocessor.samples.validations.Sum(value = 42) # <2>
124+
- type: Foo @ io.openapiprocessor.samples.validations.Sum(value = 42) # <3>
125125
126-
# this formats do work too <3>
126+
# this formats do work too <4>
127127
# - type: Foo @ annotation.Bar
128128
# - type: Foo @ annotation.Bar()
129129
# - type: Foo @ annotation.Bar("bar")
@@ -132,9 +132,10 @@ map:
132132

133133
The `Sum` annotation in the example is a custom bean validation but the feature itself is not limited to bean validation.
134134

135-
<1> the `Bar` mapping is using a global type annotation mapping, so the annotation is added to the generated `Bar` class.
136-
<2> the `Foo` mapping adds the annotation to the parameter of the endpoint methods that use `Foo`.
137-
<3> this is a list of examples that shows annotation parameters. It is nearly java code.
135+
<1> use `v2.1` as the mapping version to avoid validation warnings in the mapping file.
136+
<2> the `Bar` mapping is using a global type annotation mapping, so the annotation is added to the generated `Bar` class.
137+
<3> the `Foo` mapping adds the annotation to the parameter of the endpoint methods that use `Foo`.
138+
<4> this is a list of examples that shows annotation parameters. It is nearly java code.
138139

139140
Here are the generated interfaces, first the `FooApi`:
140141

0 commit comments

Comments
 (0)