Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/sdk/generate-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ cat > "${OUTPUT_DIR}/tsconfig.json" << EOF
{
"compilerOptions": {
"target": "ES2022",
"module": "nodenext",
"moduleResolution": "nodenext",
"module": "esnext",
"moduleResolution": "bundler",
"declaration": true,
"outDir": "./dist",
"rootDir": "./src",
Expand Down
3 changes: 2 additions & 1 deletion scripts/sdk/generate-php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ TEMPLATES_DIR="${OAS_ROOT}/templates/php"

echo "Generating PHP SDK v${VERSION} from ${SPEC_FILE}..."

# cd to OAS root so config-relative paths (templateDir: templates/php) resolve
cd "${OAS_ROOT}"
npx @openapitools/openapi-generator-cli generate \
-i "${SPEC_FILE}" \
-g php \
-c "${CONFIGS_DIR}/php.yaml" \
-o "${OUTPUT_DIR}" \
--template-dir "${TEMPLATES_DIR}" \
--additional-properties=invokerPackage=Shotstack\\\\Client,licenseName="MIT",composerPackageName="shotstack/shotstack-sdk-php",srcBasePath="src",artifactVersion="${VERSION}",artifactUrl="https://shotstack.io",developerOrganization="Shotstack",developerOrganizationUrl="https://shotstack.io"

echo "PHP SDK generated at ${OUTPUT_DIR}"
3 changes: 2 additions & 1 deletion scripts/sdk/generate-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ echo "Using openapi-generator v${PYTHON_GENERATOR_VERSION} (Python requires lega

npx @openapitools/openapi-generator-cli version-manager set "${PYTHON_GENERATOR_VERSION}"

# cd to OAS root so config-relative paths (templateDir: templates/python) resolve
cd "${OAS_ROOT}"
npx @openapitools/openapi-generator-cli generate \
-i "${SPEC_FILE}" \
-g python \
-c "${CONFIGS_DIR}/python.yaml" \
-o "${OUTPUT_DIR}" \
--template-dir "${TEMPLATES_DIR}" \
--additional-properties=packageName="shotstack_sdk",projectName="shotstack-sdk",pythonAttrNoneIfUnset=true,packageVersion="${VERSION}",packageUrl="https://shotstack.io/product/sdk/python/",infoName="Shotstack",infoEmail="pypi@shotstack.io",licenseInfo="MIT"

echo "Python SDK generated at ${OUTPUT_DIR}"
3 changes: 2 additions & 1 deletion scripts/sdk/generate-ruby.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ TEMPLATES_DIR="${OAS_ROOT}/templates/ruby"

echo "Generating Ruby SDK v${VERSION} from ${SPEC_FILE}..."

# cd to OAS root so config-relative paths (templateDir: templates/ruby) resolve
cd "${OAS_ROOT}"
npx @openapitools/openapi-generator-cli generate \
-i "${SPEC_FILE}" \
-g ruby \
-c "${CONFIGS_DIR}/ruby.yaml" \
-o "${OUTPUT_DIR}" \
--template-dir "${TEMPLATES_DIR}" \
--additional-properties=moduleName="Shotstack",gemAuthor="Shotstack",gemAuthorEmail="ruby@shotstack.io",gemHomepage="https://shotstack.io/product/sdk/ruby/",gemLicense="MIT",gemVersion="${VERSION}"

echo "Ruby SDK generated at ${OUTPUT_DIR}"
4 changes: 2 additions & 2 deletions scripts/sdk/generate-typescript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ cat > "${OUTPUT_DIR}/tsconfig.json" << EOF
{
"compilerOptions": {
"target": "ES2022",
"module": "nodenext",
"moduleResolution": "nodenext",
"module": "esnext",
"moduleResolution": "bundler",
"declaration": true,
"outDir": "./dist",
"rootDir": "./src",
Expand Down
6 changes: 3 additions & 3 deletions scripts/sdk/smoke-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ case "${LANGUAGE}" in
echo "→ TypeScript type-check..."
cd "${SDK_DIR}"
npm install --ignore-scripts 2>/dev/null || true
npx tsc --noEmit --skipLibCheck
# Use npx -p typescript to ensure we get the real TypeScript compiler, not the 'tsc' npm package
npx -p typescript tsc --noEmit --skipLibCheck
echo "→ Import check..."
node -e "import('./src/index.ts')" 2>/dev/null || \
npx tsx -e "import * as sdk from './src/index'; console.log('Exports:', Object.keys(sdk).length)"
npx -p tsx tsx -e "import * as sdk from './src/index'; console.log('Exports:', Object.keys(sdk).length)"
echo "✓ Node/TypeScript smoke tests passed"
;;

Expand Down
Loading