Skip to content

Commit

Permalink
Update OpenAPI Descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
github-openapi-bot authored Feb 11, 2021
1 parent be681ae commit fc4dec9
Show file tree
Hide file tree
Showing 16 changed files with 544 additions and 260 deletions.
66 changes: 43 additions & 23 deletions lib/rest/static/decorated/api.github.com.json
Original file line number Diff line number Diff line change
Expand Up @@ -24167,7 +24167,7 @@
"properties": {
"name": {
"type": "string",
"description": "<p><strong>Required</strong>. The name of the team.</p>",
"description": "<p>The name of the team.</p>",
"name": "name",
"in": "body",
"rawType": "string",
Expand Down Expand Up @@ -24212,18 +24212,16 @@
"childParamsGroups": []
},
"parent_team_id": {
"type": "integer",
"type": "integer or null",
"description": "<p>The ID of a team to set as the parent team.</p>",
"nullable": true,
"name": "parent_team_id",
"in": "body",
"rawType": "integer",
"rawDescription": "The ID of a team to set as the parent team.",
"childParamsGroups": []
}
},
"required": [
"name"
]
}
},
"example": {
"name": "new team name",
Expand All @@ -24248,7 +24246,7 @@
"bodyParameters": [
{
"type": "string",
"description": "<p><strong>Required</strong>. The name of the team.</p>",
"description": "<p>The name of the team.</p>",
"name": "name",
"in": "body",
"rawType": "string",
Expand Down Expand Up @@ -24293,8 +24291,9 @@
"childParamsGroups": []
},
{
"type": "integer",
"type": "integer or null",
"description": "<p>The ID of a team to set as the parent team.</p>",
"nullable": true,
"name": "parent_team_id",
"in": "body",
"rawType": "integer",
Expand Down Expand Up @@ -27036,7 +27035,8 @@
"rawDescription": "The permission to grant to the team for this project. Can be one of: \n\\* `read` - team members can read, but not write to or administer this project. \n\\* `write` - team members can read and write, but not administer this project. \n\\* `admin` - team members can read, write and administer this project. \nDefault: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"",
"childParamsGroups": []
}
}
},
"nullable": true
}
}
}
Expand Down Expand Up @@ -58258,14 +58258,17 @@
}
],
"description": "<p>The title of the issue.</p>",
"nullable": true,
"name": "title",
"in": "body",
"rawDescription": "The title of the issue.",
"type": "undefined or null",
"childParamsGroups": []
},
"body": {
"type": "string",
"type": "string or null",
"description": "<p>The contents of the issue.</p>",
"nullable": true,
"name": "body",
"in": "body",
"rawType": "string",
Expand Down Expand Up @@ -58399,14 +58402,17 @@
}
],
"description": "<p>The title of the issue.</p>",
"nullable": true,
"name": "title",
"in": "body",
"rawDescription": "The title of the issue.",
"type": "undefined or null",
"childParamsGroups": []
},
{
"type": "string",
"type": "string or null",
"description": "<p>The contents of the issue.</p>",
"nullable": true,
"name": "body",
"in": "body",
"rawType": "string",
Expand Down Expand Up @@ -65670,13 +65676,13 @@
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/comments \\\n -d '{\"body\":\"body\",\"path\":\"path\"}'",
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/comments \\\n -d '{\"body\":\"body\",\"path\":\"path\"}'</code></pre>"
"source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/comments \\\n -d '{\"body\":\"body\"}'",
"html": "<pre><code class=\"hljs language-shell\">curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/comments \\\n -d '{\"body\":\"body\"}'</code></pre>"
},
{
"lang": "JavaScript",
"source": "await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/comments', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n body: 'body',\n path: 'path'\n})",
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /repos/{owner}/{repo}/pulls/{pull_number}/comments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">pull_number</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>,\n <span class=\"hljs-attr\">path</span>: <span class=\"hljs-string\">'path'</span>\n})\n</code></pre>"
"source": "await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/comments', {\n owner: 'octocat',\n repo: 'hello-world',\n pull_number: 42,\n body: 'body'\n})",
"html": "<pre><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">await</span> octokit.request(<span class=\"hljs-string\">'POST /repos/{owner}/{repo}/pulls/{pull_number}/comments'</span>, {\n <span class=\"hljs-attr\">owner</span>: <span class=\"hljs-string\">'octocat'</span>,\n <span class=\"hljs-attr\">repo</span>: <span class=\"hljs-string\">'hello-world'</span>,\n <span class=\"hljs-attr\">pull_number</span>: <span class=\"hljs-number\">42</span>,\n <span class=\"hljs-attr\">body</span>: <span class=\"hljs-string\">'body'</span>\n})\n</code></pre>"
}
],
"summary": "Create a review comment for a pull request",
Expand Down Expand Up @@ -65715,7 +65721,7 @@
},
"path": {
"type": "string",
"description": "<p><strong>Required</strong>. The relative path to the file that necessitates a comment.</p>",
"description": "<p>The relative path to the file that necessitates a comment.</p>",
"name": "path",
"in": "body",
"rawType": "string",
Expand Down Expand Up @@ -65787,8 +65793,7 @@
}
},
"required": [
"body",
"path"
"body"
]
},
"examples": {
Expand Down Expand Up @@ -65861,7 +65866,7 @@
},
{
"type": "string",
"description": "<p><strong>Required</strong>. The relative path to the file that necessitates a comment.</p>",
"description": "<p>The relative path to the file that necessitates a comment.</p>",
"name": "path",
"in": "body",
"rawType": "string",
Expand Down Expand Up @@ -66751,7 +66756,19 @@
"rawDescription": "An array of team `slug`s that will be requested.",
"childParamsGroups": []
}
}
},
"anyOf": [
{
"required": [
"reviewers"
]
},
{
"required": [
"team_reviewers"
]
}
]
},
"example": {
"reviewers": [
Expand Down Expand Up @@ -66889,7 +66906,7 @@
"properties": {
"reviewers": {
"type": "array of strings",
"description": "<p>An array of user <code>login</code>s that will be removed.</p>",
"description": "<p><strong>Required</strong>. An array of user <code>login</code>s that will be removed.</p>",
"items": {
"type": "string"
},
Expand All @@ -66911,7 +66928,10 @@
"rawDescription": "An array of team `slug`s that will be removed.",
"childParamsGroups": []
}
}
},
"required": [
"reviewers"
]
},
"example": {
"reviewers": [
Expand Down Expand Up @@ -66955,7 +66975,7 @@
"bodyParameters": [
{
"type": "array of strings",
"description": "<p>An array of user <code>login</code>s that will be removed.</p>",
"description": "<p><strong>Required</strong>. An array of user <code>login</code>s that will be removed.</p>",
"items": {
"type": "string"
},
Expand Down
51 changes: 36 additions & 15 deletions lib/rest/static/decorated/ghes-2.18.json
Original file line number Diff line number Diff line change
Expand Up @@ -39572,14 +39572,17 @@
}
],
"description": "<p>The title of the issue.</p>",
"nullable": true,
"name": "title",
"in": "body",
"rawDescription": "The title of the issue.",
"type": "undefined or null",
"childParamsGroups": []
},
"body": {
"type": "string",
"type": "string or null",
"description": "<p>The contents of the issue.</p>",
"nullable": true,
"name": "body",
"in": "body",
"rawType": "string",
Expand Down Expand Up @@ -39713,14 +39716,17 @@
}
],
"description": "<p>The title of the issue.</p>",
"nullable": true,
"name": "title",
"in": "body",
"rawDescription": "The title of the issue.",
"type": "undefined or null",
"childParamsGroups": []
},
{
"type": "string",
"type": "string or null",
"description": "<p>The contents of the issue.</p>",
"nullable": true,
"name": "body",
"in": "body",
"rawType": "string",
Expand Down Expand Up @@ -47998,7 +48004,19 @@
"rawDescription": "An array of team `slug`s that will be requested.",
"childParamsGroups": []
}
}
},
"anyOf": [
{
"required": [
"reviewers"
]
},
{
"required": [
"team_reviewers"
]
}
]
},
"example": {
"reviewers": [
Expand Down Expand Up @@ -48136,7 +48154,7 @@
"properties": {
"reviewers": {
"type": "array of strings",
"description": "<p>An array of user <code>login</code>s that will be removed.</p>",
"description": "<p><strong>Required</strong>. An array of user <code>login</code>s that will be removed.</p>",
"items": {
"type": "string"
},
Expand All @@ -48158,7 +48176,10 @@
"rawDescription": "An array of team `slug`s that will be removed.",
"childParamsGroups": []
}
}
},
"required": [
"reviewers"
]
},
"example": {
"reviewers": [
Expand Down Expand Up @@ -48202,7 +48223,7 @@
"bodyParameters": [
{
"type": "array of strings",
"description": "<p>An array of user <code>login</code>s that will be removed.</p>",
"description": "<p><strong>Required</strong>. An array of user <code>login</code>s that will be removed.</p>",
"items": {
"type": "string"
},
Expand Down Expand Up @@ -55007,7 +55028,7 @@
"properties": {
"name": {
"type": "string",
"description": "<p><strong>Required</strong>. The name of the team.</p>",
"description": "<p>The name of the team.</p>",
"name": "name",
"in": "body",
"rawType": "string",
Expand Down Expand Up @@ -55052,18 +55073,16 @@
"childParamsGroups": []
},
"parent_team_id": {
"type": "integer",
"type": "integer or null",
"description": "<p>The ID of a team to set as the parent team. <strong>Note</strong>: You must pass the <code>hellcat-preview</code> media type to use this parameter.</p>",
"nullable": true,
"name": "parent_team_id",
"in": "body",
"rawType": "integer",
"rawDescription": "The ID of a team to set as the parent team. **Note**: You must pass the `hellcat-preview` media type to use this parameter.",
"childParamsGroups": []
}
},
"required": [
"name"
]
}
},
"example": {
"name": "new team name",
Expand Down Expand Up @@ -55095,7 +55114,7 @@
"bodyParameters": [
{
"type": "string",
"description": "<p><strong>Required</strong>. The name of the team.</p>",
"description": "<p>The name of the team.</p>",
"name": "name",
"in": "body",
"rawType": "string",
Expand Down Expand Up @@ -55140,8 +55159,9 @@
"childParamsGroups": []
},
{
"type": "integer",
"type": "integer or null",
"description": "<p>The ID of a team to set as the parent team. <strong>Note</strong>: You must pass the <code>hellcat-preview</code> media type to use this parameter.</p>",
"nullable": true,
"name": "parent_team_id",
"in": "body",
"rawType": "integer",
Expand Down Expand Up @@ -57916,7 +57936,8 @@
"rawDescription": "The permission to grant to the team for this project. Can be one of: \n\\* `read` - team members can read, but not write to or administer this project. \n\\* `write` - team members can read and write, but not administer this project. \n\\* `admin` - team members can read, write and administer this project. \nDefault: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/enterprise-server@2.18/rest/overview/resources-in-the-rest-api#http-verbs).\" \n**Note**: If you pass the `hellcat-preview` media type, you can promote—but not demote—a `permission` attribute inherited from a parent team.",
"childParamsGroups": []
}
}
},
"nullable": true
}
}
}
Expand Down
Loading

0 comments on commit fc4dec9

Please sign in to comment.