Skip to content

Commit cc4474a

Browse files
committed
multi wrapper on array type mapping fails
1 parent 196be86 commit cc4474a

File tree

6 files changed

+83
-0
lines changed

6 files changed

+83
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
items:
2+
- generated/api/Api.java
3+
- generated/model/Foo.java
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* This class is auto generated by https://github.com/hauner/openapi-processor-core.
3+
* TEST ONLY.
4+
*/
5+
6+
package generated.api;
7+
8+
import annotation.Mapping;
9+
import generated.model.Foo;
10+
import reactor.core.publisher.Flux;
11+
12+
public interface Api {
13+
14+
@Mapping("/foo")
15+
Flux<Foo> getFoo();
16+
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* This class is auto generated by https://github.com/hauner/openapi-processor-core.
3+
* TEST ONLY.
4+
*/
5+
6+
package generated.model;
7+
8+
import com.fasterxml.jackson.annotation.JsonProperty;
9+
10+
public class Foo {
11+
12+
@JsonProperty("bar")
13+
private String bar;
14+
15+
public String getBar() {
16+
return bar;
17+
}
18+
19+
public void setBar(String bar) {
20+
this.bar = bar;
21+
}
22+
23+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
items:
2+
- inputs/openapi.yaml
3+
- inputs/mapping.yaml
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
openapi-processor-mapping: v2
2+
3+
options:
4+
package-name: generated
5+
6+
map:
7+
multi: reactor.core.publisher.Flux
8+
9+
types:
10+
- type: array => java.util.List
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
openapi: 3.0.2
2+
info:
3+
title: test template
4+
version: 1.0.0
5+
6+
paths:
7+
8+
/foo:
9+
get:
10+
responses:
11+
'200':
12+
description: the foo result
13+
content:
14+
application/json:
15+
schema:
16+
type: array
17+
items:
18+
$ref: '#/components/schemas/Foo'
19+
20+
components:
21+
schemas:
22+
23+
Foo:
24+
type: object
25+
properties:
26+
bar:
27+
type: string

0 commit comments

Comments
 (0)