mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 08:18:10 -05:00
Swagger: Rename annotations model (#77605)
Currently, in the schema, it's a global definition called `ItemDTO`. It's hard to figure out what that is Renaming it to `Annotation` should be more helpful
This commit is contained in:
@@ -87,6 +87,7 @@ func (i Item) TableName() string {
|
||||
return "annotation"
|
||||
}
|
||||
|
||||
// swagger:model Annotation
|
||||
type ItemDTO struct {
|
||||
ID int64 `json:"id" xorm:"id"`
|
||||
AlertID int64 `json:"alertId" xorm:"alert_id"`
|
||||
|
||||
+81
-105
@@ -2621,6 +2621,80 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Annotation": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"alertId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"alertName": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatarUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"created": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"dashboardId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"dashboardUID": {
|
||||
"type": "string"
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/definitions/Json"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"login": {
|
||||
"type": "string"
|
||||
},
|
||||
"newState": {
|
||||
"type": "string"
|
||||
},
|
||||
"panelId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"prevState": {
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"time": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"timeEnd": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"updated": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"userId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"AnnotationActions": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3460,7 +3534,7 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"folderId": {
|
||||
"description": "ID of the folder where the library element is stored.",
|
||||
"description": "ID of the folder where the library element is stored.\n\nDeprecated: use FolderUID instead",
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
@@ -5034,80 +5108,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"ItemDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"alertId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"alertName": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatarUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"created": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"dashboardId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"dashboardUID": {
|
||||
"type": "string"
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/definitions/Json"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"login": {
|
||||
"type": "string"
|
||||
},
|
||||
"newState": {
|
||||
"type": "string"
|
||||
},
|
||||
"panelId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"prevState": {
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"time": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"timeEnd": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"updated": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"userId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"JSONWebKey": {
|
||||
"type": "object",
|
||||
"title": "JSONWebKey represents a public or private key in JWK format.",
|
||||
@@ -7480,28 +7480,6 @@
|
||||
"$ref": "#/definitions/Transformation"
|
||||
}
|
||||
},
|
||||
"TrimDashboardCommand": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"dashboard": {
|
||||
"$ref": "#/definitions/Json"
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/definitions/Json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"TrimDashboardFullWithMeta": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"dashboard": {
|
||||
"$ref": "#/definitions/Json"
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/definitions/Json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Type": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -8686,7 +8664,7 @@
|
||||
"getAnnotationByIDResponse": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ItemDTO"
|
||||
"$ref": "#/definitions/Annotation"
|
||||
}
|
||||
},
|
||||
"getAnnotationTagsResponse": {
|
||||
@@ -8700,7 +8678,7 @@
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/ItemDTO"
|
||||
"$ref": "#/definitions/Annotation"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -9316,6 +9294,10 @@
|
||||
"url"
|
||||
],
|
||||
"properties": {
|
||||
"folderUid": {
|
||||
"description": "FolderUID The unique identifier (uid) of the folder the dashboard belongs to.",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "ID The unique identifier (id) of the created/updated dashboard.",
|
||||
"type": "integer",
|
||||
@@ -9483,12 +9465,6 @@
|
||||
"$ref": "#/definitions/AlertTestResult"
|
||||
}
|
||||
},
|
||||
"trimDashboardResponse": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/TrimDashboardFullWithMeta"
|
||||
}
|
||||
},
|
||||
"unauthorisedError": {
|
||||
"description": "UnauthorizedError is returned when the request is not authenticated.",
|
||||
"schema": {
|
||||
|
||||
+76
-104
@@ -12027,6 +12027,80 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Annotation": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"alertId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"alertName": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatarUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"created": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"dashboardId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"dashboardUID": {
|
||||
"type": "string"
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/definitions/Json"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"login": {
|
||||
"type": "string"
|
||||
},
|
||||
"newState": {
|
||||
"type": "string"
|
||||
},
|
||||
"panelId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"prevState": {
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"time": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"timeEnd": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"updated": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"userId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"AnnotationActions": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -15478,80 +15552,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"ItemDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"alertId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"alertName": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatarUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"created": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"dashboardId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"dashboardUID": {
|
||||
"type": "string"
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/definitions/Json"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"login": {
|
||||
"type": "string"
|
||||
},
|
||||
"newState": {
|
||||
"type": "string"
|
||||
},
|
||||
"panelId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"prevState": {
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"time": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"timeEnd": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"updated": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"userId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"JSONWebKey": {
|
||||
"type": "object",
|
||||
"title": "JSONWebKey represents a public or private key in JWK format.",
|
||||
@@ -19843,28 +19843,6 @@
|
||||
"$ref": "#/definitions/Transformation"
|
||||
}
|
||||
},
|
||||
"TrimDashboardCommand": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"dashboard": {
|
||||
"$ref": "#/definitions/Json"
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/definitions/Json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"TrimDashboardFullWithMeta": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"dashboard": {
|
||||
"$ref": "#/definitions/Json"
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/definitions/Json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Type": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -21796,7 +21774,7 @@
|
||||
"getAnnotationByIDResponse": {
|
||||
"description": "(empty)",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ItemDTO"
|
||||
"$ref": "#/definitions/Annotation"
|
||||
}
|
||||
},
|
||||
"getAnnotationTagsResponse": {
|
||||
@@ -21810,7 +21788,7 @@
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/ItemDTO"
|
||||
"$ref": "#/definitions/Annotation"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -22606,12 +22584,6 @@
|
||||
"$ref": "#/definitions/AlertTestResult"
|
||||
}
|
||||
},
|
||||
"trimDashboardResponse": {
|
||||
"description": "(empty)",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/TrimDashboardFullWithMeta"
|
||||
}
|
||||
},
|
||||
"unauthorisedError": {
|
||||
"description": "UnauthorizedError is returned when the request is not authenticated.",
|
||||
"schema": {
|
||||
|
||||
+76
-108
@@ -674,7 +674,7 @@
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ItemDTO"
|
||||
"$ref": "#/components/schemas/Annotation"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -695,7 +695,7 @@
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ItemDTO"
|
||||
"$ref": "#/components/schemas/Annotation"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
@@ -1855,16 +1855,6 @@
|
||||
},
|
||||
"description": "(empty)"
|
||||
},
|
||||
"trimDashboardResponse": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/TrimDashboardFullWithMeta"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "(empty)"
|
||||
},
|
||||
"unauthorisedError": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
@@ -2951,6 +2941,80 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"Annotation": {
|
||||
"properties": {
|
||||
"alertId": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"alertName": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatarUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"created": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"dashboardId": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"dashboardUID": {
|
||||
"type": "string"
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/Json"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"login": {
|
||||
"type": "string"
|
||||
},
|
||||
"newState": {
|
||||
"type": "string"
|
||||
},
|
||||
"panelId": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"prevState": {
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"time": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"timeEnd": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"updated": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"userId": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"AnnotationActions": {
|
||||
"properties": {
|
||||
"canAdd": {
|
||||
@@ -6402,80 +6466,6 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"ItemDTO": {
|
||||
"properties": {
|
||||
"alertId": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"alertName": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatarUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"created": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"dashboardId": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"dashboardUID": {
|
||||
"type": "string"
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/Json"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"login": {
|
||||
"type": "string"
|
||||
},
|
||||
"newState": {
|
||||
"type": "string"
|
||||
},
|
||||
"panelId": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"prevState": {
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"time": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"timeEnd": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"updated": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"userId": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"JSONWebKey": {
|
||||
"properties": {
|
||||
"Algorithm": {
|
||||
@@ -10765,28 +10755,6 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"TrimDashboardCommand": {
|
||||
"properties": {
|
||||
"dashboard": {
|
||||
"$ref": "#/components/schemas/Json"
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/components/schemas/Json"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"TrimDashboardFullWithMeta": {
|
||||
"properties": {
|
||||
"dashboard": {
|
||||
"$ref": "#/components/schemas/Json"
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/components/schemas/Json"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"Type": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user