Skip to content

Commit

Permalink
feat: add ability to disable automatic test generation
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanSpeakEasy committed Nov 11, 2024
1 parent 2447ec2 commit 938a4a1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ type Auth struct {
OAuth2PasswordEnabled bool `yaml:"oAuth2PasswordEnabled"`
}

type Tests struct {
GenerateNewTests bool `yaml:"generateNewTests"`
}

type Generation struct {
DevContainers *DevContainers `yaml:"devContainers,omitempty"`
BaseServerURL string `yaml:"baseServerUrl,omitempty"`
Expand All @@ -66,6 +70,8 @@ type Generation struct {
// Mock server generation configuration.
MockServer *MockServer `yaml:"mockServer,omitempty"`

Tests Tests `yaml:"tests,omitempty"`

AdditionalProperties map[string]any `yaml:",inline"` // Captures any additional properties that are not explicitly defined for backwards/forwards compatibility
}

Expand Down Expand Up @@ -347,6 +353,12 @@ func GetGenerationDefaults(newSDK bool) []SDKGenConfigField {
DefaultValue: ptr(newSDK),
Description: pointer.To("Enables support for OAuth2 resource owner password credentials grant type (Enterprise tier only)"),
},
{
Name: "tests.generateNewTests",
Required: false,
DefaultValue: ptr(false),
Description: pointer.To("Enables generation of new tests for any new operations found in the OpenAPI spec"),
},
}
}

Expand Down

0 comments on commit 938a4a1

Please sign in to comment.