extensions

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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

func ExtractHeaders(ex *openapi3.Example) (map[string]any, bool)

ExtractHeaders extracts x-mock-headers extension.

func ExtractOnce

func ExtractOnce(ex *openapi3.Example) bool

ExtractOnce extracts x-mock-once extension.

func ExtractSetState

func ExtractSetState(ex *openapi3.Example) (map[string]any, bool)

ExtractSetState extracts x-mock-set-state extension.

func ExtractSkip

func ExtractSkip(ex *openapi3.Example) bool

ExtractSkip extracts x-mock-skip extension.

Types

type ParamsMatch

type ParamsMatch map[string]any

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).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL