Skip to content

Commit

Permalink
[front] fix: syntax error generated by openapi typescript codegen (#1505
Browse files Browse the repository at this point in the history
)
  • Loading branch information
GresilleSiffle authored Apr 13, 2023
1 parent 8b3a436 commit 6991cac
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 67 deletions.
8 changes: 8 additions & 0 deletions frontend/scripts/generate-services-from-openapi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
set -Eeuxo pipefail

CURRENT_DIR="$(realpath -e "$(dirname "$0")")"
FRONTEND_ROOT=$(dirname $CURRENT_DIR)

cd "$CURRENT_DIR"

if [[ "${NODE_ENV:-"development"}" == "production" ]]; then
Expand All @@ -12,3 +14,9 @@ fi

cd ..
yarn run openapi

# Fix the syntax error generated by OpenAPI Typescript Codegen.
# See: https://github.com/ferdikoomen/openapi-typescript-codegen/issues/1299
if [ -f ${FRONTEND_ROOT}/src/services/openapi/models/BlankEnum.ts ]; then
cp ${FRONTEND_ROOT}/scripts/patches/BlankEnum.ts ${FRONTEND_ROOT}/src/services/openapi/models/
fi
Loading

0 comments on commit 6991cac

Please sign in to comment.