Skip to content

[BUG] hostinger_api.api.vps_firewall_api.VPSFirewallApi.get_firewall_list_v1() throws exception #2

@dldinternet

Description

@dldinternet

Bug Description

hostinger_api.api.vps_firewall_api.VPSFirewallApi.get_firewall_list_v1() throws a ValidationError because the response does NOT have JSON that matches the VPSGetFirewallListV1200Response shape
The response matches List[VPSV1FirewallFirewallResource]

Steps to Reproduce

  1. Call hostinger_api.api.vps_firewall_api.VPSFirewallApi.get_firewall_list_v1()

Expected Behavior

Get back a list of firewall objects

Actual Behavior

ValidationError exception

Screenshots

Error Messages / Stack Trace

stacktrace:

    response = self.firewall_api.get_firewall_list_v1()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/pydantic/_internal/_validate_call.py", line 39, in wrapper_function
    return wrapper(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/pydantic/_internal/_validate_call.py", line 136, in __call__
    res = self.__pydantic_validator__.validate_python(pydantic_core.ArgsKwargs(args, kwargs))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/hostinger_api/api/vps_firewall_api.py", line 2072, in get_firewall_list_v1
    return self.api_client.response_deserialize(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/hostinger_api/api_client.py", line 317, in response_deserialize
    return_data = self.deserialize(response_text, response_type, content_type)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/hostinger_api/api_client.py", line 418, in deserialize
    return self.__deserialize(data, response_type)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/hostinger_api/api_client.py", line 465, in __deserialize
    return self.__deserialize_model(data, klass)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/hostinger_api/api_client.py", line 795, in __deserialize_model
    return klass.from_dict(data)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/hostinger_api/models/vps_get_firewall_list_v1200_response.py", line 91, in from_dict
    return cls.model_validate(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/pydantic/main.py", line 705, in model_validate
    return cls.__pydantic_validator__.validate_python(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions