Skip to content

Commit 2da43cc

Browse files
authored
Merge pull request #1675 from github/openapi-update-84f3535cb9f092ca240aea6b9b5f7478de268780201d2114c728fad9978ccb6b
Update OpenAPI 3.0 Descriptions
2 parents 1b11ba7 + a7478c9 commit 2da43cc

8 files changed

Lines changed: 970 additions & 14 deletions

File tree

descriptions/api.github.com/api.github.com.json

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10245,6 +10245,82 @@
1024510245
}
1024610246
},
1024710247
"/orgs/{org}/custom_roles/{role_id}": {
10248+
"get": {
10249+
"summary": "Get a custom role",
10250+
"description": "**Note**: This operation is in beta and is subject to change.\n\nGets a custom repository role that is available to all repositories owned by the organization.\n\nTo use this operation, the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope.\nGitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint.\n\nFor more information on custom repository roles, see \"[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization).\"",
10251+
"tags": [
10252+
"orgs"
10253+
],
10254+
"operationId": "orgs/get-custom-role",
10255+
"externalDocs": {
10256+
"description": "API method documentation",
10257+
"url": "https://docs.github.com/rest/reference/orgs/#get-a-custom-role"
10258+
},
10259+
"parameters": [
10260+
{
10261+
"$ref": "#/components/parameters/org"
10262+
},
10263+
{
10264+
"$ref": "#/components/parameters/role-id"
10265+
}
10266+
],
10267+
"responses": {
10268+
"200": {
10269+
"description": "Response",
10270+
"content": {
10271+
"application/json": {
10272+
"schema": {
10273+
"$ref": "#/components/schemas/organization-custom-repository-role"
10274+
},
10275+
"examples": {
10276+
"default": {
10277+
"value": {
10278+
"id": 8030,
10279+
"name": "Labeler",
10280+
"description": "A role for who can label issues and PRs",
10281+
"base_role": "read",
10282+
"permissions": [
10283+
"add_label"
10284+
],
10285+
"organization": {
10286+
"login": "github",
10287+
"id": 9919,
10288+
"node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",
10289+
"avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",
10290+
"gravatar_id": "",
10291+
"url": "https://api.github.com/users/github",
10292+
"html_url": "https://github.com/github",
10293+
"followers_url": "https://api.github.com/users/github/followers",
10294+
"following_url": "https://api.github.com/users/github/following{/other_user}",
10295+
"gists_url": "https://api.github.com/users/github/gists{/gist_id}",
10296+
"starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
10297+
"subscriptions_url": "https://api.github.com/users/github/subscriptions",
10298+
"organizations_url": "https://api.github.com/users/github/orgs",
10299+
"repos_url": "https://api.github.com/users/github/repos",
10300+
"events_url": "https://api.github.com/users/github/events{/privacy}",
10301+
"received_events_url": "https://api.github.com/users/github/received_events",
10302+
"type": "Organization",
10303+
"site_admin": false
10304+
},
10305+
"created_at": "2022-07-04T22:19:11Z",
10306+
"updated_at": "2022-07-04T22:19:11Z"
10307+
}
10308+
}
10309+
}
10310+
}
10311+
}
10312+
},
10313+
"404": {
10314+
"$ref": "#/components/responses/not_found"
10315+
}
10316+
},
10317+
"x-github": {
10318+
"githubCloudOnly": false,
10319+
"enabledForGitHubApps": true,
10320+
"category": "orgs",
10321+
"subcategory": "custom-roles"
10322+
}
10323+
},
1024810324
"patch": {
1024910325
"summary": "Update a custom role",
1025010326
"description": "**Note**: This operation is in beta and subject to change.\n\nUpdates a custom repository role that can be used by all repositories owned by the organization.\n\nTo use this endpoint the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope.\nGitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint.\n\nFor more information about custom repository roles, see \"[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization).\"",

descriptions/api.github.com/api.github.com.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7432,6 +7432,70 @@ paths:
74327432
category: orgs
74337433
subcategory: custom-roles
74347434
"/orgs/{org}/custom_roles/{role_id}":
7435+
get:
7436+
summary: Get a custom role
7437+
description: |-
7438+
**Note**: This operation is in beta and is subject to change.
7439+
7440+
Gets a custom repository role that is available to all repositories owned by the organization.
7441+
7442+
To use this operation, the authenticated user must be an administrator for the organization and must use an access token with `admin:org` scope.
7443+
GitHub Apps must have the `organization_custom_roles:write` organization permission to use this endpoint.
7444+
7445+
For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)."
7446+
tags:
7447+
- orgs
7448+
operationId: orgs/get-custom-role
7449+
externalDocs:
7450+
description: API method documentation
7451+
url: https://docs.github.com/rest/reference/orgs/#get-a-custom-role
7452+
parameters:
7453+
- "$ref": "#/components/parameters/org"
7454+
- "$ref": "#/components/parameters/role-id"
7455+
responses:
7456+
'200':
7457+
description: Response
7458+
content:
7459+
application/json:
7460+
schema:
7461+
"$ref": "#/components/schemas/organization-custom-repository-role"
7462+
examples:
7463+
default:
7464+
value:
7465+
id: 8030
7466+
name: Labeler
7467+
description: A role for who can label issues and PRs
7468+
base_role: read
7469+
permissions:
7470+
- add_label
7471+
organization:
7472+
login: github
7473+
id: 9919
7474+
node_id: MDEyOk9yZ2FuaXphdGlvbjk5MTk=
7475+
avatar_url: https://avatars.githubusercontent.com/u/9919?v=4
7476+
gravatar_id: ''
7477+
url: https://api.github.com/users/github
7478+
html_url: https://github.com/github
7479+
followers_url: https://api.github.com/users/github/followers
7480+
following_url: https://api.github.com/users/github/following{/other_user}
7481+
gists_url: https://api.github.com/users/github/gists{/gist_id}
7482+
starred_url: https://api.github.com/users/github/starred{/owner}{/repo}
7483+
subscriptions_url: https://api.github.com/users/github/subscriptions
7484+
organizations_url: https://api.github.com/users/github/orgs
7485+
repos_url: https://api.github.com/users/github/repos
7486+
events_url: https://api.github.com/users/github/events{/privacy}
7487+
received_events_url: https://api.github.com/users/github/received_events
7488+
type: Organization
7489+
site_admin: false
7490+
created_at: '2022-07-04T22:19:11Z'
7491+
updated_at: '2022-07-04T22:19:11Z'
7492+
'404':
7493+
"$ref": "#/components/responses/not_found"
7494+
x-github:
7495+
githubCloudOnly: false
7496+
enabledForGitHubApps: true
7497+
category: orgs
7498+
subcategory: custom-roles
74357499
patch:
74367500
summary: Update a custom role
74377501
description: |-

0 commit comments

Comments
 (0)