forked from dark_thunder/immich
deps: open-api generator (#6655)
* deps: open-api generator * fix: unused sed/replace
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
OPENAPI_GENERATOR_VERSION=v6.6.0
|
||||
OPENAPI_GENERATOR_VERSION=v7.2.0
|
||||
|
||||
# usage: ./bin/generate-open-api.sh
|
||||
|
||||
@ -7,14 +7,13 @@ function dart {
|
||||
rm -rf ../mobile/openapi
|
||||
cd ./templates/mobile/serialization/native
|
||||
wget -O native_class.mustache https://raw.githubusercontent.com/OpenAPITools/openapi-generator/$OPENAPI_GENERATOR_VERSION/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache
|
||||
patch -u native_class.mustache <native_class.mustache.patch
|
||||
patch --no-backup-if-mismatch -u native_class.mustache <native_class.mustache.patch
|
||||
cd ../../../..
|
||||
npx --yes @openapitools/openapi-generator-cli generate -g dart -i ./immich-openapi-specs.json -o ../mobile/openapi -t ./templates/mobile
|
||||
|
||||
# Post generate patches
|
||||
patch --no-backup-if-mismatch -u ../mobile/openapi/lib/api_client.dart <./patch/api_client.dart.patch
|
||||
patch --no-backup-if-mismatch -u ../mobile/openapi/lib/api.dart <./patch/api.dart.patch
|
||||
sed -i 's/0.17.0/0.18.0/g' ../mobile/openapi/pubspec.yaml
|
||||
}
|
||||
|
||||
function typescript {
|
||||
|
Reference in New Issue
Block a user