Skip to content

Update OpenAPI Descriptions #561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 88 additions & 10 deletions descriptions/api.github.com/api.github.com.json
Original file line number Diff line number Diff line change
Expand Up @@ -19536,9 +19536,11 @@
"previews": [

],
"deprecationDate": "2021-09-14",
"category": "actions",
"subcategory": "workflow-runs"
}
},
"deprecated": true
}
},
"/repos/{owner}/{repo}/actions/runs/{run_id}/retry": {
Expand Down Expand Up @@ -25414,7 +25416,7 @@
"properties": {
"permission": {
"type": "string",
"description": "The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of: \n\\* `pull` - can pull, but not push to or administer this repository. \n\\* `push` - can pull and push, but not administer this repository. \n\\* `admin` - can pull, push and administer this repository. \n\\* `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions. \n\\* `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access.",
"description": "The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of: \n\\* `pull` - can pull, but not push to or administer this repository. \n\\* `push` - can pull and push, but not administer this repository. \n\\* `admin` - can pull, push and administer this repository. \n\\* `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions. \n\\* `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access. \n\\* custom repository role name - Can assign a custom repository role if the owning organization has defined any.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@imwiss the description addition says that permission can be set to a custom role name

custom repository role name - Can assign a custom repository role if the owning organization has defined any.

But the property has an enum that does not permit custom values. It only permits

  • pull
  • push
  • admin
  • maintain
  • triage

I'll file an issue, but wanted to add the comment in context

"enum": [
"pull",
"push",
Expand Down Expand Up @@ -34176,20 +34178,12 @@
},
"410": {
"$ref": "#/components/responses/gone"
},
"415": {
"$ref": "#/components/responses/preview_header_missing"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"previews": [
{
"required": true,
"name": "mockingbird",
"note": "The API to get issue timeline events is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-23-timeline-preview-api/) for full details. To access the API you must provide a custom [media type](https://docs.github.com/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.mockingbird-preview\n```"
},
{
"required": false,
"name": "starfox",
Expand Down Expand Up @@ -34831,6 +34825,79 @@
}
}
},
"/repos/{owner}/{repo}/lfs": {
"put": {
"summary": "Enable Git LFS for a repository",
"description": "**Note:** The Git LFS API endpoints are currently in beta and are subject to change.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@imwiss We would usually add a required preview header for an endpoint like this. For SDK users there is currently no telling that {DELETE,PUT} /repos/{owner}/{repo}/lfs is subjected to change. Should we add a flag to x-github?

"operationId": "repos/enable-lfs-for-repo",
"tags": [
"repos"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"202": {
"$ref": "#/components/responses/accepted"
},
"403": {
"description": "We will return a 403 with one of the following messages:\n\n- Git LFS support not enabled because Git LFS is globally disabled.\n- Git LFS support not enabled because Git LFS is disabled for the root repository in the network.\n- Git LFS support not enabled because Git LFS is disabled for <owner>."
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"previews": [

],
"category": "repos",
"subcategory": "lfs"
}
},
"delete": {
"summary": "Disable Git LFS for a repository",
"description": "**Note:** The Git LFS API endpoints are currently in beta and are subject to change.",
"operationId": "repos/disable-lfs-for-repo",
"tags": [
"repos"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"previews": [

],
"category": "repos",
"subcategory": "lfs"
}
}
},
"/repos/{owner}/{repo}/license": {
"get": {
"summary": "Get the license for a repository",
Expand Down Expand Up @@ -63704,6 +63771,11 @@
"description": "The auto incrementing run number for the workflow run.",
"example": 106
},
"run_attempt": {
"type": "integer",
"description": "Attempt number of the run, 1 for first attempt and higher if the workflow was retried.",
"example": 1
},
"event": {
"type": "string",
"example": "push"
Expand Down Expand Up @@ -63777,6 +63849,12 @@
"type": "string",
"example": "https://github.com/api/repos/github/hello-world/actions/runs/5/rerun"
},
"previous_attempt_url": {
"nullable": true,
"description": "The URL to the previous attempted run of this workflow, if one exists.",
"type": "string",
"example": "https://github.com/api/repos/github/hello-world/actions/runs/5/attempts/3"
},
"workflow_url": {
"description": "The URL to the workflow.",
"type": "string",
Expand Down
78 changes: 68 additions & 10 deletions descriptions/api.github.com/api.github.com.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13906,8 +13906,10 @@ paths:
githubCloudOnly: false
enabledForGitHubApps: false
previews: []
deprecationDate: '2021-09-14'
category: actions
subcategory: workflow-runs
deprecated: true
"/repos/{owner}/{repo}/actions/runs/{run_id}/retry":
post:
summary: Retry a workflow
Expand Down Expand Up @@ -18249,7 +18251,9 @@ paths:
\ \n\\* `maintain` - Recommended for project managers who need
to manage the repository without access to sensitive or destructive
actions. \n\\* `triage` - Recommended for contributors who need
to proactively manage issues and pull requests without write access."
to proactively manage issues and pull requests without write access.
\n\\* custom repository role name - Can assign a custom repository
role if the owning organization has defined any."
enum:
- pull
- push
Expand Down Expand Up @@ -24633,19 +24637,10 @@ paths:
"$ref": "#/components/responses/not_found"
'410':
"$ref": "#/components/responses/gone"
'415':
"$ref": "#/components/responses/preview_header_missing"
x-github:
githubCloudOnly: false
enabledForGitHubApps: true
previews:
- required: true
name: mockingbird
note: |-
The API to get issue timeline events is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-23-timeline-preview-api/) for full details. To access the API you must provide a custom [media type](https://docs.github.com/rest/overview/media-types) in the `Accept` header:
```shell
application/vnd.github.mockingbird-preview
```
- required: false
name: starfox
note: |-
Expand Down Expand Up @@ -25062,6 +25057,58 @@ paths:
previews: []
category: repos
subcategory:
"/repos/{owner}/{repo}/lfs":
put:
summary: Enable Git LFS for a repository
description: "**Note:** The Git LFS API endpoints are currently in beta and
are subject to change."
operationId: repos/enable-lfs-for-repo
tags:
- repos
externalDocs:
description: API method documentation
url: https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository
parameters:
- "$ref": "#/components/parameters/owner"
- "$ref": "#/components/parameters/repo"
responses:
'202':
"$ref": "#/components/responses/accepted"
'403':
description: |-
We will return a 403 with one of the following messages:

- Git LFS support not enabled because Git LFS is globally disabled.
- Git LFS support not enabled because Git LFS is disabled for the root repository in the network.
- Git LFS support not enabled because Git LFS is disabled for <owner>.
x-github:
githubCloudOnly: false
enabledForGitHubApps: false
previews: []
category: repos
subcategory: lfs
delete:
summary: Disable Git LFS for a repository
description: "**Note:** The Git LFS API endpoints are currently in beta and
are subject to change."
operationId: repos/disable-lfs-for-repo
tags:
- repos
externalDocs:
description: API method documentation
url: https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository
parameters:
- "$ref": "#/components/parameters/owner"
- "$ref": "#/components/parameters/repo"
responses:
'204':
description: Response
x-github:
githubCloudOnly: false
enabledForGitHubApps: false
previews: []
category: repos
subcategory: lfs
"/repos/{owner}/{repo}/license":
get:
summary: Get the license for a repository
Expand Down Expand Up @@ -46340,6 +46387,11 @@ components:
type: integer
description: The auto incrementing run number for the workflow run.
example: 106
run_attempt:
type: integer
description: Attempt number of the run, 1 for first attempt and higher if
the workflow was retried.
example: 1
event:
type: string
example: push
Expand Down Expand Up @@ -46397,6 +46449,12 @@ components:
description: The URL to rerun the workflow run.
type: string
example: https://github.com/api/repos/github/hello-world/actions/runs/5/rerun
previous_attempt_url:
nullable: true
description: The URL to the previous attempted run of this workflow, if
one exists.
type: string
example: https://github.com/api/repos/github/hello-world/actions/runs/5/attempts/3
workflow_url:
description: The URL to the workflow.
type: string
Expand Down
Loading