#!/usr/bin/env bash OPENAPI_GENERATOR_VERSION=v7.22.0 set -euo pipefail # usage: ./bin/generate-open-api.sh function dart { rm -rf ../mobile/openapi cd ./templates/mobile wget -O api.mustache https://raw.githubusercontent.com/OpenAPITools/openapi-generator/$OPENAPI_GENERATOR_VERSION/modules/openapi-generator/src/main/resources/dart2/api.mustache patch --no-backup-if-mismatch -u api.mustache