Documentation
¶
Index ¶
- Variables
- func IsPathMatchTemplate(path, pathTemplate string) bool
- func ParseArrayExample(data interface{}) ([]interface{}, error)
- func ParseObjectExample(data interface{}) (map[string]interface{}, error)
- func RemoveTrailingSlash(path string) string
- 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 ¶
func ParseArrayExample(data interface{}) ([]interface{}, error)
func ParseObjectExample ¶
func RemoveTrailingSlash ¶
RemoveTrailingSlash returns path without trailing slash
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 interface{}
}
ArrayExampleError -.
func (*ArrayExampleError) Error ¶
func (e *ArrayExampleError) Error() string
type BooleanSchema ¶
type BooleanSchema struct {
Example bool
}
BooleanSchema -.
func (BooleanSchema) ExampleValue ¶
func (b BooleanSchema) ExampleValue() interface{}
ExampleValue -.
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 interface{} Examples map[string]interface{} }
Response -.
func (Response) ExampleValue ¶
ExampleValue -.
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.