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