Documentation ¶
Index ¶
Constants ¶
View Source
const MockServerBaseURL = "MOCK_SERVER_BASE_URL"
MockServerBaseURL constant
Variables ¶
This section is empty.
Functions ¶
func MarshalScenarioToOpenAPI ¶
func MarshalScenarioToOpenAPI(title string, version string, scenarios ...*types.APIScenario) ([]byte, error)
MarshalScenarioToOpenAPI converts open-api specs into json
func ScenarioToOpenAPI ¶
ScenarioToOpenAPI convert scenarios to open-api specs
Types ¶
type APISpec ¶
type APISpec struct { Title string ID string Description string Path string Method types.MethodType SecuritySchemes openapi3.SecuritySchemes Request Request Response Response }
APISpec structure
func Parse ¶
func Parse(ctx context.Context, data []byte, dataTemplate fuzz.DataTemplateRequest) (specs []*APISpec, err error)
Parse parses Open-API and generates api scenarios
func ParseAPISpec ¶
func ParseAPISpec( title string, method types.MethodType, path string, op *openapi3.Operation, dataTemplate fuzz.DataTemplateRequest) (specs []*APISpec)
ParseAPISpec converts open-api operation to API specs
func (*APISpec) BuildMockScenario ¶
func (api *APISpec) BuildMockScenario(dataTemplate fuzz.DataTemplateRequest) (*types.APIScenario, error)
BuildMockScenario builds api scenario from open-API spec
type Property ¶
type Property struct { Name string Description string Type string SubType string Enum []string Min float64 Max float64 In string Pattern string Format string Required bool Children []Property // contains filtered or unexported fields }
Property structure
Click to show internal directories.
Click to hide internal directories.