forked from loafle/openapi-generator-original
* First commit of the Java Play Framework server generator. It is highly based on Spring so there might me a couple of things that don't make sense (like options or parameters) for the Play Framework. * Fix suggestions in the PR discussion + add .bat and .sh file as requested. * Updated Readme.md file * Remove unused mustache file + fix baseName vs paramName in all the mustache files. * Fix the compilation error when we have a body which is a list or map. Doesn't fix the problem with the annotation itself. * Fix the problem with the Http.MultipartFormData.FilePart
32 lines
919 B
Bash
32 lines
919 B
Bash
#!/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 -t modules/swagger-codegen/src/main/resources/JavaPlayFramework -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l java-play-framework -o samples/server/petstore/java-play-framework -DhideGenerationTimestamp=true"
|
|
|
|
java $JAVA_OPTS -jar $executable $ags
|