Fixes issue #8014, _check_type flag not being honored. (#8053)

* Fixes issue 8014, _check_type flag not being honored.

Updated model_utils.mustache to pass the check_type flag into attempt_convert_item(). Failure to do so
results in type validation errors occurring when the user has specifically requested that they be disabled.

* regenerated samples

Co-authored-by: Frank Levine <frank.levine@blacklynx.tech>
This commit is contained in:
fbl100 2020-12-07 15:18:16 -05:00 committed by GitHub
parent e00ac502f1
commit 99d83712a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 10 deletions

View File

@ -1116,7 +1116,8 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item,
configuration,
spec_property_naming,
key_type=False,
must_convert=True
must_convert=True,
check_type=_check_type
)
return converted_instance
else:
@ -1136,7 +1137,8 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item,
configuration,
spec_property_naming,
key_type=False,
must_convert=False
must_convert=False,
check_type=_check_type
)
return converted_instance

View File

@ -1398,7 +1398,8 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item,
configuration,
spec_property_naming,
key_type=False,
must_convert=True
must_convert=True,
check_type=_check_type
)
return converted_instance
else:
@ -1418,7 +1419,8 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item,
configuration,
spec_property_naming,
key_type=False,
must_convert=False
must_convert=False,
check_type=_check_type
)
return converted_instance

View File

@ -1398,7 +1398,8 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item,
configuration,
spec_property_naming,
key_type=False,
must_convert=True
must_convert=True,
check_type=_check_type
)
return converted_instance
else:
@ -1418,7 +1419,8 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item,
configuration,
spec_property_naming,
key_type=False,
must_convert=False
must_convert=False,
check_type=_check_type
)
return converted_instance

View File

@ -1398,7 +1398,8 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item,
configuration,
spec_property_naming,
key_type=False,
must_convert=True
must_convert=True,
check_type=_check_type
)
return converted_instance
else:
@ -1418,7 +1419,8 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item,
configuration,
spec_property_naming,
key_type=False,
must_convert=False
must_convert=False,
check_type=_check_type
)
return converted_instance

View File

@ -1398,7 +1398,8 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item,
configuration,
spec_property_naming,
key_type=False,
must_convert=True
must_convert=True,
check_type=_check_type
)
return converted_instance
else:
@ -1418,7 +1419,8 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item,
configuration,
spec_property_naming,
key_type=False,
must_convert=False
must_convert=False,
check_type=_check_type
)
return converted_instance