Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This diagnostic occurs when you reference a custom-tagged union data type, but the required value isn't provided.
Description
The property <property-name> requires a value of type <type-name>, but none was supplied.
Level
Warning / Error
Examples
The following example raises the diagnostic because the property type with the value of foo
or _bar_
isn't provided.
@discriminator('type')
type taggedUnion = {type: 'foo', value: int} | {type: 'bar', value: bool}
output outValue taggedUnion = {}
You can fix the diagnostic by including the properties:
@discriminator('type')
type taggedUnion = {type: 'foo', value: int} | {type: 'bar', value: bool}
output outValue taggedUnion = {type: 'foo', value: 3}
If the property value isn't provided in the preceding example, you get BCP035.
Next steps
For more information about Bicep diagnostics, see Bicep core diagnostics.