33# Generator: dynamic-openapi-cli
44# CLI name: petstore-cli
55# Version: 1.0.0
6+ # Description: Petstore Mini
67# Spec source: test/fixtures/petstore-mini.yaml
78# Spec MD5: bb864f7025e1408ccdc00f11f5c0e8bb
89# Spec: embedded as base64-encoded JSON (dereferenced OpenAPI v3)
@@ -76,7 +77,7 @@ if [[ "${1:-}" == "install" ]]; then
7677 -h|--help)
7778 printf ' Usage: %s install [--dir <path>] [--copy] [--force]\n' " $CLI_NAME "
7879 printf ' \n'
79- printf ' Installs this CLI into a directory on your PATH.\n'
80+ printf ' Installs this binary into a directory on your PATH.\n'
8081 printf ' \n'
8182 printf ' Options:\n'
8283 printf ' --dir <path> Target directory (default: \$XDG_BIN_HOME or \$HOME/.local/bin)\n'
@@ -125,7 +126,7 @@ if [[ "${1:-}" == "install" ]]; then
125126 printf >&2 ' \n'
126127 printf >&2 ' Then run: exec $SHELL (or open a new terminal)\n'
127128 else
128- printf >&2 ' Run: %s --help\n' " $CLI_NAME "
129+ printf >&2 ' Run: %s --help\n' " $LINK "
129130 fi
130131 exit 0
131132fi
@@ -162,12 +163,12 @@ if [[ "${1:-}" == "uninstall" ]]; then
162163 if [[ -L " $LINK " ]]; then
163164 RESOLVED=" $( readlink " $LINK " 2> /dev/null || true) "
164165 if [[ " $RESOLVED " != " $SELF " ]]; then
165- printf >&2 ' %s uninstall: %s is a symlink to %s, not to this CLI . Pass --force to remove anyway.\n' \
166+ printf >&2 ' %s uninstall: %s is a symlink to %s, not to this binary . Pass --force to remove anyway.\n' \
166167 " $CLI_NAME " " $LINK " " $RESOLVED "
167168 exit 1
168169 fi
169170 elif ! cmp -s " $LINK " " $SELF " ; then
170- printf >&2 ' %s uninstall: %s differs from this CLI . Pass --force to remove anyway.\n' " $CLI_NAME " " $LINK "
171+ printf >&2 ' %s uninstall: %s differs from this binary . Pass --force to remove anyway.\n' " $CLI_NAME " " $LINK "
171172 exit 1
172173 fi
173174 fi
@@ -187,10 +188,10 @@ if [[ "${1:-}" == "update" ]]; then
187188 -h|--help)
188189 printf ' Usage: %s update [--spec <url|file>] [--app-version <version>]\n' " $CLI_NAME "
189190 printf ' \n'
190- printf ' Re-fetches the original spec and rewrites this CLI in-place.\n'
191+ printf ' Re-fetches the original spec and rewrites this binary in-place.\n'
191192 printf ' \n'
192193 printf ' By default, the new CLI_VERSION tracks the spec.info.version of the freshly\n'
193- printf ' fetched spec — the bundled version is a snapshot of the API, not of the CLI .\n'
194+ printf ' fetched spec — the bundled version is a snapshot of the API, not of the binary .\n'
194195 printf ' \n'
195196 printf ' Options:\n'
196197 printf ' --spec <url|file> Use a different spec source (default: the one baked in at bundle time)\n'
@@ -233,7 +234,7 @@ if [[ "${1:-}" == "update" ]]; then
233234 UPDATE_SOURCE=" ${UPDATE_SPEC:- $SPEC_SOURCE } "
234235
235236 if [[ -z " $UPDATE_SOURCE " ]]; then
236- printf >&2 ' %s update: this CLI was bundled from an inline spec — no remote source to refresh.\n' " $CLI_NAME "
237+ printf >&2 ' %s update: this binary was bundled from an inline spec — no remote source to refresh.\n' " $CLI_NAME "
237238 printf >&2 ' Pass --spec <url|file> to update, or re-run "dynamic-openapi-cli bundle" manually.\n'
238239 exit 1
239240 fi
@@ -262,7 +263,7 @@ if [[ "${1:-}" == "update" ]]; then
262263 --name " $CLI_NAME " \
263264 " ${VERSION_ARGS[@]} " \
264265 --out " $TMP " ; then
265- printf >&2 ' %s update: bundle failed, CLI not modified.\n' " $CLI_NAME "
266+ printf >&2 ' %s update: bundle failed, binary not modified.\n' " $CLI_NAME "
266267 exit 1
267268 fi
268269
318319if [[ -n " $SPEC_OVERRIDE " ]]; then
319320 SPEC_FILE=" $SPEC_OVERRIDE "
320321else
321- SPEC_FILE=" $( mktemp -t " ${ CLI_NAME} .XXXXXX.json" ) "
322+ SPEC_FILE=" $( mktemp -t " $CLI_NAME .XXXXXX.json" ) "
322323 trap ' rm -f "$SPEC_FILE"' EXIT
323324 printf ' %s' " $SPEC_B64 " | base64 -d > " $SPEC_FILE "
324325fi
@@ -327,7 +328,4 @@ RUNNER_STR="$(_resolve_runner)" || exit $?
327328read -r -a RUNNER <<< " $RUNNER_STR"
328329
329330exec " ${RUNNER[@]} " \
330- --spec " $SPEC_FILE " \
331- --name " $CLI_NAME " \
332- --app-version " $CLI_VERSION " \
333- " ${PASSTHROUGH[@]} "
331+ --spec " $SPEC_FILE " --name " $CLI_NAME " --app-version " $CLI_VERSION " " ${PASSTHROUGH[@]} "
0 commit comments