Documentation ¶
Index ¶
- Variables
- func IsPathMatchTemplate(path, pathTemplate string) bool
- func ParseArrayExample(data any) ([]any, error)
- func ParseObjectExample(data any) (map[string]any, error)
- type API
- type ArrayExampleError
- type ArraySchema
- type BooleanSchema
- type Builder
- type FakerSchema
- type FieldType
- type FindResponseError
- type FindResponseParams
- type FloatSchema
- type IntSchema
- type ObjectExampleError
- type ObjectSchema
- type Operation
- type Response
- type Schema
- type SchemaTypeError
- type StringSchema
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyItems = errors.New("empty items in array")
ErrEmptyItems -.
View Source
var ErrEmptyRequireField = errors.New("empty require field")
ErrEmptyRequireField -.
Functions ¶
func IsPathMatchTemplate ¶ added in v0.6.0
IsPathMatchTemplate returns true if path matches template
func ParseArrayExample ¶
Types ¶
type API ¶
type API struct {
Operations []Operation
}
API -.
func (API) FindResponse ¶
func (a API) FindResponse(params FindResponseParams) (Response, error)
FindResponse -.
type ArrayExampleError ¶
type ArrayExampleError struct {
Data any
}
ArrayExampleError -.
func (*ArrayExampleError) Error ¶
func (e *ArrayExampleError) Error() string
type FindResponseError ¶
FindResponseError -.
type FindResponseParams ¶
type FindResponseParams struct { Path string Method string Body io.ReadCloser MediaType string }
FindResponseParams -.
type ObjectSchema ¶
ObjectSchema -.
type Response ¶
type Response struct { StatusCode int MediaType string Schema Schema Example any Examples map[string]any }
Response -.
type SchemaTypeError ¶
type SchemaTypeError struct {
SchemaType string
}
SchemaTypeError -.
func (*SchemaTypeError) Error ¶
func (e *SchemaTypeError) Error() string
Click to show internal directories.
Click to hide internal directories.