3131 validate_recursion_and_paths ,
3232)
3333from .topology_analyzer import analyze_topology
34- from .catalog_validator import CatalogValidator
34+ from .catalog_schema_validator import CatalogSchemaValidator
3535
3636
3737class A2uiValidatorError (ValueError ):
@@ -116,7 +116,7 @@ def _format_validation_errors(
116116
117117 def validate_components (
118118 self ,
119- catalog_validator : CatalogValidator ,
119+ schema_validator : CatalogSchemaValidator ,
120120 components : List [Dict [str , Any ]],
121121 config : ValidationConfig = ValidationConfig (),
122122 ) -> None :
@@ -126,12 +126,12 @@ def validate_components(
126126 # invalid component and collect all schema validation errors across the payload.
127127 for c in components :
128128 try :
129- catalog_validator .validate_components ([c ])
129+ schema_validator .validate_components ([c ])
130130 except Exception as ce :
131131 errors .append (ce )
132132 if not errors :
133133 try :
134- ref_fields = catalog_validator .extract_ref_fields ()
134+ ref_fields = schema_validator .extract_ref_fields ()
135135 validate_component_integrity (
136136 components ,
137137 ref_fields ,
@@ -150,7 +150,7 @@ def validate_components(
150150
151151 def validate (
152152 self ,
153- catalog_validator : CatalogValidator ,
153+ schema_validator : CatalogSchemaValidator ,
154154 a2ui_payload : Union [Dict [str , Any ], List [Any ]],
155155 config : Optional [ValidationConfig ] = None ,
156156 ) -> None :
@@ -173,14 +173,14 @@ def validate(
173173 if MSG_TYPE_CREATE_SURFACE in msg :
174174 theme = msg [MSG_TYPE_CREATE_SURFACE ].get (THEME_KEY )
175175 if theme :
176- catalog_validator .validate_theme (theme )
176+ schema_validator .validate_theme (theme )
177177 elif MSG_TYPE_UPDATE_COMPONENTS in msg :
178178 components = msg [MSG_TYPE_UPDATE_COMPONENTS ].get (
179179 CATALOG_COMPONENTS_KEY
180180 )
181181 if isinstance (components , list ):
182182 self .validate_components (
183- catalog_validator ,
183+ schema_validator ,
184184 components ,
185185 config = config ,
186186 )
0 commit comments