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 @@ -
/pet
+ http://petstore.swagger.wordnik.com/v2/pet
POST
Pet object that needs to be added to the store
@@ -53,7 +55,7 @@Multiple status values can be provided with comma seperated strings
/pet/findByStatus
+ http://petstore.swagger.wordnik.com/v2/pet/findByStatus
GET
Status values that need to be considered for filter
@@ -75,7 +78,7 @@Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
/pet/findByTags
+ http://petstore.swagger.wordnik.com/v2/pet/findByTags
GET
Tags to filter by
@@ -97,7 +101,7 @@Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
/pet/{petId}
+ http://petstore.swagger.wordnik.com/v2/pet/{petId}
GET
ID of pet that needs to be fetched
http://petstore.swagger.wordnik.com/v2/pet/{petId}
+ POST
+ ID of pet that needs to be updated
+Updated name of the pet
+Updated status of the pet
+/pet/{petId}
+ http://petstore.swagger.wordnik.com/v2/pet/{petId}
DELETE
Pet id to delete
/store/order
+ http://petstore.swagger.wordnik.com/v2/store/order
POST
order placed for purchasing the pet
@@ -31,7 +32,7 @@For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
/store/order/{orderId}
+ http://petstore.swagger.wordnik.com/v2/store/order/{orderId}
GET
ID of pet that needs to be fetched
@@ -53,7 +55,7 @@For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
/store/order/{orderId}
+ http://petstore.swagger.wordnik.com/v2/store/order/{orderId}
DELETE
ID of the order that needs to be deleted
diff --git a/samples/swagger-static-docs/docs/operations/UserApi.html b/samples/swagger-dynamic-html/docs/operations/UserApi.html similarity index 78% rename from samples/swagger-static-docs/docs/operations/UserApi.html rename to samples/swagger-dynamic-html/docs/operations/UserApi.html index 1c8fecf597a5..2666eeb4ecf8 100644 --- a/samples/swagger-static-docs/docs/operations/UserApi.html +++ b/samples/swagger-dynamic-html/docs/operations/UserApi.html @@ -9,7 +9,7 @@This can only be done by the logged in user.
/user
+ http://petstore.swagger.wordnik.com/v2/user
POST
Created user object
@@ -31,7 +32,7 @@/user/createWithArray
+ http://petstore.swagger.wordnik.com/v2/user/createWithArray
POST
List of user object
@@ -53,7 +58,7 @@/user/createWithList
+ http://petstore.swagger.wordnik.com/v2/user/createWithList
POST
List of user object
@@ -75,7 +84,7 @@/user/login
+ http://petstore.swagger.wordnik.com/v2/user/login
GET
The user name for login
The password for login in clear text
@@ -104,7 +115,7 @@/user/logout
+ http://petstore.swagger.wordnik.com/v2/user/logout
GET
/user/{username}
+ http://petstore.swagger.wordnik.com/v2/user/{username}
GET
The name that needs to be fetched. Use user1 for testing.
@@ -141,7 +153,7 @@This can only be done by the logged in user.
/user/{username}
+ http://petstore.swagger.wordnik.com/v2/user/{username}
PUT
name that need to be deleted
Updated user object
@@ -170,7 +184,7 @@This can only be done by the logged in user.
/user/{username}
+ http://petstore.swagger.wordnik.com/v2/user/{username}
DELETE
The name that needs to be deleted
diff --git a/samples/swagger-static-docs/main.js b/samples/swagger-dynamic-html/main.js similarity index 100% rename from samples/swagger-static-docs/main.js rename to samples/swagger-dynamic-html/main.js diff --git a/samples/swagger-static-docs/package.json b/samples/swagger-dynamic-html/package.json similarity index 100% rename from samples/swagger-static-docs/package.json rename to samples/swagger-dynamic-html/package.json diff --git a/samples/swagger-html/index.html b/samples/swagger-html/index.html new file mode 100644 index 000000000000..077295b4a9eb --- /dev/null +++ b/samples/swagger-html/index.html @@ -0,0 +1,605 @@ + + + +post: /userpost: /user/createWithArraypost: /user/createWithListget: /user/loginget: /user/logoutget: /user/{username}put: /user/{username}delete: /user/{username}put: /petpost: /petget: /pet/findByStatusget: /pet/findByTagsget: /pet/{petId}post: /pet/{petId}delete: /pet/{petId}post: /store/orderget: /store/order/{orderId}delete: /store/order/{orderId}