openapi-generator/bin/php-ze-ph-petstore-server.sh
Arthur Mogliev 77d2de4e3d [PHP][php-ze-ph] Support for PHP 7.1+, Zend Expressive 3.2 and PathHander 0.4 (#1902)
* - support for PHP 7.1, Zend Expressive 3.2 and PathHander 0.4 for php-ze-ph generator

* - fixed mess with petstore samples (added new files, removed obsolete files)

* php-ze-ph:
- overwriting "*/*" media type for producers with "n/a" (PathHandler does not support that cause it makes no sense to return response with "Content-Type: */*")
- "array" return type declaration for handler methods with ambiguous "container" return type
- better way to generate attribute annotation stub for request body data with ambiguous "container" type
- fixed missing dependency in composer.json
- minor optimization for container.php
- samples for OAS3 petstore spec

* php-ze-ph:
- note about ext-yaml in stub README
- updated .gitignore

* php-ze-ph:
- logging '*/*' replacement as warning
2019-01-30 15:36:00 +08:00

37 lines
995 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
input=modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
out_folder=samples/server/petstore/php-ze-ph
resources=modules/openapi-generator/src/main/resources/ze-ph
# 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 $resources -i $input -g php-ze-ph -o $out_folder $@"
java $JAVA_OPTS -jar $executable $ags