Skip to content

Commit 1788306

Browse files
committed
add failing test for #4836
1 parent fbe8a8d commit 1788306

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/ModelResolverOAS31Test.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ public void testAnnotatedArray() {
3030
SerializationMatchers.assertEqualsToYaml31(model, "type: array\n" +
3131
"contains:\n" +
3232
" type: string\n" +
33+
"description: arraydescription\n" +
3334
"items:\n" +
3435
" type: string\n" +
36+
" description: itemdescription\n"+
3537
"maxContains: 10\n" +
3638
"minContains: 1\n" +
3739
"prefixItems:\n" +
@@ -115,8 +117,10 @@ public void testOAS31Fields() {
115117
" type: array\n" +
116118
" contains:\n" +
117119
" type: string\n" +
120+
" description: arraydescription\n" +
118121
" items:\n" +
119122
" type: string\n" +
123+
" description: itemdescription\n" +
120124
" maxContains: 10\n" +
121125
" minContains: 1\n" +
122126
" prefixItems:\n" +

modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/AnnotatedArray.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
types = { "number" }
1414
),
1515
schema = @Schema(
16-
types = { "string" }
16+
types = { "string" },
17+
description = "itemdescription"
1718
),
19+
arraySchema = @Schema(description = "arraydescription"),
1820
prefixItems = {
1921
@Schema(
2022
types = { "string" }

modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/ModelWithOAS31Stuff.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ public class ModelWithOAS31Stuff {
2323
private Client client;
2424

2525
@ArraySchema(
26+
schema = @Schema(
27+
types = { "string" },
28+
description = "itemdescription"
29+
),
30+
arraySchema = @Schema(description = "arraydescription"),
2631
maxContains = 10,
2732
minContains = 1,
2833
contains = @Schema(

0 commit comments

Comments
 (0)