@@ -381,31 +381,31 @@ def format_namespace(namespace: List[str]) -> str:
381381def _patch_generated_models () -> None :
382382 """
383383 The OpenAPI generator creates an `api_client` that dynamically looks up
384- model classes from the `polaris .catalog.models` module using `getattr()`.
384+ model classes from the `apache_polaris.sdk .catalog.models` module using `getattr()`.
385385 For example, when a response for a `create_policy` call is received, the
386386 deserializer tries to find the `LoadPolicyResponse` class by looking for
387- `polaris .catalog.models.LoadPolicyResponse`.
387+ `apache_polaris.sdk .catalog.models.LoadPolicyResponse`.
388388
389389 However, the generator fails to add the necessary `import` statements
390390 to the `polaris/catalog/models/__init__.py` file. This means that even
391391 though the model files exist (e.g., `load_policy_response.py`), the classes
392- are not part of the `polaris .catalog.models` namespace.
392+ are not part of the `apache_polaris.sdk .catalog.models` namespace.
393393
394394 This fixture works around the bug in the generated code without modifying
395395 the source files. It runs once per test session, before any tests, and
396396 manually injects the missing response-side model classes into the
397- `polaris .catalog.models` namespace, allowing the deserializer to find them.
397+ `apache_polaris.sdk .catalog.models` namespace, allowing the deserializer to find them.
398398 """
399- import polaris .catalog .models
400- from polaris .catalog .models .applicable_policy import ApplicablePolicy
401- from polaris .catalog .models .get_applicable_policies_response import (
399+ import apache_polaris . sdk .catalog .models
400+ from apache_polaris . sdk .catalog .models .applicable_policy import ApplicablePolicy
401+ from apache_polaris . sdk .catalog .models .get_applicable_policies_response import (
402402 GetApplicablePoliciesResponse ,
403403 )
404- from polaris .catalog .models .list_policies_response import ListPoliciesResponse
405- from polaris .catalog .models .load_policy_response import LoadPolicyResponse
406- from polaris .catalog .models .policy import Policy
407- from polaris .catalog .models .policy_attachment_target import PolicyAttachmentTarget
408- from polaris .catalog .models .policy_identifier import PolicyIdentifier
404+ from apache_polaris . sdk .catalog .models .list_policies_response import ListPoliciesResponse
405+ from apache_polaris . sdk .catalog .models .load_policy_response import LoadPolicyResponse
406+ from apache_polaris . sdk .catalog .models .policy import Policy
407+ from apache_polaris . sdk .catalog .models .policy_attachment_target import PolicyAttachmentTarget
408+ from apache_polaris . sdk .catalog .models .policy_identifier import PolicyIdentifier
409409
410410 models_to_patch = {
411411 "ApplicablePolicy" : ApplicablePolicy ,
@@ -418,4 +418,4 @@ def _patch_generated_models() -> None:
418418 }
419419
420420 for name , model_class in models_to_patch .items ():
421- setattr (polaris .catalog .models , name , model_class )
421+ setattr (apache_polaris . sdk .catalog .models , name , model_class )
0 commit comments