* Fix swagger generation targer using mac
Validate using the swagger binarry instead of the docker container
* API: Make swagger specification more consistent
Fix operation parameter ordering
// The totalCount field in the response can be used for pagination list E.g. if totalCount is equal to 100 teams and the perpage parameter is set to 10 then there are 10 pages of teams.
// in:query
// required:false
// default: 1000
PerPageint`json:"perpage"`
Namestring`json:"name"`
// If set it will return results where the query value is contained in the name field. Query values with spaces need to be URL encoded.
// required:false
Querystring`json:"query"`
}
// swagger:parameters createTeam
typeCreateTeamParamstruct{
typeCreateTeamParamsstruct{
// in:body
// required:true
Bodymodels.CreateTeamCommand`json:"body"`
}
// swagger:parameters updateTeam
typeUpdateTeamParamstruct{
typeUpdateTeamParamsstruct{
// in:body
// required:true
Bodymodels.UpdateTeamCommand`json:"body"`
// in:path
// required:true
TeamIDstring`json:"team_id"`
}
// swagger:parameters addTeamMemberTeam
typeAddTeamMemberParamstruct{
// swagger:parameters addTeamMember
typeAddTeamMemberParamsstruct{
// in:body
// required:true
Bodymodels.AddTeamMemberCommand`json:"body"`
// in:path
// required:true
TeamIDstring`json:"team_id"`
}
// swagger:parameters updateTeamMember
@ -154,6 +221,12 @@ type UpdateTeamMember struct {
"description":"A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to remove assignment.",
"description":"Lists the roles that have been directly assigned to a given user. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.\n\nYou need to have a permission with action `users.roles:list` and scope `users:id:\u003cuser ID\u003e`.",
"description":"Revoke a role from a user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:remove` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to unassign a role which will allow to do that. This is done to prevent escalation of privileges.",
"tags":["access_control","enterprise"],
"summary":"Remove a user role assignment.",
"operationId":"removeUserRole",
"parameters":[
{
"type":"string",
"name":"roleUID",
"in":"path",
"required":true
},
{
"type":"boolean",
"description":"A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to remove assignment.",
"name":"global",
"in":"query"
},
{
"type":"string",
"name":"roleUID",
"in":"path",
"required":true
},
{
"type":"integer",
"format":"int64",
"name":"user_id",
"name":"userId",
"in":"path",
"required":true
}
@ -1333,6 +1341,13 @@
"in":"path",
"required":true
},
{
"type":"integer",
"format":"int64",
"name":"user_id",
"in":"path",
"required":true
},
{
"name":"body",
"in":"body",
@ -1340,13 +1355,6 @@
"schema":{
"$ref":"#/definitions/UpdateUserQuotaCmd"
}
},
{
"type":"integer",
"format":"int64",
"name":"user_id",
"in":"path",
"required":true
}
],
"responses":{
@ -1569,14 +1577,8 @@
"description":"Updates an existing notification channel identified by uid.",
"summary":"Updates permissions for a folder. This operation will remove existing permissions if they’re not included in the request.",
"operationId":"updateFolderPermissions",
"parameters":[
{
"type":"string",
"name":"folder_uid",
"in":"path",
"required":true
},
{
"name":"Body",
"in":"body",
@ -4331,12 +4353,6 @@
"schema":{
"$ref":"#/definitions/UpdateDashboardAclCommand"
}
},
{
"type":"string",
"name":"folder_uid",
"in":"path",
"required":true
}
],
"responses":{
@ -4569,12 +4585,6 @@
"summary":"Update library element.",
"operationId":"updateLibraryElement",
"parameters":[
{
"type":"string",
"name":"library_element_uid",
"in":"path",
"required":true
},
{
"name":"body",
"in":"body",
@ -4582,6 +4592,12 @@
"schema":{
"$ref":"#/definitions/PatchLibraryElementCommand"
}
},
{
"type":"string",
"name":"library_element_uid",
"in":"path",
"required":true
}
],
"responses":{
@ -5588,6 +5604,14 @@
"summary":"Update user quota.",
"operationId":"updateOrgQuota",
"parameters":[
{
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/UpdateOrgQuotaCmd"
}
},
{
"type":"string",
"name":"quota_target",
@ -5600,14 +5624,6 @@
"name":"org_id",
"in":"path",
"required":true
},
{
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/UpdateOrgQuotaCmd"
}
}
],
"responses":{
@ -6572,13 +6588,6 @@
"summary":"Update a report.",
"operationId":"updateReport",
"parameters":[
{
"type":"integer",
"format":"int64",
"name":"reportID",
"in":"path",
"required":true
},
{
"name":"body",
"in":"body",
@ -6586,6 +6595,13 @@
"schema":{
"$ref":"#/definitions/CreateOrUpdateConfigCmd"
}
},
{
"type":"integer",
"format":"int64",
"name":"reportID",
"in":"path",
"required":true
}
],
"responses":{
@ -7135,14 +7151,14 @@
{
"type":"integer",
"format":"int64",
"name":"groupId",
"name":"teamId",
"in":"path",
"required":true
},
{
"type":"integer",
"format":"int64",
"name":"teamId",
"name":"groupId",
"in":"path",
"required":true
}
@ -7205,12 +7221,6 @@
"summary":"Update Team.",
"operationId":"updateTeam",
"parameters":[
{
"type":"string",
"name":"team_id",
"in":"path",
"required":true
},
{
"name":"body",
"in":"body",
@ -7218,6 +7228,12 @@
"schema":{
"$ref":"#/definitions/UpdateTeamCommand"
}
},
{
"type":"string",
"name":"team_id",
"in":"path",
"required":true
}
],
"responses":{
@ -7308,6 +7324,14 @@
"summary":"Add Team Member.",
"operationId":"addTeamMember",
"parameters":[
{
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/AddTeamMemberCommand"
}
},
{
"type":"string",
"name":"team_id",
@ -7340,12 +7364,6 @@
"summary":"Update Team Member.",
"operationId":"updateTeamMember",
"parameters":[
{
"type":"string",
"name":"team_id",
"in":"path",
"required":true
},
{
"name":"body",
"in":"body",
@ -7354,6 +7372,12 @@
"$ref":"#/definitions/UpdateTeamMemberCommand"
}
},
{
"type":"string",
"name":"team_id",
"in":"path",
"required":true
},
{
"type":"integer",
"format":"int64",
@ -7779,7 +7803,7 @@
"description":"Revokes the given auth token (device) for the actual user. User of issued auth token (device) will no longer be logged in and will be required to authenticate again upon next activity.",
"tags":["signed_in_user"],
"summary":"Revoke an auth token of the actual User.",
"operationId":"revokeSignedINAuthTokenCmd",
"operationId":"revokeSignedInAuthToken",
"parameters":[
{
"name":"body",
@ -8064,13 +8088,6 @@
"summary":"Update user.",
"operationId":"updateUser",
"parameters":[
{
"type":"integer",
"format":"int64",
"name":"user_id",
"in":"path",
"required":true
},
{
"description":"To change the email, name, login, theme, provide another one.",