feat: API specs update for version latest#64
Conversation
Greptile SummaryThis PR updates all six Appwrite API specs (OpenAPI 3 and Swagger 2, across client/console/server variants) from version 1.9.3 to 1.9.5, introducing new endpoints and several backwards-incompatible changes.
Confidence Score: 3/5This PR contains multiple simultaneous removals and renames of existing endpoints across all spec variants; existing SDK clients will break at runtime without a coordinated SDK release. The console spec drops GET /projects/{projectId} (projectsGet) with no deprecated alias — any console SDK client fetching a project by ID will 404 after the server change. Combined with the previously flagged renames (proxy rule path, email policy paths, OAuth provider path parameter, suggestQueries parameter), this PR lands several independent breaking changes at once across both spec formats and all three API surfaces. The console spec files (open-api3-latest-console.json, swagger2-latest-console.json) carry the most risk: they have the highest concentration of removed/renamed endpoints. The server spec files also need a second look for the email-policy and OAuth provider renames. Important Files Changed
Reviews (7): Last reviewed commit: "chore: update API specs and SDK examples" | Re-trigger Greptile |
287104a to
b180840
Compare
| @@ -1,7 +1,7 @@ | |||
| { | |||
There was a problem hiding this comment.
Removed
"created" value from rule status enum
The status field of the proxyRule schema previously enumerated four values: "created", "verifying", "verified", "unverified". This PR drops "created" down to three values. Any console client that reads a rule object and branches on status === "created" will now silently fall through to its default/unknown branch. The same change appears in swagger2-latest-console.json. If the server still returns "created" for older rule objects, clients following the new spec will mishandle those responses.
b180840 to
c73222d
Compare
| "statusCode": { | ||
| "type": "string", | ||
| "description": "Variable value. Max length: 8192 chars.", | ||
| "x-example": "<VALUE>" | ||
| "description": "Status code of redirection", | ||
| "x-example": "301", | ||
| "enum": [ | ||
| "301", | ||
| "302", | ||
| "307", | ||
| "308" | ||
| ], | ||
| "x-enum-name": null, | ||
| "x-enum-keys": [ | ||
| "Moved Permanently 301", | ||
| "Found 302", | ||
| "Temporary Redirect 307", | ||
| "Permanent Redirect 308" | ||
| ] |
There was a problem hiding this comment.
Type mismatch:
statusCode request parameter vs redirectStatusCode response field
The proxyCreateRedirectRule request body defines statusCode as type: "string" (line 37143), while the proxyRule response schema defines redirectStatusCode as type: "integer" (line 70863). SDK generators will produce mismatched types for the same conceptual value — callers must pass the string "301" but will receive back the integer 301. The same mismatch is present in swagger2-latest-server.json. Either both should be strings (with the enum on the request side) or both should be integers.
2ae3944 to
0b842bb
Compare
0b842bb to
d61addf
Compare
d61addf to
a461ee4
Compare
| "\/projects\/{projectId}": { | ||
| "get": { | ||
| "summary": "Get project", | ||
| "operationId": "projectsGet", | ||
| "tags": [ | ||
| "projects" | ||
| ], | ||
| "description": "Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata. ", | ||
| "responses": { | ||
| "200": { | ||
| "description": "Project", | ||
| "content": { | ||
| "application\/json": { | ||
| "schema": { | ||
| "$ref": "#\/components\/schemas\/project" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "deprecated": false, | ||
| "x-appwrite": { | ||
| "method": "get", | ||
| "group": "projects", | ||
| "weight": 57, | ||
| "cookies": false, | ||
| "type": "", | ||
| "demo": "projects\/get.md", | ||
| "rate-limit": 0, | ||
| "rate-time": 3600, | ||
| "rate-key": "url:{url},ip:{ip}", | ||
| "scope": "projects.read", | ||
| "platforms": [ | ||
| "console" | ||
| ], | ||
| "packaging": false, | ||
| "public": true, | ||
| "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get.md", | ||
| "auth": { | ||
| "Project": [] | ||
| } | ||
| }, | ||
| "security": [ | ||
| { | ||
| "Project": [] | ||
| } | ||
| ], | ||
| "parameters": [ | ||
| { | ||
| "name": "projectId", | ||
| "description": "Project unique ID.", | ||
| "required": true, | ||
| "schema": { | ||
| "type": "string", | ||
| "x-example": "<PROJECT_ID>" | ||
| }, | ||
| "in": "path" | ||
| } | ||
| ] | ||
| }, | ||
| "patch": { |
There was a problem hiding this comment.
Breaking removal of
projectsGet (GET /projects/{projectId})
The GET /projects/{projectId} endpoint (operationId projectsGet) was removed from the console spec entirely. The replacement is GET /project (operationId projectGet), which is a completely different path with no path parameter. Any existing console SDK client that calls GET /v1/projects/{projectId} to fetch a project by ID will receive a 404 at runtime after the server-side change lands. The same removal is present in swagger2-latest-console.json. This should be coordinated with a corresponding console SDK release, or the old GET /projects/{projectId} route should be preserved as a deprecated alias during a transition period.
This PR contains API specification updates for version latest.