@@ -30,7 +30,7 @@ def __init__(self, schema: Dict[str, Any]):
30
30
31
31
@staticmethod
32
32
def _is_dict_and_non_empty (value : Optional [Dict ]):
33
- return not value or not isinstance (value , dict )
33
+ return value is not None or isinstance (value , dict )
34
34
35
35
@staticmethod
36
36
def _validate_condition (rule_name : str , condition : Dict [str , str ]) -> None :
@@ -71,6 +71,7 @@ def _validate_rule(self, feature_name: str, rule: Dict[str, Any]) -> None:
71
71
72
72
def _validate_feature (self , name : str , feature : Dict [str , Any ]) -> None :
73
73
if not feature or not isinstance (feature , dict ):
74
+ # if self._is_dict_and_non_empty(feature):
74
75
raise ConfigurationError (f"Invalid AWS AppConfig JSON schema detected, feature { name } is invalid" )
75
76
76
77
feature_default_value = feature .get (FEATURE_DEFAULT_VAL_KEY )
@@ -89,7 +90,7 @@ def _validate_feature(self, name: str, feature: Dict[str, Any]) -> None:
89
90
self ._validate_rule (name , rule )
90
91
91
92
def validate (self ) -> None :
92
- if self ._is_dict_and_non_empty (self .schema ):
93
+ if not self ._is_dict_and_non_empty (self .schema ):
93
94
raise ConfigurationError (f"Schema must be a dictionary, schema={ str (self .schema )} " )
94
95
95
96
features : Optional [Dict [str , Dict ]] = self .schema .get (FEATURES_KEY )
0 commit comments