Skip to content

"github.com/go-openapi/errors".CompositeError has no field or method ValidateName #2623

@dimovnike

Description

@dimovnike

After upgrading to the new feature "support nested body params for CompositeError" from master (166b853) the generated code produces the following error:

"github.com/go-openapi/errors".CompositeError has no field or method ValidateName

I have run go get -u -f ./... and also checked that github.com/go-openapi/errors is the latest version.

The problematic code is the following:

        if m.Field != nil {
		if err := m.Field.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("field")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("field") // <- ERROR HERE
			}
			return err
		}
	}

The type *errors.CompositeError has no ValidateName() method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions