openapi-generator/bin/security/php-petstore.sh
Yann Milin c5463232d3 [PHP] Fix deserialize ApiException as a Model (#757)
* [PHP] Fix deserialize for default responses. Update samples

* [PHP] Update sample files

* Fix the distination ("-o") of petstore-security-test

* Clean up "petstore-security-test" folder

* Update petstore-security-test sample files

* Update petstore OpenAPI3 sample files
2018-09-07 00:52:59 +09:00

39 lines
1.0 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 clean package
fi
# cleanup tests
TEST_DIR="./samples/client/petstore-security-test/php/OpenAPIToolsClient-php/test"
if [ -d $TEST_DIR ]; then
rm -rf $TEST_DIR
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/php -i modules/openapi-generator/src/test/resources/2_0/petstore-security-test.yaml -g php -o samples/client/petstore-security-test/php/OpenAPIClient-php $@"
java $JAVA_OPTS -jar $executable $ags