mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
Merge remote-tracking branch 'origin/demodesk-client-v3' into v3
This commit is contained in:
20
client/dev/api-gen
Executable file
20
client/dev/api-gen
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
OPENAPI_URL="https://raw.githubusercontent.com/demodesk/neko/master/openapi.yaml"
|
||||
|
||||
rm -rf "${PWD}/../src/component/api"
|
||||
mkdir "${PWD}/../src/component/api"
|
||||
|
||||
docker run --rm \
|
||||
--user "$(id -u):$(id -g)" \
|
||||
-v "${PWD}/../src/component/api:/local/out" \
|
||||
openapitools/openapi-generator-cli generate \
|
||||
-i "$OPENAPI_URL" \
|
||||
-g typescript-axios \
|
||||
-o /local/out \
|
||||
--additional-properties=enumPropertyNaming=original,modelPropertyNaming=original,withSeparateModelsAndApi=true,modelPackage=models,apiPackage=api
|
||||
|
||||
# Remove not needed git_push.sh
|
||||
rm -f "${PWD}/../src/component/api/git_push.sh"
|
||||
|
||||
# Fix lint errors
|
||||
./npm run lint -- --fix src/component/api
|
Reference in New Issue
Block a user