Skip to content

Commit

Permalink
added test for #130
Browse files Browse the repository at this point in the history
  • Loading branch information
fehguy committed Jul 30, 2016
1 parent d23b788 commit d0078c6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,18 @@ public void testInvalidResponsePayload() throws Exception {
assertEquals(e.getCode(), 400);
}
}

@Test
public void testIssue130() throws Exception {
Map<String, Object> body = new HashMap<String, Object>();
String response = client.invokeAPI("/issue-130", "GET", new HashMap<String, String>(), body,
new HashMap<String, String>(), null, null, "application/yaml", new String[0]);

assertEquals(response,
"---\n" +
"anIntegerArray:\n" +
"- 99\n" +
"aStringArray:\n" +
"- \"a string value\"\n");
}
}
21 changes: 21 additions & 0 deletions src/test/swagger/sample1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d0078c6

Please sign in to comment.