Skip to content

Commit 89943a9

Browse files
committed
updated docs
1 parent cb8f09d commit 89943a9

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

docs/modules/ROOT/pages/processor/response.adoc

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,23 +64,32 @@ will be either the java type or the *unknown type*.
6464

6565
NOTE: prior to 1.0.0.M13 all results were auto-wrapped with `ResponseEntity<>`.
6666

67-
== single wrapper
67+
== single & multi wrapper
6868

6969
[.badge .badge-since]+since 1.0.0.M13+
7070

71-
When using WebFlux we want to wrap the result types in a reactive type. For array like types we can
72-
simply use the standard `array` mapping:
71+
When using WebFlux we want to wrap certain parameters & results types in reactive types like
72+
`Mono<>` or `Flux<>`.
73+
74+
To achieve this the processor knows two special mappings:
75+
76+
* single: to wrap non-array like types (i.e. not a collection)
77+
* multi: to wrap array like types (i.e. a collection)
78+
79+
=== multi
7380

7481
[source,yaml]
7582
----
7683
map:
7784
types:
78-
- from: array
85+
- from: multi
7986
to: reactor.core.publisher.Flux
8087
----
8188

82-
Which will use `Flux<>` as collection wrapper instead of an java array for all list parameters
83-
or responses.
89+
Which will use `Flux<>` as collection wrapper instead of the original java collection type for all
90+
list *responses* (or *parameters*). The `multi` does not affect collections in model types.
91+
92+
=== single
8493

8594
To map non-array like responses to a `Mono<>` set the `single` mapping:
8695

0 commit comments

Comments
 (0)