Skip to content

Commit

Permalink
Go server petstore update (OAS2, OAS3) (#146)
Browse files Browse the repository at this point in the history
* restore go server petstore from codegen 2x

* update go server petstore (oas2) - no diff

* update go server samples (oas3)

* add go petstore server script
  • Loading branch information
wing328 authored Apr 19, 2018
1 parent 86f67c6 commit 686ff6a
Show file tree
Hide file tree
Showing 4 changed files with 799 additions and 3 deletions.
32 changes: 32 additions & 0 deletions bin/openapi3/go-petstore-server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/sh

SCRIPT="$0"

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

# 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/go-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -l go-server -o samples/server/petstore/go-api-server -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice"

java $JAVA_OPTS -jar $executable $ags
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.0-SNAPSHOT
3.0.0-SNAPSHOT
Loading

0 comments on commit 686ff6a

Please sign in to comment.