@@ -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
113113options:
114114 package-name: io.openapiprocessor.openapi
@@ -118,12 +118,12 @@ options:
118118
119119map:
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
133133The `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
139140Here are the generated interfaces, first the `FooApi`:
140141
0 commit comments