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
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/mapping/global.adoc
+42-14Lines changed: 42 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,11 +99,9 @@ Another example:
99
99
100
100
== mapping with generic types
101
101
102
-
Type mapping allows to use a target type that has generic parameters. The generic types are given
103
-
by the **generics** property of the mapping. **generics** is a list and can contain multiple types.
102
+
Type mapping allows to use a target type that has generic parameters. The generic types are given by the **generics** property of the mapping. **generics** is a list and can contain multiple types.
104
103
105
-
For example if a `StringPage` schema in the OpenAPI corresponds to
106
-
`org.springframework.data.domain.Page<java.lang.String>`, it can be mapped to the Spring type by:
104
+
For example if a `StringPage` schema in the OpenAPI corresponds to `org.springframework.data.domain.Page<java.lang.String>`, it can be mapped to the Spring type by:
107
105
108
106
[source,yaml]
109
107
----
@@ -112,22 +110,52 @@ For example if a `StringPage` schema in the OpenAPI corresponds to
112
110
- java.lang.String
113
111
----
114
112
115
-
The processor will replace any use of `StringPage` with the **{target type}** type and add the generic
116
-
types (in the given order) to the **{target type}** type.
113
+
The processor will replace any use of `StringPage` with the **{target type}** type and add the generic types (in the given order) to the **{target type}** type.
117
114
118
-
In case of the example above the processor will create `Page<String>` instead of `StringPage` with an
119
-
additional `import` for the generic type (.. ignoring imports on `java.lang`).
115
+
In case of the example above the processor will create `Page<String>` instead of `StringPage` with an additional `import` for the generic type (.. ignoring imports on `java.lang`).
120
116
121
-
[IMPORTANT]
122
-
The processor does support only one level of generics. It is not possible to provide generic
123
-
parameters to generic parameters.
124
-
125
-
To get a more compact description it is possible to write a shorter mapping by inlining the generic
126
-
types:
117
+
To get a more compact description it is possible to write a shorter mapping by inlining the generic types:
0 commit comments