{"action":"created","issue":{"url":"https://api.github.com/repos/go-swagger/go-swagger/issues/661","repository_url":"https://api.github.com/repos/go-swagger/go-swagger","labels_url":"https://api.github.com/repos/go-swagger/go-swagger/issues/661/labels{/name}","comments_url":"https://api.github.com/repos/go-swagger/go-swagger/issues/661/comments","events_url":"https://api.github.com/repos/go-swagger/go-swagger/issues/661/events","html_url":"https://github.com/go-swagger/go-swagger/issues/661","id":176178930,"number":661,"title":"How to access access API struct  inside operator handler","user":{"login":"Menta2L","id":2862013,"avatar_url":"https://avatars.githubusercontent.com/u/2862013?v=3","gravatar_id":"","url":"https://api.github.com/users/Menta2L","html_url":"https://github.com/Menta2L","followers_url":"https://api.github.com/users/Menta2L/followers","following_url":"https://api.github.com/users/Menta2L/following{/other_user}","gists_url":"https://api.github.com/users/Menta2L/gists{/gist_id}","starred_url":"https://api.github.com/users/Menta2L/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Menta2L/subscriptions","organizations_url":"https://api.github.com/users/Menta2L/orgs","repos_url":"https://api.github.com/users/Menta2L/repos","events_url":"https://api.github.com/users/Menta2L/events{/privacy}","received_events_url":"https://api.github.com/users/Menta2L/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-10T13:11:29Z","updated_at":"2016-09-10T15:32:38Z","closed_at":null,"body":"My question is how i can access the generated API  interface from operator handler function ?\r\nCan i pass it somehow via context or any other way to do that   ?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/go-swagger/go-swagger/issues/comments/246118117","html_url":"https://github.com/go-swagger/go-swagger/issues/661#issuecomment-246118117","issue_url":"https://api.github.com/repos/go-swagger/go-swagger/issues/661","id":246118117,"user":{"login":"Menta2L","id":2862013,"avatar_url":"https://avatars.githubusercontent.com/u/2862013?v=3","gravatar_id":"","url":"https://api.github.com/users/Menta2L","html_url":"https://github.com/Menta2L","followers_url":"https://api.github.com/users/Menta2L/followers","following_url":"https://api.github.com/users/Menta2L/following{/other_user}","gists_url":"https://api.github.com/users/Menta2L/gists{/gist_id}","starred_url":"https://api.github.com/users/Menta2L/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Menta2L/subscriptions","organizations_url":"https://api.github.com/users/Menta2L/orgs","repos_url":"https://api.github.com/users/Menta2L/repos","events_url":"https://api.github.com/users/Menta2L/events{/privacy}","received_events_url":"https://api.github.com/users/Menta2L/received_events","type":"User","site_admin":false},"created_at":"2016-09-10T15:32:38Z","updated_at":"2016-09-10T15:32:38Z","body":"Thanks for the answer will try to find another workaround.\r\nAnd about the use case its probably not relevant and its really custom.\r\n\r\nI created an module like apache access module ACL based on IP address for different url. Instand of URL for lookup key i was decided to use Operation.ID. (lookup will be faster in that way  because each operation have unique id according to swagged specification )\r\n\r\nThe problem comes when i wont to check against that ACL \r\nThere is 2 options to place a \"hook\" in golbalMiddleware or in each Operation Handler.\r\nIf i go for an golbalMiddleware a need to get an middleware.MatchedRoute.\r\nBecause i did not found a way to do that I add my ACL struct to the API struct and was thinking that i can access ACL property somehow from the context but did not found a way to do that.\r\n\r\n\r\n"}}
{"actor":{"display_login":"Menta2L"}}