Summary
The OpenAPI schema for GET /api/vps/v1/firewall (operationId: VPS_getFirewallListV1) declares its 200 response as an object envelope { data, meta }. However, the live API returns a bare JSON array of firewall resources — i.e. the VPS.V1.Firewall.FirewallCollection directly, with no wrapper object.
Evidence
Every other list endpoint in openapi.json references its *Collection schema directly. VPS_getFirewallListV1 is the only outlier:
| operationId |
200 response schema |
billing_getCatalogItemListV1 |
Billing.V1.Catalog.CatalogItemCollection |
billing_getPaymentMethodListV1 |
Billing.V1.PaymentMethod.PaymentMethodCollection |
billing_getSubscriptionListV1 |
Billing.V1.Subscription.SubscriptionCollection |
DNS_getDNSSnapshotListV1 |
DNS.V1.Snapshot.SnapshotCollection |
domains_getDomainListV1 |
Domains.V1.Domain.DomainCollection |
domains_getWHOISProfileListV1 |
Domains.V1.WHOIS.ProfileCollection |
VPS_getDataCenterListV1 |
VPS.V1.DataCenter.DataCenterCollection |
VPS_getProjectListV1 |
VPS.V1.DockerManager.ProjectCollection |
VPS_getFirewallListV1 |
{ "type": "object", "properties": { "data", "meta" } } ← outlier |
Actual response body from GET /api/vps/v1/firewall (bare array, no envelope):
[
{
"id": 255211,
"name": "...",
"is_synced": true,
"rules": [ { "id": 880659, "action": "accept", "protocol": "SSH", "port": "22", "source": "any", "source_detail": "any" } ],
"created_at": "2026-03-31T20:35:32Z",
"updated_at": "2026-04-05T23:48:01Z"
}
]
Impact
This breaks the official CLI hostinger/api-cli. oapi-codegen generates ParseVPSGetFirewallListV1Response to unmarshal the 200 body into a struct { Data *...; Meta * }, which fails against the array:
json: cannot unmarshal array into Go value of type struct { Data *client.VPSV1FirewallFirewallCollection `json:"data,omitempty"`; Meta *client.CommonSchemaPaginationMetaSchema `json:"meta,omitempty"` }
As a result, hapi vps firewall list aborts (log.Fatal). All other list subcommands work because their schemas reference the collection directly.
Proposed fix
In openapi.json, change the 200 response schema of VPS_getFirewallListV1 to reference the collection directly, consistent with every other list endpoint:
"schema": {
"$ref": "#/components/schemas/VPS.V1.Firewall.FirewallCollection"
}
(replacing the current { "type": "object", "properties": { "data": {...}, "meta": {...} } }).
Summary
The OpenAPI schema for
GET /api/vps/v1/firewall(operationId: VPS_getFirewallListV1) declares its200response as an object envelope{ data, meta }. However, the live API returns a bare JSON array of firewall resources — i.e. theVPS.V1.Firewall.FirewallCollectiondirectly, with no wrapper object.Evidence
Every other list endpoint in
openapi.jsonreferences its*Collectionschema directly.VPS_getFirewallListV1is the only outlier:200response schemabilling_getCatalogItemListV1Billing.V1.Catalog.CatalogItemCollectionbilling_getPaymentMethodListV1Billing.V1.PaymentMethod.PaymentMethodCollectionbilling_getSubscriptionListV1Billing.V1.Subscription.SubscriptionCollectionDNS_getDNSSnapshotListV1DNS.V1.Snapshot.SnapshotCollectiondomains_getDomainListV1Domains.V1.Domain.DomainCollectiondomains_getWHOISProfileListV1Domains.V1.WHOIS.ProfileCollectionVPS_getDataCenterListV1VPS.V1.DataCenter.DataCenterCollectionVPS_getProjectListV1VPS.V1.DockerManager.ProjectCollectionVPS_getFirewallListV1{ "type": "object", "properties": { "data", "meta" } }← outlierActual response body from
GET /api/vps/v1/firewall(bare array, no envelope):[ { "id": 255211, "name": "...", "is_synced": true, "rules": [ { "id": 880659, "action": "accept", "protocol": "SSH", "port": "22", "source": "any", "source_detail": "any" } ], "created_at": "2026-03-31T20:35:32Z", "updated_at": "2026-04-05T23:48:01Z" } ]Impact
This breaks the official CLI
hostinger/api-cli.oapi-codegengeneratesParseVPSGetFirewallListV1Responseto unmarshal the200body into astruct { Data *...; Meta * }, which fails against the array:As a result,
hapi vps firewall listaborts (log.Fatal). All other list subcommands work because their schemas reference the collection directly.Proposed fix
In
openapi.json, change the200response schema ofVPS_getFirewallListV1to reference the collection directly, consistent with every other list endpoint:(replacing the current
{ "type": "object", "properties": { "data": {...}, "meta": {...} } }).