mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 02:55:19 +00:00
bf17a91275
* fix: query params may be ints as well don't assume query params are Strings or List<String>s * fix dart: use correct type for QueryParams type is Iterable, not List only check params for != null if they haven't been checked already add some casts to make strong mode happy update petstore * feat dart: enable strong mode * feat dart: generate both browser and vm library move petstore client into subdirectory and reference generated libraries using path in pubspec.yaml * feat dart: refactor petstore test. The new layout resembles a real project. petstore test is now strong mode compatible. * feat: add DateTimerParser transformer * feat: improved exception reporting * feat[dart]: handle patch requests * fix[dart]: typo * fix dart: remove findPetsByTag test; enable strong-mode find pets by tag call is deprecated and returns 500 generated library is now strong mode compatible
42 lines
1.3 KiB
Bash
Executable File
42 lines
1.3 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
SCRIPT="$0"
|
|
|
|
while [ -h "$SCRIPT" ] ; do
|
|
ls=`ls -ld "$SCRIPT"`
|
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
|
if expr "$link" : '/.*' > /dev/null; then
|
|
SCRIPT="$link"
|
|
else
|
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
|
fi
|
|
done
|
|
|
|
if [ ! -d "${APP_DIR}" ]; then
|
|
APP_DIR=`dirname "$SCRIPT"`/..
|
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
|
fi
|
|
|
|
executable="./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
|
|
|
|
if [ ! -f "$executable" ]
|
|
then
|
|
mvn clean package
|
|
fi
|
|
|
|
# if you've executed sbt assembly previously it will use that instead.
|
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
|
|
|
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l dart -o samples/client/petstore/dart/swagger"
|
|
|
|
# then options to generate the library for vm would be:
|
|
#ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l dart -o samples/client/petstore/dart/swagger_vm -DbrowserClient=false -DpubName=swagger_vm"
|
|
java $JAVA_OPTS -jar $executable $ags
|
|
|
|
# There is a proposal to allow importing different libraries depending on the environment:
|
|
# https://github.com/munificent/dep-interface-libraries
|
|
# When this is implemented there will only be one library.
|
|
|
|
# The current petstore test will then work for both: the browser library and the vm library.
|
|
|