hatchet-sdk 0.2.8

This is an unofficial Rust SDK for Hatchet, a distributed, fault-tolerant task queue.
Documentation
#!/bin/bash
#
# Script to generate OpenAPI client code

set -eux

tmp_dir=./tmp

openapi-generator generate -i api-contracts/openapi/openapi.yaml \
    -g rust \
    --skip-validate-spec \
    --global-property=apiTests=false \
    --global-property=apiDocks=true \
    --global-property=modelTests=false \
    --global-property=modelDocs=true \
    -o $tmp_dir

# Replace all instances of crate:: with crate::clients::rest:: in generated files
find $tmp_dir -name "*.rs" -type f -exec sed -i '' 's/crate::/crate::clients::rest::/g' {} +

# Due to possible bug, replace instances of <Object> with <serde_json::Value>
find $tmp_dir -name "*.rs" -type f -exec sed -i '' 's/<Object>/<serde_json::Value>/g' {} +

# Update event IDs to i64
sed -i '' 's/pub id: i32/pub id: i64/g' "$tmp_dir/src/models/v1_task_event_list_200_response_rows_inner.rs"
sed -i '' 's/pub fn new(id: i32/pub fn new(id: i64/g' "$tmp_dir/src/models/v1_task_event_list_200_response_rows_inner.rs"

mv $tmp_dir/src/lib.rs $tmp_dir/src/mod.rs

cp -r $tmp_dir/src/* src/clients/rest

rm -r $tmp_dir