From 6e858ee6458b789994f4bc15012998f7a546a68a Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Wed, 3 Dec 2014 00:55:38 -0800 Subject: [PATCH] updated samples --- bin/dynamic-html.sh | 27 + bin/{static-docs.sh => html.sh} | 2 +- .../docs/assets/css/bootstrap-responsive.css | 0 .../docs/assets/css/bootstrap.css | 0 .../docs/assets/css/style.css | 0 .../docs/assets/images/logo.png | Bin .../docs/assets/js/bootstrap.js | 0 .../docs/assets/js/jquery-1.8.3.min.js | 0 .../docs/assets/js/main.js | 0 .../docs/index.html | 82 +-- .../docs/models/Category.html | 0 .../docs/models/Order.html | 0 .../docs/models/Pet.html | 4 +- .../docs/models/Tag.html | 0 .../docs/models/User.html | 0 .../docs/operations/PetApi.html | 101 ++- .../docs/operations/StoreApi.html | 27 +- .../docs/operations/UserApi.html | 85 ++- .../main.js | 0 .../package.json | 0 samples/swagger-html/index.html | 605 ++++++++++++++++++ 21 files changed, 819 insertions(+), 114 deletions(-) create mode 100755 bin/dynamic-html.sh rename bin/{static-docs.sh => html.sh} (89%) rename samples/{swagger-static-docs => swagger-dynamic-html}/docs/assets/css/bootstrap-responsive.css (100%) rename samples/{swagger-static-docs => swagger-dynamic-html}/docs/assets/css/bootstrap.css (100%) rename samples/{swagger-static-docs => swagger-dynamic-html}/docs/assets/css/style.css (100%) rename samples/{swagger-static-docs => swagger-dynamic-html}/docs/assets/images/logo.png (100%) rename samples/{swagger-static-docs => swagger-dynamic-html}/docs/assets/js/bootstrap.js (100%) rename samples/{swagger-static-docs => swagger-dynamic-html}/docs/assets/js/jquery-1.8.3.min.js (100%) rename samples/{swagger-static-docs => swagger-dynamic-html}/docs/assets/js/main.js (100%) rename samples/{swagger-static-docs => swagger-dynamic-html}/docs/index.html (97%) rename samples/{swagger-static-docs => swagger-dynamic-html}/docs/models/Category.html (100%) rename samples/{swagger-static-docs => swagger-dynamic-html}/docs/models/Order.html (100%) rename samples/{swagger-static-docs => swagger-dynamic-html}/docs/models/Pet.html (84%) rename samples/{swagger-static-docs => swagger-dynamic-html}/docs/models/Tag.html (100%) rename samples/{swagger-static-docs => swagger-dynamic-html}/docs/models/User.html (100%) rename samples/{swagger-static-docs => swagger-dynamic-html}/docs/operations/PetApi.html (67%) rename samples/{swagger-static-docs => swagger-dynamic-html}/docs/operations/StoreApi.html (81%) rename samples/{swagger-static-docs => swagger-dynamic-html}/docs/operations/UserApi.html (78%) rename samples/{swagger-static-docs => swagger-dynamic-html}/main.js (100%) rename samples/{swagger-static-docs => swagger-dynamic-html}/package.json (100%) create mode 100644 samples/swagger-html/index.html diff --git a/bin/dynamic-html.sh b/bin/dynamic-html.sh new file mode 100755 index 000000000000..192cb6f0159a --- /dev/null +++ b/bin/dynamic-html.sh @@ -0,0 +1,27 @@ +#!/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 + +cd $APP_DIR + + +# 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="$@ com.wordnik.swagger.codegen.Codegen -i http://petstore.swagger.wordnik.com/v2/swagger.json -l dynamic-html -o samples/swagger-dynamic-html" + +java -cp $APP_DIR/target/*:$APP_DIR/target/lib/* $ags diff --git a/bin/static-docs.sh b/bin/html.sh similarity index 89% rename from bin/static-docs.sh rename to bin/html.sh index f7a1e89c00d9..d50a5cc7cf04 100755 --- a/bin/static-docs.sh +++ b/bin/html.sh @@ -22,6 +22,6 @@ cd $APP_DIR # 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="$@ com.wordnik.swagger.codegen.Codegen -i http://petstore.swagger.wordnik.com/v2/swagger.json -l static -o samples/swagger-static-docs" +ags="$@ com.wordnik.swagger.codegen.Codegen -i http://petstore.swagger.wordnik.com/v2/swagger.json -l html -o samples/swagger-html" java -cp $APP_DIR/target/*:$APP_DIR/target/lib/* $ags diff --git a/samples/swagger-static-docs/docs/assets/css/bootstrap-responsive.css b/samples/swagger-dynamic-html/docs/assets/css/bootstrap-responsive.css similarity index 100% rename from samples/swagger-static-docs/docs/assets/css/bootstrap-responsive.css rename to samples/swagger-dynamic-html/docs/assets/css/bootstrap-responsive.css diff --git a/samples/swagger-static-docs/docs/assets/css/bootstrap.css b/samples/swagger-dynamic-html/docs/assets/css/bootstrap.css similarity index 100% rename from samples/swagger-static-docs/docs/assets/css/bootstrap.css rename to samples/swagger-dynamic-html/docs/assets/css/bootstrap.css diff --git a/samples/swagger-static-docs/docs/assets/css/style.css b/samples/swagger-dynamic-html/docs/assets/css/style.css similarity index 100% rename from samples/swagger-static-docs/docs/assets/css/style.css rename to samples/swagger-dynamic-html/docs/assets/css/style.css diff --git a/samples/swagger-static-docs/docs/assets/images/logo.png b/samples/swagger-dynamic-html/docs/assets/images/logo.png similarity index 100% rename from samples/swagger-static-docs/docs/assets/images/logo.png rename to samples/swagger-dynamic-html/docs/assets/images/logo.png diff --git a/samples/swagger-static-docs/docs/assets/js/bootstrap.js b/samples/swagger-dynamic-html/docs/assets/js/bootstrap.js similarity index 100% rename from samples/swagger-static-docs/docs/assets/js/bootstrap.js rename to samples/swagger-dynamic-html/docs/assets/js/bootstrap.js diff --git a/samples/swagger-static-docs/docs/assets/js/jquery-1.8.3.min.js b/samples/swagger-dynamic-html/docs/assets/js/jquery-1.8.3.min.js similarity index 100% rename from samples/swagger-static-docs/docs/assets/js/jquery-1.8.3.min.js rename to samples/swagger-dynamic-html/docs/assets/js/jquery-1.8.3.min.js diff --git a/samples/swagger-static-docs/docs/assets/js/main.js b/samples/swagger-dynamic-html/docs/assets/js/main.js similarity index 100% rename from samples/swagger-static-docs/docs/assets/js/main.js rename to samples/swagger-dynamic-html/docs/assets/js/main.js diff --git a/samples/swagger-static-docs/docs/index.html b/samples/swagger-dynamic-html/docs/index.html similarity index 97% rename from samples/swagger-static-docs/docs/index.html rename to samples/swagger-dynamic-html/docs/index.html index 2c8d293d2c0b..3fc588933798 100644 --- a/samples/swagger-static-docs/docs/index.html +++ b/samples/swagger-dynamic-html/docs/index.html @@ -31,46 +31,6 @@ -
-
- StoreApi -
- -
- -
-
- PetApi -
- -
-
UserApi @@ -98,6 +58,48 @@
+ + +
+
+ StoreApi +
+ +
+
diff --git a/samples/swagger-static-docs/docs/models/Category.html b/samples/swagger-dynamic-html/docs/models/Category.html similarity index 100% rename from samples/swagger-static-docs/docs/models/Category.html rename to samples/swagger-dynamic-html/docs/models/Category.html diff --git a/samples/swagger-static-docs/docs/models/Order.html b/samples/swagger-dynamic-html/docs/models/Order.html similarity index 100% rename from samples/swagger-static-docs/docs/models/Order.html rename to samples/swagger-dynamic-html/docs/models/Order.html diff --git a/samples/swagger-static-docs/docs/models/Pet.html b/samples/swagger-dynamic-html/docs/models/Pet.html similarity index 84% rename from samples/swagger-static-docs/docs/models/Pet.html rename to samples/swagger-dynamic-html/docs/models/Pet.html index b2c1c6d9feed..ea50d7f02998 100644 --- a/samples/swagger-static-docs/docs/models/Pet.html +++ b/samples/swagger-dynamic-html/docs/models/Pet.html @@ -14,13 +14,13 @@ diff --git a/samples/swagger-static-docs/docs/models/Tag.html b/samples/swagger-dynamic-html/docs/models/Tag.html similarity index 100% rename from samples/swagger-static-docs/docs/models/Tag.html rename to samples/swagger-dynamic-html/docs/models/Tag.html diff --git a/samples/swagger-static-docs/docs/models/User.html b/samples/swagger-dynamic-html/docs/models/User.html similarity index 100% rename from samples/swagger-static-docs/docs/models/User.html rename to samples/swagger-dynamic-html/docs/models/User.html diff --git a/samples/swagger-static-docs/docs/operations/PetApi.html b/samples/swagger-dynamic-html/docs/operations/PetApi.html similarity index 67% rename from samples/swagger-static-docs/docs/operations/PetApi.html rename to samples/swagger-dynamic-html/docs/operations/PetApi.html index c64179cba9c6..c1ecddb53b32 100644 --- a/samples/swagger-static-docs/docs/operations/PetApi.html +++ b/samples/swagger-dynamic-html/docs/operations/PetApi.html @@ -9,7 +9,7 @@

URL

- /pet + http://petstore.swagger.wordnik.com/v2/pet

HTTP Method

PUT

Response Type

@@ -18,9 +18,10 @@
@@ -31,7 +32,7 @@

URL

- /pet + http://petstore.swagger.wordnik.com/v2/pet

HTTP Method

POST

Response Type

@@ -40,9 +41,10 @@