mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Fix Swagger and OpenAPI specifications (#61669)
* Add go-swagger annotations for route * Re-generate Swagger and OpenAPI specs
This commit is contained in:
committed by
GitHub
parent
b80c9bb974
commit
4b634fadcf
@@ -548,6 +548,13 @@ type RemoveOrgUserParams struct {
|
|||||||
UserID int64 `json:"user_id"`
|
UserID int64 `json:"user_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// swagger:parameters searchOrgUsers
|
||||||
|
type SearchOrgUsersParams struct {
|
||||||
|
// in:path
|
||||||
|
// required:true
|
||||||
|
OrgID int64 `json:"org_id"`
|
||||||
|
}
|
||||||
|
|
||||||
// swagger:response getOrgUsersForCurrentOrgLookupResponse
|
// swagger:response getOrgUsersForCurrentOrgLookupResponse
|
||||||
type GetOrgUsersForCurrentOrgLookupResponse struct {
|
type GetOrgUsersForCurrentOrgLookupResponse struct {
|
||||||
// The response message
|
// The response message
|
||||||
@@ -564,7 +571,14 @@ type GetOrgUsersForCurrentOrgResponse struct {
|
|||||||
|
|
||||||
// swagger:response getOrgUsersResponse
|
// swagger:response getOrgUsersResponse
|
||||||
type GetOrgUsersResponse struct {
|
type GetOrgUsersResponse struct {
|
||||||
// The response message
|
// The response message/
|
||||||
// in: body
|
// in: body
|
||||||
Body []*org.OrgUserDTO `json:"body"`
|
Body []*org.OrgUserDTO `json:"body"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// swagger:response searchOrgUsersResponse
|
||||||
|
type SearchOrgUsersResponse struct {
|
||||||
|
// The response message
|
||||||
|
// in: body
|
||||||
|
Body *org.SearchOrgUsersQueryResult `json:"body"`
|
||||||
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
3269
public/api-spec.json
3269
public/api-spec.json
File diff suppressed because it is too large
Load Diff
@@ -942,7 +942,7 @@
|
|||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/components/schemas/PlaylistItem"
|
"$ref": "#/components/schemas/Item"
|
||||||
},
|
},
|
||||||
"type": "array"
|
"type": "array"
|
||||||
}
|
}
|
||||||
@@ -1587,6 +1587,16 @@
|
|||||||
},
|
},
|
||||||
"description": "(empty)"
|
"description": "(empty)"
|
||||||
},
|
},
|
||||||
|
"searchOrgUsersResponse": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/SearchOrgUsersQueryResult"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "(empty)"
|
||||||
|
},
|
||||||
"searchOrgsResponse": {
|
"searchOrgsResponse": {
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
@@ -2648,6 +2658,60 @@
|
|||||||
"title": "Authorization contains HTTP authorization credentials.",
|
"title": "Authorization contains HTTP authorization credentials.",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"BacktestConfig": {
|
||||||
|
"properties": {
|
||||||
|
"annotations": {
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"condition": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/AlertQuery"
|
||||||
|
},
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
"for": {
|
||||||
|
"$ref": "#/components/schemas/Duration"
|
||||||
|
},
|
||||||
|
"from": {
|
||||||
|
"format": "date-time",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"interval": {
|
||||||
|
"$ref": "#/components/schemas/Duration"
|
||||||
|
},
|
||||||
|
"labels": {
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"no_data_state": {
|
||||||
|
"enum": [
|
||||||
|
"Alerting",
|
||||||
|
"NoData",
|
||||||
|
"OK"
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"format": "date-time",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"BacktestResult": {
|
||||||
|
"$ref": "#/components/schemas/Frame"
|
||||||
|
},
|
||||||
"BasicAuth": {
|
"BasicAuth": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"password": {
|
"password": {
|
||||||
@@ -3662,8 +3726,8 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"createdBy": {
|
"createdBy": {
|
||||||
"description": "Since we get created by with left join user table, this can be null technically,\nbut in reality it will always be set, when database is not corrupted.",
|
"format": "int64",
|
||||||
"type": "string"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"dashboardId": {
|
"dashboardId": {
|
||||||
"format": "int64",
|
"format": "int64",
|
||||||
@@ -3672,6 +3736,9 @@
|
|||||||
"dashboardUid": {
|
"dashboardUid": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"data": {
|
||||||
|
"$ref": "#/components/schemas/Json"
|
||||||
|
},
|
||||||
"id": {
|
"id": {
|
||||||
"format": "int64",
|
"format": "int64",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
@@ -3695,7 +3762,7 @@
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"DashboardVersionMeta": {
|
"DashboardVersionMeta": {
|
||||||
"description": "DashboardVersionMeta extends the dashboard version model with the names\nassociated with the UserIds, overriding the field with the same name from\nthe DashboardVersion model.",
|
"description": "DashboardVersionMeta extends the DashboardVersionDTO with the names\nassociated with the UserIds, overriding the field with the same name from\nthe DashboardVersionDTO model.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"created": {
|
"created": {
|
||||||
"format": "date-time",
|
"format": "date-time",
|
||||||
@@ -3972,6 +4039,7 @@
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"DataTopic": {
|
"DataTopic": {
|
||||||
|
"description": "nolint:revive",
|
||||||
"title": "DataTopic is used to identify which topic the frame should be assigned to.",
|
"title": "DataTopic is used to identify which topic the frame should be assigned to.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@@ -5247,6 +5315,23 @@
|
|||||||
"title": "InspectType is a type for the Inspect property of a Notice.",
|
"title": "InspectType is a type for the Inspect property of a Notice.",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"Item": {
|
||||||
|
"properties": {
|
||||||
|
"title": {
|
||||||
|
"description": "Title is an unused property -- it will be removed in the future",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"$ref": "#/components/schemas/ItemType"
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"description": "Value depends on type and describes the playlist item.\n\ndashboard_by_id: The value is an internal numerical identifier set by Grafana. This\nis not portable as the numerical identifier is non-deterministic between different instances.\nWill be replaced by dashboard_by_uid in the future. (deprecated)\ndashboard_by_tag: The value is a tag which is set on any number of dashboards. All\ndashboards behind the tag will be added to the playlist.\ndashboard_by_uid: The value is the dashboard UID",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"title": "Item defines model for Item.",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"ItemDTO": {
|
"ItemDTO": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"alertId": {
|
"alertId": {
|
||||||
@@ -5321,6 +5406,10 @@
|
|||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"ItemType": {
|
||||||
|
"title": "Type of the item.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"Json": {
|
"Json": {
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
@@ -6070,6 +6159,12 @@
|
|||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"authLabels": {
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
"avatarUrl": {
|
"avatarUrl": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@@ -6195,6 +6290,9 @@
|
|||||||
},
|
},
|
||||||
"PatchAnnotationsCmd": {
|
"PatchAnnotationsCmd": {
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"$ref": "#/components/schemas/Json"
|
||||||
|
},
|
||||||
"id": {
|
"id": {
|
||||||
"format": "int64",
|
"format": "int64",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
@@ -6411,25 +6509,30 @@
|
|||||||
},
|
},
|
||||||
"PlaylistItem": {
|
"PlaylistItem": {
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"Id": {
|
||||||
|
"format": "int64",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"PlaylistId": {
|
||||||
|
"format": "int64",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"order": {
|
||||||
|
"format": "int64",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"description": "Title is an unused property -- it will be removed in the future",
|
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"type": {
|
"type": {
|
||||||
"$ref": "#/components/schemas/PlaylistItemType"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"value": {
|
"value": {
|
||||||
"description": "Value depends on type and describes the playlist item.\n\ndashboard_by_id: The value is an internal numerical identifier set by Grafana. This\nis not portable as the numerical identifier is non-deterministic between different instances.\nWill be replaced by dashboard_by_uid in the future. (deprecated)\ndashboard_by_tag: The value is a tag which is set on any number of dashboards. All\ndashboards behind the tag will be added to the playlist.\ndashboard_by_uid: The value is the dashboard UID",
|
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"title": "PlaylistItem defines model for playlist.Item.",
|
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"PlaylistItemType": {
|
|
||||||
"title": "Type of the item.",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"Playlists": {
|
"Playlists": {
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/components/schemas/Playlist"
|
"$ref": "#/components/schemas/Playlist"
|
||||||
@@ -7868,6 +7971,29 @@
|
|||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"SearchOrgUsersQueryResult": {
|
||||||
|
"properties": {
|
||||||
|
"orgUsers": {
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/OrgUserDTO"
|
||||||
|
},
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
"page": {
|
||||||
|
"format": "int64",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"perPage": {
|
||||||
|
"format": "int64",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"totalCount": {
|
||||||
|
"format": "int64",
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"SearchTeamQueryResult": {
|
"SearchTeamQueryResult": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"page": {
|
"page": {
|
||||||
@@ -9034,6 +9160,9 @@
|
|||||||
},
|
},
|
||||||
"UpdateAnnotationsCmd": {
|
"UpdateAnnotationsCmd": {
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"$ref": "#/components/schemas/Json"
|
||||||
|
},
|
||||||
"id": {
|
"id": {
|
||||||
"format": "int64",
|
"format": "int64",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
@@ -9356,7 +9485,7 @@
|
|||||||
"Email": {
|
"Email": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"Id": {
|
"ID": {
|
||||||
"format": "int64",
|
"format": "int64",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
@@ -17890,6 +18019,46 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/orgs/{org_id}/users/search": {
|
||||||
|
"get": {
|
||||||
|
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:read` with scope `users:*`.",
|
||||||
|
"operationId": "searchOrgUsers",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "path",
|
||||||
|
"name": "org_id",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"format": "int64",
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"$ref": "#/components/responses/searchOrgUsersResponse"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"$ref": "#/components/responses/unauthorisedError"
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"$ref": "#/components/responses/forbiddenError"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"$ref": "#/components/responses/internalServerError"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"basic": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"summary": "Search Users in Organization.",
|
||||||
|
"tags": [
|
||||||
|
"orgs"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/orgs/{org_id}/users/{user_id}": {
|
"/orgs/{org_id}/users/{user_id}": {
|
||||||
"delete": {
|
"delete": {
|
||||||
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:remove` with scope `users:*`.",
|
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:remove` with scope `users:*`.",
|
||||||
|
|||||||
Reference in New Issue
Block a user