{"action":"opened","number":242,"pull_request":{"url":"https://api.github.com/repos/metosin/compojure-api/pulls/242","id":77035413,"html_url":"https://github.com/metosin/compojure-api/pull/242","diff_url":"https://github.com/metosin/compojure-api/pull/242.diff","patch_url":"https://github.com/metosin/compojure-api/pull/242.patch","issue_url":"https://api.github.com/repos/metosin/compojure-api/issues/242","number":242,"state":"open","locked":false,"title":"Add option to look at the user'a handler before swagger-ui handler","user":{"login":"amalloy","id":368685,"avatar_url":"https://avatars.githubusercontent.com/u/368685?v=3","gravatar_id":"","url":"https://api.github.com/users/amalloy","html_url":"https://github.com/amalloy","followers_url":"https://api.github.com/users/amalloy/followers","following_url":"https://api.github.com/users/amalloy/following{/other_user}","gists_url":"https://api.github.com/users/amalloy/gists{/gist_id}","starred_url":"https://api.github.com/users/amalloy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amalloy/subscriptions","organizations_url":"https://api.github.com/users/amalloy/orgs","repos_url":"https://api.github.com/users/amalloy/repos","events_url":"https://api.github.com/users/amalloy/events{/privacy}","received_events_url":"https://api.github.com/users/amalloy/received_events","type":"User","site_admin":false},"body":"The docs I added may be a bit too verbose - I wasn't sure how much \"justification\" of the feature belongs in the docstring vs in this pull request. Basically the idea is that it's ideal to consult the user's handler before consulting the swagger-ui handler, so that the user sees no performance penalty on performance-sensitive requests. But normally you can't do that, because the user's handler will return a 404 for routes it doesn't recognize, including swagger-ui routes.\r\n\r\nSo, I added a way to specifically say \"my handler won't return a 404 for routes it doesn't recognize\", meaning that it becomes safe to consult the user's handler first, then the swagger-ui routes, and then if *neither* of those matches, presume that the user has wrapped the entire `(api ...)` handler in some middleware that will produce 404 responses as necessary.\r\n\r\nAn alternative implementation that could resolve the issue differently would be to add a `not-found-handler` option to `api`, and insert that after both the user's handler and the swagger-ui handler. You still need to be sure that the user's handler doesn't return any 404s it shouldn't, but perhaps this is a more self-documenting way to explain how 404s will be handled.","created_at":"2016-07-11T22:42:17Z","updated_at":"2016-07-11T22:42:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/metosin/compojure-api/pulls/242/commits","review_comments_url":"https://api.github.com/repos/metosin/compojure-api/pulls/242/comments","review_comment_url":"https://api.github.com/repos/metosin/compojure-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/metosin/compojure-api/issues/242/comments","statuses_url":"https://api.github.com/repos/metosin/compojure-api/statuses/af7e1542b361e27a97f5b456a3902ef77ab3c435","head":{"label":"amalloy:master","ref":"master","sha":"af7e1542b361e27a97f5b456a3902ef77ab3c435","user":{"login":"amalloy","id":368685,"avatar_url":"https://avatars.githubusercontent.com/u/368685?v=3","gravatar_id":"","url":"https://api.github.com/users/amalloy","html_url":"https://github.com/amalloy","followers_url":"https://api.github.com/users/amalloy/followers","following_url":"https://api.github.com/users/amalloy/following{/other_user}","gists_url":"https://api.github.com/users/amalloy/gists{/gist_id}","starred_url":"https://api.github.com/users/amalloy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amalloy/subscriptions","organizations_url":"https://api.github.com/users/amalloy/orgs","repos_url":"https://api.github.com/users/amalloy/repos","events_url":"https://api.github.com/users/amalloy/events{/privacy}","received_events_url":"https://api.github.com/users/amalloy/received_events","type":"User","site_admin":false},"repo":{"id":62920639,"name":"compojure-api","full_name":"amalloy/compojure-api","owner":{"login":"amalloy","id":368685,"avatar_url":"https://avatars.githubusercontent.com/u/368685?v=3","gravatar_id":"","url":"https://api.github.com/users/amalloy","html_url":"https://github.com/amalloy","followers_url":"https://api.github.com/users/amalloy/followers","following_url":"https://api.github.com/users/amalloy/following{/other_user}","gists_url":"https://api.github.com/users/amalloy/gists{/gist_id}","starred_url":"https://api.github.com/users/amalloy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amalloy/subscriptions","organizations_url":"https://api.github.com/users/amalloy/orgs","repos_url":"https://api.github.com/users/amalloy/repos","events_url":"https://api.github.com/users/amalloy/events{/privacy}","received_events_url":"https://api.github.com/users/amalloy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amalloy/compojure-api","description":"Sweet web apis with Compojure & Swagger","fork":true,"url":"https://api.github.com/repos/amalloy/compojure-api","forks_url":"https://api.github.com/repos/amalloy/compojure-api/forks","keys_url":"https://api.github.com/repos/amalloy/compojure-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amalloy/compojure-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amalloy/compojure-api/teams","hooks_url":"https://api.github.com/repos/amalloy/compojure-api/hooks","issue_events_url":"https://api.github.com/repos/amalloy/compojure-api/issues/events{/number}","events_url":"https://api.github.com/repos/amalloy/compojure-api/events","assignees_url":"https://api.github.com/repos/amalloy/compojure-api/assignees{/user}","branches_url":"https://api.github.com/repos/amalloy/compojure-api/branches{/branch}","tags_url":"https://api.github.com/repos/amalloy/compojure-api/tags","blobs_url":"https://api.github.com/repos/amalloy/compojure-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amalloy/compojure-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amalloy/compojure-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/amalloy/compojure-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amalloy/compojure-api/statuses/{sha}","languages_url":"https://api.github.com/repos/amalloy/compojure-api/languages","stargazers_url":"https://api.github.com/repos/amalloy/compojure-api/stargazers","contributors_url":"https://api.github.com/repos/amalloy/compojure-api/contributors","subscribers_url":"https://api.github.com/repos/amalloy/compojure-api/subscribers","subscription_url":"https://api.github.com/repos/amalloy/compojure-api/subscription","commits_url":"https://api.github.com/repos/amalloy/compojure-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/amalloy/compojure-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/amalloy/compojure-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/amalloy/compojure-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/amalloy/compojure-api/contents/{+path}","compare_url":"https://api.github.com/repos/amalloy/compojure-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amalloy/compojure-api/merges","archive_url":"https://api.github.com/repos/amalloy/compojure-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amalloy/compojure-api/downloads","issues_url":"https://api.github.com/repos/amalloy/compojure-api/issues{/number}","pulls_url":"https://api.github.com/repos/amalloy/compojure-api/pulls{/number}","milestones_url":"https://api.github.com/repos/amalloy/compojure-api/milestones{/number}","notifications_url":"https://api.github.com/repos/amalloy/compojure-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amalloy/compojure-api/labels{/name}","releases_url":"https://api.github.com/repos/amalloy/compojure-api/releases{/id}","deployments_url":"https://api.github.com/repos/amalloy/compojure-api/deployments","created_at":"2016-07-08T22:20:45Z","updated_at":"2016-07-08T22:20:47Z","pushed_at":"2016-07-11T22:35:21Z","git_url":"git://github.com/amalloy/compojure-api.git","ssh_url":"git@github.com:amalloy/compojure-api.git","clone_url":"https://github.com/amalloy/compojure-api.git","svn_url":"https://github.com/amalloy/compojure-api","homepage":"http://metosin.github.io/compojure-api/doc/","size":1801,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"metosin:master","ref":"master","sha":"71937bf575daa3207429f45c35e2585c6e261cf5","user":{"login":"metosin","id":1569418,"avatar_url":"https://avatars.githubusercontent.com/u/1569418?v=3","gravatar_id":"","url":"https://api.github.com/users/metosin","html_url":"https://github.com/metosin","followers_url":"https://api.github.com/users/metosin/followers","following_url":"https://api.github.com/users/metosin/following{/other_user}","gists_url":"https://api.github.com/users/metosin/gists{/gist_id}","starred_url":"https://api.github.com/users/metosin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metosin/subscriptions","organizations_url":"https://api.github.com/users/metosin/orgs","repos_url":"https://api.github.com/users/metosin/repos","events_url":"https://api.github.com/users/metosin/events{/privacy}","received_events_url":"https://api.github.com/users/metosin/received_events","type":"Organization","site_admin":false},"repo":{"id":15700966,"name":"compojure-api","full_name":"metosin/compojure-api","owner":{"login":"metosin","id":1569418,"avatar_url":"https://avatars.githubusercontent.com/u/1569418?v=3","gravatar_id":"","url":"https://api.github.com/users/metosin","html_url":"https://github.com/metosin","followers_url":"https://api.github.com/users/metosin/followers","following_url":"https://api.github.com/users/metosin/following{/other_user}","gists_url":"https://api.github.com/users/metosin/gists{/gist_id}","starred_url":"https://api.github.com/users/metosin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metosin/subscriptions","organizations_url":"https://api.github.com/users/metosin/orgs","repos_url":"https://api.github.com/users/metosin/repos","events_url":"https://api.github.com/users/metosin/events{/privacy}","received_events_url":"https://api.github.com/users/metosin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/metosin/compojure-api","description":"Sweet web apis with Compojure & Swagger","fork":false,"url":"https://api.github.com/repos/metosin/compojure-api","forks_url":"https://api.github.com/repos/metosin/compojure-api/forks","keys_url":"https://api.github.com/repos/metosin/compojure-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metosin/compojure-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metosin/compojure-api/teams","hooks_url":"https://api.github.com/repos/metosin/compojure-api/hooks","issue_events_url":"https://api.github.com/repos/metosin/compojure-api/issues/events{/number}","events_url":"https://api.github.com/repos/metosin/compojure-api/events","assignees_url":"https://api.github.com/repos/metosin/compojure-api/assignees{/user}","branches_url":"https://api.github.com/repos/metosin/compojure-api/branches{/branch}","tags_url":"https://api.github.com/repos/metosin/compojure-api/tags","blobs_url":"https://api.github.com/repos/metosin/compojure-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metosin/compojure-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metosin/compojure-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/metosin/compojure-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metosin/compojure-api/statuses/{sha}","languages_url":"https://api.github.com/repos/metosin/compojure-api/languages","stargazers_url":"https://api.github.com/repos/metosin/compojure-api/stargazers","contributors_url":"https://api.github.com/repos/metosin/compojure-api/contributors","subscribers_url":"https://api.github.com/repos/metosin/compojure-api/subscribers","subscription_url":"https://api.github.com/repos/metosin/compojure-api/subscription","commits_url":"https://api.github.com/repos/metosin/compojure-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/metosin/compojure-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/metosin/compojure-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/metosin/compojure-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/metosin/compojure-api/contents/{+path}","compare_url":"https://api.github.com/repos/metosin/compojure-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metosin/compojure-api/merges","archive_url":"https://api.github.com/repos/metosin/compojure-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metosin/compojure-api/downloads","issues_url":"https://api.github.com/repos/metosin/compojure-api/issues{/number}","pulls_url":"https://api.github.com/repos/metosin/compojure-api/pulls{/number}","milestones_url":"https://api.github.com/repos/metosin/compojure-api/milestones{/number}","notifications_url":"https://api.github.com/repos/metosin/compojure-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metosin/compojure-api/labels{/name}","releases_url":"https://api.github.com/repos/metosin/compojure-api/releases{/id}","deployments_url":"https://api.github.com/repos/metosin/compojure-api/deployments","created_at":"2014-01-07T10:00:52Z","updated_at":"2016-07-11T07:38:33Z","pushed_at":"2016-07-09T19:26:56Z","git_url":"git://github.com/metosin/compojure-api.git","ssh_url":"git@github.com:metosin/compojure-api.git","clone_url":"https://github.com/metosin/compojure-api.git","svn_url":"https://github.com/metosin/compojure-api","homepage":"http://metosin.github.io/compojure-api/doc/","size":2153,"stargazers_count":504,"watchers_count":504,"language":"Clojure","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":68,"mirror_url":null,"open_issues_count":16,"forks":68,"open_issues":16,"watchers":504,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/metosin/compojure-api/pulls/242"},"html":{"href":"https://github.com/metosin/compojure-api/pull/242"},"issue":{"href":"https://api.github.com/repos/metosin/compojure-api/issues/242"},"comments":{"href":"https://api.github.com/repos/metosin/compojure-api/issues/242/comments"},"review_comments":{"href":"https://api.github.com/repos/metosin/compojure-api/pulls/242/comments"},"review_comment":{"href":"https://api.github.com/repos/metosin/compojure-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/metosin/compojure-api/pulls/242/commits"},"statuses":{"href":"https://api.github.com/repos/metosin/compojure-api/statuses/af7e1542b361e27a97f5b456a3902ef77ab3c435"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":43,"deletions":14,"changed_files":2}}
{"actor":{"display_login":"amalloy"}}