{"action":"created","issue":{"url":"https://api.github.com/repos/danielgtaylor/aglio/issues/237","repository_url":"https://api.github.com/repos/danielgtaylor/aglio","labels_url":"https://api.github.com/repos/danielgtaylor/aglio/issues/237/labels{/name}","comments_url":"https://api.github.com/repos/danielgtaylor/aglio/issues/237/comments","events_url":"https://api.github.com/repos/danielgtaylor/aglio/issues/237/events","html_url":"https://github.com/danielgtaylor/aglio/issues/237","id":135997440,"number":237,"title":"TypeError: Cannot read property 'content' of undefined`","user":{"login":"amuino","id":47512,"avatar_url":"https://avatars.githubusercontent.com/u/47512?v=3","gravatar_id":"","url":"https://api.github.com/users/amuino","html_url":"https://github.com/amuino","followers_url":"https://api.github.com/users/amuino/followers","following_url":"https://api.github.com/users/amuino/following{/other_user}","gists_url":"https://api.github.com/users/amuino/gists{/gist_id}","starred_url":"https://api.github.com/users/amuino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amuino/subscriptions","organizations_url":"https://api.github.com/users/amuino/orgs","repos_url":"https://api.github.com/users/amuino/repos","events_url":"https://api.github.com/users/amuino/events{/privacy}","received_events_url":"https://api.github.com/users/amuino/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-24T09:00:43Z","updated_at":"2016-04-14T15:41:41Z","closed_at":null,"body":"We are constantly getting this error when trying to run aglio (we run it as a server, but it also happen when output goes to a file):\r\n\r\n```\r\n$ aglio -i sample.apib.md -s -p 9876\r\nServer started on http://127.0.0.1:9876/\r\nRendering sample.apib.md\r\n/Users/amuino/.nvm/versions/node/v5.6.0/lib/node_modules/aglio/node_modules/aglio-theme-olio/lib/main.js:387\r\n    ref = api.content || [];\r\n             ^\r\n\r\nTypeError: Cannot read property 'content' of undefined\r\n    at decorate (/Users/amuino/.nvm/versions/node/v5.6.0/lib/node_modules/aglio/node_modules/aglio-theme-olio/lib/main.js:387:14)\r\n    at Object.exports.render (/Users/amuino/.nvm/versions/node/v5.6.0/lib/node_modules/aglio/node_modules/aglio-theme-olio/lib/main.js:645:5)\r\n    at /Users/amuino/.nvm/versions/node/v5.6.0/lib/node_modules/aglio/lib/main.js:133:20\r\n```\r\n\r\nI've attached the minimal test case input file (zipped so that Github will allow me): \r\n[sample.apib.md.zip](https://github.com/danielgtaylor/aglio/files/144166/sample.apib.md.zip)\r\n\r\nThe error disappears when any of this happens:\r\n- Rename data structure `Booking State Params`. Not all renames work (seems like inserting/appending chars to the last word does not fix the issue)\r\n- Renaming data structure `Booking State Response` so that it does not match the name in Attributes (gives a nice format error)\r\n- Removing any `O*` data structure\r\n- Making `Point` an object instead of an array\r\n- Removing the reference to `Booking State Response` from the Response (any `O*` seems to work, probably because it does not reference `Point`)\r\n\r\nVersions:\r\n```\r\n$ aglio -v\r\naglio 2.2.0\r\nolio 1.6.2\r\n$ node -v\r\nv5.6.0\r\n$ npm -v\r\n3.6.0\r\n```"},"comment":{"url":"https://api.github.com/repos/danielgtaylor/aglio/issues/comments/210008506","html_url":"https://github.com/danielgtaylor/aglio/issues/237#issuecomment-210008506","issue_url":"https://api.github.com/repos/danielgtaylor/aglio/issues/237","id":210008506,"user":{"login":"joseph-norman","id":3330161,"avatar_url":"https://avatars.githubusercontent.com/u/3330161?v=3","gravatar_id":"","url":"https://api.github.com/users/joseph-norman","html_url":"https://github.com/joseph-norman","followers_url":"https://api.github.com/users/joseph-norman/followers","following_url":"https://api.github.com/users/joseph-norman/following{/other_user}","gists_url":"https://api.github.com/users/joseph-norman/gists{/gist_id}","starred_url":"https://api.github.com/users/joseph-norman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joseph-norman/subscriptions","organizations_url":"https://api.github.com/users/joseph-norman/orgs","repos_url":"https://api.github.com/users/joseph-norman/repos","events_url":"https://api.github.com/users/joseph-norman/events{/privacy}","received_events_url":"https://api.github.com/users/joseph-norman/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T15:41:41Z","updated_at":"2016-04-14T15:41:41Z","body":"I'm not sure if its related but I had a similar problem to this - It was being thrown when there was a particular syntax error in my API blueprint spec, related to Defining data structures (using a `-` instead of a `+` for each attribute).\r\n\r\nWorth a shot if this is what you're doing! "}}