API: Fix swagger specification (#50034)

* API: Fix swagger specification

* Validate specification after generation
This commit is contained in:
Sofia Papagiannaki
2022-06-02 10:49:52 +03:00
committed by GitHub
parent 1a50b0dbb7
commit 6112bd0c63
5 changed files with 43 additions and 26 deletions

View File

@@ -2258,6 +2258,15 @@
"tags": ["annotations"],
"summary": "Get Annotation by Id.",
"operationId": "getAnnotation",
"parameters": [
{
"type": "string",
"x-go-name": "AnnotationID",
"name": "annotation_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getAnnotationResponse"
@@ -3809,7 +3818,7 @@
}
}
},
"/datasources/{datasource_id}/disable-permissions": {
"/datasources/{datasourceId}/disable-permissions": {
"post": {
"description": "Disables permissions for the data source with the given id. All existing permissions will be removed and anyone will be able to query the data source.\n\nYou need to have a permission with action `datasources.permissions:toggle` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).",
"tags": ["datasource_permissions", "enterprise"],
@@ -3819,7 +3828,7 @@
{
"type": "string",
"x-go-name": "DatasourceID",
"name": "id",
"name": "datasourceId",
"in": "path",
"required": true
}
@@ -3846,7 +3855,7 @@
}
}
},
"/datasources/{datasource_id}/enable-permissions": {
"/datasources/{datasourceId}/enable-permissions": {
"post": {
"description": "Enables permissions for the data source with the given id.\nNo one except Org Admins will be able to query the data source until permissions have been added\nwhich permit certain users or teams to query the data source.\n\nYou need to have a permission with action `datasources.permissions:toggle` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).",
"tags": ["datasource_permissions", "enterprise"],
@@ -3856,7 +3865,7 @@
{
"type": "string",
"x-go-name": "DatasourceID",
"name": "id",
"name": "datasourceId",
"in": "path",
"required": true
}
@@ -3883,7 +3892,7 @@
}
}
},
"/datasources/{datasource_id}/permissions": {
"/datasources/{datasourceId}/permissions": {
"get": {
"description": "Gets all existing permissions for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:read` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).",
"tags": ["datasource_permissions", "enterprise"],
@@ -3893,7 +3902,7 @@
{
"type": "string",
"x-go-name": "DatasourceID",
"name": "id",
"name": "datasourceId",
"in": "path",
"required": true
}
@@ -3917,7 +3926,7 @@
}
}
},
"/datasources/{datasource_id}/permissions/{permissionId}": {
"/datasources/{datasourceId}/permissions/{permissionId}": {
"delete": {
"description": "Removes the permission with the given permissionId for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:delete` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).",
"tags": ["datasource_permissions", "enterprise"],
@@ -3926,15 +3935,15 @@
"parameters": [
{
"type": "string",
"x-go-name": "PermissionID",
"name": "permissionId",
"x-go-name": "DatasourceID",
"name": "datasourceId",
"in": "path",
"required": true
},
{
"type": "string",
"x-go-name": "DatasourceID",
"name": "id",
"x-go-name": "PermissionID",
"name": "permissionId",
"in": "path",
"required": true
}