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
To ensure that the schema is coherent, and that we can faithfully respect the schema during codegen, we will disable specifying any combination of const, default, and required (just 1 is ok).
Note: The required property is not set on the property itself but in an associated list.
Affected area/feature
This will narrow the set of viable schema inputs. It may allow us to simplify codegen, because it strengthens what assumptions we can make.
The text was updated successfully, but these errors were encountered:
This will require a change in schema generation for pulumi-azure-native at the very least, as it generates types like this:
"azure-native:datafactory:AzureDatabricksDeltaLakeSink": {
"description": "A copy activity Azure Databricks Delta Lake sink.",
"properties": {
..."type": {
"type": "string",
"description": "Copy sink type.\nExpected value is 'AzureDatabricksDeltaLakeSink'.",
"const": "AzureDatabricksDeltaLakeSink"
}
...
},
"type": "object",
"required": [
"type"
]
}
iwahbe
changed the title
Forbid nonsensical flag interactions in the pulumi schema.
Forbid nonsensical flag interactions in the Pulumi schema
Oct 29, 2021
Hello!
Issue details
We have several type flags that can be set on a single type in the schema. These include:
const
: Has a constant and specific value, similar to a const variable. => The caller should not specify a value.default
: The field has a default value if no value is provided. => The caller may specify a value.required
: The user must specify a value at the call site. => The caller must specify a value.In the past, we allowed the Pulumi schema to specify nonsensical combinations of flags such as
To ensure that the schema is coherent, and that we can faithfully respect the schema during codegen, we will disable specifying any combination of
const
,default
, andrequired
(just 1 is ok).Note: The
required
property is not set on the property itself but in an associated list.Affected area/feature
This will narrow the set of viable schema inputs. It may allow us to simplify codegen, because it strengthens what assumptions we can make.
The text was updated successfully, but these errors were encountered: