upgrade swagger version to v0.27.0 (#798)

This commit is contained in:
Harshavardhana
2021-06-08 12:35:39 -07:00
committed by GitHub
parent 6f0df68200
commit 6791631904
400 changed files with 5257 additions and 1128 deletions

View File

@@ -23,6 +23,7 @@ package models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
@@ -38,7 +39,6 @@ type NotificationDeleteRequest struct {
// filter specific type of event. Defaults to all event (default: '[put,delete,get]')
// Required: true
// Min Length: 1
Events []NotificationEventType `json:"events"`
// filter event associated to the specified prefix
@@ -110,6 +110,36 @@ func (m *NotificationDeleteRequest) validateSuffix(formats strfmt.Registry) erro
return nil
}
// ContextValidate validate this notification delete request based on the context it is used
func (m *NotificationDeleteRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateEvents(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *NotificationDeleteRequest) contextValidateEvents(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Events); i++ {
if err := m.Events[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("events" + "." + strconv.Itoa(i))
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *NotificationDeleteRequest) MarshalBinary() ([]byte, error) {
if m == nil {