Skip to content

typesense/typesense-rust

Repository files navigation

Typesense (rust library)

Crate API

Community-maintained Rust client library for Typesense | Work In Progress & Help Wanted!

Development

When updating or adding new parameters and endpoints, make changes directly in the Typesense API spec repository.

Once your changes are merged, you can update this project as follows (you can also run tasks individually):

cargo xtask fetch code-gen

This will:

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 run code-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=true

If you'd like to contribute, please join our Slack Community and say hello!

About

Rust client for Typesense | Work In Progress & Help Wanted

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published