models

package
v2.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aliases

type Aliases struct {
	Go         string `yaml:"go"`
	PowerShell string `yaml:"powershell"`
}

type BodyContent

type BodyContent struct {
	Type string `yaml:"type,omitempty"`
}

type Configuration

type Configuration struct {
	Dir string            `yaml:"dir,omitempty"`
	Env map[string]string `yaml:"dir,env"`
}

type EndPoint

type EndPoint struct {
	Name               string       `yaml:"name"`
	Method             string       `yaml:"method"`
	Accept             string       `yaml:"accept,omitempty"`
	CollectionType     string       `yaml:"collectionType,omitempty"`
	CollectionProperty string       `yaml:"collectionProperty,omitempty"`
	Path               string       `yaml:"path"`
	Examples           Examples     `yaml:"examples"`
	Alias              Aliases      `yaml:"alias"`
	Skip               *bool        `yaml:"skip,omitempty"`
	QueryParameters    []Parameter  `yaml:"queryParameters,omitempty"`
	PathParameters     []Parameter  `yaml:"pathParameters,omitempty"`
	HeaderParameters   []Parameter  `yaml:"headerParameters,omitempty"`
	Body               []Parameter  `yaml:"body,omitempty"`
	BodyContent        *BodyContent `yaml:"bodyContent,omitempty"`
}

func (*EndPoint) GetAllParameters

func (p *EndPoint) GetAllParameters() []Parameter

func (*EndPoint) GetQueryParameters added in v2.15.0

func (p *EndPoint) GetQueryParameters() []Parameter

func (*EndPoint) IsBodyFormData

func (p *EndPoint) IsBodyFormData() bool

func (*EndPoint) IsCollection

func (p *EndPoint) IsCollection() bool

func (*EndPoint) SupportsTemplates

func (p *EndPoint) SupportsTemplates() bool

type Example

type Example struct {
	Description  string           `yaml:"description,omitempty"`
	Command      string           `yaml:"command"`
	AssertStdout *OutputAssertion `yaml:"assertStdOut,omitempty"`
	AssertStderr *OutputAssertion `yaml:"assertStdErr,omitempty"`
	BeforeEach   []string         `yaml:"beforeEach,omitempty"`
	AfterEach    []string         `yaml:"afterEach,omitempty"`
	SkipTest     bool             `yaml:"skipTest,omitempty"`
}

type Examples

type Examples struct {
	Powershell []Example `yaml:"powershell"`
	Go         []Example `yaml:"go"`
}

type MockConfiguration

type MockConfiguration struct {
	Mocks map[string]string `yaml:"mocks,omitempty"`
	Files map[string]string `yaml:"files,omitempty"`
}

func (*MockConfiguration) Replace

func (c *MockConfiguration) Replace(command string) string

func (*MockConfiguration) ReplaceFiles

func (c *MockConfiguration) ReplaceFiles(command string) string

type OutputAssertion

type OutputAssertion struct {
	JSON     map[string]string `yaml:"json,omitempty"`
	Contains []string          `yaml:"contains,omitempty"`
}

type Parameter

type Parameter struct {
	Name            string      `yaml:"name,omitempty"`
	Type            string      `yaml:"type,omitempty"`
	Value           string      `yaml:"value,omitempty"`
	Format          string      `yaml:"format,omitempty"`
	Property        string      `yaml:"property,omitempty"`
	Pipeline        *bool       `yaml:"pipeline,omitempty"`
	PipelineAliases []string    `yaml:"pipelineAliases,omitempty"`
	Required        *bool       `yaml:"required,omitempty"`
	Description     string      `yaml:"description,omitempty"`
	Default         string      `yaml:"default,omitempty"`
	Position        *int        `yaml:"position,omitempty"`
	ValidationSet   []string    `yaml:"validationSet,omitempty"`
	Skip            *bool       `yaml:"skip,omitempty"`
	Children        []Parameter `yaml:"children,omitempty"`
}

func (*Parameter) GetTargetProperty

func (p *Parameter) GetTargetProperty() string

func (*Parameter) IsTypeDateTime

func (p *Parameter) IsTypeDateTime() bool

type Specification

type Specification struct {
	Information SpecificationInformation `yaml:"information"`
	Endpoints   []EndPoint               `yaml:"endpoints"`
}

type SpecificationInformation

type SpecificationInformation struct {
	Name            string `yaml:"name"`
	Description     string `yaml:"description"`
	DescriptionLong string `yaml:"descriptionLong"`
	Link            string `yaml:"link"`
}

type TestCase

type TestCase struct {
	Command       string           `yaml:"command,omitempty"`
	ExitCode      int              `yaml:"exit-code"`
	Skip          bool             `yaml:"skip,omitempty"`
	LineCount     int              `yaml:"line-count,omitempty"`
	StdOut        *OutputAssertion `yaml:"stdout,omitempty"`
	StdErr        *OutputAssertion `yaml:"stderr,omitempty"`
	Configuration *Configuration   `yaml:"config,omitempty"`
}

type TestSuite

type TestSuite struct {
	Configuration *Configuration      `yaml:"config,omitempty"`
	Tests         map[string]TestCase `yaml:"tests"`
}

Jump to

Keyboard shortcuts

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