Documentation
¶
Index ¶
- Variables
- func ConvertPath(path string) string
- func GetDoc(p *plugin.Plugin, errorType string) (*openapi3.T, error)
- func GetMapValueType(typ string) (string, error)
- func GetProperty(properties map[string]string, key string) string
- func IsUint(format string) bool
- func MergeRequired(rs ...[]string) []string
- func ParseInteger(format string, s string) (float64, error)
- func ParseNumber(format string, s string) (float64, error)
- func ParseValue(typ string, format string, s string) (interface{}, error)
- func ParseValueFromType(typ *openapi3.Types, format string, s string) (interface{}, error)
- func TypePointer(t string) *openapi3.Types
- func UnescapeValidateString(s string) string
- type DefaultErrorResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TypeObject = TypePointer(openapi3.TypeObject) TypeArray = TypePointer(openapi3.TypeArray) TypeString = TypePointer(openapi3.TypeString) TypeNumber = TypePointer(openapi3.TypeNumber) TypeInteger = TypePointer(openapi3.TypeInteger) TypeBoolean = TypePointer(openapi3.TypeBoolean) )
Common type constants for convenience
View Source
var DefaultErrorDesc = "Error response."
View Source
var DefaultResponseDesc = "Successful response."
View Source
var (
ErrInvalidType = fmt.Errorf("invalid type")
)
Functions ¶
func ConvertPath ¶
func GetMapValueType ¶
GetMapValueType map[[2]string][]string -> []string
func MergeRequired ¶
MergeRequired merge schema required fields
func ParseValueFromType ¶
ParseValueFromType parses value based on schema type pointer
func TypePointer ¶
TypePointer 辅助函数,将类型转换为 *openapi3.Types
Types ¶
type DefaultErrorResponse ¶
Define a default error response structure
Click to show internal directories.
Click to hide internal directories.