From 63f5ce49562e7c1732480e519d2e29f95269d336 Mon Sep 17 00:00:00 2001 From: github-openapi-bot <69533958+github-openapi-bot@users.noreply.github.com> Date: Wed, 3 Nov 2021 12:42:05 -0400 Subject: [PATCH] Update OpenAPI Descriptions (#22553) * Update OpenAPI Descriptions * Add decorated OpenAPI schema files Co-authored-by: github-openapi-bot Co-authored-by: jmarlena <6732600+jmarlena@users.noreply.github.com> --- lib/rest/static/decorated/api.github.com.json | 85 +++------ lib/rest/static/decorated/github.ae.json | 72 ++------ .../dereferenced/api.github.com.deref.json | 166 +++++++++++++----- .../static/dereferenced/ghes-3.0.deref.json | 11 ++ .../static/dereferenced/ghes-3.1.deref.json | 31 +++- .../static/dereferenced/ghes-3.2.deref.json | 31 +++- .../static/dereferenced/github.ae.deref.json | 23 +-- 7 files changed, 243 insertions(+), 176 deletions(-) diff --git a/lib/rest/static/decorated/api.github.com.json b/lib/rest/static/decorated/api.github.com.json index a66d28709d1e..77a70b83c961 100644 --- a/lib/rest/static/decorated/api.github.com.json +++ b/lib/rest/static/decorated/api.github.com.json @@ -48658,7 +48658,7 @@ } ], "summary": "Delete a code scanning analysis from a repository", - "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` and `repo:security_events` scopes.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `analysis_key`\n* `environment`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set\n(see the example default response below).\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin the set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find the deletable analysis for one of the sets,\nstep through deleting the analyses in that set,\nand then repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", + "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` and `repo:security_events` scopes.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `analysis_key`\n* `environment`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\n`next_analysis_url` and `confirm_delete_url`.\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", "operationId": "code-scanning/delete-analysis", "tags": [ "code-scanning" @@ -48677,7 +48677,7 @@ "categoryLabel": "Code scanning", "notes": [], "bodyParameters": [], - "descriptionHTML": "

Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the repo scope. For public repositories,\nyou must use an access token with public_repo and repo:security_events scopes.\nGitHub Apps must have the security_events write permission to use this endpoint.

\n

You can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.

\n

When you list the analyses for a repository,\none or more will be identified as deletable in the response:

\n
\"deletable\": true\n
\n

An analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:

\n\n

If you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:

\n
Analysis specified is not deletable.\n
\n

The response from a successful DELETE operation provides you with\ntwo alternative URLs for deleting the next analysis in the set\n(see the example default response below).\nUse the next_analysis_url URL if you want to avoid accidentally deleting the final analysis\nin the set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the confirm_delete_url URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set the value of next_analysis_url and confirm_delete_url\nin the 200 response is null.

\n

As an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find the deletable analysis for one of the sets,\nstep through deleting the analyses in that set,\nand then repeat the process for the second set.\nThe procedure therefore consists of a nested loop:

\n

Outer loop:

\n\n

The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the confirm_delete_url value. Alternatively, you could use the next_analysis_url value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.

", + "descriptionHTML": "

Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the repo scope. For public repositories,\nyou must use an access token with public_repo and repo:security_events scopes.\nGitHub Apps must have the security_events write permission to use this endpoint.

\n

You can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.

\n

When you list the analyses for a repository,\none or more will be identified as deletable in the response:

\n
\"deletable\": true\n
\n

An analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:

\n\n

If you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:

\n
Analysis specified is not deletable.\n
\n

The response from a successful DELETE operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\nnext_analysis_url and confirm_delete_url.\nUse the next_analysis_url URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the confirm_delete_url URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of next_analysis_url and confirm_delete_url\nin the 200 response is null.

\n

As an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:

\n

Outer loop:

\n\n

The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the confirm_delete_url value. Alternatively, you could use the next_analysis_url value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.

", "responses": [ { "httpStatusCode": "200", @@ -79686,13 +79686,13 @@ "x-codeSamples": [ { "lang": "Shell", - "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \\\n -d '{\"schemas\":[\"schemas\"],\"Operations\":[{\"op\":\"op\",\"path\":\"path\",\"value\":\"value\"}]}'", - "html": "
curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \\\n  -d '{\"schemas\":[\"schemas\"],\"Operations\":[{\"op\":\"op\",\"path\":\"path\",\"value\":\"value\"}]}'
" + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \\\n -d '{\"schemas\":[\"schemas\"],\"Operations\":[{\"op\":\"op\",\"path\":\"path\",\"value\":\"any\"}]}'", + "html": "
curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \\\n  -d '{\"schemas\":[\"schemas\"],\"Operations\":[{\"op\":\"op\",\"path\":\"path\",\"value\":\"any\"}]}'
" }, { "lang": "JavaScript", - "source": "await octokit.request('PATCH /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n enterprise: 'enterprise',\n scim_group_id: 'scim_group_id',\n schemas: [\n 'schemas'\n ],\n Operations: [\n {\n op: 'op',\n path: 'path',\n value: 'value'\n }\n ]\n})", - "html": "
await octokit.request('PATCH /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n  enterprise: 'enterprise',\n  scim_group_id: 'scim_group_id',\n  schemas: [\n    'schemas'\n  ],\n  Operations: [\n    {\n      op: 'op',\n      path: 'path',\n      value: 'value'\n    }\n  ]\n})\n
" + "source": "await octokit.request('PATCH /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n enterprise: 'enterprise',\n scim_group_id: 'scim_group_id',\n schemas: [\n 'schemas'\n ],\n Operations: [\n {\n op: 'op',\n path: 'path',\n value: 'any'\n }\n ]\n})", + "html": "
await octokit.request('PATCH /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n  enterprise: 'enterprise',\n  scim_group_id: 'scim_group_id',\n  schemas: [\n    'schemas'\n  ],\n  Operations: [\n    {\n      op: 'op',\n      path: 'path',\n      value: 'any'\n    }\n  ]\n})\n
" } ], "summary": "Update an attribute for a SCIM enterprise group", @@ -79756,21 +79756,11 @@ "childParamsGroups": [] }, "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object" - }, - { - "type": "array" - } - ], + "description": "

Can be any value - string, number, array or object.

", "name": "value", "in": "body", - "type": "string or object or array", - "description": "", + "rawDescription": "Can be any value - string, number, array or object.", + "type": "", "childParamsGroups": [] } }, @@ -79813,21 +79803,11 @@ "childParamsGroups": [] }, { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object" - }, - { - "type": "array" - } - ], + "description": "

Can be any value - string, number, array or object.

", "name": "value", "in": "body", - "type": "string or object or array", - "description": "", + "rawDescription": "Can be any value - string, number, array or object.", + "type": "", "childParamsGroups": [] } ] @@ -79926,21 +79906,11 @@ "childParamsGroups": [] }, "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object" - }, - { - "type": "array" - } - ], + "description": "

Can be any value - string, number, array or object.

", "name": "value", "in": "body", - "type": "string or object or array", - "description": "", + "rawDescription": "Can be any value - string, number, array or object.", + "type": "", "childParamsGroups": [] } }, @@ -79983,21 +79953,11 @@ "childParamsGroups": [] }, { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object" - }, - { - "type": "array" - } - ], + "description": "

Can be any value - string, number, array or object.

", "name": "value", "in": "body", - "type": "string or object or array", - "description": "", + "rawDescription": "Can be any value - string, number, array or object.", + "type": "", "childParamsGroups": [] } ] @@ -88678,6 +88638,15 @@ "default": 1 }, "descriptionHTML": "

Page number of the results to fetch.

" + }, + { + "name": "repository_id", + "description": "ID of the Repository to filter on", + "in": "query", + "schema": { + "type": "integer" + }, + "descriptionHTML": "

ID of the Repository to filter on

" } ], "x-codeSamples": [ diff --git a/lib/rest/static/decorated/github.ae.json b/lib/rest/static/decorated/github.ae.json index 2f1c80890799..8ed82c3fb683 100644 --- a/lib/rest/static/decorated/github.ae.json +++ b/lib/rest/static/decorated/github.ae.json @@ -67003,13 +67003,13 @@ "x-codeSamples": [ { "lang": "Shell", - "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://{hostname}/api/v3/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \\\n -d '{\"schemas\":[\"schemas\"],\"Operations\":[{\"op\":\"op\",\"path\":\"path\",\"value\":\"value\"}]}'", - "html": "
curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://{hostname}/api/v3/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \\\n  -d '{\"schemas\":[\"schemas\"],\"Operations\":[{\"op\":\"op\",\"path\":\"path\",\"value\":\"value\"}]}'
" + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://{hostname}/api/v3/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \\\n -d '{\"schemas\":[\"schemas\"],\"Operations\":[{\"op\":\"op\",\"path\":\"path\",\"value\":\"any\"}]}'", + "html": "
curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://{hostname}/api/v3/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \\\n  -d '{\"schemas\":[\"schemas\"],\"Operations\":[{\"op\":\"op\",\"path\":\"path\",\"value\":\"any\"}]}'
" }, { "lang": "JavaScript", - "source": "await octokit.request('PATCH /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n enterprise: 'enterprise',\n scim_group_id: 'scim_group_id',\n schemas: [\n 'schemas'\n ],\n Operations: [\n {\n op: 'op',\n path: 'path',\n value: 'value'\n }\n ]\n})", - "html": "
await octokit.request('PATCH /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n  enterprise: 'enterprise',\n  scim_group_id: 'scim_group_id',\n  schemas: [\n    'schemas'\n  ],\n  Operations: [\n    {\n      op: 'op',\n      path: 'path',\n      value: 'value'\n    }\n  ]\n})\n
" + "source": "await octokit.request('PATCH /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n enterprise: 'enterprise',\n scim_group_id: 'scim_group_id',\n schemas: [\n 'schemas'\n ],\n Operations: [\n {\n op: 'op',\n path: 'path',\n value: 'any'\n }\n ]\n})", + "html": "
await octokit.request('PATCH /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}', {\n  enterprise: 'enterprise',\n  scim_group_id: 'scim_group_id',\n  schemas: [\n    'schemas'\n  ],\n  Operations: [\n    {\n      op: 'op',\n      path: 'path',\n      value: 'any'\n    }\n  ]\n})\n
" } ], "summary": "Update an attribute for a SCIM enterprise group", @@ -67073,21 +67073,11 @@ "childParamsGroups": [] }, "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object" - }, - { - "type": "array" - } - ], + "description": "

Can be any value - string, number, array or object.

", "name": "value", "in": "body", - "type": "string or object or array", - "description": "", + "rawDescription": "Can be any value - string, number, array or object.", + "type": "", "childParamsGroups": [] } }, @@ -67130,21 +67120,11 @@ "childParamsGroups": [] }, { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object" - }, - { - "type": "array" - } - ], + "description": "

Can be any value - string, number, array or object.

", "name": "value", "in": "body", - "type": "string or object or array", - "description": "", + "rawDescription": "Can be any value - string, number, array or object.", + "type": "", "childParamsGroups": [] } ] @@ -67243,21 +67223,11 @@ "childParamsGroups": [] }, "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object" - }, - { - "type": "array" - } - ], + "description": "

Can be any value - string, number, array or object.

", "name": "value", "in": "body", - "type": "string or object or array", - "description": "", + "rawDescription": "Can be any value - string, number, array or object.", + "type": "", "childParamsGroups": [] } }, @@ -67300,21 +67270,11 @@ "childParamsGroups": [] }, { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object" - }, - { - "type": "array" - } - ], + "description": "

Can be any value - string, number, array or object.

", "name": "value", "in": "body", - "type": "string or object or array", - "description": "", + "rawDescription": "Can be any value - string, number, array or object.", + "type": "", "childParamsGroups": [] } ] diff --git a/lib/rest/static/dereferenced/api.github.com.deref.json b/lib/rest/static/dereferenced/api.github.com.deref.json index 2b4f5e546ced..78911b73f939 100644 --- a/lib/rest/static/dereferenced/api.github.com.deref.json +++ b/lib/rest/static/dereferenced/api.github.com.deref.json @@ -21932,10 +21932,16 @@ "type": "string" }, "config": { - "type": "array" + "type": "array", + "items": { + "type": "object" + } }, "config_was": { - "type": "array" + "type": "array", + "items": { + "type": "object" + } }, "content_type": { "type": "string" @@ -21955,10 +21961,16 @@ "type": "string" }, "events": { - "type": "array" + "type": "array", + "items": { + "type": "object" + } }, "events_were": { - "type": "array" + "type": "array", + "items": { + "type": "object" + } }, "explanation": { "type": "string" @@ -62121,10 +62133,16 @@ "type": "string" }, "config": { - "type": "array" + "type": "array", + "items": { + "type": "object" + } }, "config_was": { - "type": "array" + "type": "array", + "items": { + "type": "object" + } }, "content_type": { "type": "string" @@ -62144,10 +62162,16 @@ "type": "string" }, "events": { - "type": "array" + "type": "array", + "items": { + "type": "object" + } }, "events_were": { - "type": "array" + "type": "array", + "items": { + "type": "object" + } }, "explanation": { "type": "string" @@ -87721,7 +87745,10 @@ "title": "Container Metadata", "properties": { "tags": { - "type": "array" + "type": "array", + "items": { + "type": "string" + } } }, "required": [ @@ -87733,7 +87760,10 @@ "title": "Docker Metadata", "properties": { "tag": { - "type": "array" + "type": "array", + "items": { + "type": "string" + } } }, "required": [ @@ -88008,7 +88038,10 @@ "title": "Container Metadata", "properties": { "tags": { - "type": "array" + "type": "array", + "items": { + "type": "string" + } } }, "required": [ @@ -88020,7 +88053,10 @@ "title": "Docker Metadata", "properties": { "tag": { - "type": "array" + "type": "array", + "items": { + "type": "string" + } } }, "required": [ @@ -164020,6 +164056,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -164981,6 +165018,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -166196,6 +166234,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -177121,6 +177160,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -180428,7 +180468,7 @@ }, "delete": { "summary": "Delete a code scanning analysis from a repository", - "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` and `repo:security_events` scopes.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `analysis_key`\n* `environment`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set\n(see the example default response below).\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin the set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find the deletable analysis for one of the sets,\nstep through deleting the analyses in that set,\nand then repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", + "description": "Deletes a specified code scanning analysis from a repository. For\nprivate repositories, you must use an access token with the `repo` scope. For public repositories,\nyou must use an access token with `public_repo` and `repo:security_events` scopes.\nGitHub Apps must have the `security_events` write permission to use this endpoint.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository will have multiple sets of analyses\nfor each enabled code scanning tool,\nwhere a set is determined by a unique combination of analysis values:\n\n* `ref`\n* `tool`\n* `analysis_key`\n* `environment`\n\nIf you attempt to delete an analysis that is not the most recent in a set,\nyou'll get a 400 response with the message:\n\n```\nAnalysis specified is not deletable.\n```\n\nThe response from a successful `DELETE` operation provides you with\ntwo alternative URLs for deleting the next analysis in the set:\n`next_analysis_url` and `confirm_delete_url`.\nUse the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis\nin a set. This is a useful option if you want to preserve at least one analysis\nfor the specified tool in your repository.\nUse the `confirm_delete_url` URL if you are content to remove all analyses for a tool.\nWhen you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`\nin the 200 response is `null`.\n\nAs an example of the deletion process,\nlet's imagine that you added a workflow that configured a particular code scanning tool\nto analyze the code in a repository. This tool has added 15 analyses:\n10 on the default branch, and another 5 on a topic branch.\nYou therefore have two separate sets of analyses for this tool.\nYou've now decided that you want to remove all of the analyses for the tool.\nTo do this you must make 15 separate deletion requests.\nTo start, you must find an analysis that's identified as deletable.\nEach set of analyses always has one that's identified as deletable.\nHaving found the deletable analysis for one of the two sets,\ndelete this analysis and then continue deleting the next analysis in the set until they're all deleted.\nThen repeat the process for the second set.\nThe procedure therefore consists of a nested loop:\n\n**Outer loop**:\n* List the analyses for the repository, filtered by tool.\n* Parse this list to find a deletable analysis. If found:\n\n **Inner loop**:\n * Delete the identified analysis.\n * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.\n\nThe above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.", "operationId": "code-scanning/delete-analysis", "tags": [ "code-scanning" @@ -183029,7 +183069,8 @@ "storage_in_bytes", "memory_in_bytes", "cpus" - ] + ], + "nullable": true }, "created_at": { "type": "string", @@ -185303,7 +185344,8 @@ "storage_in_bytes", "memory_in_bytes", "cpus" - ] + ], + "nullable": true }, "created_at": { "type": "string", @@ -198643,6 +198685,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -294324,6 +294367,9 @@ }, "domains": { "type": "array", + "items": { + "type": "string" + }, "description": "Array of the domain set and its alternate name (if it is configured)", "example": [ "example.com", @@ -294602,6 +294648,9 @@ }, "domains": { "type": "array", + "items": { + "type": "string" + }, "description": "Array of the domain set and its alternate name (if it is configured)", "example": [ "example.com", @@ -316721,7 +316770,8 @@ "storage_in_bytes", "memory_in_bytes", "cpus" - ] + ], + "nullable": true }, "created_at": { "type": "string", @@ -318995,7 +319045,8 @@ "storage_in_bytes", "memory_in_bytes", "cpus" - ] + ], + "nullable": true }, "created_at": { "type": "string", @@ -352714,17 +352765,7 @@ "type": "string" }, "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object" - }, - { - "type": "array" - } - ] + "description": "Can be any value - string, number, array or object." } }, "required": [ @@ -381215,6 +381256,14 @@ "type": "integer", "default": 1 } + }, + { + "name": "repository_id", + "description": "ID of the Repository to filter on", + "in": "query", + "schema": { + "type": "integer" + } } ], "responses": { @@ -383203,7 +383252,8 @@ "storage_in_bytes", "memory_in_bytes", "cpus" - ] + ], + "nullable": true }, "created_at": { "type": "string", @@ -385981,7 +386031,8 @@ "storage_in_bytes", "memory_in_bytes", "cpus" - ] + ], + "nullable": true }, "created_at": { "type": "string", @@ -388255,7 +388306,8 @@ "storage_in_bytes", "memory_in_bytes", "cpus" - ] + ], + "nullable": true }, "created_at": { "type": "string", @@ -393906,7 +393958,8 @@ "storage_in_bytes", "memory_in_bytes", "cpus" - ] + ], + "nullable": true }, "created_at": { "type": "string", @@ -396337,7 +396390,8 @@ "storage_in_bytes", "memory_in_bytes", "cpus" - ] + ], + "nullable": true }, "created_at": { "type": "string", @@ -399102,7 +399156,8 @@ "storage_in_bytes", "memory_in_bytes", "cpus" - ] + ], + "nullable": true }, "created_at": { "type": "string", @@ -401628,7 +401683,8 @@ "storage_in_bytes", "memory_in_bytes", "cpus" - ] + ], + "nullable": true }, "created_at": { "type": "string", @@ -425098,7 +425154,10 @@ "title": "Container Metadata", "properties": { "tags": { - "type": "array" + "type": "array", + "items": { + "type": "string" + } } }, "required": [ @@ -425110,7 +425169,10 @@ "title": "Docker Metadata", "properties": { "tag": { - "type": "array" + "type": "array", + "items": { + "type": "string" + } } }, "required": [ @@ -425387,7 +425449,10 @@ "title": "Container Metadata", "properties": { "tags": { - "type": "array" + "type": "array", + "items": { + "type": "string" + } } }, "required": [ @@ -425399,7 +425464,10 @@ "title": "Docker Metadata", "properties": { "tag": { - "type": "array" + "type": "array", + "items": { + "type": "string" + } } }, "required": [ @@ -454265,7 +454333,10 @@ "title": "Container Metadata", "properties": { "tags": { - "type": "array" + "type": "array", + "items": { + "type": "string" + } } }, "required": [ @@ -454277,7 +454348,10 @@ "title": "Docker Metadata", "properties": { "tag": { - "type": "array" + "type": "array", + "items": { + "type": "string" + } } }, "required": [ @@ -454569,7 +454643,10 @@ "title": "Container Metadata", "properties": { "tags": { - "type": "array" + "type": "array", + "items": { + "type": "string" + } } }, "required": [ @@ -454581,7 +454658,10 @@ "title": "Docker Metadata", "properties": { "tag": { - "type": "array" + "type": "array", + "items": { + "type": "string" + } } }, "required": [ diff --git a/lib/rest/static/dereferenced/ghes-3.0.deref.json b/lib/rest/static/dereferenced/ghes-3.0.deref.json index dd49e32f64a0..f3d578001e1a 100644 --- a/lib/rest/static/dereferenced/ghes-3.0.deref.json +++ b/lib/rest/static/dereferenced/ghes-3.0.deref.json @@ -140959,6 +140959,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -141920,6 +141921,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -143135,6 +143137,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -153856,6 +153859,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -169344,6 +169348,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -259710,6 +259715,9 @@ }, "domains": { "type": "array", + "items": { + "type": "string" + }, "description": "Array of the domain set and its alternate name (if it is configured)", "example": [ "example.com", @@ -259988,6 +259996,9 @@ }, "domains": { "type": "array", + "items": { + "type": "string" + }, "description": "Array of the domain set and its alternate name (if it is configured)", "example": [ "example.com", diff --git a/lib/rest/static/dereferenced/ghes-3.1.deref.json b/lib/rest/static/dereferenced/ghes-3.1.deref.json index 8f6edf095cff..00ddce852ecc 100644 --- a/lib/rest/static/dereferenced/ghes-3.1.deref.json +++ b/lib/rest/static/dereferenced/ghes-3.1.deref.json @@ -66259,10 +66259,16 @@ "type": "string" }, "config": { - "type": "array" + "type": "array", + "items": { + "type": "object" + } }, "config_was": { - "type": "array" + "type": "array", + "items": { + "type": "object" + } }, "content_type": { "type": "string" @@ -66282,10 +66288,16 @@ "type": "string" }, "events": { - "type": "array" + "type": "array", + "items": { + "type": "object" + } }, "events_were": { - "type": "array" + "type": "array", + "items": { + "type": "object" + } }, "explanation": { "type": "string" @@ -142875,6 +142887,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -143836,6 +143849,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -145051,6 +145065,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -155772,6 +155787,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -172337,6 +172353,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -262703,6 +262720,9 @@ }, "domains": { "type": "array", + "items": { + "type": "string" + }, "description": "Array of the domain set and its alternate name (if it is configured)", "example": [ "example.com", @@ -262981,6 +263001,9 @@ }, "domains": { "type": "array", + "items": { + "type": "string" + }, "description": "Array of the domain set and its alternate name (if it is configured)", "example": [ "example.com", diff --git a/lib/rest/static/dereferenced/ghes-3.2.deref.json b/lib/rest/static/dereferenced/ghes-3.2.deref.json index 4d87e895b9d8..81e10fdd66c7 100644 --- a/lib/rest/static/dereferenced/ghes-3.2.deref.json +++ b/lib/rest/static/dereferenced/ghes-3.2.deref.json @@ -67299,10 +67299,16 @@ "type": "string" }, "config": { - "type": "array" + "type": "array", + "items": { + "type": "object" + } }, "config_was": { - "type": "array" + "type": "array", + "items": { + "type": "object" + } }, "content_type": { "type": "string" @@ -67322,10 +67328,16 @@ "type": "string" }, "events": { - "type": "array" + "type": "array", + "items": { + "type": "object" + } }, "events_were": { - "type": "array" + "type": "array", + "items": { + "type": "object" + } }, "explanation": { "type": "string" @@ -146492,6 +146504,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -147453,6 +147466,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -148668,6 +148682,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -159437,6 +159452,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -176053,6 +176069,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -269452,6 +269469,9 @@ }, "domains": { "type": "array", + "items": { + "type": "string" + }, "description": "Array of the domain set and its alternate name (if it is configured)", "example": [ "example.com", @@ -269730,6 +269750,9 @@ }, "domains": { "type": "array", + "items": { + "type": "string" + }, "description": "Array of the domain set and its alternate name (if it is configured)", "example": [ "example.com", diff --git a/lib/rest/static/dereferenced/github.ae.deref.json b/lib/rest/static/dereferenced/github.ae.deref.json index a3f18643bec1..d214b318892f 100644 --- a/lib/rest/static/dereferenced/github.ae.deref.json +++ b/lib/rest/static/dereferenced/github.ae.deref.json @@ -115991,6 +115991,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -116952,6 +116953,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -118167,6 +118169,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -129076,6 +129079,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -145397,6 +145401,7 @@ "nullable": true }, "pull_requests": { + "type": "array", "items": { "title": "Pull Request Minimal", "type": "object", @@ -236774,6 +236779,9 @@ }, "domains": { "type": "array", + "items": { + "type": "string" + }, "description": "Array of the domain set and its alternate name (if it is configured)", "example": [ "example.com", @@ -237052,6 +237060,9 @@ }, "domains": { "type": "array", + "items": { + "type": "string" + }, "description": "Array of the domain set and its alternate name (if it is configured)", "example": [ "example.com", @@ -286695,17 +286706,7 @@ "type": "string" }, "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object" - }, - { - "type": "array" - } - ] + "description": "Can be any value - string, number, array or object." } }, "required": [