mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
21 lines
698 B
Plaintext
21 lines
698 B
Plaintext
|
#!/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
|