Swagger: Rename API Key AddCommand (#78491)

As a global definition, `AddAPIKeyCommand` is clearer
This commit is contained in:
Julien Duchesne 2023-11-21 11:25:21 -05:00 committed by GitHub
parent 5b9097e7ff
commit 5acb981680
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 6 deletions

View File

@ -32,7 +32,7 @@ type APIKey struct {
func (k APIKey) TableName() string { return "api_key" }
// swagger:model
// swagger:model AddAPIKeyCommand
type AddCommand struct {
Name string `json:"name" binding:"Required"`
Role org.RoleType `json:"role" binding:"Required"`

View File

@ -1891,7 +1891,7 @@
}
}
},
"AddCommand": {
"AddAPIKeyCommand": {
"type": "object",
"properties": {
"name": {
@ -3528,6 +3528,7 @@
"format": "int64"
},
"folderId": {
"description": "Deprecated: use FolderUID instead",
"type": "integer",
"format": "int64"
},
@ -4340,6 +4341,7 @@
"type": "boolean"
},
"id": {
"description": "Deprecated: use Uid instead",
"type": "integer",
"format": "int64"
},

View File

@ -3420,7 +3420,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AddCommand"
"$ref": "#/definitions/AddAPIKeyCommand"
}
}
],
@ -10938,7 +10938,7 @@
}
}
},
"AddCommand": {
"AddAPIKeyCommand": {
"type": "object",
"properties": {
"name": {

View File

@ -1977,7 +1977,7 @@
},
"type": "object"
},
"AddCommand": {
"AddAPIKeyCommand": {
"properties": {
"name": {
"type": "string"
@ -15818,7 +15818,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AddCommand"
"$ref": "#/components/schemas/AddAPIKeyCommand"
}
}
},