Documentation
¶
Index ¶
- Constants
- func GetIrisContext(ctx context.Context) iris.Contextdeprecated
- func GetUserData(ctx context.Context) interface{}deprecated
- func OapiRequestValidator(swagger *openapi3.T) iris.Handlerdeprecated
- func OapiRequestValidatorWithOptions(swagger *openapi3.T, options *Options) iris.Handlerdeprecated
- func OapiValidatorFromYamlFile(path string) (iris.Handler, error)deprecated
- func ValidateRequestFromContext(ctx iris.Context, router routers.Router, options *Options) errordeprecated
- type ErrorHandlerdeprecated
- type MultiErrorHandlerdeprecated
- type Optionsdeprecated
Constants ¶
const ( IrisContextKey = "oapi-codegen/iris-context" UserDataKey = "oapi-codegen/user-data" )
Variables ¶
This section is empty.
Functions ¶
func GetIrisContext
deprecated
func GetUserData
deprecated
func OapiRequestValidator
deprecated
OapiRequestValidator is a iris middleware function which validates incoming HTTP requests to make sure that they conform to the given OAPI 3.0 specification. When OAPI validation fails on the request, we return an HTTP/400 with error message
Deprecated: This has been replaced by github.com/oapi-codegen/iris-middleware#OapiRequestValidator
func OapiRequestValidatorWithOptions
deprecated
func OapiValidatorFromYamlFile
deprecated
func ValidateRequestFromContext
deprecated
ValidateRequestFromContext is called from the middleware above and actually does the work of validating a request.
Deprecated: This has been replaced by github.com/oapi-codegen/iris-middleware#ValidateRequestFromContext
Types ¶
type ErrorHandler
deprecated
type MultiErrorHandler
deprecated
type MultiErrorHandler func(openapi3.MultiError) error
MultiErrorHandler is called when oapi returns a MultiError type
Deprecated: This has been replaced by github.com/oapi-codegen/iris-middleware#MultiErrorHandler
type Options
deprecated
type Options struct {
Options openapi3filter.Options
ErrorHandler ErrorHandler
ParamDecoder openapi3filter.ContentParameterDecoder
UserData interface{}
MultiErrorHandler MultiErrorHandler
// SilenceServersWarning allows silencing a warning for https://github.com/deepmap/oapi-codegen/issues/882 that reports when an OpenAPI spec has `spec.Servers != nil`
SilenceServersWarning bool
}
Options to customize request validation. These are passed through to openapi3filter.
Deprecated: This has been replaced by github.com/oapi-codegen/iris-middleware#Options