Skip to content

feat: API specs update for version 1.9.x#78

Merged
ChiragAgg5k merged 1 commit into
mainfrom
feat-1.9.x-specs
Jun 11, 2026
Merged

feat: API specs update for version 1.9.x#78
ChiragAgg5k merged 1 commit into
mainfrom
feat-1.9.x-specs

Conversation

@appwrite-specs

Copy link
Copy Markdown
Contributor

This PR contains API specification updates for version 1.9.x.

@greptile-apps

greptile-apps Bot commented Jun 11, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates the Appwrite 1.9.x API specs and code examples with several improvements: adding x-enum-keys metadata to all enum types, moving transactionId from request body to query parameter on DELETE endpoints, enriching binary/image response content types, deduplicating platforms arrays, and adding a type field to backup policy models.

  • Type mismatch in defaults: Every \"type\": \"object\" field that previously had \"default\": {} has been changed to \"default\": [] across all six spec files. This is an invalid JSON Schema default for an object type — affected fields include document data payloads, screenshot headers, and function execution headers, spanning 40+ occurrences total.
  • Go geospatial examples corrected: Type signature fixed from []interface{} to [][]interface{} for line/point/polygon attribute defaults, which is the correct nested-array representation.
  • REST delete examples updated: transactionId body removed from delete-document, delete-documents, delete-row, and delete-rows examples to match the API change moving it to a query parameter.

Confidence Score: 3/5

The spec files contain a widespread default-value type mismatch that will affect SDK code generators consuming these specs.

All six spec files set "default":[] on fields explicitly typed as "type":"object" — document data payloads, header maps, and similar. This appears in 40+ locations across the OpenAPI 3 and Swagger 2 variants for server, console, and client. SDK generators that read these defaults will initialize object-typed parameters as arrays instead of empty objects, producing type errors at runtime. The remainder of the changes (x-enum-keys, transactionId query-param migration, Go type fixes, binary response schemas) look correct.

All three OpenAPI 3 spec files (server, console, client) need close attention for the default-value issue; the swagger2 server and console specs have fewer but still present occurrences.

Important Files Changed

Filename Overview
specs/1.9.x/open-api3-1.9.x-server.json Large spec update: adds x-enum-keys, improves binary response content types, moves transactionId to query param, deduplicates platforms arrays — but introduces a widespread type mismatch where all "type":"object" fields now carry "default":[] instead of "default":{}
specs/1.9.x/open-api3-1.9.x-console.json Similar to the server spec: x-enum-keys additions, transactionId refactoring, binary response improvements, and 23+ occurrences of "type":"object" fields with "default":[] (should be "default":{})
specs/1.9.x/open-api3-1.9.x-client.json Mirrors server/console changes; 15+ "type":"object" fields incorrectly set to "default":[] instead of "default":{}
specs/1.9.x/swagger2-1.9.x-server.json Swagger2 equivalent of server spec changes; transactionId moved to query param, 4 object-type fields set to "default":[] incorrectly
specs/1.9.x/swagger2-1.9.x-console.json Swagger2 console spec update with transactionId refactoring and similar structural changes
specs/1.9.x/swagger2-1.9.x-client.json Swagger2 client spec update; no major issues found in the changed portions
examples/1.9.x/server-go/examples/databases/create-line-attribute.md Go type corrected from []interface{} to [][]interface{} for geospatial line/point/polygon attribute defaults — correct fix
examples/1.9.x/server-rest/examples/databases/delete-document.md Removed transactionId request body from delete-document REST example, consistent with transactionId being moved to query param in the spec
examples/1.9.x/server-rest/examples/databases/delete-documents.md Removed request body JSON blocks for delete-documents; leaves a stray blank line before the closing code fence
examples/1.9.x/server-graphql/examples/backups/create-policy.md Added "type" field to backup policy GraphQL query response fragments

Reviews (1): Last reviewed commit: "chore: update API specs with OpenAPI 3 p..." | Re-trigger Greptile

Comment on lines 6113 to +6115
"type": "object",
"x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}",
"default": {}
"default": [],
"x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}"

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 Object-typed field assigned an array default

Throughout this file (and across open-api3-1.9.x-console.json, open-api3-1.9.x-client.json, and the swagger2 variants), every "type": "object" field that previously had "default": {} has been changed to "default": []. Per JSON Schema, the default value must be valid against the declared schema type; an array literal [] is not a valid default for a schema with "type": "object". SDK code generators and validators that consume these specs will produce type-incorrect defaults — e.g., a headers map or a document data map initialized as an empty array rather than an empty object. This pattern repeats at least 19 times in this file alone (screenshot headers at line 6114, document data at line 18023, function-execution headers at line 21853, and many more), and also appears in the console and client OpenAPI3 specs.

@ChiragAgg5k ChiragAgg5k merged commit c3b6cd4 into main Jun 11, 2026
2 checks passed
@ChiragAgg5k ChiragAgg5k deleted the feat-1.9.x-specs branch June 11, 2026 04:25
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