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
3 changed files with 107 additions and 9 deletions
+17 -3
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"`
}