feat: API specs update for version latest#62
Conversation
Greptile SummaryThis PR updates all six API spec files (OpenAPI 3 and Swagger 2 variants for client, console, and server) to introduce a new
Confidence Score: 3/5The spec changes introduce two issues that could cause incorrect behavior once consumed by SDK generators or server-side enforcement: the scope field type inconsistency and the mismatched scope on the new AI query endpoint. The The server and console specs ( Important Files Changed
|
| "scope": [ | ||
| "policies.read", | ||
| "backups.policies.read" | ||
| ], |
There was a problem hiding this comment.
x-appwrite.scope silently changed type from string to array
The scope field inside x-appwrite was exclusively a JSON string in every previous endpoint definition. This PR converts 87 endpoints across server and console specs to emit an array instead (e.g. ["policies.read", "backups.policies.read"]), while the remaining ~490 endpoints still emit a string. Any SDK generator, documentation tool, or Appwrite server code that reads x-appwrite.scope with a string assumption — e.g. a direct equality check or .includes() call — will silently mishandle all array-scoped endpoints. The same inconsistency is present in swagger2-latest-server.json and the console variants.
| "rate-limit": 10, | ||
| "rate-time": 3600, | ||
| "rate-key": "url:{url},ip:{ip}", | ||
| "scope": "databases.read", |
There was a problem hiding this comment.
consoleSuggestQueries scope databases.read covers only a fraction of supported types
The consoleSuggestQueries endpoint accepts type values spanning all resource domains — users, functions, sites, deployments, sessions, identities, memberships, buckets, providers, etc. — yet its x-appwrite.scope is locked to databases.read. If the backend enforces this scope, a console session without database-read permission would be denied query suggestions for every resource type. Conversely, if the enforcement is relaxed because of this mismatch, the scope field is misleading. The same issue is present in swagger2-latest-console.json.
This PR contains API specification updates for version latest.