You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Individual enums and unions can override global defaults using `x-speakeasy-unknown-values: allow` or `x-speakeasy-unknown-values: disallow` in the OpenAPI spec. See the [TypeScript configuration reference](/docs/speakeasy-reference/generation/ts-config#forward-compatibility) or [Ruby configuration reference](/docs/speakeasy-reference/generation/ruby-config#forward-compatibility) for all available options.
389
+
Individual enums and unions can override global defaults using `x-speakeasy-unknown-values: allow` or `x-speakeasy-unknown-values: disallow` in the OpenAPI spec. See the [TypeScript configuration reference](/docs/speakeasy-reference/generation/ts-config#forward-compatibility), [Ruby configuration reference](/docs/speakeasy-reference/generation/ruby-config#forward-compatibility), or [Terraform configuration reference](/docs/speakeasy-reference/generation/terraform-config#forward-compatibility) for all available options.
Copy file name to clipboardExpand all lines: docs/speakeasy-reference/extensions.mdx
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,8 @@ x-speakeasy-extension-rewrite:
82
82
{ extension: "x-speakeasy-wrapped-attribute", description: "Enables additional API operation data to be placed under a specifically named attribute." },
83
83
{ extension: "x-speakeasy-xor-with", description: "Indicate mutually exclusive properties to prevent incompatible combinations in Terraform configurations." },
84
84
{ extension: "x-speakeasy-match", description: "Adjusts an API parameter name to align with a Terraform state property." },
85
-
{ extension: "x-speakeasy-response-filter", description: "Enable client-side filtering of list API responses in data resources by marking response properties that Terraform users can filter on." }
85
+
{ extension: "x-speakeasy-response-filter", description: "Enable client-side filtering of list API responses in data resources by marking response properties that Terraform users can filter on." },
86
+
{ extension: "x-speakeasy-unknown-values", description: "Control whether an enum is open or closed in the generated Terraform provider. Set to `allow` to accept unknown enum values or `disallow` to reject them. Can also be enabled globally via the `forwardCompatibleEnumsByDefault` config option." }
Copy file name to clipboardExpand all lines: docs/speakeasy-reference/generation/terraform-config.mdx
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,6 +91,31 @@ terraform:
91
91
]}
92
92
/>
93
93
94
+
## Forward compatibility
95
+
96
+
```yml
97
+
terraform:
98
+
forwardCompatibleEnumsByDefault: true
99
+
```
100
+
101
+
<Table
102
+
data={[
103
+
{
104
+
name: "forwardCompatibleEnumsByDefault",
105
+
required: "false",
106
+
default: "false",
107
+
description:
108
+
"When true, enums used in responses are generated as open enums that accept unknown values. This prevents new enum values added by the API from breaking the Terraform provider. Individual enums can be controlled with `x-speakeasy-unknown-values: allow` or `x-speakeasy-unknown-values: disallow` in the OpenAPI spec.",
0 commit comments