{"swagger":"2.0","info":{"title":"Github","description":"See https://developer.github.com/v3/","contact":{"name":"Michael Bryzek","url":"http://twitter.com/mbryzek","email":"mbryzek@alum.mit.edu"},"license":{"name":"MIT","url":"http://opensource.org/licenses/MIT"},"version":"0.5.15"},"host":"api.github.com","basePath":"/","schemes":["https"],"consumes":["application/json"],"produces":["application/json"],"paths":{"/repos/{owner}/{repo}/git/blobs/{sha}":{"get":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"},{"name":"sha","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/blob"}},"404":{"description":"404 response"}}}},"/repos/{owner}/{repo}/git/blobs":{"post":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"},{"name":"blob_form","in":"body","schema":{"$ref":"#/definitions/blob_form"}}],"responses":{"201":{"description":"201 response","schema":{"$ref":"#/definitions/blob_created"}},"404":{"description":"404 response"},"422":{"description":"422 response","schema":{"$ref":"#/definitions/unprocessable_entity"}}}}},"/repos/{owner}/{repo}/git/commits/{sha}":{"get":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"},{"name":"sha","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/commit"}},"404":{"description":"404 response"},"422":{"description":"422 response","schema":{"$ref":"#/definitions/unprocessable_entity"}}}}},"/repos/{owner}/{repo}/git/commits":{"post":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"},{"name":"commit_form","in":"body","schema":{"$ref":"#/definitions/commit_form"}}],"responses":{"201":{"description":"201 response","schema":{"$ref":"#/definitions/commit_response"}},"404":{"description":"404 response"},"422":{"description":"422 response","schema":{"$ref":"#/definitions/unprocessable_entity"}}}}},"/repos/{owner}/{repo}/readme":{"get":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"},{"name":"ref","in":"query","required":true,"default":"main","type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/contents"}},"401":{"description":"401 response"},"404":{"description":"404 response"}}}},"/repos/{owner}/{repo}/contents/{path}":{"get":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"},{"name":"path","in":"path","required":true,"type":"string"},{"name":"ref","in":"query","required":true,"default":"main","type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/contents"}},"401":{"description":"401 response"},"404":{"description":"404 response"}}}},"/repos/{owner}/{repo}/hooks":{"get":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"type":"array","items":{"$ref":"#/definitions/hook"}}},"404":{"description":"404 response"}}},"post":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"},{"name":"hook_form","in":"body","schema":{"$ref":"#/definitions/hook_form"}}],"responses":{"201":{"description":"201 response","schema":{"$ref":"#/definitions/hook"}},"404":{"description":"404 response"},"422":{"description":"422 response","schema":{"$ref":"#/definitions/unprocessable_entity"}}}}},"/repos/{owner}/{repo}/hooks/{id}":{"get":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"},{"name":"id","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/hook"}},"404":{"description":"404 response"}}},"delete":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"},{"name":"id","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"204":{"description":"204 response"},"404":{"description":"404 response"}}}},"/repos/{owner}/{repo}/pulls":{"post":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"},{"name":"pull_request_form","in":"body","schema":{"$ref":"#/definitions/pull_request_form"}}],"responses":{"201":{"description":"201 response","schema":{"$ref":"#/definitions/pull_request"}},"404":{"description":"404 response"},"422":{"description":"422 response","schema":{"$ref":"#/definitions/unprocessable_entity"}}}},"get":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"},{"name":"page","in":"query","required":true,"default":"1","type":"integer","format":"int64"}],"responses":{"200":{"description":"200 response","schema":{"type":"array","items":{"$ref":"#/definitions/pull_request"}}},"404":{"description":"404 response"}}}},"/repos/{owner}/{repo}/git/refs":{"get":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"type":"array","items":{"$ref":"#/definitions/ref"}}},"404":{"description":"404 response"}}},"post":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"},{"name":"ref_form","in":"body","schema":{"$ref":"#/definitions/ref_form"}}],"responses":{"201":{"description":"201 response","schema":{"$ref":"#/definitions/ref"}},"404":{"description":"404 response"},"422":{"description":"422 response","schema":{"$ref":"#/definitions/unprocessable_entity"}}}}},"/repos/{owner}/{repo}/git/refs/{ref}":{"get":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"},{"name":"ref","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/ref"}},"404":{"description":"404 response"}}},"put":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"},{"name":"ref","in":"path","required":true,"type":"string"},{"name":"ref_update_form","in":"body","schema":{"$ref":"#/definitions/ref_update_form"}}],"responses":{"201":{"description":"201 response","schema":{"$ref":"#/definitions/ref"}},"404":{"description":"404 response"},"422":{"description":"422 response","schema":{"$ref":"#/definitions/unprocessable_entity"}}}}},"/user/repos":{"get":{"parameters":[{"name":"page","in":"query","required":true,"default":"1","type":"integer","format":"int64"},{"name":"visibility","in":"query","required":true,"default":"all"},{"name":"affiliation","in":"query","required":false,"type":"string"},{"name":"type","in":"query","required":false,"type":"string"},{"name":"sort","in":"query","required":true,"default":"full_name","type":"string"},{"name":"direction","in":"query","required":true,"default":"asc","type":"string"}],"responses":{"200":{"description":"200 response","schema":{"type":"array","items":{"$ref":"#/definitions/repository"}}},"401":{"description":"401 response"}}}},"/users/{username}/repos":{"get":{"description":"List public repositories for the specified user.","parameters":[{"name":"username","in":"path","required":true,"type":"string"},{"name":"page","in":"query","required":true,"default":"1","type":"integer","format":"int64"},{"name":"type","in":"query","required":true,"default":"owner","type":"string"},{"name":"sort","in":"query","required":true,"default":"full_name","type":"string"},{"name":"direction","in":"query","required":true,"default":"asc","type":"string"}],"responses":{"200":{"description":"200 response","schema":{"type":"array","items":{"$ref":"#/definitions/repository"}}},"401":{"description":"401 response"}}}},"/orgs/{org}/repos":{"get":{"description":"List repositories for the specified org.","parameters":[{"name":"org","in":"path","required":true,"type":"string"},{"name":"page","in":"query","required":true,"default":"1","type":"integer","format":"int64"},{"name":"type","in":"query","required":true,"default":"all","type":"string"},{"name":"sort","in":"query","required":true,"default":"full_name","type":"string"},{"name":"direction","in":"query","required":true,"default":"asc","type":"string"}],"responses":{"200":{"description":"200 response","schema":{"type":"array","items":{"$ref":"#/definitions/repository"}}},"401":{"description":"401 response"}}}},"/repos/{owner}/{repo}/tags":{"get":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"},{"name":"page","in":"query","required":true,"default":"1","type":"integer","format":"int64"},{"name":"per_page","in":"query","required":true,"default":"30","type":"integer","format":"int64"}],"responses":{"200":{"description":"200 response","schema":{"type":"array","items":{"$ref":"#/definitions/tag_summary"}}},"404":{"description":"404 response"}}}},"/repos/{owner}/{repo}/tags/{sha}":{"get":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"},{"name":"sha","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/tag"}},"404":{"description":"404 response"}}}},"/repos/{owner}/{repo}/git/tags":{"post":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"},{"name":"tag_form","in":"body","schema":{"$ref":"#/definitions/tag_form"}}],"responses":{"201":{"description":"201 response","schema":{"$ref":"#/definitions/tag"}},"404":{"description":"404 response"},"422":{"description":"422 response","schema":{"$ref":"#/definitions/unprocessable_entity"}}}}},"/repos/{owner}/{repo}/git/trees":{"post":{"parameters":[{"name":"owner","in":"path","required":true,"type":"string"},{"name":"repo","in":"path","required":true,"type":"string"},{"name":"create_tree_form","in":"body","schema":{"$ref":"#/definitions/create_tree_form"}}],"responses":{"201":{"description":"201 response","schema":{"$ref":"#/definitions/create_tree_response"}},"404":{"description":"404 response"},"422":{"description":"422 response","schema":{"$ref":"#/definitions/unprocessable_entity"}}}}},"/user":{"get":{"parameters":[],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/user"}},"401":{"description":"401 response"}}}},"/user/orgs":{"get":{"parameters":[{"name":"page","in":"query","required":true,"default":"1","type":"integer","format":"int64"},{"name":"per_page","in":"query","required":false,"maximum":100,"type":"integer","format":"int64"}],"responses":{"200":{"description":"200 response","schema":{"type":"array","items":{"$ref":"#/definitions/user_org"}}},"401":{"description":"401 response"}}}},"/user/emails":{"get":{"parameters":[],"responses":{"200":{"description":"200 response","schema":{"type":"array","items":{"$ref":"#/definitions/user_email"}}},"401":{"description":"401 response"}}}}},"definitions":{"blob":{"type":"object","title":"blob","required":["content","encoding","url","sha","size"],"properties":{"content":{"type":"string"},"encoding":{"type":"string","enum":["base64","utf-8"]},"url":{"type":"string"},"sha":{"type":"string"},"size":{"type":"integer","format":"int64"}}},"blob_created":{"type":"object","title":"blob_created","required":["url","sha"],"properties":{"url":{"type":"string"},"sha":{"type":"string"}}},"blob_form":{"type":"object","title":"blob_form","required":["content","encoding"],"properties":{"content":{"type":"string"},"encoding":{"type":"string","enum":["base64","utf-8"]}}},"commit":{"type":"object","title":"commit","required":["sha","url","html_url","author","committer","tree","message","parents"],"properties":{"sha":{"example":"c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc","type":"string"},"url":{"example":"https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc","type":"string"},"html_url":{"type":"string"},"author":{"$ref":"#/definitions/person"},"committer":{"$ref":"#/definitions/person"},"tree":{"$ref":"#/definitions/tree_summary"},"message":{"type":"string"},"parents":{"type":"array","items":{"$ref":"#/definitions/commit_summary"}}}},"commit_form":{"type":"object","title":"commit_form","required":["message","tree","parents","author","committer"],"properties":{"message":{"type":"string"},"tree":{"type":"string"},"parents":{"type":"array","items":{"type":"string"}},"author":{"$ref":"#/definitions/person"},"committer":{"$ref":"#/definitions/person"}}},"commit_response":{"type":"object","title":"commit_response","required":["sha","url","author","committer","message","tree","parents"],"properties":{"sha":{"type":"string"},"url":{"type":"string"},"author":{"$ref":"#/definitions/person"},"committer":{"$ref":"#/definitions/person"},"message":{"type":"string"},"tree":{"$ref":"#/definitions/tree_summary"},"parents":{"type":"array","items":{"$ref":"#/definitions/tree_summary"}}}},"commit_summary":{"type":"object","title":"commit_summary","required":["sha","url"],"properties":{"sha":{"example":"c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc","type":"string"},"url":{"example":"https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc","type":"string"}}},"contents":{"type":"object","title":"contents","required":["type","encoding","size","name","path","sha","url","git_url","html_url","download_url"],"properties":{"type":{"type":"string","enum":["file","dir","symlink","submodule"]},"encoding":{"type":"string","enum":["base64","utf-8"]},"size":{"type":"integer","format":"int64"},"name":{"type":"string"},"path":{"type":"string"},"content":{"description":"If file, then present","type":"string"},"sha":{"type":"string"},"url":{"type":"string"},"git_url":{"type":"string"},"html_url":{"type":"string"},"download_url":{"type":"string"}}},"create_tree_form":{"type":"object","title":"create_tree_form","required":["base_tree","tree"],"properties":{"base_tree":{"type":"string"},"tree":{"type":"array","items":{"$ref":"#/definitions/tree_form"}}}},"create_tree_response":{"type":"object","title":"create_tree_response","required":["sha","url","tree_result"],"properties":{"sha":{"type":"string"},"url":{"type":"string"},"tree_result":{"$ref":"#/definitions/tree"}}},"error":{"type":"object","title":"error","required":["resource","field","code"],"properties":{"resource":{"example":"Issue","type":"string"},"field":{"example":"title","type":"string"},"code":{"example":"missing_field","type":"string"}}},"github_object":{"type":"object","title":"github_object","required":["type","sha","url"],"properties":{"type":{"example":"commit","type":"string"},"sha":{"type":"string"},"url":{"type":"string"}}},"hook":{"type":"object","description":"See https://developer.github.com/v3/repos/hooks/#create-a-hook","title":"hook","required":["id","url","test_url","ping_url","name","events","active","config","updated_at","created_at"],"properties":{"id":{"type":"integer","format":"int64"},"url":{"type":"string"},"test_url":{"type":"string"},"ping_url":{"type":"string"},"name":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["push","pull_request"]}},"active":{"type":"boolean"},"config":{"$ref":"#/definitions/hook_config"},"updated_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"hook_config":{"type":"object","title":"hook_config","properties":{"url":{"type":"string"},"content_type":{"example":"json or form","type":"string"}}},"hook_form":{"type":"object","title":"hook_form","required":["name","config","events","active"],"properties":{"name":{"example":"web","type":"string"},"config":{"$ref":"#/definitions/hook_config"},"events":{"type":"array","items":{"type":"string","enum":["push","pull_request"]}},"active":{"type":"boolean"}}},"node":{"type":"object","title":"node","required":["path","mode","type","size","sha","url"],"properties":{"path":{"type":"string"},"mode":{"description":"100644 file (blob), 100755 executable (blob), 040000 subdirectory (tree), 160000 submodule (commit)","type":"string"},"type":{"type":"string","enum":["blob","tree","commit"]},"size":{"type":"integer","format":"int64"},"sha":{"type":"string"},"url":{"type":"string"}}},"node_form":{"type":"object","title":"node_form","required":["path","mode","type","sha"],"properties":{"path":{"type":"string"},"mode":{"description":"100644 file (blob), 100755 executable (blob), 040000 subdirectory (tree), 160000 submodule (commit)","type":"string"},"type":{"type":"string","enum":["blob","tree","commit"]},"sha":{"type":"string"}}},"person":{"type":"object","title":"person","required":["name","email","date"],"properties":{"name":{"type":"string"},"email":{"type":"string"},"date":{"type":"string","format":"date-time"}}},"pull_request":{"type":"object","title":"pull_request","required":["id","url","number","html_url","head"],"properties":{"id":{"type":"integer","format":"int64"},"url":{"type":"string"},"number":{"type":"integer","format":"int64"},"html_url":{"type":"string"},"head":{"$ref":"#/definitions/pull_request_head"}}},"pull_request_form":{"type":"object","title":"pull_request_form","required":["title","head","base"],"properties":{"title":{"type":"string"},"head":{"type":"string"},"base":{"type":"string"},"body":{"type":"string"}}},"pull_request_head":{"type":"object","title":"pull_request_head","required":["ref"],"properties":{"ref":{"type":"string"}}},"ref":{"type":"object","title":"ref","required":["ref","url","object"],"properties":{"ref":{"example":"refs/heads/featureA or refs/heads/main","type":"string"},"url":{"type":"string"},"object":{"$ref":"#/definitions/github_object"}}},"ref_form":{"type":"object","title":"ref_form","required":["ref","sha"],"properties":{"ref":{"example":"refs/heads/featureA or refs/heads/main","type":"string"},"sha":{"example":"940bd336248efae0f9ee5bc7b2d5c985887b16ac","type":"string"}}},"ref_update_form":{"type":"object","title":"ref_update_form","required":["sha"],"properties":{"sha":{"example":"940bd336248efae0f9ee5bc7b2d5c985887b16ac","type":"string"}}},"repository":{"type":"object","title":"repository","required":["id","owner","name","full_name","private","url","html_url","default_branch"],"properties":{"id":{"type":"integer","format":"int64"},"owner":{"$ref":"#/definitions/user"},"name":{"type":"string"},"full_name":{"type":"string"},"private":{"type":"boolean"},"description":{"type":"string"},"url":{"type":"string"},"html_url":{"type":"string"},"default_branch":{"type":"string"}}},"tag":{"type":"object","title":"tag","required":["tag","sha","url","message","tagger","object"],"properties":{"tag":{"example":"v0.0.1","type":"string"},"sha":{"example":"940bd336248efae0f9ee5bc7b2d5c985887b16ac","type":"string"},"url":{"example":"https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac","type":"string"},"message":{"example":"initial version","type":"string"},"tagger":{"$ref":"#/definitions/tagger"},"object":{"$ref":"#/definitions/github_object"}}},"tag_form":{"type":"object","title":"tag_form","required":["tag","message","object","type","tagger"],"properties":{"tag":{"example":"v0.0.1","type":"string"},"message":{"type":"string"},"object":{"description":"The SHA of the git object this is tagging","example":"940bd336248efae0f9ee5bc7b2d5c985887b16ac","type":"string"},"type":{"default":"commit","type":"string"},"tagger":{"$ref":"#/definitions/tagger"}}},"tag_summary":{"type":"object","title":"tag_summary","required":["name","commit"],"properties":{"name":{"example":"v0.1","type":"string"},"commit":{"$ref":"#/definitions/commit_summary"}}},"tagger":{"type":"object","title":"tagger","required":["name","email","date"],"properties":{"name":{"type":"string"},"email":{"type":"string"},"date":{"type":"string","format":"date-time"}}},"tree":{"type":"object","title":"tree","required":["sha","url","truncated","tree"],"properties":{"sha":{"type":"string"},"url":{"type":"string"},"truncated":{"type":"boolean"},"tree":{"type":"array","items":{"$ref":"#/definitions/node"}}}},"tree_form":{"type":"object","title":"tree_form","required":["path","mode","type"],"properties":{"path":{"type":"string"},"mode":{"description":"100644 file (blob), 100755 executable (blob), 040000 subdirectory (tree), 160000 submodule (commit)","type":"string"},"type":{"type":"string","enum":["blob","tree","commit"]},"sha":{"type":"string"},"content":{"type":"string"}}},"tree_result":{"type":"object","title":"tree_result","required":["path","mode","type","size","sha","url"],"properties":{"path":{"type":"string"},"mode":{"description":"100644 file (blob), 100755 executable (blob), 040000 subdirectory (tree), 160000 submodule (commit)","type":"string"},"type":{"type":"string","enum":["blob","tree","commit"]},"size":{"type":"integer","format":"int64"},"sha":{"type":"string"},"url":{"type":"string"}}},"tree_summary":{"type":"object","title":"tree_summary","required":["url","sha"],"properties":{"url":{"type":"string"},"sha":{"type":"string"}}},"unprocessable_entity":{"type":"object","title":"unprocessable_entity","required":["message"],"properties":{"message":{"example":"Validation Failed","type":"string"},"errors":{"type":"array","items":{"$ref":"#/definitions/error"}}}},"user":{"type":"object","title":"user","required":["id","login","url","html_url","type"],"properties":{"id":{"type":"integer","format":"int64"},"login":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"avatar_url":{"type":"string"},"gravatar_id":{"type":"string"},"url":{"type":"string"},"html_url":{"type":"string"},"type":{"type":"string","enum":["User"]}}},"user_email":{"type":"object","title":"user_email","required":["email","verified","primary"],"properties":{"email":{"type":"string"},"verified":{"type":"boolean"},"primary":{"type":"boolean"}}},"user_org":{"type":"object","title":"user_org","required":["login"],"properties":{"login":{"type":"string"}}}}}