mirror of
https://github.com/m1k1o/neko-rooms.git
synced 2026-11-03 07:01:35 -06:00
26 lines
706 B
Bash
Executable File
26 lines
706 B
Bash
Executable File
#!/bin/bash
|
|
|
|
rm -rf ../client/src/api
|
|
mkdir ../client/src/api
|
|
|
|
docker run --rm \
|
|
--user "$(id -u):$(id -g)" \
|
|
-v "${PWD}/../client/src/api:/local/out" \
|
|
-v "${PWD}/../OpenApi.yml:/local/in.yaml" \
|
|
openapitools/openapi-generator-cli generate \
|
|
-i /local/in.yaml \
|
|
-g typescript-axios \
|
|
-o /local/out \
|
|
--additional-properties=enumPropertyNaming=original,modelPropertyNaming=original
|
|
|
|
# Remove not needed git_push.sh
|
|
rm -f ../client/src/api/git_push.sh
|
|
|
|
# Fix lint errors
|
|
docker run --rm -it \
|
|
--user "$(id -u):$(id -g)" \
|
|
-v "${PWD}/../client:/app" \
|
|
--entrypoint="npm" \
|
|
--workdir="/app" \
|
|
node:20-bookworm-slim run lint -- --fix src/api
|