Skip to content

Commit fc4dec9

Browse files
Update OpenAPI Descriptions
1 parent be681ae commit fc4dec9

16 files changed

Lines changed: 544 additions & 260 deletions

lib/rest/static/decorated/api.github.com.json

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24167,7 +24167,7 @@
2416724167
"properties": {
2416824168
"name": {
2416924169
"type": "string",
24170-
"description": "<p><strong>Required</strong>. The name of the team.</p>",
24170+
"description": "<p>The name of the team.</p>",
2417124171
"name": "name",
2417224172
"in": "body",
2417324173
"rawType": "string",
@@ -24212,18 +24212,16 @@
2421224212
"childParamsGroups": []
2421324213
},
2421424214
"parent_team_id": {
24215-
"type": "integer",
24215+
"type": "integer or null",
2421624216
"description": "<p>The ID of a team to set as the parent team.</p>",
24217+
"nullable": true,
2421724218
"name": "parent_team_id",
2421824219
"in": "body",
2421924220
"rawType": "integer",
2422024221
"rawDescription": "The ID of a team to set as the parent team.",
2422124222
"childParamsGroups": []
2422224223
}
24223-
},
24224-
"required": [
24225-
"name"
24226-
]
24224+
}
2422724225
},
2422824226
"example": {
2422924227
"name": "new team name",
@@ -24248,7 +24246,7 @@
2424824246
"bodyParameters": [
2424924247
{
2425024248
"type": "string",
24251-
"description": "<p><strong>Required</strong>. The name of the team.</p>",
24249+
"description": "<p>The name of the team.</p>",
2425224250
"name": "name",
2425324251
"in": "body",
2425424252
"rawType": "string",
@@ -24293,8 +24291,9 @@
2429324291
"childParamsGroups": []
2429424292
},
2429524293
{
24296-
"type": "integer",
24294+
"type": "integer or null",
2429724295
"description": "<p>The ID of a team to set as the parent team.</p>",
24296+
"nullable": true,
2429824297
"name": "parent_team_id",
2429924298
"in": "body",
2430024299
"rawType": "integer",
@@ -27036,7 +27035,8 @@
2703627035
"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).\"",
2703727036
"childParamsGroups": []
2703827037
}
27039-
}
27038+
},
27039+
"nullable": true
2704027040
}
2704127041
}
2704227042
}
@@ -58258,14 +58258,17 @@
5825858258
}
5825958259
],
5826058260
"description": "<p>The title of the issue.</p>",
58261+
"nullable": true,
5826158262
"name": "title",
5826258263
"in": "body",
5826358264
"rawDescription": "The title of the issue.",
58265+
"type": "undefined or null",
5826458266
"childParamsGroups": []
5826558267
},
5826658268
"body": {
58267-
"type": "string",
58269+
"type": "string or null",
5826858270
"description": "<p>The contents of the issue.</p>",
58271+
"nullable": true,
5826958272
"name": "body",
5827058273
"in": "body",
5827158274
"rawType": "string",
@@ -58399,14 +58402,17 @@
5839958402
}
5840058403
],
5840158404
"description": "<p>The title of the issue.</p>",
58405+
"nullable": true,
5840258406
"name": "title",
5840358407
"in": "body",
5840458408
"rawDescription": "The title of the issue.",
58409+
"type": "undefined or null",
5840558410
"childParamsGroups": []
5840658411
},
5840758412
{
58408-
"type": "string",
58413+
"type": "string or null",
5840958414
"description": "<p>The contents of the issue.</p>",
58415+
"nullable": true,
5841058416
"name": "body",
5841158417
"in": "body",
5841258418
"rawType": "string",
@@ -65670,13 +65676,13 @@
6567065676
"x-codeSamples": [
6567165677
{
6567265678
"lang": "Shell",
65673-
"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\"}'",
65674-
"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>"
65679+
"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\"}'",
65680+
"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>"
6567565681
},
6567665682
{
6567765683
"lang": "JavaScript",
65678-
"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})",
65679-
"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>"
65684+
"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})",
65685+
"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>"
6568065686
}
6568165687
],
6568265688
"summary": "Create a review comment for a pull request",
@@ -65715,7 +65721,7 @@
6571565721
},
6571665722
"path": {
6571765723
"type": "string",
65718-
"description": "<p><strong>Required</strong>. The relative path to the file that necessitates a comment.</p>",
65724+
"description": "<p>The relative path to the file that necessitates a comment.</p>",
6571965725
"name": "path",
6572065726
"in": "body",
6572165727
"rawType": "string",
@@ -65787,8 +65793,7 @@
6578765793
}
6578865794
},
6578965795
"required": [
65790-
"body",
65791-
"path"
65796+
"body"
6579265797
]
6579365798
},
6579465799
"examples": {
@@ -65861,7 +65866,7 @@
6586165866
},
6586265867
{
6586365868
"type": "string",
65864-
"description": "<p><strong>Required</strong>. The relative path to the file that necessitates a comment.</p>",
65869+
"description": "<p>The relative path to the file that necessitates a comment.</p>",
6586565870
"name": "path",
6586665871
"in": "body",
6586765872
"rawType": "string",
@@ -66751,7 +66756,19 @@
6675166756
"rawDescription": "An array of team `slug`s that will be requested.",
6675266757
"childParamsGroups": []
6675366758
}
66754-
}
66759+
},
66760+
"anyOf": [
66761+
{
66762+
"required": [
66763+
"reviewers"
66764+
]
66765+
},
66766+
{
66767+
"required": [
66768+
"team_reviewers"
66769+
]
66770+
}
66771+
]
6675566772
},
6675666773
"example": {
6675766774
"reviewers": [
@@ -66889,7 +66906,7 @@
6688966906
"properties": {
6689066907
"reviewers": {
6689166908
"type": "array of strings",
66892-
"description": "<p>An array of user <code>login</code>s that will be removed.</p>",
66909+
"description": "<p><strong>Required</strong>. An array of user <code>login</code>s that will be removed.</p>",
6689366910
"items": {
6689466911
"type": "string"
6689566912
},
@@ -66911,7 +66928,10 @@
6691166928
"rawDescription": "An array of team `slug`s that will be removed.",
6691266929
"childParamsGroups": []
6691366930
}
66914-
}
66931+
},
66932+
"required": [
66933+
"reviewers"
66934+
]
6691566935
},
6691666936
"example": {
6691766937
"reviewers": [
@@ -66955,7 +66975,7 @@
6695566975
"bodyParameters": [
6695666976
{
6695766977
"type": "array of strings",
66958-
"description": "<p>An array of user <code>login</code>s that will be removed.</p>",
66978+
"description": "<p><strong>Required</strong>. An array of user <code>login</code>s that will be removed.</p>",
6695966979
"items": {
6696066980
"type": "string"
6696166981
},

lib/rest/static/decorated/ghes-2.18.json

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39572,14 +39572,17 @@
3957239572
}
3957339573
],
3957439574
"description": "<p>The title of the issue.</p>",
39575+
"nullable": true,
3957539576
"name": "title",
3957639577
"in": "body",
3957739578
"rawDescription": "The title of the issue.",
39579+
"type": "undefined or null",
3957839580
"childParamsGroups": []
3957939581
},
3958039582
"body": {
39581-
"type": "string",
39583+
"type": "string or null",
3958239584
"description": "<p>The contents of the issue.</p>",
39585+
"nullable": true,
3958339586
"name": "body",
3958439587
"in": "body",
3958539588
"rawType": "string",
@@ -39713,14 +39716,17 @@
3971339716
}
3971439717
],
3971539718
"description": "<p>The title of the issue.</p>",
39719+
"nullable": true,
3971639720
"name": "title",
3971739721
"in": "body",
3971839722
"rawDescription": "The title of the issue.",
39723+
"type": "undefined or null",
3971939724
"childParamsGroups": []
3972039725
},
3972139726
{
39722-
"type": "string",
39727+
"type": "string or null",
3972339728
"description": "<p>The contents of the issue.</p>",
39729+
"nullable": true,
3972439730
"name": "body",
3972539731
"in": "body",
3972639732
"rawType": "string",
@@ -47998,7 +48004,19 @@
4799848004
"rawDescription": "An array of team `slug`s that will be requested.",
4799948005
"childParamsGroups": []
4800048006
}
48001-
}
48007+
},
48008+
"anyOf": [
48009+
{
48010+
"required": [
48011+
"reviewers"
48012+
]
48013+
},
48014+
{
48015+
"required": [
48016+
"team_reviewers"
48017+
]
48018+
}
48019+
]
4800248020
},
4800348021
"example": {
4800448022
"reviewers": [
@@ -48136,7 +48154,7 @@
4813648154
"properties": {
4813748155
"reviewers": {
4813848156
"type": "array of strings",
48139-
"description": "<p>An array of user <code>login</code>s that will be removed.</p>",
48157+
"description": "<p><strong>Required</strong>. An array of user <code>login</code>s that will be removed.</p>",
4814048158
"items": {
4814148159
"type": "string"
4814248160
},
@@ -48158,7 +48176,10 @@
4815848176
"rawDescription": "An array of team `slug`s that will be removed.",
4815948177
"childParamsGroups": []
4816048178
}
48161-
}
48179+
},
48180+
"required": [
48181+
"reviewers"
48182+
]
4816248183
},
4816348184
"example": {
4816448185
"reviewers": [
@@ -48202,7 +48223,7 @@
4820248223
"bodyParameters": [
4820348224
{
4820448225
"type": "array of strings",
48205-
"description": "<p>An array of user <code>login</code>s that will be removed.</p>",
48226+
"description": "<p><strong>Required</strong>. An array of user <code>login</code>s that will be removed.</p>",
4820648227
"items": {
4820748228
"type": "string"
4820848229
},
@@ -55007,7 +55028,7 @@
5500755028
"properties": {
5500855029
"name": {
5500955030
"type": "string",
55010-
"description": "<p><strong>Required</strong>. The name of the team.</p>",
55031+
"description": "<p>The name of the team.</p>",
5501155032
"name": "name",
5501255033
"in": "body",
5501355034
"rawType": "string",
@@ -55052,18 +55073,16 @@
5505255073
"childParamsGroups": []
5505355074
},
5505455075
"parent_team_id": {
55055-
"type": "integer",
55076+
"type": "integer or null",
5505655077
"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>",
55078+
"nullable": true,
5505755079
"name": "parent_team_id",
5505855080
"in": "body",
5505955081
"rawType": "integer",
5506055082
"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.",
5506155083
"childParamsGroups": []
5506255084
}
55063-
},
55064-
"required": [
55065-
"name"
55066-
]
55085+
}
5506755086
},
5506855087
"example": {
5506955088
"name": "new team name",
@@ -55095,7 +55114,7 @@
5509555114
"bodyParameters": [
5509655115
{
5509755116
"type": "string",
55098-
"description": "<p><strong>Required</strong>. The name of the team.</p>",
55117+
"description": "<p>The name of the team.</p>",
5509955118
"name": "name",
5510055119
"in": "body",
5510155120
"rawType": "string",
@@ -55140,8 +55159,9 @@
5514055159
"childParamsGroups": []
5514155160
},
5514255161
{
55143-
"type": "integer",
55162+
"type": "integer or null",
5514455163
"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>",
55164+
"nullable": true,
5514555165
"name": "parent_team_id",
5514655166
"in": "body",
5514755167
"rawType": "integer",
@@ -57916,7 +57936,8 @@
5791657936
"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.",
5791757937
"childParamsGroups": []
5791857938
}
57919-
}
57939+
},
57940+
"nullable": true
5792057941
}
5792157942
}
5792257943
}

0 commit comments

Comments
 (0)