troposphere icon indicating copy to clipboard operation
troposphere copied to clipboard

json_checker - recursively validate dictionary while ignoring non-string types

Open thejohnlin opened this issue 8 years ago • 1 comments

Currently, using a Ref inside the Schema parameter to create a new apigateway.Model resource will result in an Exception from attempting to validate the dictionary via json.dumps(). This PR is an attempt to enable this use-case by only attempting json.dumps() on the values of type basestring in the dictionary.

This also seems to affect cloudwatch.Dashboard, which also uses json_checker to validate the DashboardBody property.

thejohnlin avatar Dec 11 '17 18:12 thejohnlin

Additional tests and concise reproductions in code will be coming soon

thejohnlin avatar Dec 11 '17 18:12 thejohnlin