|
1 | 1 | {
|
2 | 2 | "openapi": "3.0.3",
|
3 | 3 | "info": {
|
4 |
| - "version": "6.5.0", |
| 4 | + "version": "6.6.2", |
5 | 5 | "title": "GitHub's official OpenAPI spec + Octokit extension",
|
6 | 6 | "description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs",
|
7 | 7 | "license": { "name": "MIT", "url": "https://spdx.org/licenses/MIT" },
|
|
1239 | 1239 | "type": "string"
|
1240 | 1240 | }
|
1241 | 1241 | }
|
| 1242 | + }, |
| 1243 | + "examples": { |
| 1244 | + "default": { |
| 1245 | + "summary": "Create an authorization", |
| 1246 | + "value": { |
| 1247 | + "scopes": ["public_repo"], |
| 1248 | + "note": "optional note", |
| 1249 | + "note_url": "http://optional/note/url", |
| 1250 | + "client_id": "abcde12345fghij67890", |
| 1251 | + "client_secret": "3ef4ad510c59ad37bac6bb4f80047fb3aee3cc7f" |
| 1252 | + } |
| 1253 | + } |
1242 | 1254 | }
|
1243 | 1255 | }
|
1244 | 1256 | }
|
|
1289 | 1301 | "description": "API method documentation",
|
1290 | 1302 | "url": "https://docs.github.com/rest/reference/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app"
|
1291 | 1303 | },
|
1292 |
| - "parameters": [{ "$ref": "#/components/parameters/client-id" }], |
| 1304 | + "parameters": [{ "$ref": "#/components/parameters/oauth-client-id" }], |
1293 | 1305 | "requestBody": {
|
1294 | 1306 | "required": true,
|
1295 | 1307 | "content": {
|
|
1324 | 1336 | },
|
1325 | 1337 | "required": ["client_secret"],
|
1326 | 1338 | "type": "object"
|
| 1339 | + }, |
| 1340 | + "examples": { |
| 1341 | + "default": { |
| 1342 | + "summary": "Create an authorization for an app", |
| 1343 | + "value": { |
| 1344 | + "client_secret": "3ef4ad510c59ad37bac6bb4f80047fb3aee3cc7f", |
| 1345 | + "scopes": ["public_repo"], |
| 1346 | + "note": "optional note", |
| 1347 | + "note_url": "http://optional/note/url" |
| 1348 | + } |
| 1349 | + } |
1327 | 1350 | }
|
1328 | 1351 | }
|
1329 | 1352 | }
|
|
1393 | 1416 | "url": "https://docs.github.com/rest/reference/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app-and-fingerprint"
|
1394 | 1417 | },
|
1395 | 1418 | "parameters": [
|
1396 |
| - { "$ref": "#/components/parameters/client-id" }, |
| 1419 | + { "$ref": "#/components/parameters/oauth-client-id" }, |
1397 | 1420 | {
|
1398 | 1421 | "name": "fingerprint",
|
1399 | 1422 | "in": "path",
|
|
1431 | 1454 | },
|
1432 | 1455 | "required": ["client_secret"],
|
1433 | 1456 | "type": "object"
|
| 1457 | + }, |
| 1458 | + "examples": { |
| 1459 | + "default": { |
| 1460 | + "summary": "Create an authorization for an app and fingerprint", |
| 1461 | + "value": { |
| 1462 | + "client_secret": "3ef4ad510c59ad37bac6bb4f80047fb3aee3cc7f", |
| 1463 | + "scopes": ["public_repo"], |
| 1464 | + "note": "optional note", |
| 1465 | + "note_url": "http://optional/note/url" |
| 1466 | + } |
| 1467 | + } |
1434 | 1468 | }
|
1435 | 1469 | }
|
1436 | 1470 | }
|
|
10293 | 10327 | },
|
10294 | 10328 | "exclude": {
|
10295 | 10329 | "type": "array",
|
| 10330 | + "description": "Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `\"repositories\"`.", |
10296 | 10331 | "items": { "type": "string", "enum": ["repositories"] }
|
10297 | 10332 | }
|
10298 | 10333 | },
|
|
41698 | 41733 | },
|
41699 | 41734 | "required": ["repositories"],
|
41700 | 41735 | "type": "object"
|
| 41736 | + }, |
| 41737 | + "examples": { |
| 41738 | + "default": { |
| 41739 | + "value": { |
| 41740 | + "repositories": ["octocat/Hello-World"], |
| 41741 | + "lock_repositories": true |
| 41742 | + } |
| 41743 | + } |
41701 | 41744 | }
|
41702 | 41745 | }
|
41703 | 41746 | }
|
|
86319 | 86362 | "required": true,
|
86320 | 86363 | "schema": { "type": "string" }
|
86321 | 86364 | },
|
| 86365 | + "oauth-client-id": { |
| 86366 | + "name": "client_id", |
| 86367 | + "in": "path", |
| 86368 | + "required": true, |
| 86369 | + "description": "The client ID of the OAuth app.", |
| 86370 | + "schema": { "type": "string" }, |
| 86371 | + "examples": { "default": { "value": "abcde12345fghij67890" } } |
| 86372 | + }, |
86322 | 86373 | "authorization-id": {
|
86323 | 86374 | "name": "authorization_id",
|
86324 | 86375 | "description": "The unique identifier of the authorization.",
|
|
0 commit comments