Rust client library for Boaviztapi.
SDK is generated from the published openAPI specification of Boaviztapi (http://api.boavizta.org/openapi.json).
We use openapi-generator-cli to generate the SDK. See GitHub - OpenAPITools/openapi-generator-cli: A node package wrapper for https://github.com/OpenAPITools/openapi-generator .
```sh
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate -i http://api.boavizta.org/openapi.json -g rust -o /local/ --package-name boaviztaapisdk
docker run --network=host --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate -i http://localhost:5000/openapi.json -g rust -o /local/ --package-name boaviztaapisdk ```
The generated code require some manual updates before being usable.
To generate the SDK for a specific version of BoaviztaAPI (e.g. a dev branch or unreleased version), you have to:
Metadata of Cargo.toml are overwritten by generation.
toml
description = "A Rust client/sdk to access Boavizta API"
homepage = "https://boavizta.org"
repository = "https://github.com/Boavizta/boaviztapi-sdk-rust/"
readme = "README.md"
authors = ["boavizta.org", "olivier de Meringo"]
edition = "2018"
license-file = "LICENSE"
Ensure that the dependency on reqwest
does not use native SSL(the default feature), but uses rust-tls
. It makes cross compiling so much easier.
toml
[dependencies.reqwest]
version = "^0.11"
default-features = false
features = ["json", "multipart", "rustls-tls"]