From 5b7d9bd7b17d1ee65da24afa54380ad786e9e57d Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Fri, 18 Sep 2026 13:35:01 +0100 Subject: [PATCH] docs: list the 2.x versions and refresh the generation notes --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6496db22a..afa532637 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,9 @@ SDK code examples for each supported language, organized by version, platform, a | Version | Specs | Examples | |---------|-------|----------| | latest | [specs/latest](specs/latest) | - | +| 2.2.x | [specs/2.2.x](specs/2.2.x) | [examples/2.2.x](examples/2.2.x) | +| 2.1.x | [specs/2.1.x](specs/2.1.x) | [examples/2.1.x](examples/2.1.x) | +| 2.0.x | [specs/2.0.x](specs/2.0.x) | [examples/2.0.x](examples/2.0.x) | | 1.9.x | [specs/1.9.x](specs/1.9.x) | [examples/1.9.x](examples/1.9.x) | | 1.8.x | [specs/1.8.x](specs/1.8.x) | [examples/1.8.x](examples/1.8.x) | | 1.7.x | [specs/1.7.x](specs/1.7.x) | [examples/1.7.x](examples/1.7.x) | @@ -67,17 +70,17 @@ You can use these specs with any OpenAPI-compatible tool. For example, to genera ```bash # Download the spec -curl -O https://raw.githubusercontent.com/appwrite/specs/main/specs/2.0.x/open-api3-2.0.x.json +curl -O https://raw.githubusercontent.com/appwrite/specs/main/specs/2.2.x/open-api3-2.2.x.json # The document covers every platform. Keep the operations available to one of # them (client, server or console) by filtering on x-appwrite.platforms. jq --arg platform server ' .paths |= (map_values(with_entries(select(.value["x-appwrite"].platforms | index($platform)))) | with_entries(select(.value | length > 0))) -' open-api3-2.0.x.json > open-api3-2.0.x-server.json +' open-api3-2.2.x.json > open-api3-2.2.x-server.json # Generate a client -openapi-generator generate -i open-api3-2.0.x-server.json -g python -o ./sdk +openapi-generator generate -i open-api3-2.2.x-server.json -g python -o ./sdk ``` Or import directly into tools like [Postman](https://www.postman.com/), [Insomnia](https://insomnia.rest/), or [Swagger UI](https://swagger.io/tools/swagger-ui/). @@ -88,13 +91,15 @@ Each example file is a Markdown document showing how to call a specific API meth ## How Specs Are Generated -Specs and examples are automatically generated from the [appwrite/appwrite](https://github.com/appwrite/appwrite) repository using the `specs` CLI task: +Specs and examples are generated from the [appwrite/appwrite](https://github.com/appwrite/appwrite) codebase using the `specs` CLI task: ```bash -php app/cli.php specs --version=1.9.x --git=yes --message="Update specs for 1.9.x" +php app/cli.php specs --version=2.2.x --git=yes --message="Update specs for 2.2.x" ``` -This generates the API specification files, regenerates SDK examples for all supported languages, and creates a PR in this repository. +The task writes the API specification for that version, regenerates SDK examples for every supported language, and opens a PR in this repository. Releases run it through Appwrite's deployment automation rather than by hand, which is why the PRs here are authored by a bot. + +Each version is generated from the code that shipped it, so a document keeps the vendor extensions of its own release. `x-appwrite.config` on an operation, for example, appears from 2.2.x onwards; earlier versions state the same binding with a `ProjectPath` security scheme. ## Contributing