Auth: fix swagger responses for the SSO settings API (#81639)

fix swagger responses for the sso settings API
This commit is contained in:
Mihai Doarna 2024-01-31 18:06:22 +02:00 committed by GitHub
parent 91b2909c39
commit 395a06ab86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 107 additions and 9 deletions

View File

@ -233,7 +233,11 @@ type UpdateProviderSettingsParams struct {
Provider string `json:"key"`
// in:body
// required:true
Body models.SSOSettings `json:"body"`
Body struct {
ID string `json:"id"`
Provider string `json:"provider"`
Settings map[string]any `json:"settings"`
} `json:"body"`
}
// swagger:parameters removeProviderSettings
@ -246,11 +250,21 @@ type RemoveProviderSettingsParams struct {
// swagger:response listSSOSettingsResponse
type ListSSOSettingsResponse struct {
// in: body
Body []models.SSOSettings `json:"body"`
Body []struct {
ID string `json:"id"`
Provider string `json:"provider"`
Settings map[string]any `json:"settings"`
Source string `json:"source"`
} `json:"body"`
}
// swagger:response getSSOSettingsResponse
type GetSSOSettingsResponse struct {
// in: body
Body models.SSOSettings `json:"body"`
Body struct {
ID string `json:"id"`
Provider string `json:"provider"`
Settings map[string]any `json:"settings"`
Source string `json:"source"`
} `json:"body"`
}

View File

@ -11475,7 +11475,19 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SSOSettings"
"type": "object",
"properties": {
"id": {
"type": "string"
},
"provider": {
"type": "string"
},
"settings": {
"type": "object",
"additionalProperties": false
}
}
}
}
],
@ -22991,7 +23003,22 @@
"getSSOSettingsResponse": {
"description": "(empty)",
"schema": {
"$ref": "#/definitions/SSOSettings"
"type": "object",
"properties": {
"id": {
"type": "string"
},
"provider": {
"type": "string"
},
"settings": {
"type": "object",
"additionalProperties": false
},
"source": {
"type": "string"
}
}
}
},
"getSharingOptionsResponse": {
@ -23177,7 +23204,22 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/SSOSettings"
"type": "object",
"properties": {
"id": {
"type": "string"
},
"provider": {
"type": "string"
},
"settings": {
"type": "object",
"additionalProperties": false
},
"source": {
"type": "string"
}
}
}
}
},

View File

@ -1173,7 +1173,22 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SSOSettings"
"properties": {
"id": {
"type": "string"
},
"provider": {
"type": "string"
},
"settings": {
"additionalProperties": false,
"type": "object"
},
"source": {
"type": "string"
}
},
"type": "object"
}
}
},
@ -1438,7 +1453,22 @@
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/SSOSettings"
"properties": {
"id": {
"type": "string"
},
"provider": {
"type": "string"
},
"settings": {
"additionalProperties": false,
"type": "object"
},
"source": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
@ -25205,7 +25235,19 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SSOSettings"
"properties": {
"id": {
"type": "string"
},
"provider": {
"type": "string"
},
"settings": {
"additionalProperties": false,
"type": "object"
}
},
"type": "object"
}
}
},