@@ -537,8 +537,8 @@ def pydantic_validator(self, stac_type: str) -> Dict:
537537 try :
538538 # Import here to make stac-pydantic an optional dependency
539539 try :
540- from stac_pydantic .extensions import validate_extensions # type: ignore
541540 from pydantic import ValidationError # type: ignore
541+ from stac_pydantic .extensions import validate_extensions # type: ignore
542542 except ImportError :
543543 raise ImportError (
544544 "stac-pydantic is not installed. Install with 'pip install stac-validator[pydantic]'"
@@ -547,6 +547,7 @@ def pydantic_validator(self, stac_type: str) -> Dict:
547547 # Validate based on STAC type
548548 if stac_type == "ITEM" :
549549 from stac_pydantic import Item # type: ignore
550+
550551 model = Item .model_validate (self .stac_content )
551552 message ["schema" ] = ["stac-pydantic Item model" ]
552553
@@ -563,6 +564,7 @@ def pydantic_validator(self, stac_type: str) -> Dict:
563564
564565 elif stac_type == "COLLECTION" :
565566 from stac_pydantic import Collection # type: ignore
567+
566568 model = Collection .model_validate (self .stac_content )
567569 message ["schema" ] = ["stac-pydantic Collection model" ]
568570
@@ -579,6 +581,7 @@ def pydantic_validator(self, stac_type: str) -> Dict:
579581
580582 elif stac_type == "CATALOG" :
581583 from stac_pydantic import Catalog # type: ignore
584+
582585 model = Catalog .model_validate (self .stac_content )
583586 message ["schema" ] = ["stac-pydantic Catalog model" ]
584587
0 commit comments