- Notifications
You must be signed in to change notification settings - Fork15
Rust client for Typesense | Work In Progress & Help Wanted
License
typesense/typesense-rust
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Community-maintained Rust client library for Typesense | Work In Progress & Help Wanted!
When updating or adding new parameters and endpoints, make changes directly in theTypesense API spec repository.
Once your changes are merged, you can update this project as follows (you can also run tasks individually):
cargo xtask fetch preprocess code-gen
This will:
- Download the latest API spec.
- Write it to our local
openapi.yml. - Preprocess it into
preprocessed_openapi.yml. - Regenerate the
/typesense_codegencrate.
The preprocessing step does two things:
- Flatten the URL params defined as objects into individual URL parameters (in
preprocess_openapi.rs) - Inject OpenAPI vendor attributes (e.g., generic parameters, schema builders) into the spec before code generation (in
add_vendor_attributes.rs)
You can also runcode-gen directly through Docker:
docker run --rm \ -v $PWD:/local openapitools/openapi-generator-cli generate \ -i /local/preprocessed_openapi.yml \ -g rust \ -o /local/typesense_codegen \ -t /local/openapi-generator-template \ --additional-properties library=reqwest \ --additional-properties supportMiddleware=true \ --additional-properties useSingleRequestParameter=trueMake sure you have a Typesense server up and running:
docker compose up
Then run this command in the root folder to run the integration tests:
cargo test-clean -- --all-features
This is an alias command which will run a script to clean up your Typesense server after the tests finish. You can pass any arguments ofcargo test after the--.
To run test for wasm (chrome, headless):
cargo test-clean --wasm
If you'd like to contribute, please join ourSlack Community and say hello!
About
Rust client for Typesense | Work In Progress & Help Wanted
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.