Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotMatchingParser = errors.New("spec type does not match parser") ErrUnknownParserType = errors.New("unknown parser type") DefaultRegistry = make(ParserRegistry) )
Functions ¶
func RegisterAt ¶
func RegisterAt[TSpec any, TParser ports.SpecParser](registry *ParserRegistry, provider func(spec TSpec) (TParser, error))
Types ¶
type OpenAPISpecParser ¶
type OpenAPISpecParser struct { Spec libopenapi.Document MockGenerator *renderer.MockGenerator }
func NewOpenAPISpecParser ¶
func NewOpenAPISpecParser(spec *config.OpenApiSpec) (*OpenAPISpecParser, error)
type ParserRegistry ¶
func (*ParserRegistry) ParserFor ¶
func (r *ParserRegistry) ParserFor(spec any) (ports.SpecParser, error)
type PlainRuleSpecParser ¶
type PlainRuleSpecParser struct {
Handlers []ports.RequestHandler
}
func NewPlainRuleSpecParser ¶
func NewPlainRuleSpecParser(spec *config.PlainRuleSpec) (*PlainRuleSpecParser, error)
Click to show internal directories.
Click to hide internal directories.