diff --git a/src/test/java/io/swagger/test/integration/responses/SchemaResponseIT.java b/src/test/java/io/swagger/test/integration/responses/SchemaResponseIT.java index 05057cff..4300dadc 100644 --- a/src/test/java/io/swagger/test/integration/responses/SchemaResponseIT.java +++ b/src/test/java/io/swagger/test/integration/responses/SchemaResponseIT.java @@ -67,4 +67,18 @@ public void testInvalidResponsePayload() throws Exception { assertEquals(e.getCode(), 400); } } + + @Test + public void testIssue130() throws Exception { + Map body = new HashMap(); + String response = client.invokeAPI("/issue-130", "GET", new HashMap(), body, + new HashMap(), null, null, "application/yaml", new String[0]); + + assertEquals(response, + "---\n" + + "anIntegerArray:\n" + + "- 99\n" + + "aStringArray:\n" + + "- \"a string value\"\n"); + } } diff --git a/src/test/swagger/sample1.yaml b/src/test/swagger/sample1.yaml index afe75b4e..062f2a3c 100644 --- a/src/test/swagger/sample1.yaml +++ b/src/test/swagger/sample1.yaml @@ -418,6 +418,27 @@ paths: type: string format: url example: 'http://foo.bar/other' + /issue-130: + get: + parameters: [] + responses: + 200: + description: issue 130 + schema: + type: object + description: an object with array properties + properties: + aStringArray: + type: array + items: + type: string + example: a string value + anIntegerArray: + type: array + items: + type: integer + format: int32 + example: 99 /form: post: operationId: postFormData