While validating a client's test double against content/v2/openapi.yml, we found that the GET /{account}/dns_analytics 200 response types data.rows items as scalars, while both the schema's own example and the production API send each row as an array of values (one entry per headers column).
The spec currently reads (around line 2898):
rows:
type: array
items:
anyOf:
- type: integer
- type: string
- $ref: '#/components/schemas/Date'
example: ["example.com", "2024-08-01", 102985]
The example contradicts the items schema: it is one row as a 3-element array, which is what production returns. A response like the following fails validation against the current schema with "got array, want integer" on every row:
{"data": {"headers": ["zone_name", "date", "volume"], "rows": [["example.com", "2024-08-01", 102985]]}}
The items schema should therefore be an array of scalars:
rows:
type: array
items:
type: array
items:
anyOf:
- type: integer
- type: string
- $ref: '#/components/schemas/Date'
example: [["example.com", "2024-08-01", 102985]]
Due to this, any client generated or validated from the spec rejects real dns_analytics responses; we currently carry an explicit exemption for this endpoint in our contract checks and would be happy to drop it.
While validating a client's test double against
content/v2/openapi.yml, we found that theGET /{account}/dns_analytics200 response typesdata.rowsitems as scalars, while both the schema's own example and the production API send each row as an array of values (one entry perheaderscolumn).The spec currently reads (around line 2898):
The
examplecontradicts theitemsschema: it is one row as a 3-element array, which is what production returns. A response like the following fails validation against the current schema with "got array, want integer" on every row:{"data": {"headers": ["zone_name", "date", "volume"], "rows": [["example.com", "2024-08-01", 102985]]}}The items schema should therefore be an array of scalars:
Due to this, any client generated or validated from the spec rejects real
dns_analyticsresponses; we currently carry an explicit exemption for this endpoint in our contract checks and would be happy to drop it.