Open gravieure opened 2 days ago
@gravieure , thanks for reaching out. I am not able to reproduce the issue. Could you please share a minnimal reproducible code snippet?
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
@gravieure , thanks for reaching out. I am not able to reproduce the issue. Could you please share a minnimal reproducible code snippet?
The sample code in the documentation is a reproducer.
You can reproduce the other described behavior by changing the all=all
in that code to all=True
.
Describe the bug
This pertains to the Python bindings, but I believe the issue affects TypeScript as well, though to a lesser degree.
The documentation for
JsonMatchPatternProperty.all
states:However, if I specify
all=True
,cdk synth
fails:So the type hint is incorrect; a value of
Any
type is not legal for theall
argument.The example code in the documentation is:
This violates the immediately preceding text, "You must specify either this setting or the IncludedPaths setting, but not both." Specifying only
all=all
does not work;all
is a built-in function in Python, which causes a JSII error:It appears that I have to pass some JSII-serializable value here to indicate truthy state, such as:
This is a very unusual way to express a boolean, particularly because an empty dict is considered
False
in Python:Expected Behavior
all
attribute would work.Current Behavior
Reproduction Steps
JsonMatchPatternProperty
whoseall
value isall
, as the example code does.or
JsonMatchPatternProperty
whoseall
value isTrue
.Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.147.1 (build d3695d4)
Framework Version
2.147.1
Node.js Version
v18.15.0
OS
macOS Sonoma 14.5 (23F79)
Language
Python
Language Version
Python 3.10.7
Other information
The TypeScript documentation also says that
all?
can acceptany
type, though this is not true.