{"action":"opened","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/963","labels_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/963/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/963/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/963/events","html_url":"https://github.com/swagger-api/swagger-ui/issues/963","id":58989426,"number":963,"title":"Swagger-UI does not handle nested objects as expected","user":{"login":"steowens","id":978310,"avatar_url":"https://avatars.githubusercontent.com/u/978310?v=3","gravatar_id":"","url":"https://api.github.com/users/steowens","html_url":"https://github.com/steowens","followers_url":"https://api.github.com/users/steowens/followers","following_url":"https://api.github.com/users/steowens/following{/other_user}","gists_url":"https://api.github.com/users/steowens/gists{/gist_id}","starred_url":"https://api.github.com/users/steowens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steowens/subscriptions","organizations_url":"https://api.github.com/users/steowens/orgs","repos_url":"https://api.github.com/users/steowens/repos","events_url":"https://api.github.com/users/steowens/events{/privacy}","received_events_url":"https://api.github.com/users/steowens/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-25T23:44:06Z","updated_at":"2015-02-25T23:44:06Z","closed_at":null,"body":"I am documenting an API that takes a JSON document that contains an array of sub documents.  When I look at the API in the UI, it does not show the schema for the sub document.  I also have an example attached to the schema but that does not seem to appear in the UI either.\r\n![screen shot 2015-02-25 at 3 41 34 pm](https://cloud.githubusercontent.com/assets/978310/6383400/fe6fe25c-bd04-11e4-994c-fb9c8ae6e54c.png)\r\n\r\nHere is my swagger spec:\r\n\r\n```\r\n{\r\n  \"swagger\": \"2.0\",\r\n  \"consumes\": [\r\n    \"application\\/json\"\r\n  ],\r\n  \"produces\": [\r\n    \"application\\/json\"\r\n  ],\r\n  \"info\": {\r\n    \"version\": \"1.0.0\",\r\n    \"title\": \"Subscription Service\",\r\n    \"description\": \"Manages subscriptions between producers and consumers.\",\r\n    \"contact\": {\r\n      \"name\": \"Disney Web Services\",\r\n      \"url\": \"https:\\/\\/confluence.disney.com\\/display\\/FND\\/Disney+Web+Services\",\r\n      \"email\": \"DTSS.Disney.Web.Services@disney.com\"\r\n    }\r\n  },\r\n  \"paths\": {\r\n    \"\\/entities\": {\r\n      \"get\": {\r\n        \"operationId\": \"queryEntities\",\r\n        \"summary\": \"List all ENTITY objects I can see\",\r\n        \"description\": \"Get secured entities for all ENTITY objects maintained by system\",\r\n        \"produces\": [\r\n          \"application\\/json\"\r\n        ],\r\n        \"parameters\": [\r\n          {\r\n            \"in\": \"header\",\r\n            \"name\": \"Authorization\",\r\n            \"required\": true,\r\n            \"type\": \"string\",\r\n            \"description\": \"Must be of the form 'SESSION {token}' where {token} is the session token returned from session service.  See response body for more details.\"\r\n          }\r\n        ],\r\n        \"responses\": {\r\n          \"200\": {\r\n            \"description\": \"Successful operation\",\r\n            \"schema\": {\r\n              \"type\": \"array\",\r\n              \"items\": {\r\n                \"$ref\": \"#\\/definitions\\/Entity\"\r\n              }\r\n            }\r\n          },\r\n          \"401\": {\r\n            \"description\": \"Either the authorization header is missing\\/badly formed, the token is not valid, or the token is expired, or session service is down.  See response body for more details.\"\r\n          },\r\n          \"500\": {\r\n            \"description\": \"An unexpected error occured or a service dependency is down.  See response body for more details.  See response body for more details.\"\r\n          }\r\n        }\r\n      },\r\n      \"post\": {\r\n        \"operationId\": \"createEntity\",\r\n        \"summary\": \"Create new ENTITY\",\r\n        \"description\": \"Creates a new entity, registers the secured entity for the entity, and assigns ownership to the caller session.\",\r\n        \"consumes\": [\r\n          \"application\\/json\"\r\n        ],\r\n        \"produces\": [\r\n          \"application\\/json\"\r\n        ],\r\n        \"parameters\": [\r\n          {\r\n            \"in\": \"header\",\r\n            \"name\": \"Authorization\",\r\n            \"required\": true,\r\n            \"type\": \"string\",\r\n            \"description\": \"Must be of the form 'SESSION {token}' where {token} is the session token returned from session service.\"\r\n          },\r\n          {\r\n            \"in\": \"body\",\r\n            \"description\": \"The new Entity to create\",\r\n            \"schema\": {\r\n              \"$ref\": \"#\\/definitions\\/Entity\"\r\n            }\r\n          }\r\n        ],\r\n        \"responses\": {\r\n          \"200\": {\r\n            \"description\": \"Successful operation\",\r\n            \"schema\": {\r\n              \"$ref\": \"#\\/definitions\\/Entity\"\r\n            }\r\n          },\r\n          \"401\": {\r\n            \"description\": \"Either the authorization header is missing\\/badly formed, the token is not valid, or the token is expired, or session service is down.  See response body for more details.\"\r\n          },\r\n          \"403\": {\r\n            \"description\": \"A permission check failed, input was invalid, or an integrity constraint would be violated if the operation were completed.  See response body for more details.\"\r\n          },\r\n          \"500\": {\r\n            \"description\": \"An unexpected error occured or a service dependency is down.  See response body for more details.\"\r\n          }\r\n        }\r\n      }\r\n    },\r\n    \"\\/entities\\/{name}\": {\r\n      \"get\": {\r\n        \"operationId\": \"getEntity\",\r\n        \"summary\": \"Get actual entity object by name\",\r\n        \"description\": \"Get full entity object with the given name\",\r\n        \"produces\": [\r\n          \"application\\/json\"\r\n        ],\r\n        \"parameters\": [\r\n          {\r\n            \"in\": \"header\",\r\n            \"name\": \"Authorization\",\r\n            \"required\": true,\r\n            \"type\": \"string\",\r\n            \"description\": \"Must be of the form 'SESSION {token}' where {token} is the session token returned from session service.  See response body for more details.\"\r\n          },\r\n          {\r\n            \"in\": \"path\",\r\n            \"name\": \"name\",\r\n            \"required\": true,\r\n            \"type\": \"string\",\r\n            \"description\": \"Then name field of the entity to retrieve\"\r\n          }\r\n        ],\r\n        \"responses\": {\r\n          \"200\": {\r\n            \"description\": \"Successful operation\",\r\n            \"schema\": {\r\n              \"$ref\": \"#\\/definitions\\/Entity\"\r\n            }\r\n          },\r\n          \"401\": {\r\n            \"description\": \"Either the authorization header is missing\\/badly formed, the token is not valid, or the token is expired, or session service is down.  See response body for more details.\"\r\n          },\r\n          \"403\": {\r\n            \"description\": \"Caller does not have permission to read entity..\"\r\n          },\r\n          \"404\": {\r\n            \"description\": \"No entity with the given name was found in the system.\"\r\n          },\r\n          \"500\": {\r\n            \"description\": \"An unexpected error occured or a service dependency is down.  See response body for more details.  See response body for more details.\"\r\n          }\r\n        }\r\n      },\r\n      \"delete\": {\r\n        \"operationId\": \"deleteEntity\",\r\n        \"summary\": \"Delete entity object by name\",\r\n        \"description\": \"Delete entity object with the given name\",\r\n        \"produces\": [\r\n          \"application\\/json\"\r\n        ],\r\n        \"parameters\": [\r\n          {\r\n            \"in\": \"header\",\r\n            \"name\": \"Authorization\",\r\n            \"required\": true,\r\n            \"type\": \"string\",\r\n            \"description\": \"Must be of the form 'SESSION {token}' where {token} is the session token returned from session service.  See response body for more details.\"\r\n          },\r\n          {\r\n            \"in\": \"path\",\r\n            \"name\": \"name\",\r\n            \"required\": true,\r\n            \"type\": \"string\",\r\n            \"description\": \"Then name field of the entity to delete\"\r\n          }\r\n        ],\r\n        \"responses\": {\r\n          \"200\": {\r\n            \"description\": \"Successful operation\",\r\n            \"schema\": {\r\n              \"$ref\": \"#\\/definitions\\/Entity\"\r\n            }\r\n          },\r\n          \"401\": {\r\n            \"description\": \"Either the authorization header is missing\\/badly formed, the token is not valid, or the token is expired, or session service is down.  See response body for more details.\"\r\n          },\r\n          \"403\": {\r\n            \"description\": \"Caller does not have permission to delete entity..\"\r\n          },\r\n          \"404\": {\r\n            \"description\": \"No entity with the given name was found in the system.\"\r\n          },\r\n          \"500\": {\r\n            \"description\": \"An unexpected error occured or a service dependency is down.  See response body for more details.  See response body for more details.\"\r\n          }\r\n        }\r\n      },\r\n      \"put\": {\r\n        \"operationId\": \"updateEntity\",\r\n        \"summary\": \"Update an existing entity object\",\r\n        \"description\": \"Update an existing entity object\",\r\n        \"produces\": [\r\n          \"application\\/json\"\r\n        ],\r\n        \"parameters\": [\r\n          {\r\n            \"in\": \"header\",\r\n            \"name\": \"Authorization\",\r\n            \"required\": true,\r\n            \"type\": \"string\",\r\n            \"description\": \"Must be of the form 'SESSION {token}' where {token} is the session token returned from session service.  See response body for more details.\"\r\n          },\r\n          {\r\n            \"in\": \"path\",\r\n            \"name\": \"name\",\r\n            \"required\": true,\r\n            \"type\": \"string\",\r\n            \"description\": \"Then name field of the entity to delete\"\r\n          },\r\n          {\r\n            \"in\": \"body\",\r\n            \"schema\": {\r\n              \"$ref\": \"#\\/definitions\\/Entity\"\r\n            },\r\n            \"description\": \"The existing entity object with updated properties\"\r\n          }\r\n        ],\r\n        \"responses\": {\r\n          \"200\": {\r\n            \"description\": \"Successful operation\",\r\n            \"schema\": {\r\n              \"$ref\": \"#\\/definitions\\/Entity\"\r\n            }\r\n          },\r\n          \"401\": {\r\n            \"description\": \"Either the authorization header is missing\\/badly formed, the token is not valid, or the token is expired, or session service is down.  See response body for more details.\"\r\n          },\r\n          \"403\": {\r\n            \"description\": \"Caller does not have permission to delete entity..\"\r\n          },\r\n          \"404\": {\r\n            \"description\": \"No entity with the given name was found in the system.\"\r\n          },\r\n          \"409\": {\r\n            \"description\": \"The revision on the entity passed in does not match the revision on the entity in the system.\"\r\n          },\r\n          \"500\": {\r\n            \"description\": \"An unexpected error occurred or a service dependency is down.  See response body for more details.  See response body for more details.\"\r\n          }\r\n        }\r\n      }\r\n    }\r\n  },\r\n  \"definitions\": {\r\n    \"Entity\": {\r\n      \"id\": \"Entity\",\r\n      \"type\": \"object\",\r\n      \"properties\": {\r\n        \"_id\": {\r\n          \"type\": \"string\",\r\n          \"description\": \"Unique system identifier for the entity.  This will be assigned by the system and need not be provided by the client for new entities.\"\r\n        },\r\n        \"revision\": {\r\n          \"type\": \"integer\",\r\n          \"description\": \"Assigned by the system to track revisions, and coordinate predictable updates.  This will be assigned (and maintained) by the system and need not be provided by the client for new entities.\"\r\n        },\r\n        \"name\": {\r\n          \"type\": \"string\",\r\n          \"description\": \"A name that IS unique that may not be so friendly.\",\r\n          \"required\": true\r\n        },\r\n        \"type\": {\r\n          \"type\": \"string\",\r\n          \"enum\": [\r\n            \"GUEST\",\r\n            \"CAST_MEMBER\",\r\n            \"APPLICATION\",\r\n            \"SERVICE\",\r\n            \"DEVICE\"\r\n          ],\r\n          \"required\": true\r\n        },\r\n        \"featuresProvided\": {\r\n          \"type\": \"array\",\r\n          \"items\": {\r\n            \"type\": \"object\",\r\n            \"properties\": {\r\n              \"name\": {\r\n                \"type\": \"string\",\r\n                \"description\": \"Unique identifier with respect to the Provider Entity for the feature.\"\r\n              },\r\n              \"description\": {\r\n                \"type\": \"string\",\r\n                \"description\": \"Describes what the feature is or does.\"\r\n              },\r\n              \"onboardingLink\": {\r\n                \"type\": \"string\",\r\n                \"description\": \"The link for onboarding onto this feature.\",\r\n                \"format\": \"url\"\r\n              },\r\n              \"subscriptionMetadataSchema\": {\r\n                \"type\": \"object\",\r\n                \"description\": \"The json schema of the subscription metadata for the feature.\"\r\n              }\r\n            }\r\n          }\r\n        }\r\n      },\r\n      \"example\": {\r\n        \"_id\": \"54ed3472cd3a24dc57679a2e\",\r\n        \"revision\": 0,\r\n        \"type\": \"SERVICE\",\r\n        \"name\": \"ACE\",\r\n        \"contactEmail\": \"DTSS.Disney.Web.Services@disney.com\",\r\n        \"description\": \"Fine grained dynamic, self service authorization provider.\",\r\n        \"featuresProvided\": [\r\n          {\r\n            \"name\": \"rights-management\",\r\n            \"description\": \"Register items to secure and assign permissions to manage those items to users, groups and based on other criteria.\",\r\n            \"onboardingLink\": \"https:\\/\\/beta.dws.cloud.corp.dig.com\\/\",\r\n            \"subscriptionMetadataSchema\": null\r\n          }\r\n        ]\r\n      },\r\n      \"feturesProvided\": {\r\n        \"$ref\": \"#\\/definitions\\/Feature\"\r\n      }\r\n    },\r\n    \"SecuredEntityForEntitySchema\": {\r\n      \"id\": \"SecuredEntityForEntity\",\r\n      \"type\": \"object\",\r\n      \"properties\": {\r\n        \"domain\": {\r\n          \"type\": \"string\",\r\n          \"description\": \"Ace domain name\"\r\n        },\r\n        \"containerId\": {\r\n          \"type\": \"string\",\r\n          \"description\": \"Ace container for Entities in domain.\",\r\n          \"default\": \"Entities\"\r\n        },\r\n        \"instanceId\": {\r\n          \"type\": \"string\",\r\n          \"description\": \"Name of the ENTITY\"\r\n        },\r\n        \"type\": {\r\n          \"type\": \"string\",\r\n          \"description\": \"Secured entity type\",\r\n          \"default\": \"ENTITY\"\r\n        },\r\n        \"listingData\": {\r\n          \"type\": \"object\",\r\n          \"properties\": {\r\n            \"name\": {\r\n              \"type\": \"string\",\r\n              \"description\": \"Name of the ENTITY, (matches instanceId)\"\r\n            },\r\n            \"description\": {\r\n              \"type\": \"string\",\r\n              \"description\": \"A creator specified description for the entity\"\r\n            },\r\n            \"contactEmail\": {\r\n              \"type\": \"string\",\r\n              \"format\": \"email\",\r\n              \"description\": \"Email to contact regarding this entity\"\r\n            },\r\n            \"type\": {\r\n              \"type\": \"string\",\r\n              \"description\": \"Entity type\",\r\n              \"enum\": [\r\n                \"GUEST\",\r\n                \"CAST_MEMBER\",\r\n                \"APPLICATION\",\r\n                \"SERVICE\",\r\n                \"DEVICE\"\r\n              ]\r\n            },\r\n            \"featureNames\": {\r\n              \"type\": \"array\",\r\n              \"description\": \"Names of features this entity provides.\",\r\n              \"items\": {\r\n                \"type\": \"string\"\r\n              }\r\n            }\r\n          }\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n```"}}