correct enum for User-Source in api doc (#562)

This commit is contained in:
Christoph Haas
2025-11-13 19:42:43 +01:00
parent de91506bfa
commit 80dc7f290a
4 changed files with 8 additions and 2 deletions

View File

@@ -512,6 +512,8 @@ definitions:
description: The source of the user. This field is optional. description: The source of the user. This field is optional.
enum: enum:
- db - db
- ldap
- oauth
example: db example: db
type: string type: string
required: required:

View File

@@ -2216,7 +2216,9 @@
"description": "The source of the user. This field is optional.", "description": "The source of the user. This field is optional.",
"type": "string", "type": "string",
"enum": [ "enum": [
"db" "db",
"ldap",
"oauth"
], ],
"example": "db" "example": "db"
} }

View File

@@ -561,6 +561,8 @@ definitions:
description: The source of the user. This field is optional. description: The source of the user. This field is optional.
enum: enum:
- db - db
- ldap
- oauth
example: db example: db
type: string type: string
required: required:

View File

@@ -13,7 +13,7 @@ type User struct {
// The email address of the user. This field is optional. // The email address of the user. This field is optional.
Email string `json:"Email" binding:"omitempty,email" example:"test@test.com"` Email string `json:"Email" binding:"omitempty,email" example:"test@test.com"`
// The source of the user. This field is optional. // The source of the user. This field is optional.
Source string `json:"Source" binding:"oneof=db" example:"db"` Source string `json:"Source" binding:"oneof=db ldap oauth" example:"db"`
// The name of the authentication provider. This field is read-only. // The name of the authentication provider. This field is read-only.
ProviderName string `json:"ProviderName,omitempty" readonly:"true" example:""` ProviderName string `json:"ProviderName,omitempty" readonly:"true" example:""`
// If this field is set, the user is an admin. // If this field is set, the user is an admin.