Documentation
¶
Index ¶
- func EvaluateParamsMatch(pm ParamsMatch, eval runtime.Evaluator) (bool, error)
- func ExtractHeaders(ex *openapi3.Example) (map[string]any, bool)
- func ExtractOnce(ex *openapi3.Example) bool
- func ExtractSetState(ex *openapi3.Example) (map[string]any, bool)
- func ExtractSkip(ex *openapi3.Example) bool
- type ParamsMatch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvaluateParamsMatch ¶
func EvaluateParamsMatch(pm ParamsMatch, eval runtime.Evaluator) (bool, error)
EvaluateParamsMatch evaluates whether the given params match the conditions.
func ExtractHeaders ¶
ExtractHeaders extracts x-mock-headers extension.
func ExtractOnce ¶
ExtractOnce extracts x-mock-once extension.
func ExtractSetState ¶
ExtractSetState extracts x-mock-set-state extension.
func ExtractSkip ¶
ExtractSkip extracts x-mock-skip extension.
Types ¶
type ParamsMatch ¶
ParamsMatch represents a parsed x-mock-params-match extension.
func ExtractParamsMatch ¶
func ExtractParamsMatch(ex *openapi3.Example) (ParamsMatch, bool)
ExtractParamsMatch extracts the x-mock-params-match extension from an example. If both x-mock-match and x-mock-params-match are present, uses x-mock-match and writes a warning to stderr (as per spec).
Click to show internal directories.
Click to hide internal directories.