openapi-generator/bin/erlang-petstore-proper.sh
Juan Facorro fc0a0d2cda Generator erlang-proper (#1102)
* Generator erlang-proper

Used to generate PropEr generators for property-based testing

* Fix binary/2 implementation. Add behaviour attribute.

* Remove line from copyright notice

* Avoid escpaing HTML and remove suffix from variable name

* Update samples

* Include querystring parameters

* We use export_all, don't consider warnings as errors

* List command sequence on failure

* Use hasConsumes instead

* Add nowarn_export_all, re-add warning_as_errors
2018-10-27 16:54:35 +08:00

33 lines
937 B
Bash
Executable File

#!/bin/sh
SCRIPT="$0"
echo "# START SCRIPT: $SCRIPT"
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/openapi-generator-cli/target/openapi-generator-cli.jar"
if [ ! -f "$executable" ]
then
mvn -B 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 -t modules/openapi-generator/src/main/resources/erlang-proper -DpackageName=petstore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g erlang-proper -o samples/client/petstore/erlang-proper $@"
java $JAVA_OPTS -jar $executable $ags