{"action":"closed","issue":{"url":"https://api.github.com/repos/Jumpscale/go-raml/issues/31","repository_url":"https://api.github.com/repos/Jumpscale/go-raml","labels_url":"https://api.github.com/repos/Jumpscale/go-raml/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/Jumpscale/go-raml/issues/31/comments","events_url":"https://api.github.com/repos/Jumpscale/go-raml/issues/31/events","html_url":"https://github.com/Jumpscale/go-raml/issues/31","id":138104114,"number":31,"title":"Generated Go code for array response is invalid","user":{"login":"mohabusama","id":488406,"avatar_url":"https://avatars.githubusercontent.com/u/488406?v=3","gravatar_id":"","url":"https://api.github.com/users/mohabusama","html_url":"https://github.com/mohabusama","followers_url":"https://api.github.com/users/mohabusama/followers","following_url":"https://api.github.com/users/mohabusama/following{/other_user}","gists_url":"https://api.github.com/users/mohabusama/gists{/gist_id}","starred_url":"https://api.github.com/users/mohabusama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohabusama/subscriptions","organizations_url":"https://api.github.com/users/mohabusama/orgs","repos_url":"https://api.github.com/users/mohabusama/repos","events_url":"https://api.github.com/users/mohabusama/events{/privacy}","received_events_url":"https://api.github.com/users/mohabusama/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Jumpscale/go-raml/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"iwanbk","id":977552,"avatar_url":"https://avatars.githubusercontent.com/u/977552?v=3","gravatar_id":"","url":"https://api.github.com/users/iwanbk","html_url":"https://github.com/iwanbk","followers_url":"https://api.github.com/users/iwanbk/followers","following_url":"https://api.github.com/users/iwanbk/following{/other_user}","gists_url":"https://api.github.com/users/iwanbk/gists{/gist_id}","starred_url":"https://api.github.com/users/iwanbk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwanbk/subscriptions","organizations_url":"https://api.github.com/users/iwanbk/orgs","repos_url":"https://api.github.com/users/iwanbk/repos","events_url":"https://api.github.com/users/iwanbk/events{/privacy}","received_events_url":"https://api.github.com/users/iwanbk/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2016-03-03T07:52:20Z","updated_at":"2016-03-08T07:01:54Z","closed_at":"2016-03-08T07:01:54Z","body":"Hi\r\n\r\nAssuming the following input raml file:\r\n\r\n```YAML\r\n#%RAML 1.0\r\ntitle: UserApi\r\nversion: 0.1\r\nbaseUri: /users\r\n\r\ntypes:\r\n user:\r\n    properties:\r\n        username:\r\n            type: string\r\n        email:\r\n            type: string\r\n\r\n    example:\r\n        username: bob\r\n        email:  bob@company.com\r\n\r\n/users:\r\n\r\n  get:\r\n    description: Get all users\r\n    responses:\r\n        200:\r\n            body:\r\n                application/json:\r\n                    type: user[]\r\n```\r\n\r\nthe generated Go code for the `get` request handler:\r\n\r\n```go\r\nfunc(api UsersAPI) Get(w http.ResponseWriter, r *http.Request) {\r\n\tvar respBody user[]\r\n\tjson.NewEncoder(w).Encode(&respBody);\r\n\r\n\t// uncomment below line to add header\r\n\t// w.Header().Set(\"key\",\"value\")\r\n}\r\n```\r\n`var respBody user[]` is invalid syntax.\r\n\r\nThanks,\r\nMohab"}}