Documentation
¶
Index ¶
- type BreakingChange
- type CircularReference
- type OpenAPIBreakingChangesTest
- type OpenAPICircularReferenceTest
- type OpenAPIIntegration
- func (oi *OpenAPIIntegration) CreateBreakingChangesTest(previousCommit string) core.Test
- func (oi *OpenAPIIntegration) CreateCircularReferenceTest() core.Test
- func (oi *OpenAPIIntegration) CreateFullTestSuite(previousCommit string) *core.TestSuite
- func (oi *OpenAPIIntegration) CreateValidationTest() core.Test
- type OpenAPITestBuilder
- func (b *OpenAPITestBuilder) Build() (*core.TestSuite, error)
- func (b *OpenAPITestBuilder) WithBreakingChangesDetection(enabled bool, commit string) *OpenAPITestBuilder
- func (b *OpenAPITestBuilder) WithCircularReferenceDetection(enabled bool) *OpenAPITestBuilder
- func (b *OpenAPITestBuilder) WithPreviousCommit(commit string) *OpenAPITestBuilder
- func (b *OpenAPITestBuilder) WithValidation(enabled bool) *OpenAPITestBuilder
- type OpenAPITester
- func (t *OpenAPITester) CheckBreakingChanges(previousCommit string) *TestResult
- func (t *OpenAPITester) DetectCircularReferences() *TestResult
- func (t *OpenAPITester) GetSummary(results []*TestResult) string
- func (t *OpenAPITester) RunAllTests(previousCommit string) []*TestResult
- func (t *OpenAPITester) ValidateSpec() *TestResult
- type OpenAPIValidationTest
- type TestResult
- type ValidationError
- type ValidationWarning
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BreakingChange ¶
type BreakingChange struct {
Type string
Path string
OldValue interface{}
NewValue interface{}
Description string
Impact string
}
BreakingChange represents a breaking change detected between versions
type CircularReference ¶
CircularReference represents a circular reference in the OpenAPI spec
type OpenAPIBreakingChangesTest ¶
type OpenAPIBreakingChangesTest struct {
// contains filtered or unexported fields
}
OpenAPIBreakingChangesTest implements the Test interface for breaking changes detection
func (*OpenAPIBreakingChangesTest) Execute ¶
func (t *OpenAPIBreakingChangesTest) Execute() *core.TestCaseResult
Execute runs the breaking changes detection test
func (*OpenAPIBreakingChangesTest) GetName ¶
func (t *OpenAPIBreakingChangesTest) GetName() string
GetName returns the test name
type OpenAPICircularReferenceTest ¶
type OpenAPICircularReferenceTest struct {
// contains filtered or unexported fields
}
OpenAPICircularReferenceTest implements the Test interface for circular reference detection
func (*OpenAPICircularReferenceTest) Execute ¶
func (t *OpenAPICircularReferenceTest) Execute() *core.TestCaseResult
Execute runs the circular reference detection test
func (*OpenAPICircularReferenceTest) GetName ¶
func (t *OpenAPICircularReferenceTest) GetName() string
GetName returns the test name
type OpenAPIIntegration ¶
type OpenAPIIntegration struct {
// contains filtered or unexported fields
}
OpenAPIIntegration provides integration with the GoWright testing framework
func NewOpenAPIIntegration ¶
func NewOpenAPIIntegration(specPath string) (*OpenAPIIntegration, error)
NewOpenAPIIntegration creates a new OpenAPI integration instance
func (*OpenAPIIntegration) CreateBreakingChangesTest ¶
func (oi *OpenAPIIntegration) CreateBreakingChangesTest(previousCommit string) core.Test
CreateBreakingChangesTest creates a GoWright test for breaking changes detection
func (*OpenAPIIntegration) CreateCircularReferenceTest ¶
func (oi *OpenAPIIntegration) CreateCircularReferenceTest() core.Test
CreateCircularReferenceTest creates a GoWright test for circular reference detection
func (*OpenAPIIntegration) CreateFullTestSuite ¶
func (oi *OpenAPIIntegration) CreateFullTestSuite(previousCommit string) *core.TestSuite
CreateFullTestSuite creates a complete test suite for OpenAPI testing
func (*OpenAPIIntegration) CreateValidationTest ¶
func (oi *OpenAPIIntegration) CreateValidationTest() core.Test
CreateValidationTest creates a GoWright test for OpenAPI validation
type OpenAPITestBuilder ¶
type OpenAPITestBuilder struct {
// contains filtered or unexported fields
}
OpenAPITestBuilder provides a fluent interface for building OpenAPI tests
func NewOpenAPITestBuilder ¶
func NewOpenAPITestBuilder(specPath string) *OpenAPITestBuilder
NewOpenAPITestBuilder creates a new OpenAPI test builder
func (*OpenAPITestBuilder) Build ¶
func (b *OpenAPITestBuilder) Build() (*core.TestSuite, error)
Build creates the test suite based on the builder configuration
func (*OpenAPITestBuilder) WithBreakingChangesDetection ¶
func (b *OpenAPITestBuilder) WithBreakingChangesDetection(enabled bool, commit string) *OpenAPITestBuilder
WithBreakingChangesDetection enables or disables breaking changes detection
func (*OpenAPITestBuilder) WithCircularReferenceDetection ¶
func (b *OpenAPITestBuilder) WithCircularReferenceDetection(enabled bool) *OpenAPITestBuilder
WithCircularReferenceDetection enables or disables circular reference detection
func (*OpenAPITestBuilder) WithPreviousCommit ¶
func (b *OpenAPITestBuilder) WithPreviousCommit(commit string) *OpenAPITestBuilder
WithPreviousCommit sets the previous commit for breaking changes detection
func (*OpenAPITestBuilder) WithValidation ¶
func (b *OpenAPITestBuilder) WithValidation(enabled bool) *OpenAPITestBuilder
WithValidation enables or disables validation testing
type OpenAPITester ¶
type OpenAPITester struct {
// contains filtered or unexported fields
}
OpenAPITester provides comprehensive OpenAPI specification testing capabilities
func NewOpenAPITester ¶
func NewOpenAPITester(specPath string) (*OpenAPITester, error)
NewOpenAPITester creates a new OpenAPI tester instance
func (*OpenAPITester) CheckBreakingChanges ¶
func (t *OpenAPITester) CheckBreakingChanges(previousCommit string) *TestResult
CheckBreakingChanges compares the current spec with the previous version from git
func (*OpenAPITester) DetectCircularReferences ¶
func (t *OpenAPITester) DetectCircularReferences() *TestResult
DetectCircularReferences detects circular references in the OpenAPI specification
func (*OpenAPITester) GetSummary ¶
func (t *OpenAPITester) GetSummary(results []*TestResult) string
GetSummary returns a summary of all test results
func (*OpenAPITester) RunAllTests ¶
func (t *OpenAPITester) RunAllTests(previousCommit string) []*TestResult
RunAllTests runs all available OpenAPI tests
func (*OpenAPITester) ValidateSpec ¶
func (t *OpenAPITester) ValidateSpec() *TestResult
ValidateSpec validates the OpenAPI specification against the OpenAPI standard
type OpenAPIValidationTest ¶
type OpenAPIValidationTest struct {
// contains filtered or unexported fields
}
OpenAPIValidationTest implements the Test interface for OpenAPI validation
func (*OpenAPIValidationTest) Execute ¶
func (t *OpenAPIValidationTest) Execute() *core.TestCaseResult
Execute runs the OpenAPI validation test
func (*OpenAPIValidationTest) GetName ¶
func (t *OpenAPIValidationTest) GetName() string
GetName returns the test name
type TestResult ¶
type TestResult struct {
TestName string
Passed bool
Message string
Details []string
Errors []ValidationError
Warnings []ValidationWarning
}
TestResult represents the result of an OpenAPI test
type ValidationError ¶
ValidationError represents a validation error found in the OpenAPI spec
type ValidationWarning ¶
ValidationWarning represents a validation warning