mirror of
https://github.com/openziti/zrok.git
synced 2025-08-11 00:44:11 +02:00
added 'uniqueName' to the share request in the api spec (#123)
This commit is contained in:
@ -56,6 +56,9 @@ type ShareRequest struct {
|
||||
// share mode
|
||||
// Enum: [public private]
|
||||
ShareMode string `json:"shareMode,omitempty"`
|
||||
|
||||
// unique name
|
||||
UniqueName string `json:"uniqueName,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this share request
|
||||
@ -267,6 +270,11 @@ func (m *ShareRequest) contextValidateAuthUsers(ctx context.Context, formats str
|
||||
for i := 0; i < len(m.AuthUsers); i++ {
|
||||
|
||||
if m.AuthUsers[i] != nil {
|
||||
|
||||
if swag.IsZero(m.AuthUsers[i]) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := m.AuthUsers[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("authUsers" + "." + strconv.Itoa(i))
|
||||
|
Reference in New Issue
Block a user