{"action":"created","issue":{"url":"https://api.github.com/repos/go-swagger/go-swagger/issues/75","labels_url":"https://api.github.com/repos/go-swagger/go-swagger/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/go-swagger/go-swagger/issues/75/comments","events_url":"https://api.github.com/repos/go-swagger/go-swagger/issues/75/events","html_url":"https://github.com/go-swagger/go-swagger/issues/75","id":112278016,"number":75,"title":"When scanning a response the definition is not ref'ed","user":{"login":"casualjim","id":456109,"avatar_url":"https://avatars.githubusercontent.com/u/456109?v=3","gravatar_id":"","url":"https://api.github.com/users/casualjim","html_url":"https://github.com/casualjim","followers_url":"https://api.github.com/users/casualjim/followers","following_url":"https://api.github.com/users/casualjim/following{/other_user}","gists_url":"https://api.github.com/users/casualjim/gists{/gist_id}","starred_url":"https://api.github.com/users/casualjim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/casualjim/subscriptions","organizations_url":"https://api.github.com/users/casualjim/orgs","repos_url":"https://api.github.com/users/casualjim/repos","events_url":"https://api.github.com/users/casualjim/events{/privacy}","received_events_url":"https://api.github.com/users/casualjim/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/go-swagger/go-swagger/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/go-swagger/go-swagger/milestones/1","html_url":"https://github.com/go-swagger/go-swagger/milestones/Minimal%20first%20release","labels_url":"https://api.github.com/repos/go-swagger/go-swagger/milestones/1/labels","id":1161275,"number":1,"title":"Minimal first release","description":"This first release is focussed on getting a baseline in functionality set.\r\n\r\nIt should however promise API stability to support the entire planned feature set:\r\n\r\nBaseline functionality: \r\n\r\n* validate a spec, including extended validations\r\n* generate a client from a spec\r\n* generate a spec through go code analysis\r\n* generate a server from a spec\r\n\r\nAPI stability:\r\n\r\n* serialization format agnostic\r\n* transport agnostic, this should be a matter of config\r\n* validation for client and server ","creator":{"login":"casualjim","id":456109,"avatar_url":"https://avatars.githubusercontent.com/u/456109?v=3","gravatar_id":"","url":"https://api.github.com/users/casualjim","html_url":"https://github.com/casualjim","followers_url":"https://api.github.com/users/casualjim/followers","following_url":"https://api.github.com/users/casualjim/following{/other_user}","gists_url":"https://api.github.com/users/casualjim/gists{/gist_id}","starred_url":"https://api.github.com/users/casualjim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/casualjim/subscriptions","organizations_url":"https://api.github.com/users/casualjim/orgs","repos_url":"https://api.github.com/users/casualjim/repos","events_url":"https://api.github.com/users/casualjim/events{/privacy}","received_events_url":"https://api.github.com/users/casualjim/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":33,"state":"open","created_at":"2015-06-12T03:22:12Z","updated_at":"2015-11-25T05:44:48Z","due_on":"2015-12-31T08:00:00Z","closed_at":null},"comments":7,"created_at":"2015-10-20T03:21:28Z","updated_at":"2015-11-25T17:40:36Z","closed_at":null,"body":"Doesn't seem to scan \r\n\r\n```go\r\n// swagger:response resp\r\ntype Resp struct {\r\n  User User\r\n}\r\n```\r\n\r\n\r\nIt's totally possible that this is better handled through documenting usage, but add a test to verify the right thing happens with the right annotations"},"comment":{"url":"https://api.github.com/repos/go-swagger/go-swagger/issues/comments/159684195","html_url":"https://github.com/go-swagger/go-swagger/issues/75#issuecomment-159684195","issue_url":"https://api.github.com/repos/go-swagger/go-swagger/issues/75","id":159684195,"user":{"login":"casualjim","id":456109,"avatar_url":"https://avatars.githubusercontent.com/u/456109?v=3","gravatar_id":"","url":"https://api.github.com/users/casualjim","html_url":"https://github.com/casualjim","followers_url":"https://api.github.com/users/casualjim/followers","following_url":"https://api.github.com/users/casualjim/following{/other_user}","gists_url":"https://api.github.com/users/casualjim/gists{/gist_id}","starred_url":"https://api.github.com/users/casualjim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/casualjim/subscriptions","organizations_url":"https://api.github.com/users/casualjim/orgs","repos_url":"https://api.github.com/users/casualjim/repos","events_url":"https://api.github.com/users/casualjim/events{/privacy}","received_events_url":"https://api.github.com/users/casualjim/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T17:40:36Z","updated_at":"2015-11-25T17:40:36Z","body":"In the end the generated spec has a faulty ref where it uses the model instead of the response as $ref. Manual editing fixes this\r\n\r\n```diff\r\n     \"BookingResponse\": {\r\n       \"description\": \"BookingResponse represents a scheduled appointment\",\r\n       \"schema\": {\r\n-        \"$ref\": \"#/definitions/Booking\"\r\n+        \"$ref\": \"#/definitions/BookingResponse\"\r\n       }\r\n     }\r\n   }\r\n```"}}