Skip to content

feat: API specs update for version latest#81

Merged
ChiragAgg5k merged 1 commit into
mainfrom
feat-latest-specs
Jun 19, 2026
Merged

feat: API specs update for version latest#81
ChiragAgg5k merged 1 commit into
mainfrom
feat-latest-specs

Conversation

@appwrite-specs

Copy link
Copy Markdown
Contributor

This PR contains API specification updates for version latest.

@greptile-apps

greptile-apps Bot commented Jun 19, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates the Appwrite API specs for the latest version, adding OAuth2 OIDC extensions (RP-Initiated Logout, Device Authorization Grant, token exchange, token revocation) and refactoring the usage analytics schemas.

  • New OAuth2 endpoints across all three specs: POST /oauth2/{project_id}/device_authorization, GET /oauth2/{project_id}/logout, POST /oauth2/{project_id}/revoke, and POST /oauth2/{project_id}/token (server/console only); existing grants and authorize endpoints gain console platform support and migrate from Project to ProjectPath auth.
  • Schema refactor: usageEvent and usageGauge are replaced by a unified usageGroup type; usageEventList and usageGaugeList now wrap groups arrays with an interval field instead of total/events/gauges — this is a breaking change for any existing client consuming those schemas.
  • app schema extended with postLogoutRedirectUris (required field) and the ImpersonateUser* security scheme descriptions were shortened, removing the previous detailed security caveats about impersonation requirements.

Confidence Score: 3/5

The new revoke endpoint carries an incorrect response schema in all three spec files; generated SDKs will expect a binary file body for a token revocation call that actually returns an empty response.

The oauth2Revoke endpoint in all three specs declares its 200 OK response as description: File with type: string, format: binary — a copy-paste artifact from a file-download endpoint. RFC 7009 requires an empty body on success, so any SDK generated from this spec will be mistyped and may fail to handle the actual server response.

All three spec files need the oauth2Revoke response corrected; open-api3-latest-console.json also carries the largest diff and the breaking usageGroup schema refactor worth a second look.

Important Files Changed

Filename Overview
specs/latest/open-api3-latest-server.json Adds new OAuth2 endpoints (device authorization, token exchange, revoke), new schemas (oauth2DeviceAuthorization, oauth2Token, usageGroup), and refactors usage schemas; the revoke endpoint response is incorrectly typed as a binary file instead of an empty body.
specs/latest/open-api3-latest-client.json Adds OAuth2 device authorization, logout, revoke endpoints; updates platform scoping for existing OAuth2 endpoints; carries the same incorrect binary response schema on the revoke endpoint.
specs/latest/open-api3-latest-console.json Adds full oauth2 tag with all new endpoints (logout, device authorization, token, revoke), refactors usageEvent/usageGauge into usageGroup, adds postLogoutRedirectUris to app schema; revoke endpoint response schema is incorrect.

Reviews (1): Last reviewed commit: "chore: update API specs and SDK examples" | Re-trigger Greptile

Comment on lines +31461 to +31471
"200": {
"description": "File",
"content": {
"application\/json": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Incorrect response schema for token revocation endpoint

The oauth2Revoke endpoint declares a 200 OK response with "description": "File" and schema: { type: "string", format: "binary" }. Per RFC 7009 (OAuth 2.0 Token Revocation, Section 2.2), a successful revocation returns an empty body — not a binary file. The "File" description and binary format schema appear to be copy-paste from a file-download endpoint. Generated SDK clients will incorrectly expect a binary blob and may fail to handle the actual empty response. The same issue appears in open-api3-latest-client.json (line 12123) and open-api3-latest-console.json (line 45910).

@ChiragAgg5k ChiragAgg5k merged commit fd5eba1 into main Jun 19, 2026
2 checks passed
@ChiragAgg5k ChiragAgg5k deleted the feat-latest-specs branch June 19, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant