mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-06 10:35:25 +00:00
4be605bcb7
* Add GraphQL express/apollo server generator * add basic resolvers; adjust parameters/input types * small adjustments and improvements * adjust logger config for GraphQL generators * remove MaxPermSize form bash script as it will be removed from later Java versions; add isNullable utility helper method; Adjust TODOs for graphql implementation * re-created samples for graphql config and server generators * re-added templates for graphql config generator * add graphql-config-petstore bash script * add isNullable utility method * fix javadoc issues * adjust licence headers * rename Generator to Codegen for GraphQL classes * renaming, minor enhancement to graphql generator * add graphql server samples * add windows batch files, rename directory
33 lines
922 B
Bash
Executable File
33 lines
922 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
|
|
|
|
# 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/graphql-schema -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g graphql-schema -o samples/config/petstore/graphql-schema -DpackageName=petstore $@"
|
|
|
|
java $JAVA_OPTS -jar $executable $ags
|