feat: API specs update for version latest#83
Conversation
Greptile SummaryThis PR updates the latest Appwrite OpenAPI specs. The main changes are:
Confidence Score: 3/5Several API contract mismatches in the generated OpenAPI specs should be corrected before merge to avoid broken generated clients and validation failures. The changed files are limited to specs, but repeated query serialization and schema default mismatches affect client generation and request compatibility across console, server, and client specs. specs/latest/open-api3-latest-client.json, specs/latest/open-api3-latest-console.json, specs/latest/open-api3-latest-server.json
What T-Rex did
Reviews (1): Last reviewed commit: "chore: update API specs and SDK examples" | Re-trigger Greptile |
| "name": "resource", | ||
| "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", | ||
| "required": false, | ||
| "schema": { | ||
| "type": "string", | ||
| "default": [] |
There was a problem hiding this comment.
This query parameter is documented as a URI or URI list, but the schema is a string with an array default. OpenAPI clients can generate a string argument whose default value is [], and validators/code generators can reject the schema because the default does not match the declared type. If multiple RFC 8707 resources are supported, this needs an array schema with explicit query serialization; otherwise the default should be a string and the docs should describe a single resource.
Artifacts
Repro: targeted OpenAPI parameter default mismatch harness
- Contains supporting evidence from the run (text/javascript; charset=utf-8).
Repro: validation harness output showing resource string schema with array default mismatch
- Keeps the command output available without making the summary code-heavy.
| "name": "metrics", | ||
| "description": "One to ten metric names. Single-metric callers pass a one-element array. Example: `metrics[]=executions` or `metrics[]=executions&metrics[]=executions.compute` for stacked charts.", | ||
| "required": true, | ||
| "schema": { | ||
| "type": "string", | ||
| "x-example": "<METRIC>" | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| }, |
There was a problem hiding this comment.
The description tells callers to send metrics[]=executions, but this OpenAPI array parameter is named metrics. Generated clients will serialize the required array as repeated metrics parameters by default, not as bracketed metrics[]. If the API expects the bracketed form, generated clients can send a request that omits the required parameter from the backend's point of view.
Artifacts
Repro: executable OpenAPI query serialization harness
- Contains supporting evidence from the run (text/javascript; charset=utf-8).
Repro: structured serialization trace showing metrics=executions versus metrics[]=executions
- Keeps the command output available without making the summary code-heavy.
| "name": "metrics", | ||
| "description": "One to ten metric names. Single-metric callers pass a one-element array. Example: `metrics[]=files.storage` or `metrics[]=files.storage&metrics[]=deployments.storage` for stacked charts.", | ||
| "required": true, | ||
| "schema": { | ||
| "type": "string", | ||
| "x-example": "<METRIC>" | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| }, |
There was a problem hiding this comment.
This required metrics array has the same mismatch as the events endpoint: the docs show metrics[]=files.storage, while the OpenAPI parameter name is metrics. Generated SDKs commonly follow the OpenAPI name and send repeated metrics query parameters, so gauge requests can be rejected or handled as missing metrics when the backend expects metrics[].
Artifacts
Repro: OpenAPI metrics serialization script
- Contains supporting evidence from the run (text/x-python; charset=utf-8).
Repro: serialization trace showing metrics=files.storage versus metrics[] description
- Keeps the command output available without making the summary code-heavy.
| "resource": { | ||
| "type": "string", | ||
| "description": "Resource type when broken down by `resource` (gauges only).", | ||
| "x-example": "file", |
There was a problem hiding this comment.
usageDataPoint is reused by both usageEventList and usageGaugeList, and /usage/events now advertises resource as an allowed breakdown dimension. This property says resource is gauges only, so generated docs and typed clients can treat event resource breakdowns as unsupported even though the events endpoint can return them.
| "resource": { | |
| "type": "string", | |
| "description": "Resource type when broken down by `resource` (gauges only).", | |
| "x-example": "file", | |
| "resource": { | |
| "type": "string", | |
| "description": "Resource type when broken down by `resource`.", | |
| "x-example": "file", |
| "name": "type", | ||
| "description": "Specification type to list. Can be one of: runtimes, builds.", | ||
| "required": false, | ||
| "schema": { | ||
| "type": "string", | ||
| "x-example": "runtimes", | ||
| "default": "runtimes" | ||
| }, |
There was a problem hiding this comment.
| "name": "resource", | ||
| "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", | ||
| "required": false, | ||
| "schema": { | ||
| "type": "string", | ||
| "default": [] |
There was a problem hiding this comment.
This query parameter is documented as a URI or URI list, but the schema is a string with an array default. OpenAPI clients can generate a string argument whose default value is [], and validators/code generators can reject the schema because the default does not match the declared type. If multiple RFC 8707 resources are supported, this needs an array schema with explicit query serialization; otherwise the default should be a string and the docs should describe a single resource.
Artifacts
Repro: targeted OpenAPI resource parameter validation harness
- Contains supporting evidence from the run (text/javascript; charset=utf-8).
Repro: failing validation harness output showing string schema with array default
- Keeps the command output available without making the summary code-heavy.
| "name": "metrics", | ||
| "description": "One to ten metric names. Single-metric callers pass a one-element array. Example: `metrics[]=executions` or `metrics[]=executions&metrics[]=executions.compute` for stacked charts.", | ||
| "required": true, | ||
| "schema": { | ||
| "type": "string", | ||
| "x-example": "<METRIC>" | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| }, |
There was a problem hiding this comment.
The description tells callers to send metrics[]=executions, but this OpenAPI array parameter is named metrics. Generated clients will serialize the required array as repeated metrics parameters by default, not as bracketed metrics[]. If the API expects the bracketed form, generated clients can send a request that omits the required parameter from the backend's point of view.
Artifacts
Repro: executable OpenAPI serialization trace script
- Contains supporting evidence from the run (text/javascript; charset=utf-8).
Repro: serialization trace output showing metrics versus metrics[] mismatch
- Keeps the command output available without making the summary code-heavy.
| "name": "metrics", | ||
| "description": "One to ten metric names. Single-metric callers pass a one-element array. Example: `metrics[]=files.storage` or `metrics[]=files.storage&metrics[]=deployments.storage` for stacked charts.", | ||
| "required": true, | ||
| "schema": { | ||
| "type": "string", | ||
| "x-example": "<METRIC>" | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| }, |
There was a problem hiding this comment.
This required metrics array has the same mismatch as the events endpoint: the docs show metrics[]=files.storage, while the OpenAPI parameter name is metrics. Generated SDKs commonly follow the OpenAPI name and send repeated metrics query parameters, so gauge requests can be rejected or handled as missing metrics when the backend expects metrics[].
Artifacts
Repro: executable OpenAPI serialization script
- Contains supporting evidence from the run (text/javascript; charset=utf-8).
Repro: structured serialization trace output
- Keeps the command output available without making the summary code-heavy.
| "name": "type", | ||
| "description": "Specification type to list. Can be one of: runtimes, builds.", | ||
| "required": false, | ||
| "schema": { | ||
| "type": "string", | ||
| "x-example": "runtimes", | ||
| "default": "runtimes" | ||
| }, |
There was a problem hiding this comment.
This PR contains API specification updates for version latest.