Chore: Use same JSON tag casing everywhere for parent UID (#61935)

Chore: Use same JSON tag casing everywhere for parent UID
This commit is contained in:
Sofia Papagiannaki 2023-01-24 10:20:28 +02:00 committed by GitHub
parent 3b73b16245
commit e5e8bb4dea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 72 additions and 87 deletions

View File

@ -31,5 +31,5 @@ type FolderSearchHit struct {
Uid string `json:"uid"`
Title string `json:"title"`
AccessControl accesscontrol.Metadata `json:"accessControl,omitempty"`
ParentUID string `json:"parent_uid,omitempty"`
ParentUID string `json:"parentUid,omitempty"`
}

View File

@ -39,7 +39,7 @@ func (hs *HTTPServer) GetFolders(c *models.ReqContext) response.Response {
OrgID: c.OrgID,
Limit: c.QueryInt64("limit"),
Page: c.QueryInt64("page"),
UID: c.Query("parent_uid"),
UID: c.Query("parentUid"),
SignedInUser: c.SignedInUser,
})
} else {
@ -340,7 +340,7 @@ type GetFoldersParams struct {
// The parent folder UID
// in:query
// required:false
ParentUID string `json:"parent_uid"`
ParentUID string `json:"parentUid"`
}
// swagger:parameters getFolderByUID

View File

@ -3058,7 +3058,7 @@
"tags": [
"provisioning"
],
"summary": "Updates an existing template.",
"summary": "Updates an existing notification template.",
"operationId": "RoutePutTemplate",
"parameters": [
{
@ -5240,7 +5240,7 @@
},
"/folders": {
"get": {
"description": "Returns all folders that the authenticated user has permission to view.\nIf nested folders are enabled, it expects an additional query parameter with the parent folder UID.",
"description": "Returns all folders that the authenticated user has permission to view.\nIf nested folders are enabled, it expects an additional query parameter with the parent folder UID\nand returns the immediate subfolders.",
"tags": [
"folders"
],
@ -5266,7 +5266,7 @@
{
"type": "string",
"description": "The parent folder UID",
"name": "parent_uid",
"name": "parentUid",
"in": "query"
}
],
@ -12218,9 +12218,6 @@
"hasAcl": {
"type": "boolean"
},
"hasPublicDashboard": {
"type": "boolean"
},
"isFolder": {
"type": "boolean"
},
@ -13179,7 +13176,7 @@
"type": "integer",
"format": "int64"
},
"parent_uid": {
"parentUid": {
"type": "string"
},
"title": {
@ -14447,34 +14444,6 @@
"$ref": "#/definitions/Matcher"
}
},
"NotificationTemplate": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"provenance": {
"$ref": "#/definitions/Provenance"
},
"template": {
"type": "string"
}
}
},
"NotificationTemplateContent": {
"type": "object",
"properties": {
"template": {
"type": "string"
}
}
},
"NotificationTemplates": {
"type": "array",
"items": {
"$ref": "#/definitions/NotificationTemplate"
}
},
"Metadata": {
"description": "Metadata contains user accesses for a given resource\nEx: map[string]bool{\"create\":true, \"delete\": true}",
"type": "object",
@ -14647,6 +14616,34 @@
"format": "int64",
"title": "NoticeSeverity is a type for the Severity property of a Notice."
},
"NotificationTemplate": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"provenance": {
"$ref": "#/definitions/Provenance"
},
"template": {
"type": "string"
}
}
},
"NotificationTemplateContent": {
"type": "object",
"properties": {
"template": {
"type": "string"
}
}
},
"NotificationTemplates": {
"type": "array",
"items": {
"$ref": "#/definitions/NotificationTemplate"
}
},
"NotificationTestCommand": {
"type": "object",
"properties": {
@ -18578,7 +18575,6 @@
}
},
"alertGroups": {
"description": "AlertGroups alert groups",
"type": "array",
"items": {
"$ref": "#/definitions/alertGroup"
@ -18739,14 +18735,12 @@
}
},
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"type": "array",
"items": {
"$ref": "#/definitions/gettableAlert"
}
},
"gettableSilence": {
"description": "GettableSilence gettable silence",
"type": "object",
"required": [
"comment",
@ -18795,7 +18789,6 @@
}
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"type": "array",
"items": {
"$ref": "#/definitions/gettableSilence"
@ -18982,6 +18975,7 @@
}
},
"receiver": {
"description": "Receiver receiver",
"type": "object",
"required": [
"active",

View File

@ -4568,7 +4568,7 @@
},
"/folders": {
"get": {
"description": "Returns all folders that the authenticated user has permission to view.\nIf nested folders are enabled, it expects an additional query parameter with the parent folder UID.",
"description": "Returns all folders that the authenticated user has permission to view.\nIf nested folders are enabled, it expects an additional query parameter with the parent folder UID\nand returns the immediate subfolders.",
"tags": [
"folders"
],
@ -4594,7 +4594,7 @@
{
"type": "string",
"description": "The parent folder UID",
"name": "parent_uid",
"name": "parentUid",
"in": "query"
}
],
@ -11159,9 +11159,6 @@
"hasAcl": {
"type": "boolean"
},
"hasPublicDashboard": {
"type": "boolean"
},
"isFolder": {
"type": "boolean"
},
@ -11919,7 +11916,7 @@
"type": "integer",
"format": "int64"
},
"parent_uid": {
"parentUid": {
"type": "string"
},
"title": {

View File

@ -3534,9 +3534,6 @@
"hasAcl": {
"type": "boolean"
},
"hasPublicDashboard": {
"type": "boolean"
},
"isFolder": {
"type": "boolean"
},
@ -4495,7 +4492,7 @@
"format": "int64",
"type": "integer"
},
"parent_uid": {
"parentUid": {
"type": "string"
},
"title": {
@ -5764,34 +5761,6 @@
},
"type": "array"
},
"NotificationTemplate": {
"properties": {
"name": {
"type": "string"
},
"provenance": {
"$ref": "#/components/schemas/Provenance"
},
"template": {
"type": "string"
}
},
"type": "object"
},
"NotificationTemplateContent": {
"properties": {
"template": {
"type": "string"
}
},
"type": "object"
},
"NotificationTemplates": {
"items": {
"$ref": "#/components/schemas/NotificationTemplate"
},
"type": "array"
},
"Metadata": {
"additionalProperties": {
"type": "boolean"
@ -5964,6 +5933,34 @@
"title": "NoticeSeverity is a type for the Severity property of a Notice.",
"type": "integer"
},
"NotificationTemplate": {
"properties": {
"name": {
"type": "string"
},
"provenance": {
"$ref": "#/components/schemas/Provenance"
},
"template": {
"type": "string"
}
},
"type": "object"
},
"NotificationTemplateContent": {
"properties": {
"template": {
"type": "string"
}
},
"type": "object"
},
"NotificationTemplates": {
"items": {
"$ref": "#/components/schemas/NotificationTemplate"
},
"type": "array"
},
"NotificationTestCommand": {
"properties": {
"disableResolveMessage": {
@ -9893,7 +9890,6 @@
"type": "object"
},
"alertGroups": {
"description": "AlertGroups alert groups",
"items": {
"$ref": "#/components/schemas/alertGroup"
},
@ -10054,14 +10050,12 @@
"type": "object"
},
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"items": {
"$ref": "#/components/schemas/gettableAlert"
},
"type": "array"
},
"gettableSilence": {
"description": "GettableSilence gettable silence",
"properties": {
"comment": {
"description": "comment",
@ -10110,7 +10104,6 @@
"type": "object"
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"items": {
"$ref": "#/components/schemas/gettableSilence"
},
@ -10297,6 +10290,7 @@
"type": "object"
},
"receiver": {
"description": "Receiver receiver",
"properties": {
"active": {
"description": "active",
@ -13835,7 +13829,7 @@
"description": "ValidationError"
}
},
"summary": "Updates an existing template.",
"summary": "Updates an existing notification template.",
"tags": [
"provisioning"
]
@ -16131,7 +16125,7 @@
},
"/folders": {
"get": {
"description": "Returns all folders that the authenticated user has permission to view.\nIf nested folders are enabled, it expects an additional query parameter with the parent folder UID.",
"description": "Returns all folders that the authenticated user has permission to view.\nIf nested folders are enabled, it expects an additional query parameter with the parent folder UID\nand returns the immediate subfolders.",
"operationId": "getFolders",
"parameters": [
{
@ -16157,7 +16151,7 @@
{
"description": "The parent folder UID",
"in": "query",
"name": "parent_uid",
"name": "parentUid",
"schema": {
"type": "string"
}