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
14 changes: 6 additions & 8 deletions build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

DOCS_DIR=build/docs
OAS3_YAML=api.oas3.yaml
OAS3_JSON=api.oas3.json
OAS3_JSON=$DOCS_DIR/api.bundled.json
mkdir -p $DOCS_DIR

# Validate OpenAPI 3.0 YAML
./node_modules/.bin/swagger-cli validate $OAS3_YAML

# Resolve YAML files in to one master JSON file
./node_modules/.bin/swagger-cli bundle -o $OAS3_JSON $OAS3_YAML
./node_modules/.bin/swagger-cli bundle -o $OAS3_JSON $OAS3_YAML -t json

# Split bundled spec into per-API JSON files (api.edit.json, api.serve.json, api.ingest.json)
node scripts/split-by-api.cjs $OAS3_JSON $DOCS_DIR

# Convert OpenAPI to doc to Shins Markdown
./node_modules/.bin/widdershins \
Expand All @@ -20,13 +23,9 @@ mkdir -p $DOCS_DIR

cp $DOCS_DIR/index.html.md .shins/source/index.html.md

# Replace Create, Serve, Ingest API URL's as overrides do not work
# Replace Serve, Ingest API URL's as overrides do not work
sed -i -e 's/https:\/\/api.shotstack.io\/edit\/{version}\/assets/https:\/\/api.shotstack.io\/serve\/{version}\/assets/g' .shins/source/index.html.md
sed -i -e 's/https:\/\/api.shotstack.io\/edit\/{version}\/sources/https:\/\/api.shotstack.io\/ingest\/{version}\/sources/g' .shins/source/index.html.md
sed -i -e 's/https:\/\/api.shotstack.io\/edit\/{version}\/createassets/https:\/\/api.shotstack.io\/create\/{version}\/assets/g' .shins/source/index.html.md

# Openapi doesn't support duplicate path mapping
sed -i -e 's/\/path_alias_createassets/\/assets/g' .shins/source/index.html.md

# Build the Shins docs HTML
cd .shins
Expand All @@ -51,4 +50,3 @@ if [ -f .tags ]; then
fi

rm -f ./$DOCS_DIR/index.html.md
rm -f $OAS3_JSON
7 changes: 0 additions & 7 deletions build-sdks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,6 @@ $OPENAPI_GENERATOR generate -i $SPEC_FILE_JSON -g python -c $CONFIGS_DIR/python.
printf "\n========================================= \n"
printf "\nPython SDK Generated\n\n"

# Openapi doesn't support duplicate path mapping
sed -i -e 's/\/path_alias_createassets/\/assets/g' $BUILD_DIR/node/dist/api/CreateApi.js
sed -i -e 's/\/path_alias_createassets/\/assets/g' $BUILD_DIR/typescript/api/createApi.ts
sed -i -e 's/\/path_alias_createassets/\/assets/g' $BUILD_DIR/php/src/Api/CreateApi.php
sed -i -e 's/\/path_alias_createassets/\/assets/g' $BUILD_DIR/python/shotstack_sdk/api/create_api.py
sed -i -e 's/\/path_alias_createassets/\/assets/g' $BUILD_DIR/ruby/lib/shotstack/api/create_api.rb

# Revert back to stable version
$OPENAPI_GENERATOR version-manager set $OPENAPI_GENERATOR_VERSION_STABLE

Expand Down
34 changes: 0 additions & 34 deletions paths/generateasset.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions paths/generateassetid.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions schemas/create/didGeneratedAsset.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions schemas/create/didGeneratedAssetOptions.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions schemas/create/didTextToAvatarOptions.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions schemas/create/elevenlabsGeneratedAsset.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions schemas/create/elevenlabsGeneratedAssetOptions.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions schemas/create/elevenlabsTextToSpeechOptions.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions schemas/create/generatedAsset.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions schemas/create/heygenGeneratedAsset.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions schemas/create/heygenGeneratedAssetOptions.yaml

This file was deleted.

Loading
Loading