providers

package
v0.1.29 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DocumentTestCase

type DocumentTestCase struct {
	DocFactory func(filePath string) (openapi.Document, error)
}

DocumentTestCase is a test case for every Document implementation. It tests the basic functionality of the Document interface. The actual test run is defined in each provider's document_test file.

func (*DocumentTestCase) Run

func (tc *DocumentTestCase) Run(t *testing.T)

type NewSchemaTestSuite

type NewSchemaTestSuite struct {
	SchemaFactory func(t *testing.T, fileName, componentID string, parseConfig *config.ParseConfig) *openapi.Schema
}

NewSchemaTestSuite tests the NewSchema functions from providers, so we don't have to repeat the same tests for each

func (*NewSchemaTestSuite) Run

func (tc *NewSchemaTestSuite) Run(t *testing.T)

type OperationTestCase

type OperationTestCase struct {
	DocFactory func(filePath string) (openapi.Document, error)
}

func (*OperationTestCase) Run

func (tc *OperationTestCase) Run(t *testing.T)

type RequestValidatorTestCase

type RequestValidatorTestCase struct {
	Doc       openapi.Document
	Validator openapi.Validator
}

func (*RequestValidatorTestCase) BaseCase

func (tc *RequestValidatorTestCase) BaseCase(t *testing.T, expectedErrors []string)

func (*RequestValidatorTestCase) FormPayload

func (tc *RequestValidatorTestCase) FormPayload(t *testing.T, expectedErrors []string)

func (*RequestValidatorTestCase) InvalidTypeDoc

func (tc *RequestValidatorTestCase) InvalidTypeDoc(t *testing.T, expectedErrors []string)

func (*RequestValidatorTestCase) MissingRequired

func (tc *RequestValidatorTestCase) MissingRequired(t *testing.T, expectedErrors []string)

type ResponseValidatorTestCase

type ResponseValidatorTestCase struct {
	Doc       openapi.Document
	Validator openapi.Validator
}

func (*ResponseValidatorTestCase) BaseCase

func (tc *ResponseValidatorTestCase) BaseCase(t *testing.T, expectedErrors []string)

func (*ResponseValidatorTestCase) EmptyOperationHandle

func (tc *ResponseValidatorTestCase) EmptyOperationHandle(t *testing.T, expectedErrors []string)

func (*ResponseValidatorTestCase) InvalidTypeButUnsupportedResponse

func (tc *ResponseValidatorTestCase) InvalidTypeButUnsupportedResponse(t *testing.T, expectedErrors []string)

func (*ResponseValidatorTestCase) InvalidTypeDoc

func (tc *ResponseValidatorTestCase) InvalidTypeDoc(t *testing.T, expectedErrors []string)

func (*ResponseValidatorTestCase) NoHeaders

func (tc *ResponseValidatorTestCase) NoHeaders(t *testing.T, expectedErrors []string)

func (*ResponseValidatorTestCase) NoResponseSchema

func (tc *ResponseValidatorTestCase) NoResponseSchema(t *testing.T, expectedErrors []string)

func (*ResponseValidatorTestCase) NoSchemaResponse

func (tc *ResponseValidatorTestCase) NoSchemaResponse(t *testing.T, expectedErrors []string)

func (*ResponseValidatorTestCase) PlainText

func (tc *ResponseValidatorTestCase) PlainText(t *testing.T, expectedErrors []string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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