-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
Line 1929 in 2b8fda8
| "content": { |
The response schema is incorrect. The actual API returns the Collection:
Steps to Reproduce
Both the hapi vps firewall list CLI fails as well as the python SDK.
This Python hack compensates:
# Get the raw API response to access all fields
rresponse = self.firewall_api.get_firewall_list_v1_without_preload_content()
_response_types_map: dict[str, str | None] = {
# '200': "VPSGetFirewallListV1200Response",
'200': "List[VPSV1FirewallFirewallResource]",
'401': "InlineObject1",
'500': "InlineObject",
}
from hostinger_api import rest
response_data = rest.RESTResponse(rresponse)
response_data.read()
response = self._client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
Expected Behavior
Expect hapi vps firewall list to work right.
Actual Behavior
↳ hapi vps firewall list
Using config file: /Users/christo/.hapi.yaml
2025/09/17 12:01:15 json: cannot unmarshal array into Go value of type struct { Data *[]client.VPSV1FirewallFirewallResource "json:"data,omitempty""; Meta *client.CommonSchemaPaginationMetaSchema "json:"meta,omitempty"" }
Screenshots
Error Messages / Stack Trace
↳ hapi vps firewall list
Using config file: /Users/christo/.hapi.yaml
2025/09/17 12:01:15 json: cannot unmarshal array into Go value of type struct { Data *[]client.VPSV1FirewallFirewallResource "json:\"data,omitempty\""; Meta *client.CommonSchemaPaginationMetaSchema "json:\"meta,omitempty\"" }
Additional Context
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working