-
Notifications
You must be signed in to change notification settings - Fork 7
feat: indexer api client and minor jinja generator fixes #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b1dd4b8 to
65c9974
Compare
Updates the OAS parser to represent top-level array schemas as type aliases (e.g., Vec) instead of structs. This simplifies the generated Rust code and avoids creating unnecessary empty structs for array types. Also it renames and refactors the 'StateDelta' and 'TealKeyValueStore' to be type aliases rather than structs.
Adds the Indexer client to algokit-utils, enabling interaction with the Algorand Indexer service. This includes: - Integration of the `indexer_client` crate. - Updates to `AlgorandClient` to support Indexer configuration. - Addition of methods in `ClientManager` to manage Indexer client instances. - Adds pre-commit hooks for formatting, linting, and testing the API OAS generator code. - Adds integration tests for the Indexer client.
…ns; refine ci Introduces a composite action to set up Rust, Bun, and Python dependencies. Implements CI workflows for linting, testing, generating, and verifying the API client code. This includes output stability checks and compilation tests. Adds a scheduled workflow to convert OpenAPI specifications and identify any necessary updates. Fixes typos in the OpenAPI specification and generated code.
This change introduces a set of helper functions to facilitate testing involving the Algorand Indexer. It provides functionality to wait for the indexer to catch up with transactions or applications, with configurable retry logic and error handling. This ensures tests can reliably verify the state of the indexer after submitting transactions. This commit also removes the previous implementation of indexer waiting logic, and replaces it with the new helpers.
65c9974 to
2616b0c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds initial support for the indexer client along with minor tweaks to the API generator tooling. The main purpose is to introduce a new HTTP client library for interacting with Algorand's indexer API alongside the existing algod client.
- Adds new indexer API client with complete endpoint coverage and type-safe request/response handling
- Expands API generation tooling to support both algod and indexer client generation
- Updates documentation to include the new indexer client alongside the existing algod client
Reviewed Changes
Copilot reviewed 159 out of 161 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tools/api_tools/src/main.rs | Adds new CLI commands for indexer client generation, formatting, and OpenAPI conversion |
| docs/book/api_index.md | Documents the new algod_client and indexer_client HTTP libraries |
| crates/indexer_client/ | Contains the complete generated indexer client with models, APIs, and type definitions |
crates/indexer_client/src/models/transaction_signature_multisig_subsignature.rs
Show resolved
Hide resolved
Adds functionality to parse string enums from the OAS specification and generate corresponding Rust enums. This includes adding a new `enum_values` field to the `Schema` dataclass and a macro for generating Rust enums from string values. The changes also refactor the `OASParser` class to improve readability and maintainability by extracting several methods for handling vendor extensions, array schemas, and properties. This makes the code easier to understand and modify in the future.
api/oas_generator/rust_oas_generator/templates/apis/client.rs.j2
Outdated
Show resolved
Hide resolved
api/oas_generator/rust_oas_generator/templates/apis/endpoint.rs.j2
Outdated
Show resolved
Hide resolved
|
🎉 This PR is included in version 1.0.0-alpha.52 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.0.0-alpha.44 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Adds minor tweaks to api generator along with initial support for indexer client.