Skip to content

chore: generate examples from the canonical OpenAPI document - #1882

Merged
ChiragAgg5k merged 3 commits into
mainfrom
chore/canonical-spec-url
Sep 7, 2026
Merged

chore: generate examples from the canonical OpenAPI document#1882
ChiragAgg5k merged 3 commits into
mainfrom
chore/canonical-spec-url

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

Summary

appwrite/specs now publishes one open-api3-<version>.json per current version (appwrite/specs#105, #106), and the generator has selected its platform from that document since 4.8.0. The per-platform OpenAPI 3 files are being removed for 2.0.x and latest, so example.php fetches the canonical file. Swagger 2 documents remain per platform and that path is unchanged. AGENTS.md and README updated to match.

Validation

  • php example.php web console and php example.php node server against the published canonical document: generation succeeds; the Node server example for account.get configures setSession() and the Web console example configures the project only, matching the previous per-platform output.

Related to CLO-4377.

appwrite/specs now publishes one open-api3-<version>.json per current version and the generator selects the platform from it since 4.8.0; the per-platform OpenAPI 3 files are gone for 2.0.x and latest. Swagger 2 documents stay per platform.
@greptile-apps

greptile-apps Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR updates example generation to consume the canonical OpenAPI 3 document while retaining platform-specific Swagger 2 URLs and explicitly selecting the SDK platform.

  • Documents the canonical specification URL and platform-selection behavior.
  • Adds the missing setPlatform() call to the README example.
  • Adds a bounded Rust encoding_rs dependency.

Confidence Score: 5/5

The PR appears safe to merge, with no outstanding correctness or repository-rule violations identified.

The README now passes the selected platform to the SDK, resolving the previously identified platform-filtering problem. That thread was manually resolved without explanation.

Important Files Changed

Filename Overview
example.php Fetches canonical OpenAPI 3 specifications while preserving platform-specific Swagger 2 fetching.
README.md Documents canonical specification usage and now explicitly configures the selected SDK platform.
AGENTS.md Updates contributor guidance for canonical OpenAPI 3 and platform-specific Swagger 2 URLs.
templates/rust/Cargo.toml.twig Adds a bounded encoding_rs dependency to generated Rust SDK manifests.

Reviews (3): Last reviewed commit: "docs: select the platform in the README ..." | Re-trigger Greptile

Comment thread README.md
encoding_rs 0.8.40 requires edition 2024, which cargo 1.83 cannot parse, and cargo 1.83 does not resolve dependencies against rust-version. Pin it below 0.8.40 like the other transitive crates held back for the MSRV.
@ChiragAgg5k
ChiragAgg5k merged commit 599f742 into main Sep 7, 2026
59 checks passed
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