Skip to content

Commit d4826cf

Browse files
authored
feat: add type annotations with examples and annotations about strings' formats, where available (and other improvements) (#202)
1 parent ee0b684 commit d4826cf

File tree

18 files changed

+47287
-12395
lines changed

18 files changed

+47287
-12395
lines changed

cache/api.github.jpy.wang.json

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"openapi": "3.0.3",
33
"info": {
4-
"version": "6.5.0",
4+
"version": "6.6.2",
55
"title": "GitHub's official OpenAPI spec + Octokit extension",
66
"description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs",
77
"license": { "name": "MIT", "url": "https://spdx.org/licenses/MIT" },
@@ -1239,6 +1239,18 @@
12391239
"type": "string"
12401240
}
12411241
}
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+
}
12421254
}
12431255
}
12441256
}
@@ -1289,7 +1301,7 @@
12891301
"description": "API method documentation",
12901302
"url": "https://docs.github.com/rest/reference/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app"
12911303
},
1292-
"parameters": [{ "$ref": "#/components/parameters/client-id" }],
1304+
"parameters": [{ "$ref": "#/components/parameters/oauth-client-id" }],
12931305
"requestBody": {
12941306
"required": true,
12951307
"content": {
@@ -1324,6 +1336,17 @@
13241336
},
13251337
"required": ["client_secret"],
13261338
"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+
}
13271350
}
13281351
}
13291352
}
@@ -1393,7 +1416,7 @@
13931416
"url": "https://docs.github.com/rest/reference/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app-and-fingerprint"
13941417
},
13951418
"parameters": [
1396-
{ "$ref": "#/components/parameters/client-id" },
1419+
{ "$ref": "#/components/parameters/oauth-client-id" },
13971420
{
13981421
"name": "fingerprint",
13991422
"in": "path",
@@ -1431,6 +1454,17 @@
14311454
},
14321455
"required": ["client_secret"],
14331456
"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+
}
14341468
}
14351469
}
14361470
}
@@ -10293,6 +10327,7 @@
1029310327
},
1029410328
"exclude": {
1029510329
"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\"`.",
1029610331
"items": { "type": "string", "enum": ["repositories"] }
1029710332
}
1029810333
},
@@ -41698,6 +41733,14 @@
4169841733
},
4169941734
"required": ["repositories"],
4170041735
"type": "object"
41736+
},
41737+
"examples": {
41738+
"default": {
41739+
"value": {
41740+
"repositories": ["octocat/Hello-World"],
41741+
"lock_repositories": true
41742+
}
41743+
}
4170141744
}
4170241745
}
4170341746
}
@@ -86319,6 +86362,14 @@
8631986362
"required": true,
8632086363
"schema": { "type": "string" }
8632186364
},
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+
},
8632286373
"authorization-id": {
8632386374
"name": "authorization_id",
8632486375
"description": "The unique identifier of the authorization.",

0 commit comments

Comments
 (0)