You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
****{source type}** is the type name used in the OpenAPI description and names the type that should receive the additional annotation.This can be a **{type}:{format}** combination like `string:uuid`.
27
+
****{source type}** is the type name used in the OpenAPI description and names the type that should receive the additional annotation.This can be a **+{type}:{format}+** combination like `string:uuid`.
28
28
29
29
****{annotation type}** is the fully qualified class name of the java annotation type. It may have parameters (see example below).
30
30
31
-
The link:{oap-samples}[samples project] has a small example using annotation mappings similar to the one described below.
31
+
Here is a list of examples using different parameters:
<1> [.badge .badge-since]+since 2023.2+ use a *class* as annotation parameter.
45
+
46
+
*`object` source type*
47
+
48
+
[.badge .badge-since]+since 2023.3+
49
+
50
+
it is also possible to add an annotation to **all** generated schema/model classes using a single annotation mapping:
51
+
52
+
[source,yaml]
53
+
----
54
+
- type: object @ annotation
55
+
----
56
+
57
+
The `object` string represents **all** generated object classes (i.e. schema/model classes) and will add the given annotation **only** at the class level.
58
+
59
+
For example, a mapping like this:
60
+
61
+
[source,yaml]
62
+
----
63
+
map:
64
+
types:
65
+
- type: object @ lombok.Builder
66
+
----
67
+
68
+
[source,java]
69
+
----
70
+
@Builder
71
+
@Generated(...)
72
+
public class Foo {
73
+
...
74
+
}
75
+
----
76
+
77
+
The link:{oap-samples}[samples project] has a small example using annotation mappings.
0 commit comments