Skip to content
Merged
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 @@ -235,6 +235,12 @@ private void processProperties(final Map<String, Property> subProps, final Strin
file);
}
}
else if (prop.getValue() instanceof ObjectProperty){
ObjectProperty objProp = (ObjectProperty) prop.getValue();
if(objProp.getProperties() != null ){
processProperties(objProp.getProperties(),file);
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1405,4 +1405,12 @@ public void testIssue258() {
assertEquals(result.getMessages().get(0), "attribute paths.'/pets/{id}'(post).operationId is repeated");
}

@Test
public void testIssue913() {
SwaggerParser parser = new SwaggerParser();
final Swagger swagger = parser.read("src/test/resources/issue-913/BS/ApiSpecification.yaml");
Assert.assertNotNull(swagger);
Assert.assertNotNull(swagger.getDefinitions().get("indicatorType"));
Assert.assertEquals(swagger.getDefinitions().get("indicatorType").getProperties().size(),1);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"properties": {
"indicatorType": {
"type": "object",
"properties": {
"indicator": {
"type": "boolean"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"properties": {
"details": {
"type": "object",
"properties": {
"confirmationCodeRequired": {
"$ref": "../Common/BasicComponents.json#/properties/indicatorType"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"swagger": "2.0",
"info": {
"title": "Service Model",
"version": "2.4.0"
},
"host": "api.com",
"basePath": "/{access}/accessProfileAPI",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/networkAccessProfile": {
"get": {
"tags": [
"AccessProfile"
],
"operationId": "getList",
"produces": [
"application/json"
],
"parameters": [
{
"name": "id",
"in": "query",
"type": "string"
}
],
"responses": {
"200": {
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/accessProfileBO"
}
}
}
}
}
}
},
"definitions": {
"accessProfileBO": {
"$ref": "../BO/Resource/ApiSpecificationBO.json"
}
},
"parameters": {
"fields": {
"name": "fields",
"in": "query",
"type": "string"
}
}
}