forked from loafle/openapi-generator-original
* fix go compilation error for properties of type map and array * fix go compilation error for properties of type date and datetime * add missing shell script to bin/utils/ensure-up-to-date * add missing shell script to bin/utils/ensure-up-to-date * add missing shell script to bin/utils/ensure-up-to-date * fix issue with 'date' type * fix time import problem * Add missing pom.xml files for golang * Add missing unit test files for golang * Add missing unit test files for golang. Must use class name prefix for enums * Fix unit tests for go-experimental in OAS3 * Fix unit tests for go-experimental in OAS3 * Add code comments in codegen * Fix compilation errors of generated go code * Fix compilation errors of generated go code * remove antihax from go-experimental, it is no longer used * copy python testfile for ut purpose * add error checkout in unit tests * add unit tests * add code comments * move test foo.png file to correct location * run samples scripts * run samples scripts
42 lines
1.1 KiB
Bash
Executable File
42 lines
1.1 KiB
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
|
|
|
|
SPEC="modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml"
|
|
GENERATOR="go"
|
|
STUB_DIR="samples/openapi3/client/petstore/go/go-petstore"
|
|
|
|
echo "Removing files and folders under $STUB_DIR"
|
|
rm -rf $STUB_DIR
|
|
|
|
# if you've executed sbt assembly previously it will use that instead.
|
|
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
|
ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR"
|
|
ags="$ags --additional-properties enumClassPrefix=true,packageName=petstore"
|
|
ags="$ags $@"
|
|
|
|
java $JAVA_OPTS -jar $executable $ags
|