feat: API specs update for version 1.9.x#86
Conversation
7f462c0 to
548a847
Compare
Greptile SummaryThis PR updates all three OpenAPI 3 spec files (client, server, console) for Appwrite 1.9.x, generated from cloud
Confidence Score: 4/5Safe to merge as a spec-only update; the changes reflect intentional 1.9.x API decisions generated from cloud main with no example modifications. The The server spec deserves a second look on the Bearer security scheme wiring and the new OAuth2/organization endpoint security requirements. Important Files Changed
|
| "Bearer": { | ||
| "type": "http", | ||
| "scheme": "bearer", | ||
| "bearerFormat": "JWT", | ||
| "description": "The OAuth access token to authenticate with" | ||
| }, |
There was a problem hiding this comment.
Bearer security scheme defined but never referenced
The new Bearer HTTP security scheme (type: http, scheme: bearer) is added to securitySchemes but is not included in the security array of any operation. The new OAuth2 endpoints that semantically require an OAuth2 access token — oauth2ListOrganizations, oauth2ListProjects — list ProjectPath + Session + JWT + Key instead. If callers are expected to pass their access token via a standard Authorization: Bearer <token> header to these endpoints, those operations need Bearer added to their security requirements; otherwise the security scheme entry is dead and can be removed to avoid confusion in generated SDKs.
Prompt To Fix With AI
This is a comment left during a code review.
Path: specs/1.9.x/open-api3-1.9.x-server.json
Line: 83398-83403
Comment:
**Bearer security scheme defined but never referenced**
The new `Bearer` HTTP security scheme (`type: http, scheme: bearer`) is added to `securitySchemes` but is not included in the `security` array of any operation. The new OAuth2 endpoints that semantically require an OAuth2 access token — `oauth2ListOrganizations`, `oauth2ListProjects` — list `ProjectPath + Session + JWT + Key` instead. If callers are expected to pass their access token via a standard `Authorization: Bearer <token>` header to these endpoints, those operations need `Bearer` added to their `security` requirements; otherwise the security scheme entry is dead and can be removed to avoid confusion in generated SDKs.
How can I resolve this? If you propose a fix, please make it concise.| "default": true, | ||
| "x-example": false | ||
| }, | ||
| "dedicatedDatabaseId": { | ||
| "specification": { | ||
| "type": "string", | ||
| "description": "Optional dedicated database (compute) ID to attach this database to. Leave empty to create a database on the shared pool.", | ||
| "default": "", | ||
| "x-example": "<DEDICATED_DATABASE_ID>", | ||
| "x-appwrite": { | ||
| "idGenerator": "ID.unique" | ||
| } | ||
| "description": "Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.", | ||
| "default": "serverless", | ||
| "x-example": "serverless" | ||
| } |
There was a problem hiding this comment.
dedicatedDatabaseId replaced by specification — breaking parameter rename
The database-create body parameter previously named dedicatedDatabaseId (an opaque ID string) is replaced by specification (a slug like "serverless"). Any existing server SDK user passing dedicatedDatabaseId will silently have that field ignored by the 1.9 server, placing the new database on the wrong compute tier without an error. This is consistent across the create-database call in the server spec, but is worth calling out explicitly in the migration notes for 1.9.x so SDK generators can emit a deprecation or compile-time warning for callers on older generated SDKs.
Prompt To Fix With AI
This is a comment left during a code review.
Path: specs/1.9.x/open-api3-1.9.x-server.json
Line: 16528-16536
Comment:
**`dedicatedDatabaseId` replaced by `specification` — breaking parameter rename**
The database-create body parameter previously named `dedicatedDatabaseId` (an opaque ID string) is replaced by `specification` (a slug like `"serverless"`). Any existing server SDK user passing `dedicatedDatabaseId` will silently have that field ignored by the 1.9 server, placing the new database on the wrong compute tier without an error. This is consistent across the create-database call in the server spec, but is worth calling out explicitly in the migration notes for 1.9.x so SDK generators can emit a deprecation or compile-time warning for callers on older generated SDKs.
How can I resolve this? If you propose a fix, please make it concise.
This PR contains API specification updates for version 1.9.x (client, server, console platforms), generated from the current cloud main.
Synced manually because the "Generate Specs" workflow's examples step currently fails with
Class "Appwrite\SDK\Language\AgentSkills" not found(server-ce references a class no sdk-generator release ships) — the spec generation step itself succeeded. Examples are unchanged.Needed to unblock appwrite/sdk-generator#1653 validation, which generates the console CLI/web SDKs from these specs.