mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
Our SDKs are generated by openapi-generator on our own CI. The docs said a hosted third-party service, which we retired: hanzoai/openapi's LLM.md and its regenerate-sdks.yml both already said so, while its README still called that service "canonical" and told a reader to fetch an API key for it out of KMS. Two sources disagreeing is how somebody follows the wrong one, and the wrong one here sends them looking for a credential that should not exist. The same claim had spread to what customers and agents read: five pages on docs.hanzo.ai and six agent skills advertised a vendor we do not use, and hip-0040 -- the standard for multi-language SDKs -- argued FOR it by name. The argument survives without the brand, because it was never about the vendor: one spec beats N hand-written clients. python-sdk's mock script also pulled that vendor's fork of prism-cli; it takes upstream @stoplight/prism-cli now. What is deliberately left alone is every occurrence that is not about us: a filament material in a 3D-printer integration, a browser of that name in three user-agent parsers, tokenizer vocabulary where the string is a token id, and citations recording where Mux, Perigon and Stigg publish their own specs. Renaming any of those breaks something real.
42 lines
861 B
Bash
Executable File
42 lines
861 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
if [[ -n "$1" && "$1" != '--'* ]]; then
|
|
URL="$1"
|
|
shift
|
|
else
|
|
URL="$(grep 'openapi_spec_url' .stats.yml | cut -d' ' -f2)"
|
|
fi
|
|
|
|
# Check if the URL is empty
|
|
if [ -z "$URL" ]; then
|
|
echo "Error: No OpenAPI spec path/url provided or found in .stats.yml"
|
|
exit 1
|
|
fi
|
|
|
|
echo "==> Starting mock server with URL ${URL}"
|
|
|
|
# Run prism mock on the given spec
|
|
if [ "$1" == "--daemon" ]; then
|
|
npm exec --package=@stoplight/[email protected] -- prism mock "$URL" &> .prism.log &
|
|
|
|
# Wait for server to come online
|
|
echo -n "Waiting for server"
|
|
while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
|
|
echo -n "."
|
|
sleep 0.1
|
|
done
|
|
|
|
if grep -q "✖ fatal" ".prism.log"; then
|
|
cat .prism.log
|
|
exit 1
|
|
fi
|
|
|
|
echo
|
|
else
|
|
npm exec --package=@stoplight/[email protected] -- prism mock "$URL"
|
|
fi
|