Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ public Swagger convert(ResourceListing resourceListing, List<ApiDeclaration> api
Contact contact = null;
if (apiInfo.getContact() != null) {
contact = new Contact()
.url(apiInfo.getContact());
.email(apiInfo.getContact());
}
License license = null;
if (apiInfo.getLicense() != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,12 @@ public void testIssue_641()throws IOException {
BodyParameter bodyParameter = (BodyParameter) swagger2.getPaths().get("/user/createWithArray").getPost().getParameters().get(0);
assertEquals(((RefProperty)((ArrayModel)bodyParameter.getSchema()).getItems()).get$ref(),"#/definitions/User");
}

@Test
public void testIssue_1451()throws IOException {
SwaggerCompatConverter converter = new SwaggerCompatConverter();
Swagger swagger2 = converter.read("specs/v1_2/issue-1451.json");
assertNotNull(swagger2);
assertEquals(swagger2.getInfo().getContact().getEmail(), "[email protected]");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"apiVersion": "1.0.0",
"swaggerVersion": "1.2",
"basePath": "http://petstore.swagger.io/api",
"info": {
"contact": "[email protected]"
},
"apis": [
{
"path": "/test"
}
]
}