Building the ODA Open API SDK for Rust.
Install Rust.
Install OpenAPI Generator.
Generate a client and server for each ODA Open API.
openapi-generator-cli generate --generator-name rust-server --output tmf634 --additional-properties packageName=oda_sdk_tmf634 -i https://raw.githubusercontent.com/tmforum-apis/TMF634_ResourceCatalog/master/TMF634-ResourceCatalog-v4.1.0.swagger.json
openapi-generator-cli generate --generator-name rust-server --output tmf639 --additional-properties packageName=oda_sdk_tmf639 -i https://raw.githubusercontent.com/tmforum-apis/TMF639_ResourceInventory/master/TMF639-ResourceInventory-v4.0.0.swagger.json
Pending resolution of BUG17136 it is necesssary to patch the generated models for the servers:
sed -ie '/#\[validate(/a length(min=1)' tmf{634,639}/src/models.rs
cargo build --workspace
cargo doc --workspace
cargo build --examples --workspace
cargo run --package oda_sdk_tmf634 --example client -- --help
cargo run --package oda_sdk_tmf634 --example server -- --help
cargo run --package oda_sdk_tmf639 --example client -- --help
cargo run --package oda_sdk_tmf639 --example server -- --help