mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-06 18:45:23 +00:00
77d2de4e3d
* - 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
37 lines
995 B
Bash
Executable File
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
|