Categorygithub.com/go-openapi/errors
modulepackage
0.22.0
Repository: https://github.com/go-openapi/errors.git
Documentation: pkg.go.dev

# README

OpenAPI errors Build Status codecov

Slack Status license Go Reference Go Report Card

Shared errors and error interface used throughout the various libraries found in the go-openapi toolkit.

# Functions

AdditionalItemsNotAllowed an error for invalid additional items.
CompositeValidationError an error to wrap a bunch of other errors.
DuplicateItems error for when an array contains duplicates.
EnumFail error for when an enum validation fails.
ExceedsMaximum error for when maximum validation fails.
ExceedsMaximumInt error for when maximum validation fails.
ExceedsMaximumUint error for when maximum validation fails.
ExceedsMinimum error for when minimum validation fails.
ExceedsMinimumInt error for when minimum validation fails.
ExceedsMinimumUint error for when minimum validation fails.
FailedAllPatternProperties an error for when the property doesn't match a pattern.
FailedPattern error for when a string fails a regex pattern match the pattern that is returned is the ECMA syntax version of the pattern not the golang version.
InvalidCollectionFormat another flavor of invalid type error.
InvalidContentType error for an invalid content type.
InvalidResponseFormat error for an unacceptable response format request.
InvalidType creates an error for when the type is invalid.
InvalidTypeName an error for when the type is invalid.
MethodNotAllowed creates a new method not allowed error.
MultipleOfMustBePositive error for when a multipleOf factor is negative.
New creates a new API error with a code and a message.
NewParseError creates a new parse error.
NotFound creates a new not found error.
NotImplemented creates a new not implemented error.
NotMultipleOf error for when multiple of validation fails.
PropertyNotAllowed an error for when the property doesn't match a pattern.
ReadOnly error for when a value is present in request.
Required error for when a value is missing.
ServeError implements the http error handler interface.
TooFewItems error for when an array contains too few items.
TooFewProperties an error for an object with too few properties.
TooLong error for when a string is too long.
TooManyItems error for when an array contains too many items.
TooManyProperties an error for an object with too many properties.
TooShort error for when a string is too short.
Unauthenticated returns an unauthenticated error.

# Constants

CompositeErrorCode remains 422 for backwards-compatibility and to separate it from validation errors with cause.
All code responses can be used to differentiate errors for different handling by the consuming program.
All code responses can be used to differentiate errors for different handling by the consuming program.
InvalidTypeCode is used for any subclass of invalid types.
All code responses can be used to differentiate errors for different handling by the consuming program.
All code responses can be used to differentiate errors for different handling by the consuming program.
All code responses can be used to differentiate errors for different handling by the consuming program.
All code responses can be used to differentiate errors for different handling by the consuming program.
All code responses can be used to differentiate errors for different handling by the consuming program.
All code responses can be used to differentiate errors for different handling by the consuming program.
All code responses can be used to differentiate errors for different handling by the consuming program.
All code responses can be used to differentiate errors for different handling by the consuming program.
All code responses can be used to differentiate errors for different handling by the consuming program.
All code responses can be used to differentiate errors for different handling by the consuming program.
All code responses can be used to differentiate errors for different handling by the consuming program.
All code responses can be used to differentiate errors for different handling by the consuming program.
All code responses can be used to differentiate errors for different handling by the consuming program.
All code responses can be used to differentiate errors for different handling by the consuming program.
All code responses can be used to differentiate errors for different handling by the consuming program.
All code responses can be used to differentiate errors for different handling by the consuming program.

# Variables

DefaultHTTPCode is used when the error Code cannot be used as an HTTP code.

# Structs

APIVerificationFailed is an error that contains all the missing info for a mismatched section between the api registrations and the api spec.
CompositeError is an error that groups several errors together.
MethodNotAllowedError represents an error for when the path matches but the method doesn't.
ParseError represents a parsing error.
Validation represents a failure of a precondition.

# Interfaces

Error represents a error interface all swagger framework errors implement.