File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -euo pipefail
33
4- # OpenAPI spec: https://api.ideogram.ai/openapi.json
4+ install_autosdk_cli () {
5+ dotnet tool update --global autosdk.cli --prerelease > /dev/null 2>&1 || \
6+ dotnet tool install --global autosdk.cli --prerelease
7+ }
8+
9+ fetch_spec () {
10+ curl " $@ " \
11+ --fail --silent --show-error --location \
12+ --retry 5 --retry-delay 10 --retry-all-errors \
13+ --connect-timeout 30 --max-time 300
14+ }
515
6- dotnet tool install --global autosdk.cli --prerelease
16+ # OpenAPI spec: https://api.ideogram.ai/openapi.json
17+ install_autosdk_cli
718rm -rf Generated
8- curl --fail --silent --show-error -L https://api.ideogram.ai/openapi.json | jq . > openapi.json
19+ fetch_spec --fail --silent --show-error -L https://api.ideogram.ai/openapi.json | jq . > openapi.json
920autosdk generate openapi.json \
1021 --namespace Ideogram \
1122 --clientClassName IdeogramClient \
You can’t perform that action at this time.
0 commit comments