diff --git a/.gitignore b/.gitignore
index 0dc527992362..25bb6c205cba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -107,3 +107,6 @@ samples/client/petstore/python/swagger_client.egg-info/SOURCES.txt
samples/client/petstore/python/.coverage
samples/client/petstore/python/.projectile
samples/client/petstore/python/.venv/
+
+# ts
+samples/client/petstore/typescript-node/npm/node_modules
diff --git a/README.md b/README.md
index 1d97c7675d8c..8eca8ecd53ed 100644
--- a/README.md
+++ b/README.md
@@ -763,6 +763,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
- [Acunetix](https://www.acunetix.com/)
- [Atlassian](https://www.atlassian.com/)
- [beemo](http://www.beemo.eu)
+- [bitly](https://bitly.com)
- [Cachet Financial](http://www.cachetfinancial.com/)
- [CloudBoost](https://www.CloudBoost.io/)
- [Cupix](http://www.cupix.com)
@@ -779,9 +780,11 @@ Here are some companies/projects using Swagger Codegen in production. To add you
- [nViso](http://www.nviso.ch/)
- [Okiok](https://www.okiok.com)
- [OSDN](https://osdn.jp)
+- [Pepipost](https://www.pepipost.com)
- [Pixoneye](http://www.pixoneye.com/)
- [PostAffiliatePro](https://www.postaffiliatepro.com/)
- [Reload! A/S](https://reload.dk/)
+- [REstore](https://www.restore.eu)
- [Royal Bank of Canada (RBC)](http://www.rbc.com/canada.html)
- [SmartRecruiters](https://www.smartrecruiters.com/)
- [StyleRecipe](http://stylerecipe.co.jp)
diff --git a/bin/all-petstore.sh b/bin/all-petstore.sh
index af322af4820e..2bb63f6d573f 100755
--- a/bin/all-petstore.sh
+++ b/bin/all-petstore.sh
@@ -49,5 +49,6 @@ cd $APP_DIR
./bin/tizen-petstore.sh
./bin/typescript-angular-petstore.sh
./bin/typescript-angular2-petstore.sh
+./bin/typescript-angular2-petstore-with-npm.sh
./bin/typescript-node-petstore.sh
./bin/lumen-petstore-server.sh
\ No newline at end of file
diff --git a/bin/go-petstore.sh b/bin/go-petstore.sh
index 35c5c0e60642..eea1aaaf6f3d 100755
--- a/bin/go-petstore.sh
+++ b/bin/go-petstore.sh
@@ -26,6 +26,6 @@ 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/swagger-codegen/src/main/resources/go -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l go -o samples/client/petstore/go/go-petstore"
+ags="$@ generate -t modules/swagger-codegen/src/main/resources/go -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l go -o samples/client/petstore/go/go-petstore -DpackageName=petstore "
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/groovy-petstore.sh b/bin/groovy-petstore.sh
new file mode 100755
index 000000000000..6afb14a7f099
--- /dev/null
+++ b/bin/groovy-petstore.sh
@@ -0,0 +1,30 @@
+#!/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/swagger-codegen-cli/target/swagger-codegen-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 -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l groovy -o samples/client/petstore/groovy -DhideGenerationTimestamp=true"
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/javascript-petstore.sh b/bin/javascript-petstore.sh
index 11fadd17d497..2eb26210e0ae 100755
--- a/bin/javascript-petstore.sh
+++ b/bin/javascript-petstore.sh
@@ -26,6 +26,6 @@ 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/swagger-codegen/src/main/resources/Javascript -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l javascript -o samples/client/petstore/javascript"
+ags="$@ generate -t modules/swagger-codegen/src/main/resources/Javascript -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l javascript -o samples/client/petstore/javascript"
java -DappName=PetstoreClient $JAVA_OPTS -jar $executable $ags
diff --git a/bin/javascript-promise-petstore.sh b/bin/javascript-promise-petstore.sh
index f6e7ef139134..fac0f221424c 100755
--- a/bin/javascript-promise-petstore.sh
+++ b/bin/javascript-promise-petstore.sh
@@ -27,7 +27,7 @@ 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/swagger-codegen/src/main/resources/Javascript \
--i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l javascript \
+-i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l javascript \
-o samples/client/petstore/javascript-promise \
--additional-properties usePromises=true"
diff --git a/bin/springboot-petstore-server.sh b/bin/springboot-petstore-server.sh
new file mode 100755
index 000000000000..83d810ba5954
--- /dev/null
+++ b/bin/springboot-petstore-server.sh
@@ -0,0 +1,31 @@
+#!/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/swagger-codegen-cli/target/swagger-codegen-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/swagger-codegen/src/main/resources/JavaSpringBoot -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l springboot -o samples/server/petstore/springboot"
+
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/typescript-angular2-petstore-with-npm.sh b/bin/typescript-angular2-petstore-with-npm.sh
index 9e455715b01d..305a3e0b39de 100755
--- a/bin/typescript-angular2-petstore-with-npm.sh
+++ b/bin/typescript-angular2-petstore-with-npm.sh
@@ -26,6 +26,6 @@ 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 -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-angular2 -c bin/typescript-angular2-petstore-with-npm.json -o samples/client/petstore/typescript-angular2-with-npm"
+ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-angular2 -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-angular2/npm"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/typescript-angular2-petstore.sh b/bin/typescript-angular2-petstore.sh
index 4ad341f64f8f..f26dd0f668f2 100755
--- a/bin/typescript-angular2-petstore.sh
+++ b/bin/typescript-angular2-petstore.sh
@@ -26,6 +26,6 @@ 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 -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-angular2 -o samples/client/petstore/typescript-angular2"
+ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-angular2 -o samples/client/petstore/typescript-angular2/default"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/typescript-fetch-petstore.sh b/bin/typescript-fetch-petstore.sh
new file mode 100755
index 000000000000..a4fc62dac90f
--- /dev/null
+++ b/bin/typescript-fetch-petstore.sh
@@ -0,0 +1,31 @@
+#!/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/swagger-codegen-cli/target/swagger-codegen-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 -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-fetch -o samples/client/petstore/typescript-fetch/"
+
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/typescript-node-petstore-with-npm.sh b/bin/typescript-node-petstore-with-npm.sh
new file mode 100755
index 000000000000..e369be758e7b
--- /dev/null
+++ b/bin/typescript-node-petstore-with-npm.sh
@@ -0,0 +1,31 @@
+#!/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/swagger-codegen-cli/target/swagger-codegen-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 -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-node -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-node/npm"
+
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/typescript-node-petstore.sh b/bin/typescript-node-petstore.sh
index 53c5a6f8d828..c9d16d961133 100755
--- a/bin/typescript-node-petstore.sh
+++ b/bin/typescript-node-petstore.sh
@@ -26,6 +26,6 @@ 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 -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-node -o samples/client/petstore/typescript-node"
+ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-node -o samples/client/petstore/typescript-node/default"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/typescript-angular2-petstore-with-npm.json b/bin/typescript-petstore-npm.json
similarity index 100%
rename from bin/typescript-angular2-petstore-with-npm.json
rename to bin/typescript-petstore-npm.json
diff --git a/bin/windows/spring-mvc-petstore-j8-async-server.bat b/bin/windows/spring-mvc-petstore-j8-async-server.bat
new file mode 100644
index 000000000000..601de1ff6f82
--- /dev/null
+++ b/bin/windows/spring-mvc-petstore-j8-async-server.bat
@@ -0,0 +1,10 @@
+set executable=.\modules\swagger-codegen-cli\target\swagger-codegen-cli.jar
+
+If Not Exist %executable% (
+ mvn clean package
+)
+
+set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties
+set ags=generate -t modules\swagger-codegen\src\main\resources\JavaSpringMVC -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -l spring-mvc -o samples/server/petstore/spring-mvc-j8-async -c bin/spring-mvc-petstore-j8-async.json
+
+java %JAVA_OPTS% -jar %executable% %ags%
\ No newline at end of file
diff --git a/bin/windows/spring-mvc-petstore-server.bat b/bin/windows/spring-mvc-petstore-server.bat
new file mode 100644
index 000000000000..f4ab64d5bd89
--- /dev/null
+++ b/bin/windows/spring-mvc-petstore-server.bat
@@ -0,0 +1,10 @@
+set executable=.\modules\swagger-codegen-cli\target\swagger-codegen-cli.jar
+
+If Not Exist %executable% (
+ mvn clean package
+)
+
+set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties
+set ags=generate -t modules\swagger-codegen\src\main\resources\JavaSpringMVC -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -l spring-mvc -o samples\server\petstore\spring-mvc
+
+java %JAVA_OPTS% -jar %executable% %ags%
\ No newline at end of file
diff --git a/bin/windows/springboot-petstore-server.bat b/bin/windows/springboot-petstore-server.bat
new file mode 100644
index 000000000000..18077852db34
--- /dev/null
+++ b/bin/windows/springboot-petstore-server.bat
@@ -0,0 +1,10 @@
+set executable=.\modules\swagger-codegen-cli\target\swagger-codegen-cli.jar
+
+If Not Exist %executable% (
+ mvn clean package
+)
+
+set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties
+set ags=generate -t modules\swagger-codegen\src\main\resources\JavaSpringBoot -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -l springboot -o samples\server\petstore\springboot
+
+java %JAVA_OPTS% -jar %executable% %ags%
\ No newline at end of file
diff --git a/bin/windows/typescript-angular2-with-npm.bat b/bin/windows/typescript-angular2-with-npm.bat
new file mode 100644
index 000000000000..dcbd6df81554
--- /dev/null
+++ b/bin/windows/typescript-angular2-with-npm.bat
@@ -0,0 +1,10 @@
+set executable=.\modules\swagger-codegen-cli\target\swagger-codegen-cli.jar
+
+If Not Exist %executable% (
+ mvn clean package
+)
+
+set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties
+set ags=generate -t modules\swagger-codegen\src\main\resources\typescript-angular -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -c bin/typescript-petstore-npm.json -l typescript-angular2 -o samples\client\petstore\typescript-angular2\npm
+
+java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/bin/windows/typescript-angular2.bat b/bin/windows/typescript-angular2.bat
index 7657d184fd15..ce2f0e0dc8c8 100755
--- a/bin/windows/typescript-angular2.bat
+++ b/bin/windows/typescript-angular2.bat
@@ -5,6 +5,6 @@ If Not Exist %executable% (
)
set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties
-set ags=generate -t modules\swagger-codegen\src\main\resources\typescript-angular -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -l typescript-angular2 -o samples\client\petstore\typescript-angular
+set ags=generate -t modules\swagger-codegen\src\main\resources\typescript-angular -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -l typescript-angular2 -o samples\client\petstore\typescript-angular2\default
java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/bin/windows/typescript-fetch.bat b/bin/windows/typescript-fetch.bat
new file mode 100755
index 000000000000..b3ff19ea2117
--- /dev/null
+++ b/bin/windows/typescript-fetch.bat
@@ -0,0 +1,10 @@
+set executable=.\modules\swagger-codegen-cli\target\swagger-codegen-cli.jar
+
+If Not Exist %executable% (
+ mvn clean package
+)
+
+set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties
+set ags=generate -t modules\swagger-codegen\src\main\resources\typescript-fetch -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -l typescript-fetch -o samples\client\petstore\typescript-fetch
+
+java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/bin/windows/typescript-node-with-npm.bat b/bin/windows/typescript-node-with-npm.bat
new file mode 100755
index 000000000000..a433181fde97
--- /dev/null
+++ b/bin/windows/typescript-node-with-npm.bat
@@ -0,0 +1,10 @@
+set executable=.\modules\swagger-codegen-cli\target\swagger-codegen-cli.jar
+
+If Not Exist %executable% (
+ mvn clean package
+)
+
+set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties
+set ags=generate -t modules\swagger-codegen\src\main\resources\typescript-node -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -c bin/typescript-petstore-npm.json -l typescript-node -o samples\client\petstore\typescript-node\npm
+
+java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/bin/windows/typescript-node.bat b/bin/windows/typescript-node.bat
index b6d47abd1af0..53f8b34e8430 100755
--- a/bin/windows/typescript-node.bat
+++ b/bin/windows/typescript-node.bat
@@ -5,6 +5,6 @@ If Not Exist %executable% (
)
set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties
-set ags=generate -t modules\swagger-codegen\src\main\resources\typescript-node -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -l typescript-node -o samples\client\petstore\typescript-node
+set ags=generate -t modules\swagger-codegen\src\main\resources\typescript-node -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -l typescript-node -o samples\client\petstore\typescript-node\default
java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConstants.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConstants.java
index 1d97fe829b83..b4b414bb00de 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConstants.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConstants.java
@@ -89,7 +89,7 @@ public class CodegenConstants {
public static final String MODEL_NAME_SUFFIX_DESC = "Suffix that will be appended to all model names. Default is the empty string.";
public static final String OPTIONAL_EMIT_DEFAULT_VALUES = "optionalEmitDefaultValues";
- public static final String OPTIONAL_EMIT_DEFAULT_VALUES_DESC = "Set DataMember's EmitDefaultValue, default false.";
+ public static final String OPTIONAL_EMIT_DEFAULT_VALUES_DESC = "Set DataMember's EmitDefaultValue.";
public static final String GIT_USER_ID = "gitUserId";
public static final String GIT_USER_ID_DESC = "Git user ID, e.g. swagger-api.";
@@ -103,4 +103,6 @@ public class CodegenConstants {
public static final String HTTP_USER_AGENT = "httpUserAgent";
public static final String HTTP_USER_AGENT_DESC = "HTTP user agent, e.g. codegen_csharp_api_client, default to 'Swagger-Codegen/{packageVersion}}/{language}'";
+ public static final String SUPPORTS_ES6 = "supportsES6";
+ public static final String SUPPORTS_ES6_DESC = "Generate code that conforms to ES6.";
}
diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenModel.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenModel.java
index 945388b25886..ccea2ee070e9 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenModel.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenModel.java
@@ -20,7 +20,7 @@ public class CodegenModel {
public List
* A non-AMD browser application (discouraged) might do something like this: @@ -37,23 +37,23 @@ * ... * *
- * @module index + * @module {{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index * @version {{projectVersion}} */{{/emitJSDoc}} {{=< >=}} var exports = {<#emitJSDoc> /** * The ApiClient constructor. - * @property {module:ApiClient} + * @property {module:<#invokerPackage>{{classname}}.{{#description}}
- * {{description}}{{/description}}
- * @alias module:{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{classname}}
- * @class{{#useInheritance}}{{#parent}}
- * @extends module:{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{parent}}{{/parent}}{{#interfaces}}
- * @implements module:{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{.}}{{/interfaces}}{{/useInheritance}}{{#vendorExtensions.x-all-required}}
- * @param {{.}}{{/vendorExtensions.x-all-required}}
- */{{/emitJSDoc}}
- var exports = function({{#vendorExtensions.x-all-required}}{{.}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-all-required}}) {
-{{#useInheritance}}{{#parentModel}} {{classname}}.call(this{{#vendorExtensions.x-all-required}}, {{.}}{{/vendorExtensions.x-all-required}});{{/parentModel}}
-{{#interfaceModels}} {{classname}}.call(this{{#vendorExtensions.x-all-required}}, {{.}}{{/vendorExtensions.x-all-required}});
-{{/interfaceModels}}{{/useInheritance}}{{#vars}}{{#required}} this['{{baseName}}'] = {{name}};{{/required}}
-{{/vars}} };
-
-{{#emitJSDoc}} /**
- * Constructs a {{classname}} from a plain JavaScript object, optionally creating a new instance.
- * Copies all relevant properties from data to obj if supplied or a new instance if not.
- * @param {Object} data The plain JavaScript object bearing properties of interest.
- * @param {{=< >=}}{module:<#modelPackage>{{classname}} instance.
- */
-{{/emitJSDoc}} exports.constructFromObject = function(data, obj) {
- if (data) { {{!// TODO: support polymorphism: discriminator property on data determines class to instantiate.}}
- obj = obj || new exports();
-{{#useInheritance}}{{#parent}} {{.}}.constructFromObject(data, obj);{{/parent}}
-{{#interfaces}} {{.}}.constructFromObject(data, obj);
-{{/interfaces}}{{/useInheritance}}{{#vars}} if (data.hasOwnProperty('{{baseName}}')) {
- obj['{{baseName}}']{{{defaultValueWithParam}}}
- }
-{{/vars}} }
- return obj;
- }
-{{#useInheritance}}{{#parent}}
- exports.prototype = Object.create({{parent}}.prototype);
- exports.prototype.constructor = exports;
-{{/parent}}{{/useInheritance}}
-{{#vars}}{{#emitJSDoc}}
- /**{{#description}}
- * {{{description}}}{{/description}}
- * @member {{{vendorExtensions.x-jsdoc-type}}} {{baseName}}{{#defaultValue}}
- * @default {{{defaultValue}}}{{/defaultValue}}
- */
-{{/emitJSDoc}} exports.prototype['{{baseName}}'] = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}undefined{{/defaultValue}};
-{{/vars}}{{#useInheritance}}{{#interfaceModels}}
- // Implement {{classname}} interface:{{#allVars}}{{#emitJSDoc}}
- /**{{#description}}
- * {{{description}}}{{/description}}
- * @member {{{vendorExtensions.x-jsdoc-type}}} {{baseName}}{{#defaultValue}}
- * @default {{{defaultValue}}}{{/defaultValue}}
- */
-{{/emitJSDoc}} exports.prototype['{{baseName}}'] = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}undefined{{/defaultValue}};
-{{/allVars}}{{/interfaceModels}}{{/useInheritance}}
-{{#emitModelMethods}}{{#vars}}{{#emitJSDoc}} /**{{#description}}
- * Returns {{{description}}}{{/description}}{{#minimum}}
- * minimum: {{minimum}}{{/minimum}}{{#maximum}}
- * maximum: {{maximum}}{{/maximum}}
- * @return {{{vendorExtensions.x-jsdoc-type}}}
- */
-{{/emitJSDoc}} exports.prototype.{{getter}} = function() {
- return this['{{baseName}}'];
- }
-
-{{#emitJSDoc}} /**{{#description}}
- * Sets {{{description}}}{{/description}}
- * @param {{{vendorExtensions.x-jsdoc-type}}} {{name}}{{#description}} {{{description}}}{{/description}}
- */
-{{/emitJSDoc}} exports.prototype.{{setter}} = function({{name}}) {
- this['{{baseName}}'] = {{name}};
- }
-
-{{/vars}}{{/emitModelMethods}}
-{{#vars}}{{#isEnum}}{{>enumClass}}{{/isEnum}}{{#items.isEnum}}{{#items}}
-{{>enumClass}}{{/items}}*/{{/items.isEnum}}{{/vars}}
-
- return exports;
-{{/model}}{{/models}}}));
+{{#models}}{{#model}}
+{{#isEnum}}{{>partial_model_enum_class}}{{/isEnum}}{{^isEnum}}{{>partial_model_generic}}{{/isEnum}}
+{{/model}}{{/models}}
diff --git a/modules/swagger-codegen/src/main/resources/Javascript/model_doc.mustache b/modules/swagger-codegen/src/main/resources/Javascript/model_doc.mustache
index 306d8a2b3f7d..4f2324fa2a75 100644
--- a/modules/swagger-codegen/src/main/resources/Javascript/model_doc.mustache
+++ b/modules/swagger-codegen/src/main/resources/Javascript/model_doc.mustache
@@ -1,9 +1,25 @@
-{{#models}}{{#model}}# {{moduleName}}.{{classname}}
+{{#models}}{{#model}}{{#isEnum}}# {{moduleName}}.{{classname}}
+
+## Enum
+
+{{#allowableValues}}{{#enumVars}}
+* `{{name}}` (value: `{{{value}}}`)
+{{/enumVars}}{{/allowableValues}}
+{{/isEnum}}{{^isEnum}}# {{moduleName}}.{{classname}}
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
{{/vars}}
+{{#vars}}{{#isEnum}}
-{{/model}}{{/models}}
+
+## Enum: {{datatypeWithEnum}}
+
+{{#allowableValues}}{{#enumVars}}
+* `{{name}}` (value: `{{{value}}}`)
+{{/enumVars}}{{/allowableValues}}
+
+{{/isEnum}}{{/vars}}
+{{/isEnum}}{{/model}}{{/models}}
diff --git a/modules/swagger-codegen/src/main/resources/Javascript/package.mustache b/modules/swagger-codegen/src/main/resources/Javascript/package.mustache
index 55c33e3f2808..ca84decf9d39 100644
--- a/modules/swagger-codegen/src/main/resources/Javascript/package.mustache
+++ b/modules/swagger-codegen/src/main/resources/Javascript/package.mustache
@@ -3,7 +3,7 @@
"version": "{{{projectVersion}}}",
"description": "{{{projectDescription}}}",{{#projectLicenseName}}
"license": "{{{projectLicenseName}}}",{{/projectLicenseName}}
- "main": "{{sourceFolder}}/index.js",
+ "main": "{{sourceFolder}}{{#invokerPackage}}/{{invokerPackage}}{{/invokerPackage}}/index.js",
"scripts": {
"test": "./node_modules/mocha/bin/mocha --recursive"
},
diff --git a/modules/swagger-codegen/src/main/resources/Javascript/partial_model_enum_class.mustache b/modules/swagger-codegen/src/main/resources/Javascript/partial_model_enum_class.mustache
new file mode 100644
index 000000000000..9ad7e3d3a90d
--- /dev/null
+++ b/modules/swagger-codegen/src/main/resources/Javascript/partial_model_enum_class.mustache
@@ -0,0 +1,24 @@
+{{#emitJSDoc}}
+ /**
+ * Enum class {{classname}}.
+ * @enum {{=<% %>=}}{<%datatype%>}<%={{ }}=%>
+ * @readonly
+ */
+{{/emitJSDoc}}
+ var exports = {
+ {{#allowableValues}}
+ {{#enumVars}}
+{{#emitJSDoc}}
+ /**
+ * value: {{{value}}}
+ * @const
+ */
+{{/emitJSDoc}}
+ "{{name}}": {{{value}}}{{^-last}},
+ {{/-last}}
+ {{/enumVars}}
+ {{/allowableValues}}
+ };
+
+ return exports;
+}));
diff --git a/modules/swagger-codegen/src/main/resources/Javascript/partial_model_generic.mustache b/modules/swagger-codegen/src/main/resources/Javascript/partial_model_generic.mustache
new file mode 100644
index 000000000000..d8a9d250a4a2
--- /dev/null
+++ b/modules/swagger-codegen/src/main/resources/Javascript/partial_model_generic.mustache
@@ -0,0 +1,103 @@
+
+{{#models}}{{#model}}
+{{#emitJSDoc}}
+ /**
+ * The {{classname}} model module.
+ * @module {{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{classname}}
+ * @version {{projectVersion}}
+ */
+
+ /**
+ * Constructs a new {{classname}}.{{#description}}
+ * {{description}}{{/description}}
+ * @alias module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{classname}}
+ * @class{{#useInheritance}}{{#parent}}
+ * @extends {{#parentModel}}module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{classname}}{{/parentModel}}{{^parentModel}}{{#vendorExtensions.x-isArray}}Array{{/vendorExtensions.x-isArray}}{{#vendorExtensions.x-isMap}}Object{{/vendorExtensions.x-isMap}}{{/parentModel}}{{/parent}}{{#interfaces}}
+ * @implements module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{.}}{{/interfaces}}{{/useInheritance}}{{#vendorExtensions.x-all-required}}
+ * @param {{.}}{{/vendorExtensions.x-all-required}}
+ */
+{{/emitJSDoc}}
+ var exports = function({{#vendorExtensions.x-all-required}}{{.}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-all-required}}) {
+ var _this = this;
+{{#parent}}{{^parentModel}}{{#vendorExtensions.x-isArray}} _this = new Array();
+ Object.setPrototypeOf(_this, exports);
+{{/vendorExtensions.x-isArray}}{{/parentModel}}{{/parent}}{{#useInheritance}}{{#parentModel}} {{classname}}.call(_this{{#vendorExtensions.x-all-required}}, {{.}}{{/vendorExtensions.x-all-required}});{{/parentModel}}
+{{#interfaceModels}} {{classname}}.call(_this{{#vendorExtensions.x-all-required}}, {{.}}{{/vendorExtensions.x-all-required}});
+{{/interfaceModels}}{{/useInheritance}}{{#vars}}{{#required}} _this['{{baseName}}'] = {{name}};{{/required}}
+{{/vars}}{{#parent}}{{^parentModel}} return _this;
+{{/parentModel}}{{/parent}} };
+
+{{#emitJSDoc}}
+ /**
+ * Constructs a {{classname}} from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data to obj if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {{=< >=}}{module:<#invokerPackage>{{classname}} instance.
+ */
+{{/emitJSDoc}}
+ exports.constructFromObject = function(data, obj) {
+ if (data){{! TODO: support polymorphism: discriminator property on data determines class to instantiate.}} {
+ obj = obj || new exports();
+{{#parent}}{{^parentModel}} ApiClient.constructFromObject(data, obj, {{vendorExtensions.x-itemType}});
+{{/parentModel}}{{/parent}}{{#useInheritance}}{{#parentModel}} {{classname}}.constructFromObject(data, obj);{{/parentModel}}
+{{#interfaces}} {{.}}.constructFromObject(data, obj);
+{{/interfaces}}{{/useInheritance}}{{#vars}} if (data.hasOwnProperty('{{baseName}}')) {
+ obj['{{baseName}}']{{{defaultValueWithParam}}}
+ }
+{{/vars}} }
+ return obj;
+ }
+{{#useInheritance}}{{#parentModel}}
+ exports.prototype = Object.create({{classname}}.prototype);
+ exports.prototype.constructor = exports;
+{{/parentModel}}{{/useInheritance}}
+{{#vars}}
+{{#emitJSDoc}}
+ /**{{#description}}
+ * {{{description}}}{{/description}}
+ * @member {{{vendorExtensions.x-jsdoc-type}}} {{baseName}}{{#defaultValue}}
+ * @default {{{defaultValue}}}{{/defaultValue}}
+ */
+{{/emitJSDoc}}
+ exports.prototype['{{baseName}}'] = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}undefined{{/defaultValue}};
+{{/vars}}{{#useInheritance}}{{#interfaceModels}}
+ // Implement {{classname}} interface:{{#allVars}}
+{{#emitJSDoc}}
+ /**{{#description}}
+ * {{{description}}}{{/description}}
+ * @member {{{vendorExtensions.x-jsdoc-type}}} {{baseName}}{{#defaultValue}}
+ * @default {{{defaultValue}}}{{/defaultValue}}
+ */
+{{/emitJSDoc}}
+exports.prototype['{{baseName}}'] = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}undefined{{/defaultValue}};
+{{/allVars}}{{/interfaceModels}}{{/useInheritance}}
+{{#emitModelMethods}}{{#vars}}
+{{#emitJSDoc}}
+ /**{{#description}}
+ * Returns {{{description}}}{{/description}}{{#minimum}}
+ * minimum: {{minimum}}{{/minimum}}{{#maximum}}
+ * maximum: {{maximum}}{{/maximum}}
+ * @return {{{vendorExtensions.x-jsdoc-type}}}
+ */
+{{/emitJSDoc}}
+ exports.prototype.{{getter}} = function() {
+ return this['{{baseName}}'];
+ }
+
+{{#emitJSDoc}}
+ /**{{#description}}
+ * Sets {{{description}}}{{/description}}
+ * @param {{{vendorExtensions.x-jsdoc-type}}} {{name}}{{#description}} {{{description}}}{{/description}}
+ */
+{{/emitJSDoc}}
+ exports.prototype.{{setter}} = function({{name}}) {
+ this['{{baseName}}'] = {{name}};
+ }
+
+{{/vars}}{{/emitModelMethods}}
+{{#vars}}{{#isEnum}}{{>partial_model_inner_enum}}{{/isEnum}}{{#items.isEnum}}{{#items}}
+{{>partial_model_inner_enum}}{{/items}}*/{{/items.isEnum}}{{/vars}}
+
+ return exports;
+{{/model}}{{/models}}}));
diff --git a/modules/swagger-codegen/src/main/resources/Javascript/partial_model_inner_enum.mustache b/modules/swagger-codegen/src/main/resources/Javascript/partial_model_inner_enum.mustache
new file mode 100644
index 000000000000..a8b981316d1c
--- /dev/null
+++ b/modules/swagger-codegen/src/main/resources/Javascript/partial_model_inner_enum.mustache
@@ -0,0 +1,21 @@
+{{#emitJSDoc}}
+ /**
+ * Allowed values for the {{baseName}} property.
+ * @enum {{=<% %>=}}{<%datatype%>}<%={{ }}=%>
+ * @readonly
+ */
+{{/emitJSDoc}}
+ exports.{{datatypeWithEnum}} = {
+ {{#allowableValues}}
+ {{#enumVars}}
+{{#emitJSDoc}}
+ /**
+ * value: {{{value}}}
+ * @const
+ */
+{{/emitJSDoc}}
+ "{{name}}": {{{value}}}{{^-last}},
+ {{/-last}}
+ {{/enumVars}}
+ {{/allowableValues}}
+ };
diff --git a/modules/swagger-codegen/src/main/resources/META-INF/services/io.swagger.codegen.CodegenConfig b/modules/swagger-codegen/src/main/resources/META-INF/services/io.swagger.codegen.CodegenConfig
index 22823c956262..c84abac129ca 100644
--- a/modules/swagger-codegen/src/main/resources/META-INF/services/io.swagger.codegen.CodegenConfig
+++ b/modules/swagger-codegen/src/main/resources/META-INF/services/io.swagger.codegen.CodegenConfig
@@ -28,6 +28,7 @@ io.swagger.codegen.languages.ScalatraServerCodegen
io.swagger.codegen.languages.SilexServerCodegen
io.swagger.codegen.languages.SinatraServerCodegen
io.swagger.codegen.languages.SlimFrameworkServerCodegen
+io.swagger.codegen.languages.SpringBootServerCodegen
io.swagger.codegen.languages.SpringMVCServerCodegen
io.swagger.codegen.languages.StaticDocCodegen
io.swagger.codegen.languages.StaticHtmlGenerator
@@ -38,6 +39,7 @@ io.swagger.codegen.languages.TizenClientCodegen
io.swagger.codegen.languages.TypeScriptAngular2ClientCodegen
io.swagger.codegen.languages.TypeScriptAngularClientCodegen
io.swagger.codegen.languages.TypeScriptNodeClientCodegen
+io.swagger.codegen.languages.TypeScriptFetchClientCodegen
io.swagger.codegen.languages.AkkaScalaClientCodegen
io.swagger.codegen.languages.CsharpDotNet2ClientCodegen
io.swagger.codegen.languages.ClojureClientCodegen
diff --git a/modules/swagger-codegen/src/main/resources/TypeScript-Fetch/api.mustache b/modules/swagger-codegen/src/main/resources/TypeScript-Fetch/api.mustache
new file mode 100644
index 000000000000..02e6816ff262
--- /dev/null
+++ b/modules/swagger-codegen/src/main/resources/TypeScript-Fetch/api.mustache
@@ -0,0 +1,133 @@
+import * as querystring from 'querystring';
+import * as fetch from 'isomorphic-fetch';
+import {assign} from './assign';
+
+
+{{#models}}
+{{#model}}
+{{#description}}
+/**
+ * {{{description}}}
+ */
+{{/description}}
+export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{
+{{#vars}}
+{{#description}}
+
+ /**
+ * {{{description}}}
+ */
+{{/description}}
+ "{{name}}"{{^required}}?{{/required}}: {{#isEnum}}{{classname}}.{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}};
+{{/vars}}
+}
+
+{{#hasEnums}}
+{{#vars}}
+{{#isEnum}}
+
+export enum {{datatypeWithEnum}} { {{#allowableValues}}{{#values}}
+ {{.}} = index module provides access to constructors for all the classes which comprise the public API.
* * An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: *
- * var SwaggerPetstore = require('./index'); // See note below*.
+ * var SwaggerPetstore = require('index'); // See note below*.
* var xxxSvc = new SwaggerPetstore.XxxApi(); // Allocate the API class we're going to use.
* var yyyModel = new SwaggerPetstore.Yyy(); // Construct a model instance.
* yyyModel.someProperty = 'someValue';
@@ -23,8 +23,8 @@
* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
* ...
*
- * *NOTE: For a top-level AMD script, use require(['./index'], function(){...}) and put the application logic within the
- * callback function.
+ * *NOTE: For a top-level AMD script, use require(['index'], function(){...})
+ * and put the application logic within the callback function.
*
*
* A non-AMD browser application (discouraged) might do something like this:
@@ -51,6 +51,16 @@
* @property {module:model/Animal}
*/
Animal: Animal,
+ /**
+ * The AnimalFarm model constructor.
+ * @property {module:model/AnimalFarm}
+ */
+ AnimalFarm: AnimalFarm,
+ /**
+ * The ApiResponse model constructor.
+ * @property {module:model/ApiResponse}
+ */
+ ApiResponse: ApiResponse,
/**
* The Cat model constructor.
* @property {module:model/Cat}
@@ -66,16 +76,21 @@
* @property {module:model/Dog}
*/
Dog: Dog,
+ /**
+ * The EnumClass model constructor.
+ * @property {module:model/EnumClass}
+ */
+ EnumClass: EnumClass,
+ /**
+ * The EnumTest model constructor.
+ * @property {module:model/EnumTest}
+ */
+ EnumTest: EnumTest,
/**
* The FormatTest model constructor.
* @property {module:model/FormatTest}
*/
FormatTest: FormatTest,
- /**
- * The InlineResponse200 model constructor.
- * @property {module:model/InlineResponse200}
- */
- InlineResponse200: InlineResponse200,
/**
* The Model200Response model constructor.
* @property {module:model/Model200Response}
@@ -116,6 +131,11 @@
* @property {module:model/User}
*/
User: User,
+ /**
+ * The FakeApi service constructor.
+ * @property {module:api/FakeApi}
+ */
+ FakeApi: FakeApi,
/**
* The PetApi service constructor.
* @property {module:api/PetApi}
diff --git a/samples/client/petstore/javascript-promise/src/model/Animal.js b/samples/client/petstore/javascript-promise/src/model/Animal.js
index 674471a30ee4..e42874c669b8 100644
--- a/samples/client/petstore/javascript-promise/src/model/Animal.js
+++ b/samples/client/petstore/javascript-promise/src/model/Animal.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient'], factory);
+ define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient) {
'use strict';
+
+
+
/**
* The Animal model module.
* @module model/Animal
@@ -28,8 +31,9 @@
* @param className
*/
var exports = function(className) {
+ var _this = this;
- this['className'] = className;
+ _this['className'] = className;
};
/**
@@ -40,7 +44,7 @@
* @return {module:model/Animal} The populated
* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following:
* Animal instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('className')) {
@@ -50,7 +54,6 @@
return obj;
}
-
/**
* @member {String} className
*/
@@ -61,3 +64,5 @@
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js b/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js
new file mode 100644
index 000000000000..d5f6aa2a424f
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js
@@ -0,0 +1,64 @@
+(function(root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['ApiClient', 'model/Animal'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // CommonJS-like environments that support module.exports, like Node.
+ module.exports = factory(require('../ApiClient'), require('./Animal'));
+ } else {
+ // Browser globals (root is window)
+ if (!root.SwaggerPetstore) {
+ root.SwaggerPetstore = {};
+ }
+ root.SwaggerPetstore.AnimalFarm = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Animal);
+ }
+}(this, function(ApiClient, Animal) {
+ 'use strict';
+
+
+
+
+ /**
+ * The AnimalFarm model module.
+ * @module model/AnimalFarm
+ * @version 1.0.0
+ */
+
+ /**
+ * Constructs a new AnimalFarm.
+ * @alias module:model/AnimalFarm
+ * @class
+ * @extends Array
+ */
+ var exports = function() {
+ var _this = this;
+ _this = new Array();
+ Object.setPrototypeOf(_this, exports);
+
+ return _this;
+ };
+
+ /**
+ * Constructs a AnimalFarm from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data to obj if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/AnimalFarm} obj Optional instance to populate.
+ * @return {module:model/AnimalFarm} The populated AnimalFarm instance.
+ */
+ exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+ ApiClient.constructFromObject(data, obj, Animal);
+
+ }
+ return obj;
+ }
+
+
+
+
+
+ return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/ApiResponse.js b/samples/client/petstore/javascript-promise/src/model/ApiResponse.js
new file mode 100644
index 000000000000..6d4c970264b0
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/src/model/ApiResponse.js
@@ -0,0 +1,83 @@
+(function(root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['ApiClient'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // CommonJS-like environments that support module.exports, like Node.
+ module.exports = factory(require('../ApiClient'));
+ } else {
+ // Browser globals (root is window)
+ if (!root.SwaggerPetstore) {
+ root.SwaggerPetstore = {};
+ }
+ root.SwaggerPetstore.ApiResponse = factory(root.SwaggerPetstore.ApiClient);
+ }
+}(this, function(ApiClient) {
+ 'use strict';
+
+
+
+
+ /**
+ * The ApiResponse model module.
+ * @module model/ApiResponse
+ * @version 1.0.0
+ */
+
+ /**
+ * Constructs a new ApiResponse.
+ * @alias module:model/ApiResponse
+ * @class
+ */
+ var exports = function() {
+ var _this = this;
+
+
+
+
+ };
+
+ /**
+ * Constructs a ApiResponse from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data to obj if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/ApiResponse} obj Optional instance to populate.
+ * @return {module:model/ApiResponse} The populated ApiResponse instance.
+ */
+ exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('code')) {
+ obj['code'] = ApiClient.convertToType(data['code'], 'Integer');
+ }
+ if (data.hasOwnProperty('type')) {
+ obj['type'] = ApiClient.convertToType(data['type'], 'String');
+ }
+ if (data.hasOwnProperty('message')) {
+ obj['message'] = ApiClient.convertToType(data['message'], 'String');
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * @member {Integer} code
+ */
+ exports.prototype['code'] = undefined;
+ /**
+ * @member {String} type
+ */
+ exports.prototype['type'] = undefined;
+ /**
+ * @member {String} message
+ */
+ exports.prototype['message'] = undefined;
+
+
+
+
+ return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/Cat.js b/samples/client/petstore/javascript-promise/src/model/Cat.js
index c878af6edecf..a6b25bc6d584 100644
--- a/samples/client/petstore/javascript-promise/src/model/Cat.js
+++ b/samples/client/petstore/javascript-promise/src/model/Cat.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient', './Animal'], factory);
+ define(['ApiClient', 'model/Animal'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Animal'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient, Animal) {
'use strict';
+
+
+
/**
* The Cat model module.
* @module model/Cat
@@ -29,7 +32,8 @@
* @param className
*/
var exports = function(className) {
- Animal.call(this, className);
+ var _this = this;
+ Animal.call(_this, className);
};
@@ -41,7 +45,7 @@
* @return {module:model/Cat} The populated Cat instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
Animal.constructFromObject(data, obj);
if (data.hasOwnProperty('declawed')) {
@@ -54,7 +58,6 @@
exports.prototype = Object.create(Animal.prototype);
exports.prototype.constructor = exports;
-
/**
* @member {Boolean} declawed
*/
@@ -65,3 +68,5 @@
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/Category.js b/samples/client/petstore/javascript-promise/src/model/Category.js
index 473f4b783d58..9e2e19ac5bba 100644
--- a/samples/client/petstore/javascript-promise/src/model/Category.js
+++ b/samples/client/petstore/javascript-promise/src/model/Category.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient'], factory);
+ define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient) {
'use strict';
+
+
+
/**
* The Category model module.
* @module model/Category
@@ -27,6 +30,7 @@
* @class
*/
var exports = function() {
+ var _this = this;
@@ -40,7 +44,7 @@
* @return {module:model/Category} The populated Category instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('id')) {
@@ -53,12 +57,10 @@
return obj;
}
-
/**
* @member {Integer} id
*/
exports.prototype['id'] = undefined;
-
/**
* @member {String} name
*/
@@ -69,3 +71,5 @@
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/Dog.js b/samples/client/petstore/javascript-promise/src/model/Dog.js
index e5e55581a70d..ee17ae3467f2 100644
--- a/samples/client/petstore/javascript-promise/src/model/Dog.js
+++ b/samples/client/petstore/javascript-promise/src/model/Dog.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient', './Animal'], factory);
+ define(['ApiClient', 'model/Animal'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Animal'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient, Animal) {
'use strict';
+
+
+
/**
* The Dog model module.
* @module model/Dog
@@ -29,7 +32,8 @@
* @param className
*/
var exports = function(className) {
- Animal.call(this, className);
+ var _this = this;
+ Animal.call(_this, className);
};
@@ -41,7 +45,7 @@
* @return {module:model/Dog} The populated Dog instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
Animal.constructFromObject(data, obj);
if (data.hasOwnProperty('breed')) {
@@ -54,7 +58,6 @@
exports.prototype = Object.create(Animal.prototype);
exports.prototype.constructor = exports;
-
/**
* @member {String} breed
*/
@@ -65,3 +68,5 @@
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/EnumClass.js b/samples/client/petstore/javascript-promise/src/model/EnumClass.js
new file mode 100644
index 000000000000..e9bf5219ee53
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/src/model/EnumClass.js
@@ -0,0 +1,44 @@
+(function(root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['ApiClient'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // CommonJS-like environments that support module.exports, like Node.
+ module.exports = factory(require('../ApiClient'));
+ } else {
+ // Browser globals (root is window)
+ if (!root.SwaggerPetstore) {
+ root.SwaggerPetstore = {};
+ }
+ root.SwaggerPetstore.EnumClass = factory(root.SwaggerPetstore.ApiClient);
+ }
+}(this, function(ApiClient) {
+ 'use strict';
+
+
+ /**
+ * Enum class EnumClass.
+ * @enum {}
+ * @readonly
+ */
+ var exports = {
+ /**
+ * value: "_abc"
+ * @const
+ */
+ "_abc": "_abc",
+ /**
+ * value: "-efg"
+ * @const
+ */
+ "-efg": "-efg",
+ /**
+ * value: "(xyz)"
+ * @const
+ */
+ "(xyz)": "(xyz)" };
+
+ return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/EnumTest.js b/samples/client/petstore/javascript-promise/src/model/EnumTest.js
new file mode 100644
index 000000000000..6f8f0de38365
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/src/model/EnumTest.js
@@ -0,0 +1,131 @@
+(function(root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['ApiClient'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // CommonJS-like environments that support module.exports, like Node.
+ module.exports = factory(require('../ApiClient'));
+ } else {
+ // Browser globals (root is window)
+ if (!root.SwaggerPetstore) {
+ root.SwaggerPetstore = {};
+ }
+ root.SwaggerPetstore.EnumTest = factory(root.SwaggerPetstore.ApiClient);
+ }
+}(this, function(ApiClient) {
+ 'use strict';
+
+
+
+
+ /**
+ * The EnumTest model module.
+ * @module model/EnumTest
+ * @version 1.0.0
+ */
+
+ /**
+ * Constructs a new EnumTest.
+ * @alias module:model/EnumTest
+ * @class
+ */
+ var exports = function() {
+ var _this = this;
+
+
+
+
+ };
+
+ /**
+ * Constructs a EnumTest from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data to obj if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/EnumTest} obj Optional instance to populate.
+ * @return {module:model/EnumTest} The populated EnumTest instance.
+ */
+ exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('enum_string')) {
+ obj['enum_string'] = ApiClient.convertToType(data['enum_string'], 'String');
+ }
+ if (data.hasOwnProperty('enum_integer')) {
+ obj['enum_integer'] = ApiClient.convertToType(data['enum_integer'], 'Integer');
+ }
+ if (data.hasOwnProperty('enum_number')) {
+ obj['enum_number'] = ApiClient.convertToType(data['enum_number'], 'Number');
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * @member {module:model/EnumTest.EnumStringEnum} enum_string
+ */
+ exports.prototype['enum_string'] = undefined;
+ /**
+ * @member {module:model/EnumTest.EnumIntegerEnum} enum_integer
+ */
+ exports.prototype['enum_integer'] = undefined;
+ /**
+ * @member {module:model/EnumTest.EnumNumberEnum} enum_number
+ */
+ exports.prototype['enum_number'] = undefined;
+
+
+ /**
+ * Allowed values for the enum_string property.
+ * @enum {String}
+ * @readonly
+ */
+ exports.EnumStringEnum = {
+ /**
+ * value: "UPPER"
+ * @const
+ */
+ "UPPER": "UPPER",
+ /**
+ * value: "lower"
+ * @const
+ */
+ "lower": "lower" };
+ /**
+ * Allowed values for the enum_integer property.
+ * @enum {Integer}
+ * @readonly
+ */
+ exports.EnumIntegerEnum = {
+ /**
+ * value: 1
+ * @const
+ */
+ "1": 1,
+ /**
+ * value: -1
+ * @const
+ */
+ "-1": -1 };
+ /**
+ * Allowed values for the enum_number property.
+ * @enum {Number}
+ * @readonly
+ */
+ exports.EnumNumberEnum = {
+ /**
+ * value: 1.1
+ * @const
+ */
+ "1.1": 1.1,
+ /**
+ * value: -1.2
+ * @const
+ */
+ "-1.2": -1.2 };
+
+
+ return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/FormatTest.js b/samples/client/petstore/javascript-promise/src/model/FormatTest.js
index 46a9bc854fc6..ed9e0cfcaf89 100644
--- a/samples/client/petstore/javascript-promise/src/model/FormatTest.js
+++ b/samples/client/petstore/javascript-promise/src/model/FormatTest.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient'], factory);
+ define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient) {
'use strict';
+
+
+
/**
* The FormatTest model module.
* @module model/FormatTest
@@ -26,20 +29,26 @@
* @alias module:model/FormatTest
* @class
* @param _number
+ * @param _byte
+ * @param _date
+ * @param password
*/
- var exports = function(_number) {
+ var exports = function(_number, _byte, _date, password) {
+ var _this = this;
- this['number'] = _number;
-
-
+ _this['number'] = _number;
+ _this['byte'] = _byte;
+
+ _this['date'] = _date;
+ _this['password'] = password;
};
/**
@@ -50,7 +59,7 @@
* @return {module:model/FormatTest} The populated FormatTest instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('integer')) {
@@ -84,70 +93,75 @@
obj['date'] = ApiClient.convertToType(data['date'], 'Date');
}
if (data.hasOwnProperty('dateTime')) {
- obj['dateTime'] = ApiClient.convertToType(data['dateTime'], 'String');
+ obj['dateTime'] = ApiClient.convertToType(data['dateTime'], 'Date');
+ }
+ if (data.hasOwnProperty('uuid')) {
+ obj['uuid'] = ApiClient.convertToType(data['uuid'], 'String');
+ }
+ if (data.hasOwnProperty('password')) {
+ obj['password'] = ApiClient.convertToType(data['password'], 'String');
}
}
return obj;
}
-
/**
* @member {Integer} integer
*/
exports.prototype['integer'] = undefined;
-
/**
* @member {Integer} int32
*/
exports.prototype['int32'] = undefined;
-
/**
* @member {Integer} int64
*/
exports.prototype['int64'] = undefined;
-
/**
* @member {Number} number
*/
exports.prototype['number'] = undefined;
-
/**
* @member {Number} float
*/
exports.prototype['float'] = undefined;
-
/**
* @member {Number} double
*/
exports.prototype['double'] = undefined;
-
/**
* @member {String} string
*/
exports.prototype['string'] = undefined;
-
/**
* @member {String} byte
*/
exports.prototype['byte'] = undefined;
-
/**
* @member {String} binary
*/
exports.prototype['binary'] = undefined;
-
/**
* @member {Date} date
*/
exports.prototype['date'] = undefined;
-
/**
- * @member {String} dateTime
+ * @member {Date} dateTime
*/
exports.prototype['dateTime'] = undefined;
+ /**
+ * @member {String} uuid
+ */
+ exports.prototype['uuid'] = undefined;
+ /**
+ * @member {String} password
+ */
+ exports.prototype['password'] = undefined;
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/InlineResponse200.js b/samples/client/petstore/javascript-promise/src/model/InlineResponse200.js
deleted file mode 100644
index f9ecda79491a..000000000000
--- a/samples/client/petstore/javascript-promise/src/model/InlineResponse200.js
+++ /dev/null
@@ -1,132 +0,0 @@
-(function(root, factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['../ApiClient', './Tag'], factory);
- } else if (typeof module === 'object' && module.exports) {
- // CommonJS-like environments that support module.exports, like Node.
- module.exports = factory(require('../ApiClient'), require('./Tag'));
- } else {
- // Browser globals (root is window)
- if (!root.SwaggerPetstore) {
- root.SwaggerPetstore = {};
- }
- root.SwaggerPetstore.InlineResponse200 = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Tag);
- }
-}(this, function(ApiClient, Tag) {
- 'use strict';
-
- /**
- * The InlineResponse200 model module.
- * @module model/InlineResponse200
- * @version 1.0.0
- */
-
- /**
- * Constructs a new InlineResponse200.
- * @alias module:model/InlineResponse200
- * @class
- * @param id
- */
- var exports = function(id) {
-
-
- this['id'] = id;
-
-
-
-
- };
-
- /**
- * Constructs a InlineResponse200 from a plain JavaScript object, optionally creating a new instance.
- * Copies all relevant properties from data to obj if supplied or a new instance if not.
- * @param {Object} data The plain JavaScript object bearing properties of interest.
- * @param {module:model/InlineResponse200} obj Optional instance to populate.
- * @return {module:model/InlineResponse200} The populated InlineResponse200 instance.
- */
- exports.constructFromObject = function(data, obj) {
- if (data) {
- obj = obj || new exports();
-
- if (data.hasOwnProperty('tags')) {
- obj['tags'] = ApiClient.convertToType(data['tags'], [Tag]);
- }
- if (data.hasOwnProperty('id')) {
- obj['id'] = ApiClient.convertToType(data['id'], 'Integer');
- }
- if (data.hasOwnProperty('category')) {
- obj['category'] = ApiClient.convertToType(data['category'], Object);
- }
- if (data.hasOwnProperty('status')) {
- obj['status'] = ApiClient.convertToType(data['status'], 'String');
- }
- if (data.hasOwnProperty('name')) {
- obj['name'] = ApiClient.convertToType(data['name'], 'String');
- }
- if (data.hasOwnProperty('photoUrls')) {
- obj['photoUrls'] = ApiClient.convertToType(data['photoUrls'], ['String']);
- }
- }
- return obj;
- }
-
-
- /**
- * @member {Array.status property.
- * @enum {String}
- * @readonly
- */
- exports.StatusEnum = {
- /**
- * value: available
- * @const
- */
- AVAILABLE: "available",
-
- /**
- * value: pending
- * @const
- */
- PENDING: "pending",
-
- /**
- * value: sold
- * @const
- */
- SOLD: "sold"
- };
-
- return exports;
-}));
diff --git a/samples/client/petstore/javascript-promise/src/model/Model200Response.js b/samples/client/petstore/javascript-promise/src/model/Model200Response.js
index 1682ed079fce..1d83d420287f 100644
--- a/samples/client/petstore/javascript-promise/src/model/Model200Response.js
+++ b/samples/client/petstore/javascript-promise/src/model/Model200Response.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient'], factory);
+ define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient) {
'use strict';
+
+
+
/**
* The Model200Response model module.
* @module model/Model200Response
@@ -28,6 +31,7 @@
* @class
*/
var exports = function() {
+ var _this = this;
};
@@ -40,7 +44,7 @@
* @return {module:model/Model200Response} The populated Model200Response instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('name')) {
@@ -50,7 +54,6 @@
return obj;
}
-
/**
* @member {Integer} name
*/
@@ -61,3 +64,5 @@
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js
index 86d28d038a9f..d0236e77b174 100644
--- a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js
+++ b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient'], factory);
+ define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient) {
'use strict';
+
+
+
/**
* The ModelReturn model module.
* @module model/ModelReturn
@@ -28,6 +31,7 @@
* @class
*/
var exports = function() {
+ var _this = this;
};
@@ -40,7 +44,7 @@
* @return {module:model/ModelReturn} The populated ModelReturn instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('return')) {
@@ -50,7 +54,6 @@
return obj;
}
-
/**
* @member {Integer} return
*/
@@ -61,3 +64,5 @@
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/Name.js b/samples/client/petstore/javascript-promise/src/model/Name.js
index c8bd6862c978..93d1d55deb27 100644
--- a/samples/client/petstore/javascript-promise/src/model/Name.js
+++ b/samples/client/petstore/javascript-promise/src/model/Name.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient'], factory);
+ define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient) {
'use strict';
+
+
+
/**
* The Name model module.
* @module model/Name
@@ -29,8 +32,10 @@
* @param name
*/
var exports = function(name) {
+ var _this = this;
+
+ _this['name'] = name;
- this['name'] = name;
};
@@ -42,7 +47,7 @@
* @return {module:model/Name} The populated Name instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('name')) {
@@ -51,23 +56,30 @@
if (data.hasOwnProperty('snake_case')) {
obj['snake_case'] = ApiClient.convertToType(data['snake_case'], 'Integer');
}
+ if (data.hasOwnProperty('property')) {
+ obj['property'] = ApiClient.convertToType(data['property'], 'String');
+ }
}
return obj;
}
-
/**
* @member {Integer} name
*/
exports.prototype['name'] = undefined;
-
/**
* @member {Integer} snake_case
*/
exports.prototype['snake_case'] = undefined;
+ /**
+ * @member {String} property
+ */
+ exports.prototype['property'] = undefined;
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/Order.js b/samples/client/petstore/javascript-promise/src/model/Order.js
index 81f1feb78000..57f77d84ccd0 100644
--- a/samples/client/petstore/javascript-promise/src/model/Order.js
+++ b/samples/client/petstore/javascript-promise/src/model/Order.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient'], factory);
+ define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient) {
'use strict';
+
+
+
/**
* The Order model module.
* @module model/Order
@@ -27,6 +30,7 @@
* @class
*/
var exports = function() {
+ var _this = this;
@@ -44,7 +48,7 @@
* @return {module:model/Order} The populated Order instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('id')) {
@@ -69,37 +73,32 @@
return obj;
}
-
/**
* @member {Integer} id
*/
exports.prototype['id'] = undefined;
-
/**
* @member {Integer} petId
*/
exports.prototype['petId'] = undefined;
-
/**
* @member {Integer} quantity
*/
exports.prototype['quantity'] = undefined;
-
/**
* @member {Date} shipDate
*/
exports.prototype['shipDate'] = undefined;
-
/**
* Order Status
* @member {module:model/Order.StatusEnum} status
*/
exports.prototype['status'] = undefined;
-
/**
* @member {Boolean} complete
+ * @default false
*/
- exports.prototype['complete'] = undefined;
+ exports.prototype['complete'] = false;
/**
@@ -107,25 +106,25 @@
* @enum {String}
* @readonly
*/
- exports.StatusEnum = {
+ exports.StatusEnum = {
/**
- * value: placed
+ * value: "placed"
* @const
*/
- PLACED: "placed",
-
+ "placed": "placed",
/**
- * value: approved
+ * value: "approved"
* @const
*/
- APPROVED: "approved",
-
+ "approved": "approved",
/**
- * value: delivered
+ * value: "delivered"
* @const
*/
- DELIVERED: "delivered"
- };
+ "delivered": "delivered" };
+
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/Pet.js b/samples/client/petstore/javascript-promise/src/model/Pet.js
index 39a09b471700..fe14361dbf2e 100644
--- a/samples/client/petstore/javascript-promise/src/model/Pet.js
+++ b/samples/client/petstore/javascript-promise/src/model/Pet.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient', './Category', './Tag'], factory);
+ define(['ApiClient', 'model/Category', 'model/Tag'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Category'), require('./Tag'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient, Category, Tag) {
'use strict';
+
+
+
/**
* The Pet model module.
* @module model/Pet
@@ -29,11 +32,12 @@
* @param photoUrls
*/
var exports = function(name, photoUrls) {
+ var _this = this;
- this['name'] = name;
- this['photoUrls'] = photoUrls;
+ _this['name'] = name;
+ _this['photoUrls'] = photoUrls;
};
@@ -46,7 +50,7 @@
* @return {module:model/Pet} The populated Pet instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('id')) {
@@ -71,32 +75,26 @@
return obj;
}
-
/**
* @member {Integer} id
*/
exports.prototype['id'] = undefined;
-
/**
* @member {module:model/Category} category
*/
exports.prototype['category'] = undefined;
-
/**
* @member {String} name
*/
exports.prototype['name'] = undefined;
-
/**
* @member {Array.SpecialModelName instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('$special[property.name]')) {
@@ -49,7 +53,6 @@
return obj;
}
-
/**
* @member {Integer} $special[property.name]
*/
@@ -60,3 +63,5 @@
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/Tag.js b/samples/client/petstore/javascript-promise/src/model/Tag.js
index 8a0739b2ef5b..443d312b76ab 100644
--- a/samples/client/petstore/javascript-promise/src/model/Tag.js
+++ b/samples/client/petstore/javascript-promise/src/model/Tag.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient'], factory);
+ define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient) {
'use strict';
+
+
+
/**
* The Tag model module.
* @module model/Tag
@@ -27,6 +30,7 @@
* @class
*/
var exports = function() {
+ var _this = this;
@@ -40,7 +44,7 @@
* @return {module:model/Tag} The populated Tag instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('id')) {
@@ -53,12 +57,10 @@
return obj;
}
-
/**
* @member {Integer} id
*/
exports.prototype['id'] = undefined;
-
/**
* @member {String} name
*/
@@ -69,3 +71,5 @@
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/User.js b/samples/client/petstore/javascript-promise/src/model/User.js
index 1d960a89914b..2360c7c6314b 100644
--- a/samples/client/petstore/javascript-promise/src/model/User.js
+++ b/samples/client/petstore/javascript-promise/src/model/User.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient'], factory);
+ define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient) {
'use strict';
+
+
+
/**
* The User model module.
* @module model/User
@@ -27,6 +30,7 @@
* @class
*/
var exports = function() {
+ var _this = this;
@@ -46,7 +50,7 @@
* @return {module:model/User} The populated User instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('id')) {
@@ -77,42 +81,34 @@
return obj;
}
-
/**
* @member {Integer} id
*/
exports.prototype['id'] = undefined;
-
/**
* @member {String} username
*/
exports.prototype['username'] = undefined;
-
/**
* @member {String} firstName
*/
exports.prototype['firstName'] = undefined;
-
/**
* @member {String} lastName
*/
exports.prototype['lastName'] = undefined;
-
/**
* @member {String} email
*/
exports.prototype['email'] = undefined;
-
/**
* @member {String} password
*/
exports.prototype['password'] = undefined;
-
/**
* @member {String} phone
*/
exports.prototype['phone'] = undefined;
-
/**
* User Status
* @member {Integer} userStatus
@@ -124,3 +120,5 @@
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript-promise/test/ApiClientTest.js b/samples/client/petstore/javascript-promise/test/ApiClientTest.js
index c91fbb037830..085983688bbb 100644
--- a/samples/client/petstore/javascript-promise/test/ApiClientTest.js
+++ b/samples/client/petstore/javascript-promise/test/ApiClientTest.js
@@ -13,7 +13,11 @@ describe('ApiClient', function() {
expect(apiClient.basePath).to.be('http://petstore.swagger.io/v2');
expect(apiClient.authentications).to.eql({
petstore_auth: {type: 'oauth2'},
- api_key: {type: 'apiKey', 'in': 'header', name: 'api_key'},
+ api_key: {type: 'apiKey', 'in': 'header', name: 'api_key'}
+ /* comment out the following as these fake security def (testing purpose)
+ * are removed from the spec, we'll add these back after updating the
+ * petstore server
+ *
test_http_basic: {type: 'basic'},
test_api_client_id: {
type: 'apiKey',
@@ -34,7 +38,7 @@ describe('ApiClient', function() {
type: 'apiKey',
'in': 'header',
name: 'test_api_key_header'
- }
+ }*/
});
});
diff --git a/samples/client/petstore/javascript-promise/test/api/PetApiTest.js b/samples/client/petstore/javascript-promise/test/api/PetApiTest.js
index 1119546014d3..98debb8ea195 100644
--- a/samples/client/petstore/javascript-promise/test/api/PetApiTest.js
+++ b/samples/client/petstore/javascript-promise/test/api/PetApiTest.js
@@ -49,7 +49,7 @@ var createRandomPet = function() {
describe('PetApi', function() {
it('should create and get pet', function(done) {
var pet = createRandomPet();
- api.addPet({body: pet})
+ api.addPet(pet)
.then(function() {
return api.getPetById(pet.id)
})
@@ -63,7 +63,7 @@ describe('PetApi', function() {
.to.be(getProperty(getProperty(pet, "getCategory", "category"), "getName", "name"));
api.deletePet(pet.id);
- done();
+ done();
});
});
});
diff --git a/samples/client/petstore/javascript/README.md b/samples/client/petstore/javascript/README.md
index c57237d7cebd..1bf60abb9c32 100644
--- a/samples/client/petstore/javascript/README.md
+++ b/samples/client/petstore/javascript/README.md
@@ -1,12 +1,12 @@
# swagger-petstore
SwaggerPetstore - JavaScript client for swagger-petstore
-This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
+This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose.
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API version: 1.0.0
- Package version: 1.0.0
-- Build date: 2016-04-11T22:17:15.122+08:00
+- Build date: 2016-05-06T18:34:50.267+08:00
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen
## Installation
@@ -27,11 +27,11 @@ npm install swagger-petstore --save
#### git
#
If the library is hosted at a git repository, e.g.
-https://github.com/YOUR_USERNAME/YOUR_GIT_REPO_ID
+https://github.com/GIT_USER_ID/GIT_REPO_ID
then install it via:
```shell
-npm install YOUR_USERNAME/YOUR_GIT_REPO_ID --save
+ npm install GIT_USER_ID/GIT_REPO_ID --save
```
### For browser
@@ -53,16 +53,25 @@ Please follow the [installation](#installation) instruction and execute the foll
```javascript
var SwaggerPetstore = require('swagger-petstore');
-var defaultClient = SwaggerPetstore.ApiClient.default;
+var api = new SwaggerPetstore.FakeApi()
-// Configure OAuth2 access token for authorization: petstore_auth
-var petstore_auth = defaultClient.authentications['petstore_auth'];
-petstore_auth.accessToken = "YOUR ACCESS TOKEN"
+var _number = 3.4; // {Number} None
-var api = new SwaggerPetstore.PetApi()
+var _double = 1.2; // {Number} None
+
+var _string = "_string_example"; // {String} None
+
+var _byte = "B"; // {String} None
var opts = {
- 'body': new SwaggerPetstore.Pet() // {Pet} Pet object that needs to be added to the store
+ 'integer': 56, // {Integer} None
+ 'int32': 56, // {Integer} None
+ 'int64': 789, // {Integer} None
+ '_float': 3.4, // {Number} None
+ 'binary': "B", // {String} None
+ '_date': new Date("2013-10-20"), // {Date} None
+ 'dateTime': new Date("2013-10-20T19:20:30+01:00"), // {Date} None
+ 'password': "password_example" // {String} None
};
var callback = function(error, data, response) {
@@ -72,7 +81,7 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
-api.addPet(opts, callback);
+api.testEndpointParameters(_number, _double, _string, _byte, opts, callback);
```
@@ -82,21 +91,17 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
+*SwaggerPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters
*SwaggerPetstore.PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
-*SwaggerPetstore.PetApi* | [**addPetUsingByteArray**](docs/PetApi.md#addPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
*SwaggerPetstore.PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
*SwaggerPetstore.PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
*SwaggerPetstore.PetApi* | [**findPetsByTags**](docs/PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
*SwaggerPetstore.PetApi* | [**getPetById**](docs/PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
-*SwaggerPetstore.PetApi* | [**getPetByIdInObject**](docs/PetApi.md#getPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
-*SwaggerPetstore.PetApi* | [**petPetIdtestingByteArraytrueGet**](docs/PetApi.md#petPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
*SwaggerPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
*SwaggerPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
*SwaggerPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
*SwaggerPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
-*SwaggerPetstore.StoreApi* | [**findOrdersByStatus**](docs/StoreApi.md#findOrdersByStatus) | **GET** /store/findByStatus | Finds orders by status
*SwaggerPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
-*SwaggerPetstore.StoreApi* | [**getInventoryInObject**](docs/StoreApi.md#getInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
*SwaggerPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
*SwaggerPetstore.StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
*SwaggerPetstore.UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user
@@ -112,11 +117,14 @@ Class | Method | HTTP request | Description
## Documentation for Models
- [SwaggerPetstore.Animal](docs/Animal.md)
+ - [SwaggerPetstore.AnimalFarm](docs/AnimalFarm.md)
+ - [SwaggerPetstore.ApiResponse](docs/ApiResponse.md)
- [SwaggerPetstore.Cat](docs/Cat.md)
- [SwaggerPetstore.Category](docs/Category.md)
- [SwaggerPetstore.Dog](docs/Dog.md)
+ - [SwaggerPetstore.EnumClass](docs/EnumClass.md)
+ - [SwaggerPetstore.EnumTest](docs/EnumTest.md)
- [SwaggerPetstore.FormatTest](docs/FormatTest.md)
- - [SwaggerPetstore.InlineResponse200](docs/InlineResponse200.md)
- [SwaggerPetstore.Model200Response](docs/Model200Response.md)
- [SwaggerPetstore.ModelReturn](docs/ModelReturn.md)
- [SwaggerPetstore.Name](docs/Name.md)
@@ -130,40 +138,6 @@ Class | Method | HTTP request | Description
## Documentation for Authorization
-### test_api_key_header
-
-- **Type**: API key
-- **API key parameter name**: test_api_key_header
-- **Location**: HTTP header
-
-### api_key
-
-- **Type**: API key
-- **API key parameter name**: api_key
-- **Location**: HTTP header
-
-### test_http_basic
-
-- **Type**: HTTP basic authentication
-
-### test_api_client_secret
-
-- **Type**: API key
-- **API key parameter name**: x-test_api_client_secret
-- **Location**: HTTP header
-
-### test_api_client_id
-
-- **Type**: API key
-- **API key parameter name**: x-test_api_client_id
-- **Location**: HTTP header
-
-### test_api_key_query
-
-- **Type**: API key
-- **API key parameter name**: test_api_key_query
-- **Location**: URL query string
-
### petstore_auth
- **Type**: OAuth
@@ -173,3 +147,9 @@ Class | Method | HTTP request | Description
- write:pets: modify pets in your account
- read:pets: read your pets
+### api_key
+
+- **Type**: API key
+- **API key parameter name**: api_key
+- **Location**: HTTP header
+
diff --git a/samples/client/petstore/javascript/docs/AnimalFarm.md b/samples/client/petstore/javascript/docs/AnimalFarm.md
new file mode 100644
index 000000000000..b72739a44c42
--- /dev/null
+++ b/samples/client/petstore/javascript/docs/AnimalFarm.md
@@ -0,0 +1,7 @@
+# SwaggerPetstore.AnimalFarm
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+
diff --git a/samples/client/petstore/javascript/docs/ApiResponse.md b/samples/client/petstore/javascript/docs/ApiResponse.md
new file mode 100644
index 000000000000..0ee678b84afa
--- /dev/null
+++ b/samples/client/petstore/javascript/docs/ApiResponse.md
@@ -0,0 +1,10 @@
+# SwaggerPetstore.ApiResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**code** | **Integer** | | [optional]
+**type** | **String** | | [optional]
+**message** | **String** | | [optional]
+
+
diff --git a/samples/client/petstore/javascript/docs/EnumClass.md b/samples/client/petstore/javascript/docs/EnumClass.md
new file mode 100644
index 000000000000..04b89362941b
--- /dev/null
+++ b/samples/client/petstore/javascript/docs/EnumClass.md
@@ -0,0 +1,12 @@
+# SwaggerPetstore.EnumClass
+
+## Enum
+
+
+* `_abc` (value: `"_abc"`)
+
+* `-efg` (value: `"-efg"`)
+
+* `(xyz)` (value: `"(xyz)"`)
+
+
diff --git a/samples/client/petstore/javascript/docs/EnumTest.md b/samples/client/petstore/javascript/docs/EnumTest.md
new file mode 100644
index 000000000000..22c4da11b9d3
--- /dev/null
+++ b/samples/client/petstore/javascript/docs/EnumTest.md
@@ -0,0 +1,43 @@
+# SwaggerPetstore.EnumTest
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**enumString** | **String** | | [optional]
+**enumInteger** | **Integer** | | [optional]
+**enumNumber** | **Number** | | [optional]
+
+
+
+## Enum: EnumStringEnum
+
+
+* `UPPER` (value: `"UPPER"`)
+
+* `lower` (value: `"lower"`)
+
+
+
+
+
+## Enum: EnumIntegerEnum
+
+
+* `1` (value: `1`)
+
+* `-1` (value: `-1`)
+
+
+
+
+
+## Enum: EnumNumberEnum
+
+
+* `1.1` (value: `1.1`)
+
+* `-1.2` (value: `-1.2`)
+
+
+
+
diff --git a/samples/client/petstore/javascript/docs/FakeApi.md b/samples/client/petstore/javascript/docs/FakeApi.md
new file mode 100644
index 000000000000..121056d1c568
--- /dev/null
+++ b/samples/client/petstore/javascript/docs/FakeApi.md
@@ -0,0 +1,82 @@
+# SwaggerPetstore.FakeApi
+
+All URIs are relative to *http://petstore.swagger.io/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters
+
+
+
+# **testEndpointParameters**
+> testEndpointParameters(_number, _double, _string, _byte, opts)
+
+Fake endpoint for testing various parameters
+
+Fake endpoint for testing various parameters
+
+### Example
+```javascript
+var SwaggerPetstore = require('swagger-petstore');
+
+var apiInstance = new SwaggerPetstore.FakeApi();
+
+var _number = 3.4; // Number | None
+
+var _double = 1.2; // Number | None
+
+var _string = "_string_example"; // String | None
+
+var _byte = "B"; // String | None
+
+var opts = {
+ 'integer': 56, // Integer | None
+ 'int32': 56, // Integer | None
+ 'int64': 789, // Integer | None
+ '_float': 3.4, // Number | None
+ 'binary': "B", // String | None
+ '_date': new Date("2013-10-20"), // Date | None
+ 'dateTime': new Date("2013-10-20T19:20:30+01:00"), // Date | None
+ 'password': "password_example" // String | None
+};
+
+var callback = function(error, data, response) {
+ if (error) {
+ console.error(error);
+ } else {
+ console.log('API called successfully.');
+ }
+};
+apiInstance.testEndpointParameters(_number, _double, _string, _byte, opts, callback);
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **_number** | **Number**| None |
+ **_double** | **Number**| None |
+ **_string** | **String**| None |
+ **_byte** | **String**| None |
+ **integer** | **Integer**| None | [optional]
+ **int32** | **Integer**| None | [optional]
+ **int64** | **Integer**| None | [optional]
+ **_float** | **Number**| None | [optional]
+ **binary** | **String**| None | [optional]
+ **_date** | **Date**| None | [optional]
+ **dateTime** | **Date**| None | [optional]
+ **password** | **String**| None | [optional]
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
diff --git a/samples/client/petstore/javascript/docs/FormatTest.md b/samples/client/petstore/javascript/docs/FormatTest.md
index 57a4fb132d53..9600904ee6d4 100644
--- a/samples/client/petstore/javascript/docs/FormatTest.md
+++ b/samples/client/petstore/javascript/docs/FormatTest.md
@@ -10,9 +10,11 @@ Name | Type | Description | Notes
**_float** | **Number** | | [optional]
**_double** | **Number** | | [optional]
**_string** | **String** | | [optional]
-**_byte** | **String** | | [optional]
+**_byte** | **String** | |
**binary** | **String** | | [optional]
-**_date** | **Date** | | [optional]
-**dateTime** | **String** | | [optional]
+**_date** | **Date** | |
+**dateTime** | **Date** | | [optional]
+**uuid** | **String** | | [optional]
+**password** | **String** | |
diff --git a/samples/client/petstore/javascript/docs/InlineResponse200.md b/samples/client/petstore/javascript/docs/InlineResponse200.md
deleted file mode 100644
index bbb11067e9a4..000000000000
--- a/samples/client/petstore/javascript/docs/InlineResponse200.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# SwaggerPetstore.InlineResponse200
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**tags** | [**[Tag]**](Tag.md) | | [optional]
-**id** | **Integer** | |
-**category** | **Object** | | [optional]
-**status** | **String** | pet status in the store | [optional]
-**name** | **String** | | [optional]
-**photoUrls** | **[String]** | | [optional]
-
-
diff --git a/samples/client/petstore/javascript/docs/Name.md b/samples/client/petstore/javascript/docs/Name.md
index f0e693f2f564..3bdb76be0859 100644
--- a/samples/client/petstore/javascript/docs/Name.md
+++ b/samples/client/petstore/javascript/docs/Name.md
@@ -5,5 +5,6 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **Integer** | |
**snakeCase** | **Integer** | | [optional]
+**property** | **String** | | [optional]
diff --git a/samples/client/petstore/javascript/docs/Order.md b/samples/client/petstore/javascript/docs/Order.md
index b34b67d3a56a..95ee5946ed26 100644
--- a/samples/client/petstore/javascript/docs/Order.md
+++ b/samples/client/petstore/javascript/docs/Order.md
@@ -8,6 +8,19 @@ Name | Type | Description | Notes
**quantity** | **Integer** | | [optional]
**shipDate** | **Date** | | [optional]
**status** | **String** | Order Status | [optional]
-**complete** | **Boolean** | | [optional]
+**complete** | **Boolean** | | [optional] [default to false]
+
+
+
+## Enum: StatusEnum
+
+
+* `placed` (value: `"placed"`)
+
+* `approved` (value: `"approved"`)
+
+* `delivered` (value: `"delivered"`)
+
+
diff --git a/samples/client/petstore/javascript/docs/Pet.md b/samples/client/petstore/javascript/docs/Pet.md
index f1b049dcadd0..a08333731c0d 100644
--- a/samples/client/petstore/javascript/docs/Pet.md
+++ b/samples/client/petstore/javascript/docs/Pet.md
@@ -11,3 +11,16 @@ Name | Type | Description | Notes
**status** | **String** | pet status in the store | [optional]
+
+## Enum: StatusEnum
+
+
+* `available` (value: `"available"`)
+
+* `pending` (value: `"pending"`)
+
+* `sold` (value: `"sold"`)
+
+
+
+
diff --git a/samples/client/petstore/javascript/docs/PetApi.md b/samples/client/petstore/javascript/docs/PetApi.md
index 35a760e218be..8807e772687c 100644
--- a/samples/client/petstore/javascript/docs/PetApi.md
+++ b/samples/client/petstore/javascript/docs/PetApi.md
@@ -5,13 +5,10 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
-[**addPetUsingByteArray**](PetApi.md#addPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
-[**getPetByIdInObject**](PetApi.md#getPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
-[**petPetIdtestingByteArraytrueGet**](PetApi.md#petPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
@@ -19,7 +16,7 @@ Method | HTTP request | Description
# **addPet**
-> addPet(opts)
+> addPet(body)
Add a new pet to the store
@@ -32,13 +29,12 @@ var defaultClient = SwaggerPetstore.ApiClient.default;
// Configure OAuth2 access token for authorization: petstore_auth
var petstore_auth = defaultClient.authentications['petstore_auth'];
-petstore_auth.accessToken = "YOUR ACCESS TOKEN"
+petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
-var apiInstance = new SwaggerPetstore.PetApi()
+var apiInstance = new SwaggerPetstore.PetApi();
+
+var body = new SwaggerPetstore.Pet(); // Pet | Pet object that needs to be added to the store
-var opts = {
- 'body': new SwaggerPetstore.Pet() // {Pet} Pet object that needs to be added to the store
-};
var callback = function(error, data, response) {
if (error) {
@@ -47,14 +43,14 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
-api.addPet(opts, callback);
+apiInstance.addPet(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
+ **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -67,59 +63,7 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- - **Accept**: application/json, application/xml
-
-
-# **addPetUsingByteArray**
-> addPetUsingByteArray(opts)
-
-Fake endpoint to test byte array in body parameter for adding a new pet to the store
-
-
-
-### Example
-```javascript
-var SwaggerPetstore = require('swagger-petstore');
-var defaultClient = SwaggerPetstore.ApiClient.default;
-
-// Configure OAuth2 access token for authorization: petstore_auth
-var petstore_auth = defaultClient.authentications['petstore_auth'];
-petstore_auth.accessToken = "YOUR ACCESS TOKEN"
-
-var apiInstance = new SwaggerPetstore.PetApi()
-
-var opts = {
- 'body': "B" // {String} Pet object in the form of byte array
-};
-
-var callback = function(error, data, response) {
- if (error) {
- console.error(error);
- } else {
- console.log('API called successfully.');
- }
-};
-api.addPetUsingByteArray(opts, callback);
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **body** | **String**| Pet object in the form of byte array | [optional]
-
-### Return type
-
-null (empty response body)
-
-### Authorization
-
-[petstore_auth](../README.md#petstore_auth)
-
-### HTTP request headers
-
- - **Content-Type**: application/json, application/xml
- - **Accept**: application/json, application/xml
+ - **Accept**: application/xml, application/json
# **deletePet**
@@ -136,14 +80,14 @@ var defaultClient = SwaggerPetstore.ApiClient.default;
// Configure OAuth2 access token for authorization: petstore_auth
var petstore_auth = defaultClient.authentications['petstore_auth'];
-petstore_auth.accessToken = "YOUR ACCESS TOKEN"
+petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
-var apiInstance = new SwaggerPetstore.PetApi()
+var apiInstance = new SwaggerPetstore.PetApi();
-var petId = 789; // {Integer} Pet id to delete
+var petId = 789; // Integer | Pet id to delete
var opts = {
- 'apiKey': "apiKey_example" // {String}
+ 'apiKey': "apiKey_example" // String |
};
var callback = function(error, data, response) {
@@ -153,7 +97,7 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
-api.deletePet(petId, opts, callback);
+apiInstance.deletePet(petId, opts, callback);
```
### Parameters
@@ -174,11 +118,11 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
+ - **Accept**: application/xml, application/json
# **findPetsByStatus**
-> [Pet] findPetsByStatus(opts)
+> [Pet] findPetsByStatus(status)
Finds Pets by status
@@ -191,13 +135,12 @@ var defaultClient = SwaggerPetstore.ApiClient.default;
// Configure OAuth2 access token for authorization: petstore_auth
var petstore_auth = defaultClient.authentications['petstore_auth'];
-petstore_auth.accessToken = "YOUR ACCESS TOKEN"
+petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
-var apiInstance = new SwaggerPetstore.PetApi()
+var apiInstance = new SwaggerPetstore.PetApi();
+
+var status = ["status_example"]; // [String] | Status values that need to be considered for filter
-var opts = {
- 'status': ["available"] // {[String]} Status values that need to be considered for query
-};
var callback = function(error, data, response) {
if (error) {
@@ -206,14 +149,14 @@ var callback = function(error, data, response) {
console.log('API called successfully. Returned data: ' + data);
}
};
-api.findPetsByStatus(opts, callback);
+apiInstance.findPetsByStatus(status, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **status** | [**[String]**](String.md)| Status values that need to be considered for query | [optional] [default to available]
+ **status** | [**[String]**](String.md)| Status values that need to be considered for filter |
### Return type
@@ -226,15 +169,15 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
+ - **Accept**: application/xml, application/json
# **findPetsByTags**
-> [Pet] findPetsByTags(opts)
+> [Pet] findPetsByTags(tags)
Finds Pets by tags
-Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
+Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
### Example
```javascript
@@ -243,13 +186,12 @@ var defaultClient = SwaggerPetstore.ApiClient.default;
// Configure OAuth2 access token for authorization: petstore_auth
var petstore_auth = defaultClient.authentications['petstore_auth'];
-petstore_auth.accessToken = "YOUR ACCESS TOKEN"
+petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
-var apiInstance = new SwaggerPetstore.PetApi()
+var apiInstance = new SwaggerPetstore.PetApi();
+
+var tags = ["tags_example"]; // [String] | Tags to filter by
-var opts = {
- 'tags': ["tags_example"] // {[String]} Tags to filter by
-};
var callback = function(error, data, response) {
if (error) {
@@ -258,14 +200,14 @@ var callback = function(error, data, response) {
console.log('API called successfully. Returned data: ' + data);
}
};
-api.findPetsByTags(opts, callback);
+apiInstance.findPetsByTags(tags, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **tags** | [**[String]**](String.md)| Tags to filter by | [optional]
+ **tags** | [**[String]**](String.md)| Tags to filter by |
### Return type
@@ -278,7 +220,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
+ - **Accept**: application/xml, application/json
# **getPetById**
@@ -286,7 +228,7 @@ Name | Type | Description | Notes
Find pet by ID
-Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
+Returns a single pet
### Example
```javascript
@@ -295,17 +237,13 @@ var defaultClient = SwaggerPetstore.ApiClient.default;
// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
-api_key.apiKey = "YOUR API KEY"
+api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//api_key.apiKeyPrefix['api_key'] = "Token"
+//api_key.apiKeyPrefix = 'Token';
-// Configure OAuth2 access token for authorization: petstore_auth
-var petstore_auth = defaultClient.authentications['petstore_auth'];
-petstore_auth.accessToken = "YOUR ACCESS TOKEN"
+var apiInstance = new SwaggerPetstore.PetApi();
-var apiInstance = new SwaggerPetstore.PetApi()
-
-var petId = 789; // {Integer} ID of pet that needs to be fetched
+var petId = 789; // Integer | ID of pet to return
var callback = function(error, data, response) {
@@ -315,14 +253,14 @@ var callback = function(error, data, response) {
console.log('API called successfully. Returned data: ' + data);
}
};
-api.getPetById(petId, callback);
+apiInstance.getPetById(petId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **petId** | **Integer**| ID of pet that needs to be fetched |
+ **petId** | **Integer**| ID of pet to return |
### Return type
@@ -330,130 +268,16 @@ Name | Type | Description | Notes
### Authorization
-[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
+[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
-
-
-# **getPetByIdInObject**
-> InlineResponse200 getPetByIdInObject(petId)
-
-Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
-
-Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
-
-### Example
-```javascript
-var SwaggerPetstore = require('swagger-petstore');
-var defaultClient = SwaggerPetstore.ApiClient.default;
-
-// Configure API key authorization: api_key
-var api_key = defaultClient.authentications['api_key'];
-api_key.apiKey = "YOUR API KEY"
-// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//api_key.apiKeyPrefix['api_key'] = "Token"
-
-// Configure OAuth2 access token for authorization: petstore_auth
-var petstore_auth = defaultClient.authentications['petstore_auth'];
-petstore_auth.accessToken = "YOUR ACCESS TOKEN"
-
-var apiInstance = new SwaggerPetstore.PetApi()
-
-var petId = 789; // {Integer} ID of pet that needs to be fetched
-
-
-var callback = function(error, data, response) {
- if (error) {
- console.error(error);
- } else {
- console.log('API called successfully. Returned data: ' + data);
- }
-};
-api.getPetByIdInObject(petId, callback);
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **petId** | **Integer**| ID of pet that needs to be fetched |
-
-### Return type
-
-[**InlineResponse200**](InlineResponse200.md)
-
-### Authorization
-
-[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
-
-
-# **petPetIdtestingByteArraytrueGet**
-> 'String' petPetIdtestingByteArraytrueGet(petId)
-
-Fake endpoint to test byte array return by 'Find pet by ID'
-
-Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
-
-### Example
-```javascript
-var SwaggerPetstore = require('swagger-petstore');
-var defaultClient = SwaggerPetstore.ApiClient.default;
-
-// Configure API key authorization: api_key
-var api_key = defaultClient.authentications['api_key'];
-api_key.apiKey = "YOUR API KEY"
-// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//api_key.apiKeyPrefix['api_key'] = "Token"
-
-// Configure OAuth2 access token for authorization: petstore_auth
-var petstore_auth = defaultClient.authentications['petstore_auth'];
-petstore_auth.accessToken = "YOUR ACCESS TOKEN"
-
-var apiInstance = new SwaggerPetstore.PetApi()
-
-var petId = 789; // {Integer} ID of pet that needs to be fetched
-
-
-var callback = function(error, data, response) {
- if (error) {
- console.error(error);
- } else {
- console.log('API called successfully. Returned data: ' + data);
- }
-};
-api.petPetIdtestingByteArraytrueGet(petId, callback);
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **petId** | **Integer**| ID of pet that needs to be fetched |
-
-### Return type
-
-**'String'**
-
-### Authorization
-
-[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
+ - **Accept**: application/xml, application/json
# **updatePet**
-> updatePet(opts)
+> updatePet(body)
Update an existing pet
@@ -466,13 +290,12 @@ var defaultClient = SwaggerPetstore.ApiClient.default;
// Configure OAuth2 access token for authorization: petstore_auth
var petstore_auth = defaultClient.authentications['petstore_auth'];
-petstore_auth.accessToken = "YOUR ACCESS TOKEN"
+petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
-var apiInstance = new SwaggerPetstore.PetApi()
+var apiInstance = new SwaggerPetstore.PetApi();
+
+var body = new SwaggerPetstore.Pet(); // Pet | Pet object that needs to be added to the store
-var opts = {
- 'body': new SwaggerPetstore.Pet() // {Pet} Pet object that needs to be added to the store
-};
var callback = function(error, data, response) {
if (error) {
@@ -481,14 +304,14 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
-api.updatePet(opts, callback);
+apiInstance.updatePet(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
+ **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -501,7 +324,7 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- - **Accept**: application/json, application/xml
+ - **Accept**: application/xml, application/json
# **updatePetWithForm**
@@ -518,15 +341,15 @@ var defaultClient = SwaggerPetstore.ApiClient.default;
// Configure OAuth2 access token for authorization: petstore_auth
var petstore_auth = defaultClient.authentications['petstore_auth'];
-petstore_auth.accessToken = "YOUR ACCESS TOKEN"
+petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
-var apiInstance = new SwaggerPetstore.PetApi()
+var apiInstance = new SwaggerPetstore.PetApi();
-var petId = "petId_example"; // {String} ID of pet that needs to be updated
+var petId = 789; // Integer | ID of pet that needs to be updated
var opts = {
- 'name': "name_example", // {String} Updated name of the pet
- 'status': "status_example" // {String} Updated status of the pet
+ 'name': "name_example", // String | Updated name of the pet
+ 'status': "status_example" // String | Updated status of the pet
};
var callback = function(error, data, response) {
@@ -536,14 +359,14 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
-api.updatePetWithForm(petId, opts, callback);
+apiInstance.updatePetWithForm(petId, opts, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **petId** | **String**| ID of pet that needs to be updated |
+ **petId** | **Integer**| ID of pet that needs to be updated |
**name** | **String**| Updated name of the pet | [optional]
**status** | **String**| Updated status of the pet | [optional]
@@ -558,11 +381,11 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- - **Accept**: application/json, application/xml
+ - **Accept**: application/xml, application/json
# **uploadFile**
-> uploadFile(petId, opts)
+> ApiResponse uploadFile(petId, opts)
uploads an image
@@ -575,25 +398,25 @@ var defaultClient = SwaggerPetstore.ApiClient.default;
// Configure OAuth2 access token for authorization: petstore_auth
var petstore_auth = defaultClient.authentications['petstore_auth'];
-petstore_auth.accessToken = "YOUR ACCESS TOKEN"
+petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
-var apiInstance = new SwaggerPetstore.PetApi()
+var apiInstance = new SwaggerPetstore.PetApi();
-var petId = 789; // {Integer} ID of pet to update
+var petId = 789; // Integer | ID of pet to update
var opts = {
- 'additionalMetadata': "additionalMetadata_example", // {String} Additional data to pass to server
- 'file': "/path/to/file.txt" // {File} file to upload
+ 'additionalMetadata': "additionalMetadata_example", // String | Additional data to pass to server
+ 'file': "/path/to/file.txt" // File | file to upload
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
- console.log('API called successfully.');
+ console.log('API called successfully. Returned data: ' + data);
}
};
-api.uploadFile(petId, opts, callback);
+apiInstance.uploadFile(petId, opts, callback);
```
### Parameters
@@ -606,7 +429,7 @@ Name | Type | Description | Notes
### Return type
-null (empty response body)
+[**ApiResponse**](ApiResponse.md)
### Authorization
@@ -615,5 +438,5 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: multipart/form-data
- - **Accept**: application/json, application/xml
+ - **Accept**: application/json
diff --git a/samples/client/petstore/javascript/docs/StoreApi.md b/samples/client/petstore/javascript/docs/StoreApi.md
index 6ad8406dfc9b..39c66ed54301 100644
--- a/samples/client/petstore/javascript/docs/StoreApi.md
+++ b/samples/client/petstore/javascript/docs/StoreApi.md
@@ -5,9 +5,7 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
-[**findOrdersByStatus**](StoreApi.md#findOrdersByStatus) | **GET** /store/findByStatus | Finds orders by status
[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
-[**getInventoryInObject**](StoreApi.md#getInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
@@ -24,9 +22,9 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or
```javascript
var SwaggerPetstore = require('swagger-petstore');
-var apiInstance = new SwaggerPetstore.StoreApi()
+var apiInstance = new SwaggerPetstore.StoreApi();
-var orderId = "orderId_example"; // {String} ID of the order that needs to be deleted
+var orderId = "orderId_example"; // String | ID of the order that needs to be deleted
var callback = function(error, data, response) {
@@ -36,7 +34,7 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
-api.deleteOrder(orderId, callback);
+apiInstance.deleteOrder(orderId, callback);
```
### Parameters
@@ -56,71 +54,11 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
-
-
-# **findOrdersByStatus**
-> [Order] findOrdersByStatus(opts)
-
-Finds orders by status
-
-A single status value can be provided as a string
-
-### Example
-```javascript
-var SwaggerPetstore = require('swagger-petstore');
-var defaultClient = SwaggerPetstore.ApiClient.default;
-
-// Configure API key authorization: test_api_client_id
-var test_api_client_id = defaultClient.authentications['test_api_client_id'];
-test_api_client_id.apiKey = "YOUR API KEY"
-// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//test_api_client_id.apiKeyPrefix['x-test_api_client_id'] = "Token"
-
-// Configure API key authorization: test_api_client_secret
-var test_api_client_secret = defaultClient.authentications['test_api_client_secret'];
-test_api_client_secret.apiKey = "YOUR API KEY"
-// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//test_api_client_secret.apiKeyPrefix['x-test_api_client_secret'] = "Token"
-
-var apiInstance = new SwaggerPetstore.StoreApi()
-
-var opts = {
- 'status': "placed" // {String} Status value that needs to be considered for query
-};
-
-var callback = function(error, data, response) {
- if (error) {
- console.error(error);
- } else {
- console.log('API called successfully. Returned data: ' + data);
- }
-};
-api.findOrdersByStatus(opts, callback);
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **status** | **String**| Status value that needs to be considered for query | [optional] [default to placed]
-
-### Return type
-
-[**[Order]**](Order.md)
-
-### Authorization
-
-[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
+ - **Accept**: application/xml, application/json
# **getInventory**
-> {'String': 'Integer'} getInventory
+> {'String': 'Integer'} getInventory()
Returns pet inventories by status
@@ -133,11 +71,11 @@ var defaultClient = SwaggerPetstore.ApiClient.default;
// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
-api_key.apiKey = "YOUR API KEY"
+api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//api_key.apiKeyPrefix['api_key'] = "Token"
+//api_key.apiKeyPrefix = 'Token';
-var apiInstance = new SwaggerPetstore.StoreApi()
+var apiInstance = new SwaggerPetstore.StoreApi();
var callback = function(error, data, response) {
if (error) {
@@ -146,7 +84,7 @@ var callback = function(error, data, response) {
console.log('API called successfully. Returned data: ' + data);
}
};
-api.getInventory(callback);
+apiInstance.getInventory(callback);
```
### Parameters
@@ -163,54 +101,7 @@ This endpoint does not need any parameter.
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
-
-
-# **getInventoryInObject**
-> Object getInventoryInObject
-
-Fake endpoint to test arbitrary object return by 'Get inventory'
-
-Returns an arbitrary object which is actually a map of status codes to quantities
-
-### Example
-```javascript
-var SwaggerPetstore = require('swagger-petstore');
-var defaultClient = SwaggerPetstore.ApiClient.default;
-
-// Configure API key authorization: api_key
-var api_key = defaultClient.authentications['api_key'];
-api_key.apiKey = "YOUR API KEY"
-// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//api_key.apiKeyPrefix['api_key'] = "Token"
-
-var apiInstance = new SwaggerPetstore.StoreApi()
-
-var callback = function(error, data, response) {
- if (error) {
- console.error(error);
- } else {
- console.log('API called successfully. Returned data: ' + data);
- }
-};
-api.getInventoryInObject(callback);
-```
-
-### Parameters
-This endpoint does not need any parameter.
-
-### Return type
-
-**Object**
-
-### Authorization
-
-[api_key](../README.md#api_key)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
+ - **Accept**: application/json
# **getOrderById**
@@ -223,23 +114,10 @@ For valid response try integer IDs with value <= 5 or > 10. Other val
### Example
```javascript
var SwaggerPetstore = require('swagger-petstore');
-var defaultClient = SwaggerPetstore.ApiClient.default;
-// Configure API key authorization: test_api_key_header
-var test_api_key_header = defaultClient.authentications['test_api_key_header'];
-test_api_key_header.apiKey = "YOUR API KEY"
-// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//test_api_key_header.apiKeyPrefix['test_api_key_header'] = "Token"
+var apiInstance = new SwaggerPetstore.StoreApi();
-// Configure API key authorization: test_api_key_query
-var test_api_key_query = defaultClient.authentications['test_api_key_query'];
-test_api_key_query.apiKey = "YOUR API KEY"
-// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//test_api_key_query.apiKeyPrefix['test_api_key_query'] = "Token"
-
-var apiInstance = new SwaggerPetstore.StoreApi()
-
-var orderId = "orderId_example"; // {String} ID of pet that needs to be fetched
+var orderId = 789; // Integer | ID of pet that needs to be fetched
var callback = function(error, data, response) {
@@ -249,14 +127,14 @@ var callback = function(error, data, response) {
console.log('API called successfully. Returned data: ' + data);
}
};
-api.getOrderById(orderId, callback);
+apiInstance.getOrderById(orderId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **orderId** | **String**| ID of pet that needs to be fetched |
+ **orderId** | **Integer**| ID of pet that needs to be fetched |
### Return type
@@ -264,16 +142,16 @@ Name | Type | Description | Notes
### Authorization
-[test_api_key_header](../README.md#test_api_key_header), [test_api_key_query](../README.md#test_api_key_query)
+No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
+ - **Accept**: application/xml, application/json
# **placeOrder**
-> Order placeOrder(opts)
+> Order placeOrder(body)
Place an order for a pet
@@ -282,25 +160,11 @@ Place an order for a pet
### Example
```javascript
var SwaggerPetstore = require('swagger-petstore');
-var defaultClient = SwaggerPetstore.ApiClient.default;
-// Configure API key authorization: test_api_client_id
-var test_api_client_id = defaultClient.authentications['test_api_client_id'];
-test_api_client_id.apiKey = "YOUR API KEY"
-// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//test_api_client_id.apiKeyPrefix['x-test_api_client_id'] = "Token"
+var apiInstance = new SwaggerPetstore.StoreApi();
-// Configure API key authorization: test_api_client_secret
-var test_api_client_secret = defaultClient.authentications['test_api_client_secret'];
-test_api_client_secret.apiKey = "YOUR API KEY"
-// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//test_api_client_secret.apiKeyPrefix['x-test_api_client_secret'] = "Token"
+var body = new SwaggerPetstore.Order(); // Order | order placed for purchasing the pet
-var apiInstance = new SwaggerPetstore.StoreApi()
-
-var opts = {
- 'body': new SwaggerPetstore.Order() // {Order} order placed for purchasing the pet
-};
var callback = function(error, data, response) {
if (error) {
@@ -309,14 +173,14 @@ var callback = function(error, data, response) {
console.log('API called successfully. Returned data: ' + data);
}
};
-api.placeOrder(opts, callback);
+apiInstance.placeOrder(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Order**](Order.md)| order placed for purchasing the pet | [optional]
+ **body** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
@@ -324,10 +188,10 @@ Name | Type | Description | Notes
### Authorization
-[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
+No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
+ - **Accept**: application/xml, application/json
diff --git a/samples/client/petstore/javascript/docs/UserApi.md b/samples/client/petstore/javascript/docs/UserApi.md
index 4e990c894263..6646acc83eeb 100644
--- a/samples/client/petstore/javascript/docs/UserApi.md
+++ b/samples/client/petstore/javascript/docs/UserApi.md
@@ -16,7 +16,7 @@ Method | HTTP request | Description
# **createUser**
-> createUser(opts)
+> createUser(body)
Create user
@@ -26,11 +26,10 @@ This can only be done by the logged in user.
```javascript
var SwaggerPetstore = require('swagger-petstore');
-var apiInstance = new SwaggerPetstore.UserApi()
+var apiInstance = new SwaggerPetstore.UserApi();
+
+var body = new SwaggerPetstore.User(); // User | Created user object
-var opts = {
- 'body': new SwaggerPetstore.User() // {User} Created user object
-};
var callback = function(error, data, response) {
if (error) {
@@ -39,14 +38,14 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
-api.createUser(opts, callback);
+apiInstance.createUser(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**User**](User.md)| Created user object | [optional]
+ **body** | [**User**](User.md)| Created user object |
### Return type
@@ -59,11 +58,11 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
+ - **Accept**: application/xml, application/json
# **createUsersWithArrayInput**
-> createUsersWithArrayInput(opts)
+> createUsersWithArrayInput(body)
Creates list of users with given input array
@@ -73,11 +72,10 @@ Creates list of users with given input array
```javascript
var SwaggerPetstore = require('swagger-petstore');
-var apiInstance = new SwaggerPetstore.UserApi()
+var apiInstance = new SwaggerPetstore.UserApi();
+
+var body = [new SwaggerPetstore.User()]; // [User] | List of user object
-var opts = {
- 'body': [new SwaggerPetstore.User()] // {[User]} List of user object
-};
var callback = function(error, data, response) {
if (error) {
@@ -86,14 +84,14 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
-api.createUsersWithArrayInput(opts, callback);
+apiInstance.createUsersWithArrayInput(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**[User]**](User.md)| List of user object | [optional]
+ **body** | [**[User]**](User.md)| List of user object |
### Return type
@@ -106,11 +104,11 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
+ - **Accept**: application/xml, application/json
# **createUsersWithListInput**
-> createUsersWithListInput(opts)
+> createUsersWithListInput(body)
Creates list of users with given input array
@@ -120,11 +118,10 @@ Creates list of users with given input array
```javascript
var SwaggerPetstore = require('swagger-petstore');
-var apiInstance = new SwaggerPetstore.UserApi()
+var apiInstance = new SwaggerPetstore.UserApi();
+
+var body = [new SwaggerPetstore.User()]; // [User] | List of user object
-var opts = {
- 'body': [new SwaggerPetstore.User()] // {[User]} List of user object
-};
var callback = function(error, data, response) {
if (error) {
@@ -133,14 +130,14 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
-api.createUsersWithListInput(opts, callback);
+apiInstance.createUsersWithListInput(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**[User]**](User.md)| List of user object | [optional]
+ **body** | [**[User]**](User.md)| List of user object |
### Return type
@@ -153,7 +150,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
+ - **Accept**: application/xml, application/json
# **deleteUser**
@@ -166,16 +163,10 @@ This can only be done by the logged in user.
### Example
```javascript
var SwaggerPetstore = require('swagger-petstore');
-var defaultClient = SwaggerPetstore.ApiClient.default;
-// Configure HTTP basic authorization: test_http_basic
-var test_http_basic = defaultClient.authentications['test_http_basic'];
-test_http_basic.username = 'YOUR USERNAME'
-test_http_basic.password = 'YOUR PASSWORD'
+var apiInstance = new SwaggerPetstore.UserApi();
-var apiInstance = new SwaggerPetstore.UserApi()
-
-var username = "username_example"; // {String} The name that needs to be deleted
+var username = "username_example"; // String | The name that needs to be deleted
var callback = function(error, data, response) {
@@ -185,7 +176,7 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
-api.deleteUser(username, callback);
+apiInstance.deleteUser(username, callback);
```
### Parameters
@@ -200,12 +191,12 @@ null (empty response body)
### Authorization
-[test_http_basic](../README.md#test_http_basic)
+No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
+ - **Accept**: application/xml, application/json
# **getUserByName**
@@ -219,9 +210,9 @@ Get user by user name
```javascript
var SwaggerPetstore = require('swagger-petstore');
-var apiInstance = new SwaggerPetstore.UserApi()
+var apiInstance = new SwaggerPetstore.UserApi();
-var username = "username_example"; // {String} The name that needs to be fetched. Use user1 for testing.
+var username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
var callback = function(error, data, response) {
@@ -231,7 +222,7 @@ var callback = function(error, data, response) {
console.log('API called successfully. Returned data: ' + data);
}
};
-api.getUserByName(username, callback);
+apiInstance.getUserByName(username, callback);
```
### Parameters
@@ -251,11 +242,11 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
+ - **Accept**: application/xml, application/json
# **loginUser**
-> 'String' loginUser(opts)
+> 'String' loginUser(username, password)
Logs user into the system
@@ -265,12 +256,12 @@ Logs user into the system
```javascript
var SwaggerPetstore = require('swagger-petstore');
-var apiInstance = new SwaggerPetstore.UserApi()
+var apiInstance = new SwaggerPetstore.UserApi();
+
+var username = "username_example"; // String | The user name for login
+
+var password = "password_example"; // String | The password for login in clear text
-var opts = {
- 'username': "username_example", // {String} The user name for login
- 'password': "password_example" // {String} The password for login in clear text
-};
var callback = function(error, data, response) {
if (error) {
@@ -279,15 +270,15 @@ var callback = function(error, data, response) {
console.log('API called successfully. Returned data: ' + data);
}
};
-api.loginUser(opts, callback);
+apiInstance.loginUser(username, password, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **username** | **String**| The user name for login | [optional]
- **password** | **String**| The password for login in clear text | [optional]
+ **username** | **String**| The user name for login |
+ **password** | **String**| The password for login in clear text |
### Return type
@@ -300,11 +291,11 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
+ - **Accept**: application/xml, application/json
# **logoutUser**
-> logoutUser
+> logoutUser()
Logs out current logged in user session
@@ -314,7 +305,7 @@ Logs out current logged in user session
```javascript
var SwaggerPetstore = require('swagger-petstore');
-var apiInstance = new SwaggerPetstore.UserApi()
+var apiInstance = new SwaggerPetstore.UserApi();
var callback = function(error, data, response) {
if (error) {
@@ -323,7 +314,7 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
-api.logoutUser(callback);
+apiInstance.logoutUser(callback);
```
### Parameters
@@ -340,11 +331,11 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
+ - **Accept**: application/xml, application/json
# **updateUser**
-> updateUser(username, opts)
+> updateUser(username, body)
Updated user
@@ -354,13 +345,12 @@ This can only be done by the logged in user.
```javascript
var SwaggerPetstore = require('swagger-petstore');
-var apiInstance = new SwaggerPetstore.UserApi()
+var apiInstance = new SwaggerPetstore.UserApi();
-var username = "username_example"; // {String} name that need to be deleted
+var username = "username_example"; // String | name that need to be deleted
+
+var body = new SwaggerPetstore.User(); // User | Updated user object
-var opts = {
- 'body': new SwaggerPetstore.User() // {User} Updated user object
-};
var callback = function(error, data, response) {
if (error) {
@@ -369,7 +359,7 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
-api.updateUser(username, opts, callback);
+apiInstance.updateUser(username, body, callback);
```
### Parameters
@@ -377,7 +367,7 @@ api.updateUser(username, opts, callback);
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted |
- **body** | [**User**](User.md)| Updated user object | [optional]
+ **body** | [**User**](User.md)| Updated user object |
### Return type
@@ -390,5 +380,5 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, application/xml
+ - **Accept**: application/xml, application/json
diff --git a/samples/client/petstore/javascript/git_push.sh b/samples/client/petstore/javascript/git_push.sh
index 1a36388db023..0d041ad0ba49 100644
--- a/samples/client/petstore/javascript/git_push.sh
+++ b/samples/client/petstore/javascript/git_push.sh
@@ -8,12 +8,12 @@ git_repo_id=$2
release_note=$3
if [ "$git_user_id" = "" ]; then
- git_user_id="YOUR_GIT_USR_ID"
+ git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
- git_repo_id="YOUR_GIT_REPO_ID"
+ git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
@@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
- echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the Git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
diff --git a/samples/client/petstore/javascript/package.json b/samples/client/petstore/javascript/package.json
index 72a48ac71de6..8ff02a78ae3f 100644
--- a/samples/client/petstore/javascript/package.json
+++ b/samples/client/petstore/javascript/package.json
@@ -1,7 +1,7 @@
{
"name": "swagger-petstore",
"version": "1.0.0",
- "description": "This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters",
+ "description": "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose.",
"license": "Apache 2.0",
"main": "src/index.js",
"scripts": {
diff --git a/samples/client/petstore/javascript/src/ApiClient.js b/samples/client/petstore/javascript/src/ApiClient.js
index 2b6c0c5b1922..2598dd8d9ea9 100644
--- a/samples/client/petstore/javascript/src/ApiClient.js
+++ b/samples/client/petstore/javascript/src/ApiClient.js
@@ -40,13 +40,8 @@
* @type {Array.
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose..
* The index module provides access to constructors for all the classes which comprise the public API.
*
- * var SwaggerPetstore = require('./index'); // See note below*.
+ * var SwaggerPetstore = require('index'); // See note below*.
* var xxxSvc = new SwaggerPetstore.XxxApi(); // Allocate the API class we're going to use.
* var yyyModel = new SwaggerPetstore.Yyy(); // Construct a model instance.
* yyyModel.someProperty = 'someValue';
@@ -23,8 +23,8 @@
* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
* ...
*
- * *NOTE: For a top-level AMD script, use require(['./index'], function(){...}) and put the application logic within the
- * callback function.
+ * *NOTE: For a top-level AMD script, use require(['index'], function(){...})
+ * and put the application logic within the callback function.
*
* A non-AMD browser application (discouraged) might do something like this:
@@ -51,6 +51,16 @@
* @property {module:model/Animal}
*/
Animal: Animal,
+ /**
+ * The AnimalFarm model constructor.
+ * @property {module:model/AnimalFarm}
+ */
+ AnimalFarm: AnimalFarm,
+ /**
+ * The ApiResponse model constructor.
+ * @property {module:model/ApiResponse}
+ */
+ ApiResponse: ApiResponse,
/**
* The Cat model constructor.
* @property {module:model/Cat}
@@ -66,16 +76,21 @@
* @property {module:model/Dog}
*/
Dog: Dog,
+ /**
+ * The EnumClass model constructor.
+ * @property {module:model/EnumClass}
+ */
+ EnumClass: EnumClass,
+ /**
+ * The EnumTest model constructor.
+ * @property {module:model/EnumTest}
+ */
+ EnumTest: EnumTest,
/**
* The FormatTest model constructor.
* @property {module:model/FormatTest}
*/
FormatTest: FormatTest,
- /**
- * The InlineResponse200 model constructor.
- * @property {module:model/InlineResponse200}
- */
- InlineResponse200: InlineResponse200,
/**
* The Model200Response model constructor.
* @property {module:model/Model200Response}
@@ -116,6 +131,11 @@
* @property {module:model/User}
*/
User: User,
+ /**
+ * The FakeApi service constructor.
+ * @property {module:api/FakeApi}
+ */
+ FakeApi: FakeApi,
/**
* The PetApi service constructor.
* @property {module:api/PetApi}
diff --git a/samples/client/petstore/javascript/src/model/Animal.js b/samples/client/petstore/javascript/src/model/Animal.js
index 674471a30ee4..e42874c669b8 100644
--- a/samples/client/petstore/javascript/src/model/Animal.js
+++ b/samples/client/petstore/javascript/src/model/Animal.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient'], factory);
+ define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient) {
'use strict';
+
+
+
/**
* The Animal model module.
* @module model/Animal
@@ -28,8 +31,9 @@
* @param className
*/
var exports = function(className) {
+ var _this = this;
- this['className'] = className;
+ _this['className'] = className;
};
/**
@@ -40,7 +44,7 @@
* @return {module:model/Animal} The populated Animal instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('className')) {
@@ -50,7 +54,6 @@
return obj;
}
-
/**
* @member {String} className
*/
@@ -61,3 +64,5 @@
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/AnimalFarm.js b/samples/client/petstore/javascript/src/model/AnimalFarm.js
new file mode 100644
index 000000000000..d5f6aa2a424f
--- /dev/null
+++ b/samples/client/petstore/javascript/src/model/AnimalFarm.js
@@ -0,0 +1,64 @@
+(function(root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['ApiClient', 'model/Animal'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // CommonJS-like environments that support module.exports, like Node.
+ module.exports = factory(require('../ApiClient'), require('./Animal'));
+ } else {
+ // Browser globals (root is window)
+ if (!root.SwaggerPetstore) {
+ root.SwaggerPetstore = {};
+ }
+ root.SwaggerPetstore.AnimalFarm = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Animal);
+ }
+}(this, function(ApiClient, Animal) {
+ 'use strict';
+
+
+
+
+ /**
+ * The AnimalFarm model module.
+ * @module model/AnimalFarm
+ * @version 1.0.0
+ */
+
+ /**
+ * Constructs a new AnimalFarm.
+ * @alias module:model/AnimalFarm
+ * @class
+ * @extends Array
+ */
+ var exports = function() {
+ var _this = this;
+ _this = new Array();
+ Object.setPrototypeOf(_this, exports);
+
+ return _this;
+ };
+
+ /**
+ * Constructs a AnimalFarm from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data to obj if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/AnimalFarm} obj Optional instance to populate.
+ * @return {module:model/AnimalFarm} The populated AnimalFarm instance.
+ */
+ exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+ ApiClient.constructFromObject(data, obj, Animal);
+
+ }
+ return obj;
+ }
+
+
+
+
+
+ return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/ApiResponse.js b/samples/client/petstore/javascript/src/model/ApiResponse.js
new file mode 100644
index 000000000000..6d4c970264b0
--- /dev/null
+++ b/samples/client/petstore/javascript/src/model/ApiResponse.js
@@ -0,0 +1,83 @@
+(function(root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['ApiClient'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // CommonJS-like environments that support module.exports, like Node.
+ module.exports = factory(require('../ApiClient'));
+ } else {
+ // Browser globals (root is window)
+ if (!root.SwaggerPetstore) {
+ root.SwaggerPetstore = {};
+ }
+ root.SwaggerPetstore.ApiResponse = factory(root.SwaggerPetstore.ApiClient);
+ }
+}(this, function(ApiClient) {
+ 'use strict';
+
+
+
+
+ /**
+ * The ApiResponse model module.
+ * @module model/ApiResponse
+ * @version 1.0.0
+ */
+
+ /**
+ * Constructs a new ApiResponse.
+ * @alias module:model/ApiResponse
+ * @class
+ */
+ var exports = function() {
+ var _this = this;
+
+
+
+
+ };
+
+ /**
+ * Constructs a ApiResponse from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data to obj if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/ApiResponse} obj Optional instance to populate.
+ * @return {module:model/ApiResponse} The populated ApiResponse instance.
+ */
+ exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('code')) {
+ obj['code'] = ApiClient.convertToType(data['code'], 'Integer');
+ }
+ if (data.hasOwnProperty('type')) {
+ obj['type'] = ApiClient.convertToType(data['type'], 'String');
+ }
+ if (data.hasOwnProperty('message')) {
+ obj['message'] = ApiClient.convertToType(data['message'], 'String');
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * @member {Integer} code
+ */
+ exports.prototype['code'] = undefined;
+ /**
+ * @member {String} type
+ */
+ exports.prototype['type'] = undefined;
+ /**
+ * @member {String} message
+ */
+ exports.prototype['message'] = undefined;
+
+
+
+
+ return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/Cat.js b/samples/client/petstore/javascript/src/model/Cat.js
index c878af6edecf..a6b25bc6d584 100644
--- a/samples/client/petstore/javascript/src/model/Cat.js
+++ b/samples/client/petstore/javascript/src/model/Cat.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient', './Animal'], factory);
+ define(['ApiClient', 'model/Animal'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Animal'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient, Animal) {
'use strict';
+
+
+
/**
* The Cat model module.
* @module model/Cat
@@ -29,7 +32,8 @@
* @param className
*/
var exports = function(className) {
- Animal.call(this, className);
+ var _this = this;
+ Animal.call(_this, className);
};
@@ -41,7 +45,7 @@
* @return {module:model/Cat} The populated Cat instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
Animal.constructFromObject(data, obj);
if (data.hasOwnProperty('declawed')) {
@@ -54,7 +58,6 @@
exports.prototype = Object.create(Animal.prototype);
exports.prototype.constructor = exports;
-
/**
* @member {Boolean} declawed
*/
@@ -65,3 +68,5 @@
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/Category.js b/samples/client/petstore/javascript/src/model/Category.js
index 473f4b783d58..9e2e19ac5bba 100644
--- a/samples/client/petstore/javascript/src/model/Category.js
+++ b/samples/client/petstore/javascript/src/model/Category.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient'], factory);
+ define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient) {
'use strict';
+
+
+
/**
* The Category model module.
* @module model/Category
@@ -27,6 +30,7 @@
* @class
*/
var exports = function() {
+ var _this = this;
@@ -40,7 +44,7 @@
* @return {module:model/Category} The populated Category instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('id')) {
@@ -53,12 +57,10 @@
return obj;
}
-
/**
* @member {Integer} id
*/
exports.prototype['id'] = undefined;
-
/**
* @member {String} name
*/
@@ -69,3 +71,5 @@
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/Dog.js b/samples/client/petstore/javascript/src/model/Dog.js
index e5e55581a70d..ee17ae3467f2 100644
--- a/samples/client/petstore/javascript/src/model/Dog.js
+++ b/samples/client/petstore/javascript/src/model/Dog.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient', './Animal'], factory);
+ define(['ApiClient', 'model/Animal'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Animal'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient, Animal) {
'use strict';
+
+
+
/**
* The Dog model module.
* @module model/Dog
@@ -29,7 +32,8 @@
* @param className
*/
var exports = function(className) {
- Animal.call(this, className);
+ var _this = this;
+ Animal.call(_this, className);
};
@@ -41,7 +45,7 @@
* @return {module:model/Dog} The populated Dog instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
Animal.constructFromObject(data, obj);
if (data.hasOwnProperty('breed')) {
@@ -54,7 +58,6 @@
exports.prototype = Object.create(Animal.prototype);
exports.prototype.constructor = exports;
-
/**
* @member {String} breed
*/
@@ -65,3 +68,5 @@
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/EnumClass.js b/samples/client/petstore/javascript/src/model/EnumClass.js
new file mode 100644
index 000000000000..e9bf5219ee53
--- /dev/null
+++ b/samples/client/petstore/javascript/src/model/EnumClass.js
@@ -0,0 +1,44 @@
+(function(root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['ApiClient'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // CommonJS-like environments that support module.exports, like Node.
+ module.exports = factory(require('../ApiClient'));
+ } else {
+ // Browser globals (root is window)
+ if (!root.SwaggerPetstore) {
+ root.SwaggerPetstore = {};
+ }
+ root.SwaggerPetstore.EnumClass = factory(root.SwaggerPetstore.ApiClient);
+ }
+}(this, function(ApiClient) {
+ 'use strict';
+
+
+ /**
+ * Enum class EnumClass.
+ * @enum {}
+ * @readonly
+ */
+ var exports = {
+ /**
+ * value: "_abc"
+ * @const
+ */
+ "_abc": "_abc",
+ /**
+ * value: "-efg"
+ * @const
+ */
+ "-efg": "-efg",
+ /**
+ * value: "(xyz)"
+ * @const
+ */
+ "(xyz)": "(xyz)" };
+
+ return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/EnumTest.js b/samples/client/petstore/javascript/src/model/EnumTest.js
new file mode 100644
index 000000000000..6f8f0de38365
--- /dev/null
+++ b/samples/client/petstore/javascript/src/model/EnumTest.js
@@ -0,0 +1,131 @@
+(function(root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['ApiClient'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // CommonJS-like environments that support module.exports, like Node.
+ module.exports = factory(require('../ApiClient'));
+ } else {
+ // Browser globals (root is window)
+ if (!root.SwaggerPetstore) {
+ root.SwaggerPetstore = {};
+ }
+ root.SwaggerPetstore.EnumTest = factory(root.SwaggerPetstore.ApiClient);
+ }
+}(this, function(ApiClient) {
+ 'use strict';
+
+
+
+
+ /**
+ * The EnumTest model module.
+ * @module model/EnumTest
+ * @version 1.0.0
+ */
+
+ /**
+ * Constructs a new EnumTest.
+ * @alias module:model/EnumTest
+ * @class
+ */
+ var exports = function() {
+ var _this = this;
+
+
+
+
+ };
+
+ /**
+ * Constructs a EnumTest from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data to obj if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/EnumTest} obj Optional instance to populate.
+ * @return {module:model/EnumTest} The populated EnumTest instance.
+ */
+ exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('enum_string')) {
+ obj['enum_string'] = ApiClient.convertToType(data['enum_string'], 'String');
+ }
+ if (data.hasOwnProperty('enum_integer')) {
+ obj['enum_integer'] = ApiClient.convertToType(data['enum_integer'], 'Integer');
+ }
+ if (data.hasOwnProperty('enum_number')) {
+ obj['enum_number'] = ApiClient.convertToType(data['enum_number'], 'Number');
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * @member {module:model/EnumTest.EnumStringEnum} enum_string
+ */
+ exports.prototype['enum_string'] = undefined;
+ /**
+ * @member {module:model/EnumTest.EnumIntegerEnum} enum_integer
+ */
+ exports.prototype['enum_integer'] = undefined;
+ /**
+ * @member {module:model/EnumTest.EnumNumberEnum} enum_number
+ */
+ exports.prototype['enum_number'] = undefined;
+
+
+ /**
+ * Allowed values for the enum_string property.
+ * @enum {String}
+ * @readonly
+ */
+ exports.EnumStringEnum = {
+ /**
+ * value: "UPPER"
+ * @const
+ */
+ "UPPER": "UPPER",
+ /**
+ * value: "lower"
+ * @const
+ */
+ "lower": "lower" };
+ /**
+ * Allowed values for the enum_integer property.
+ * @enum {Integer}
+ * @readonly
+ */
+ exports.EnumIntegerEnum = {
+ /**
+ * value: 1
+ * @const
+ */
+ "1": 1,
+ /**
+ * value: -1
+ * @const
+ */
+ "-1": -1 };
+ /**
+ * Allowed values for the enum_number property.
+ * @enum {Number}
+ * @readonly
+ */
+ exports.EnumNumberEnum = {
+ /**
+ * value: 1.1
+ * @const
+ */
+ "1.1": 1.1,
+ /**
+ * value: -1.2
+ * @const
+ */
+ "-1.2": -1.2 };
+
+
+ return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/FormatTest.js b/samples/client/petstore/javascript/src/model/FormatTest.js
index 46a9bc854fc6..ed9e0cfcaf89 100644
--- a/samples/client/petstore/javascript/src/model/FormatTest.js
+++ b/samples/client/petstore/javascript/src/model/FormatTest.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient'], factory);
+ define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient) {
'use strict';
+
+
+
/**
* The FormatTest model module.
* @module model/FormatTest
@@ -26,20 +29,26 @@
* @alias module:model/FormatTest
* @class
* @param _number
+ * @param _byte
+ * @param _date
+ * @param password
*/
- var exports = function(_number) {
+ var exports = function(_number, _byte, _date, password) {
+ var _this = this;
- this['number'] = _number;
-
-
+ _this['number'] = _number;
+ _this['byte'] = _byte;
+
+ _this['date'] = _date;
+ _this['password'] = password;
};
/**
@@ -50,7 +59,7 @@
* @return {module:model/FormatTest} The populated FormatTest instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('integer')) {
@@ -84,70 +93,75 @@
obj['date'] = ApiClient.convertToType(data['date'], 'Date');
}
if (data.hasOwnProperty('dateTime')) {
- obj['dateTime'] = ApiClient.convertToType(data['dateTime'], 'String');
+ obj['dateTime'] = ApiClient.convertToType(data['dateTime'], 'Date');
+ }
+ if (data.hasOwnProperty('uuid')) {
+ obj['uuid'] = ApiClient.convertToType(data['uuid'], 'String');
+ }
+ if (data.hasOwnProperty('password')) {
+ obj['password'] = ApiClient.convertToType(data['password'], 'String');
}
}
return obj;
}
-
/**
* @member {Integer} integer
*/
exports.prototype['integer'] = undefined;
-
/**
* @member {Integer} int32
*/
exports.prototype['int32'] = undefined;
-
/**
* @member {Integer} int64
*/
exports.prototype['int64'] = undefined;
-
/**
* @member {Number} number
*/
exports.prototype['number'] = undefined;
-
/**
* @member {Number} float
*/
exports.prototype['float'] = undefined;
-
/**
* @member {Number} double
*/
exports.prototype['double'] = undefined;
-
/**
* @member {String} string
*/
exports.prototype['string'] = undefined;
-
/**
* @member {String} byte
*/
exports.prototype['byte'] = undefined;
-
/**
* @member {String} binary
*/
exports.prototype['binary'] = undefined;
-
/**
* @member {Date} date
*/
exports.prototype['date'] = undefined;
-
/**
- * @member {String} dateTime
+ * @member {Date} dateTime
*/
exports.prototype['dateTime'] = undefined;
+ /**
+ * @member {String} uuid
+ */
+ exports.prototype['uuid'] = undefined;
+ /**
+ * @member {String} password
+ */
+ exports.prototype['password'] = undefined;
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/InlineResponse200.js b/samples/client/petstore/javascript/src/model/InlineResponse200.js
deleted file mode 100644
index f9ecda79491a..000000000000
--- a/samples/client/petstore/javascript/src/model/InlineResponse200.js
+++ /dev/null
@@ -1,132 +0,0 @@
-(function(root, factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['../ApiClient', './Tag'], factory);
- } else if (typeof module === 'object' && module.exports) {
- // CommonJS-like environments that support module.exports, like Node.
- module.exports = factory(require('../ApiClient'), require('./Tag'));
- } else {
- // Browser globals (root is window)
- if (!root.SwaggerPetstore) {
- root.SwaggerPetstore = {};
- }
- root.SwaggerPetstore.InlineResponse200 = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Tag);
- }
-}(this, function(ApiClient, Tag) {
- 'use strict';
-
- /**
- * The InlineResponse200 model module.
- * @module model/InlineResponse200
- * @version 1.0.0
- */
-
- /**
- * Constructs a new InlineResponse200.
- * @alias module:model/InlineResponse200
- * @class
- * @param id
- */
- var exports = function(id) {
-
-
- this['id'] = id;
-
-
-
-
- };
-
- /**
- * Constructs a InlineResponse200 from a plain JavaScript object, optionally creating a new instance.
- * Copies all relevant properties from data to obj if supplied or a new instance if not.
- * @param {Object} data The plain JavaScript object bearing properties of interest.
- * @param {module:model/InlineResponse200} obj Optional instance to populate.
- * @return {module:model/InlineResponse200} The populated InlineResponse200 instance.
- */
- exports.constructFromObject = function(data, obj) {
- if (data) {
- obj = obj || new exports();
-
- if (data.hasOwnProperty('tags')) {
- obj['tags'] = ApiClient.convertToType(data['tags'], [Tag]);
- }
- if (data.hasOwnProperty('id')) {
- obj['id'] = ApiClient.convertToType(data['id'], 'Integer');
- }
- if (data.hasOwnProperty('category')) {
- obj['category'] = ApiClient.convertToType(data['category'], Object);
- }
- if (data.hasOwnProperty('status')) {
- obj['status'] = ApiClient.convertToType(data['status'], 'String');
- }
- if (data.hasOwnProperty('name')) {
- obj['name'] = ApiClient.convertToType(data['name'], 'String');
- }
- if (data.hasOwnProperty('photoUrls')) {
- obj['photoUrls'] = ApiClient.convertToType(data['photoUrls'], ['String']);
- }
- }
- return obj;
- }
-
-
- /**
- * @member {Array.status property.
- * @enum {String}
- * @readonly
- */
- exports.StatusEnum = {
- /**
- * value: available
- * @const
- */
- AVAILABLE: "available",
-
- /**
- * value: pending
- * @const
- */
- PENDING: "pending",
-
- /**
- * value: sold
- * @const
- */
- SOLD: "sold"
- };
-
- return exports;
-}));
diff --git a/samples/client/petstore/javascript/src/model/Model200Response.js b/samples/client/petstore/javascript/src/model/Model200Response.js
index 1682ed079fce..1d83d420287f 100644
--- a/samples/client/petstore/javascript/src/model/Model200Response.js
+++ b/samples/client/petstore/javascript/src/model/Model200Response.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient'], factory);
+ define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient) {
'use strict';
+
+
+
/**
* The Model200Response model module.
* @module model/Model200Response
@@ -28,6 +31,7 @@
* @class
*/
var exports = function() {
+ var _this = this;
};
@@ -40,7 +44,7 @@
* @return {module:model/Model200Response} The populated Model200Response instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('name')) {
@@ -50,7 +54,6 @@
return obj;
}
-
/**
* @member {Integer} name
*/
@@ -61,3 +64,5 @@
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/ModelReturn.js b/samples/client/petstore/javascript/src/model/ModelReturn.js
index 86d28d038a9f..d0236e77b174 100644
--- a/samples/client/petstore/javascript/src/model/ModelReturn.js
+++ b/samples/client/petstore/javascript/src/model/ModelReturn.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient'], factory);
+ define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient) {
'use strict';
+
+
+
/**
* The ModelReturn model module.
* @module model/ModelReturn
@@ -28,6 +31,7 @@
* @class
*/
var exports = function() {
+ var _this = this;
};
@@ -40,7 +44,7 @@
* @return {module:model/ModelReturn} The populated ModelReturn instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('return')) {
@@ -50,7 +54,6 @@
return obj;
}
-
/**
* @member {Integer} return
*/
@@ -61,3 +64,5 @@
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/Name.js b/samples/client/petstore/javascript/src/model/Name.js
index c8bd6862c978..93d1d55deb27 100644
--- a/samples/client/petstore/javascript/src/model/Name.js
+++ b/samples/client/petstore/javascript/src/model/Name.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient'], factory);
+ define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient) {
'use strict';
+
+
+
/**
* The Name model module.
* @module model/Name
@@ -29,8 +32,10 @@
* @param name
*/
var exports = function(name) {
+ var _this = this;
+
+ _this['name'] = name;
- this['name'] = name;
};
@@ -42,7 +47,7 @@
* @return {module:model/Name} The populated Name instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('name')) {
@@ -51,23 +56,30 @@
if (data.hasOwnProperty('snake_case')) {
obj['snake_case'] = ApiClient.convertToType(data['snake_case'], 'Integer');
}
+ if (data.hasOwnProperty('property')) {
+ obj['property'] = ApiClient.convertToType(data['property'], 'String');
+ }
}
return obj;
}
-
/**
* @member {Integer} name
*/
exports.prototype['name'] = undefined;
-
/**
* @member {Integer} snake_case
*/
exports.prototype['snake_case'] = undefined;
+ /**
+ * @member {String} property
+ */
+ exports.prototype['property'] = undefined;
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/Order.js b/samples/client/petstore/javascript/src/model/Order.js
index 81f1feb78000..57f77d84ccd0 100644
--- a/samples/client/petstore/javascript/src/model/Order.js
+++ b/samples/client/petstore/javascript/src/model/Order.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient'], factory);
+ define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient) {
'use strict';
+
+
+
/**
* The Order model module.
* @module model/Order
@@ -27,6 +30,7 @@
* @class
*/
var exports = function() {
+ var _this = this;
@@ -44,7 +48,7 @@
* @return {module:model/Order} The populated Order instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('id')) {
@@ -69,37 +73,32 @@
return obj;
}
-
/**
* @member {Integer} id
*/
exports.prototype['id'] = undefined;
-
/**
* @member {Integer} petId
*/
exports.prototype['petId'] = undefined;
-
/**
* @member {Integer} quantity
*/
exports.prototype['quantity'] = undefined;
-
/**
* @member {Date} shipDate
*/
exports.prototype['shipDate'] = undefined;
-
/**
* Order Status
* @member {module:model/Order.StatusEnum} status
*/
exports.prototype['status'] = undefined;
-
/**
* @member {Boolean} complete
+ * @default false
*/
- exports.prototype['complete'] = undefined;
+ exports.prototype['complete'] = false;
/**
@@ -107,25 +106,25 @@
* @enum {String}
* @readonly
*/
- exports.StatusEnum = {
+ exports.StatusEnum = {
/**
- * value: placed
+ * value: "placed"
* @const
*/
- PLACED: "placed",
-
+ "placed": "placed",
/**
- * value: approved
+ * value: "approved"
* @const
*/
- APPROVED: "approved",
-
+ "approved": "approved",
/**
- * value: delivered
+ * value: "delivered"
* @const
*/
- DELIVERED: "delivered"
- };
+ "delivered": "delivered" };
+
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/Pet.js b/samples/client/petstore/javascript/src/model/Pet.js
index 39a09b471700..fe14361dbf2e 100644
--- a/samples/client/petstore/javascript/src/model/Pet.js
+++ b/samples/client/petstore/javascript/src/model/Pet.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient', './Category', './Tag'], factory);
+ define(['ApiClient', 'model/Category', 'model/Tag'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Category'), require('./Tag'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient, Category, Tag) {
'use strict';
+
+
+
/**
* The Pet model module.
* @module model/Pet
@@ -29,11 +32,12 @@
* @param photoUrls
*/
var exports = function(name, photoUrls) {
+ var _this = this;
- this['name'] = name;
- this['photoUrls'] = photoUrls;
+ _this['name'] = name;
+ _this['photoUrls'] = photoUrls;
};
@@ -46,7 +50,7 @@
* @return {module:model/Pet} The populated Pet instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('id')) {
@@ -71,32 +75,26 @@
return obj;
}
-
/**
* @member {Integer} id
*/
exports.prototype['id'] = undefined;
-
/**
* @member {module:model/Category} category
*/
exports.prototype['category'] = undefined;
-
/**
* @member {String} name
*/
exports.prototype['name'] = undefined;
-
/**
* @member {Array.SpecialModelName instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('$special[property.name]')) {
@@ -49,7 +53,6 @@
return obj;
}
-
/**
* @member {Integer} $special[property.name]
*/
@@ -60,3 +63,5 @@
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/Tag.js b/samples/client/petstore/javascript/src/model/Tag.js
index 8a0739b2ef5b..443d312b76ab 100644
--- a/samples/client/petstore/javascript/src/model/Tag.js
+++ b/samples/client/petstore/javascript/src/model/Tag.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient'], factory);
+ define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient) {
'use strict';
+
+
+
/**
* The Tag model module.
* @module model/Tag
@@ -27,6 +30,7 @@
* @class
*/
var exports = function() {
+ var _this = this;
@@ -40,7 +44,7 @@
* @return {module:model/Tag} The populated Tag instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('id')) {
@@ -53,12 +57,10 @@
return obj;
}
-
/**
* @member {Integer} id
*/
exports.prototype['id'] = undefined;
-
/**
* @member {String} name
*/
@@ -69,3 +71,5 @@
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/User.js b/samples/client/petstore/javascript/src/model/User.js
index 1d960a89914b..2360c7c6314b 100644
--- a/samples/client/petstore/javascript/src/model/User.js
+++ b/samples/client/petstore/javascript/src/model/User.js
@@ -1,7 +1,7 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['../ApiClient'], factory);
+ define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
@@ -15,6 +15,9 @@
}(this, function(ApiClient) {
'use strict';
+
+
+
/**
* The User model module.
* @module model/User
@@ -27,6 +30,7 @@
* @class
*/
var exports = function() {
+ var _this = this;
@@ -46,7 +50,7 @@
* @return {module:model/User} The populated User instance.
*/
exports.constructFromObject = function(data, obj) {
- if (data) {
+ if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('id')) {
@@ -77,42 +81,34 @@
return obj;
}
-
/**
* @member {Integer} id
*/
exports.prototype['id'] = undefined;
-
/**
* @member {String} username
*/
exports.prototype['username'] = undefined;
-
/**
* @member {String} firstName
*/
exports.prototype['firstName'] = undefined;
-
/**
* @member {String} lastName
*/
exports.prototype['lastName'] = undefined;
-
/**
* @member {String} email
*/
exports.prototype['email'] = undefined;
-
/**
* @member {String} password
*/
exports.prototype['password'] = undefined;
-
/**
* @member {String} phone
*/
exports.prototype['phone'] = undefined;
-
/**
* User Status
* @member {Integer} userStatus
@@ -124,3 +120,5 @@
return exports;
}));
+
+
diff --git a/samples/client/petstore/javascript/test/ApiClientTest.js b/samples/client/petstore/javascript/test/ApiClientTest.js
index d259ad54c147..3a8eb843d74d 100644
--- a/samples/client/petstore/javascript/test/ApiClientTest.js
+++ b/samples/client/petstore/javascript/test/ApiClientTest.js
@@ -13,7 +13,11 @@ describe('ApiClient', function() {
expect(apiClient.basePath).to.be('http://petstore.swagger.io/v2');
expect(apiClient.authentications).to.eql({
petstore_auth: {type: 'oauth2'},
- api_key: {type: 'apiKey', 'in': 'header', name: 'api_key'},
+ api_key: {type: 'apiKey', 'in': 'header', name: 'api_key'}
+ /* commented out the following as these fake security def (testing purpose)
+ * has been removed from the spec, we'll add it back after updating the
+ * petstore server
+ *
test_http_basic: {type: 'basic'},
test_api_client_id: {
type: 'apiKey',
@@ -34,7 +38,7 @@ describe('ApiClient', function() {
type: 'apiKey',
'in': 'header',
name: 'test_api_key_header'
- }
+ }*/
});
});
diff --git a/samples/client/petstore/javascript/test/api/PetApiTest.js b/samples/client/petstore/javascript/test/api/PetApiTest.js
index d5f7ba3424c7..213660d8058d 100644
--- a/samples/client/petstore/javascript/test/api/PetApiTest.js
+++ b/samples/client/petstore/javascript/test/api/PetApiTest.js
@@ -55,7 +55,7 @@
describe('PetApi', function() {
it('should create and get pet', function(done) {
var pet = createRandomPet();
- api.addPet({body: pet}, function(error) {
+ api.addPet(pet, function(error) {
if (error) throw error;
api.getPetById(pet.id, function(error, fetched, response) {
@@ -79,6 +79,8 @@
});
});
+ /* commented out the following as the fake endpoint has been removed from the spec
+ * we'll add it back after updating the Petstore server
it('getPetByIdInObject', function(done) {
var pet = createRandomPet();
api.addPet({body: pet}, function(error) {
@@ -104,6 +106,7 @@
});
});
});
+ */
});
}));
diff --git a/samples/client/petstore/javascript/test/api/StoreApiTest.js b/samples/client/petstore/javascript/test/api/StoreApiTest.js
index 6347148221a8..65fb06b3fd08 100644
--- a/samples/client/petstore/javascript/test/api/StoreApiTest.js
+++ b/samples/client/petstore/javascript/test/api/StoreApiTest.js
@@ -19,6 +19,9 @@
});
describe('StoreApi', function() {
+ /* commented out the following as the fake endpoint has been removed from the spec
+ * we'll add it back after updating the petstore server
+ *
it('getInventoryInObject', function(done) {
api.getInventoryInObject(function(error, obj) {
if (error) throw error;
@@ -36,6 +39,7 @@
done();
});
});
+ */
});
}));
diff --git a/samples/client/petstore/objc/SwaggerClient/SWGConfiguration.m b/samples/client/petstore/objc/SwaggerClient/SWGConfiguration.m
index c9d80f5c488b..dd1596bf8ce3 100644
--- a/samples/client/petstore/objc/SwaggerClient/SWGConfiguration.m
+++ b/samples/client/petstore/objc/SwaggerClient/SWGConfiguration.m
@@ -72,7 +72,7 @@
return @"";
}
else {
- return [NSString stringWithFormat:@"BEARER %@", self.accessToken];
+ return [NSString stringWithFormat:@"Bearer %@", self.accessToken];
}
}
diff --git a/samples/client/petstore/objc/docs/SWGPetApi.md b/samples/client/petstore/objc/docs/SWGPetApi.md
index 78a54942c2fa..c69e6ce02c80 100644
--- a/samples/client/petstore/objc/docs/SWGPetApi.md
+++ b/samples/client/petstore/objc/docs/SWGPetApi.md
@@ -283,8 +283,8 @@ SWGConfiguration *apiConfig = [SWGConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
-// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
-//[apiConfig setApiKeyPrefix:@"BEARER" forApiKeyIdentifier:@"api_key"];
+// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
NSNumber* petId = @789; // ID of pet that needs to be fetched
diff --git a/samples/client/petstore/objc/docs/SWGStoreApi.md b/samples/client/petstore/objc/docs/SWGStoreApi.md
index 1eacf83431a5..7c9b20696d08 100644
--- a/samples/client/petstore/objc/docs/SWGStoreApi.md
+++ b/samples/client/petstore/objc/docs/SWGStoreApi.md
@@ -81,8 +81,8 @@ SWGConfiguration *apiConfig = [SWGConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
-// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
-//[apiConfig setApiKeyPrefix:@"BEARER" forApiKeyIdentifier:@"api_key"];
+// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
diff --git a/samples/client/petstore/perl/docs/PetApi.md b/samples/client/petstore/perl/docs/PetApi.md
index c696eac92cdf..829dc3a08ef3 100644
--- a/samples/client/petstore/perl/docs/PetApi.md
+++ b/samples/client/petstore/perl/docs/PetApi.md
@@ -269,8 +269,8 @@ use Data::Dumper;
# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
-# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
-#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
+# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";
# Configure OAuth2 access token for authorization: petstore_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
@@ -320,8 +320,8 @@ use Data::Dumper;
# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
-# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
-#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
+# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";
# Configure OAuth2 access token for authorization: petstore_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
@@ -371,8 +371,8 @@ use Data::Dumper;
# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
-# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
-#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
+# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";
# Configure OAuth2 access token for authorization: petstore_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
diff --git a/samples/client/petstore/perl/docs/StoreApi.md b/samples/client/petstore/perl/docs/StoreApi.md
index 15b02bca3fde..c5eb55a3f124 100644
--- a/samples/client/petstore/perl/docs/StoreApi.md
+++ b/samples/client/petstore/perl/docs/StoreApi.md
@@ -73,12 +73,12 @@ use Data::Dumper;
# Configure API key authorization: test_api_client_id
$WWW::SwaggerClient::Configuration::api_key->{'x-test_api_client_id'} = 'YOUR_API_KEY';
-# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
-#$WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_id'} = "BEARER";
+# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+#$WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_id'} = "Bearer";
# Configure API key authorization: test_api_client_secret
$WWW::SwaggerClient::Configuration::api_key->{'x-test_api_client_secret'} = 'YOUR_API_KEY';
-# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
-#$WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_secret'} = "BEARER";
+# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+#$WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_secret'} = "Bearer";
my $api_instance = WWW::SwaggerClient::StoreApi->new();
my $status = 'status_example'; # string | Status value that needs to be considered for query
@@ -126,8 +126,8 @@ use Data::Dumper;
# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
-# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
-#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
+# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";
my $api_instance = WWW::SwaggerClient::StoreApi->new();
@@ -171,8 +171,8 @@ use Data::Dumper;
# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
-# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
-#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
+# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";
my $api_instance = WWW::SwaggerClient::StoreApi->new();
@@ -216,12 +216,12 @@ use Data::Dumper;
# Configure API key authorization: test_api_key_header
$WWW::SwaggerClient::Configuration::api_key->{'test_api_key_header'} = 'YOUR_API_KEY';
-# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
-#$WWW::SwaggerClient::Configuration::api_key_prefix->{'test_api_key_header'} = "BEARER";
+# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+#$WWW::SwaggerClient::Configuration::api_key_prefix->{'test_api_key_header'} = "Bearer";
# Configure API key authorization: test_api_key_query
$WWW::SwaggerClient::Configuration::api_key->{'test_api_key_query'} = 'YOUR_API_KEY';
-# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
-#$WWW::SwaggerClient::Configuration::api_key_prefix->{'test_api_key_query'} = "BEARER";
+# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+#$WWW::SwaggerClient::Configuration::api_key_prefix->{'test_api_key_query'} = "Bearer";
my $api_instance = WWW::SwaggerClient::StoreApi->new();
my $order_id = 'order_id_example'; # string | ID of pet that needs to be fetched
@@ -269,12 +269,12 @@ use Data::Dumper;
# Configure API key authorization: test_api_client_id
$WWW::SwaggerClient::Configuration::api_key->{'x-test_api_client_id'} = 'YOUR_API_KEY';
-# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
-#$WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_id'} = "BEARER";
+# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+#$WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_id'} = "Bearer";
# Configure API key authorization: test_api_client_secret
$WWW::SwaggerClient::Configuration::api_key->{'x-test_api_client_secret'} = 'YOUR_API_KEY';
-# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
-#$WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_secret'} = "BEARER";
+# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+#$WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_secret'} = "Bearer";
my $api_instance = WWW::SwaggerClient::StoreApi->new();
my $body = WWW::SwaggerClient::Object::Order->new(); # Order | order placed for purchasing the pet
diff --git a/samples/client/petstore/perl/test.pl b/samples/client/petstore/perl/test.pl
index 626d25357fc2..a5b608aa4030 100755
--- a/samples/client/petstore/perl/test.pl
+++ b/samples/client/petstore/perl/test.pl
@@ -17,7 +17,7 @@ use DateTime;
$WWW::SwaggerClient::Configuration::http_user_agent = 'Perl-Swagger-Test';
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'ZZZZZZZZZZZZZZ';
-$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = 'BEARER';
+$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = 'Bearer';
$WWW::SwaggerClient::Configuration::username = 'username';
$WWW::SwaggerClient::Configuration::password = 'password';
diff --git a/samples/client/petstore/php/SwaggerClient-php/README.md b/samples/client/petstore/php/SwaggerClient-php/README.md
index c202495f7ac4..e581145b26db 100644
--- a/samples/client/petstore/php/SwaggerClient-php/README.md
+++ b/samples/client/petstore/php/SwaggerClient-php/README.md
@@ -5,7 +5,7 @@ This PHP package is automatically generated by the [Swagger Codegen](https://git
- API version: 1.0.0
- Package version: 1.0.0
-- Build date: 2016-05-05T03:40:26.342Z
+- Build date: 2016-05-07T07:39:11.271Z
- Build package: class io.swagger.codegen.languages.PhpClientCodegen
## Requirements
@@ -22,11 +22,11 @@ To install the bindings via [Composer](http://getcomposer.org/), add the followi
"repositories": [
{
"type": "git",
- "url": "https://github.com/YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID.git"
+ "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
- "YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID": "*@dev"
+ "GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
```
@@ -59,7 +59,7 @@ Please follow the [installation procedure](#installation--usage) and then run th
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\FakeApi();
-$number = "number_example"; // string | None
+$number = 3.4; // float | None
$double = 1.2; // double | None
$string = "string_example"; // string | None
$byte = "B"; // string | None
@@ -113,10 +113,13 @@ Class | Method | HTTP request | Description
## Documentation For Models
- [Animal](docs/Animal.md)
+ - [AnimalFarm](docs/AnimalFarm.md)
- [ApiResponse](docs/ApiResponse.md)
- [Cat](docs/Cat.md)
- [Category](docs/Category.md)
- [Dog](docs/Dog.md)
+ - [EnumClass](docs/EnumClass.md)
+ - [EnumTest](docs/EnumTest.md)
- [FormatTest](docs/FormatTest.md)
- [Model200Response](docs/Model200Response.md)
- [ModelReturn](docs/ModelReturn.md)
diff --git a/samples/client/petstore/php/SwaggerClient-php/composer.json b/samples/client/petstore/php/SwaggerClient-php/composer.json
index 2c63b2c8ba06..3822037d7504 100644
--- a/samples/client/petstore/php/SwaggerClient-php/composer.json
+++ b/samples/client/petstore/php/SwaggerClient-php/composer.json
@@ -1,5 +1,5 @@
{
- "name": "YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID",
+ "name": "GIT_USER_ID/GIT_REPO_ID",
"version": "1.0.0",
"description": "",
"keywords": [
diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/AnimalFarm.md b/samples/client/petstore/php/SwaggerClient-php/docs/AnimalFarm.md
new file mode 100644
index 000000000000..df6bab21dae8
--- /dev/null
+++ b/samples/client/petstore/php/SwaggerClient-php/docs/AnimalFarm.md
@@ -0,0 +1,9 @@
+# AnimalFarm
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/EnumClass.md b/samples/client/petstore/php/SwaggerClient-php/docs/EnumClass.md
new file mode 100644
index 000000000000..67f017becd0c
--- /dev/null
+++ b/samples/client/petstore/php/SwaggerClient-php/docs/EnumClass.md
@@ -0,0 +1,9 @@
+# EnumClass
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/EnumTest.md b/samples/client/petstore/php/SwaggerClient-php/docs/EnumTest.md
new file mode 100644
index 000000000000..2ef9e6adaacb
--- /dev/null
+++ b/samples/client/petstore/php/SwaggerClient-php/docs/EnumTest.md
@@ -0,0 +1,12 @@
+# EnumTest
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**enum_string** | **string** | | [optional]
+**enum_integer** | **int** | | [optional]
+**enum_number** | **double** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/FakeApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/FakeApi.md
index bc47365c9e0d..93c24ef7eebc 100644
--- a/samples/client/petstore/php/SwaggerClient-php/docs/FakeApi.md
+++ b/samples/client/petstore/php/SwaggerClient-php/docs/FakeApi.md
@@ -20,7 +20,7 @@ Fake endpoint for testing various parameters
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\FakeApi();
-$number = "number_example"; // string | None
+$number = 3.4; // float | None
$double = 1.2; // double | None
$string = "string_example"; // string | None
$byte = "B"; // string | None
@@ -45,7 +45,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **number** | **string**| None |
+ **number** | **float**| None |
**double** | **double**| None |
**string** | **string**| None |
**byte** | **string**| None |
diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/FormatTest.md b/samples/client/petstore/php/SwaggerClient-php/docs/FormatTest.md
index e043ee8d2b8e..c31305010fc4 100644
--- a/samples/client/petstore/php/SwaggerClient-php/docs/FormatTest.md
+++ b/samples/client/petstore/php/SwaggerClient-php/docs/FormatTest.md
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
**binary** | **string** | | [optional]
**date** | [**\DateTime**](Date.md) | |
**date_time** | [**\DateTime**](\DateTime.md) | | [optional]
+**uuid** | **string** | | [optional]
**password** | **string** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/PetApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/PetApi.md
index a2a06445c738..bf119270a58d 100644
--- a/samples/client/petstore/php/SwaggerClient-php/docs/PetApi.md
+++ b/samples/client/petstore/php/SwaggerClient-php/docs/PetApi.md
@@ -220,8 +220,8 @@ require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
-// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
-// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER');
+// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');
$api_instance = new Swagger\Client\Api\PetApi();
$pet_id = 789; // int | ID of pet to return
diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/StoreApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/StoreApi.md
index 8198bf3dbf4f..7040df371a46 100644
--- a/samples/client/petstore/php/SwaggerClient-php/docs/StoreApi.md
+++ b/samples/client/petstore/php/SwaggerClient-php/docs/StoreApi.md
@@ -68,8 +68,8 @@ require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
-// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
-// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER');
+// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');
$api_instance = new Swagger\Client\Api\StoreApi();
diff --git a/samples/client/petstore/php/SwaggerClient-php/git_push.sh b/samples/client/petstore/php/SwaggerClient-php/git_push.sh
index 1a36388db023..ed374619b139 100644
--- a/samples/client/petstore/php/SwaggerClient-php/git_push.sh
+++ b/samples/client/petstore/php/SwaggerClient-php/git_push.sh
@@ -8,12 +8,12 @@ git_repo_id=$2
release_note=$3
if [ "$git_user_id" = "" ]; then
- git_user_id="YOUR_GIT_USR_ID"
+ git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
- git_repo_id="YOUR_GIT_REPO_ID"
+ git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php
index 8fefa9340588..9d0456ffb2e2 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php
@@ -60,7 +60,7 @@ class FakeApi
* Constructor
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
*/
- function __construct($apiClient = null)
+ function __construct(\Swagger\Client\ApiClient $apiClient = null)
{
if ($apiClient == null) {
$apiClient = new ApiClient();
@@ -84,7 +84,7 @@ class FakeApi
* @param \Swagger\Client\ApiClient $apiClient set the API client
* @return FakeApi
*/
- public function setApiClient(ApiClient $apiClient)
+ public function setApiClient(\Swagger\Client\ApiClient $apiClient)
{
$this->apiClient = $apiClient;
return $this;
@@ -95,7 +95,7 @@ class FakeApi
*
* Fake endpoint for testing various parameters
*
- * @param string $number None (required)
+ * @param float $number None (required)
* @param double $double None (required)
* @param string $string None (required)
* @param string $byte None (required)
@@ -122,7 +122,7 @@ class FakeApi
*
* Fake endpoint for testing various parameters
*
- * @param string $number None (required)
+ * @param float $number None (required)
* @param double $double None (required)
* @param string $string None (required)
* @param string $byte None (required)
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php
index 1154b72929c7..4ab1529c7c09 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php
@@ -60,7 +60,7 @@ class PetApi
* Constructor
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
*/
- function __construct($apiClient = null)
+ function __construct(\Swagger\Client\ApiClient $apiClient = null)
{
if ($apiClient == null) {
$apiClient = new ApiClient();
@@ -84,7 +84,7 @@ class PetApi
* @param \Swagger\Client\ApiClient $apiClient set the API client
* @return PetApi
*/
- public function setApiClient(ApiClient $apiClient)
+ public function setApiClient(\Swagger\Client\ApiClient $apiClient)
{
$this->apiClient = $apiClient;
return $this;
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php
index 27253a09f4fc..a238eb41312b 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php
@@ -60,7 +60,7 @@ class StoreApi
* Constructor
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
*/
- function __construct($apiClient = null)
+ function __construct(\Swagger\Client\ApiClient $apiClient = null)
{
if ($apiClient == null) {
$apiClient = new ApiClient();
@@ -84,7 +84,7 @@ class StoreApi
* @param \Swagger\Client\ApiClient $apiClient set the API client
* @return StoreApi
*/
- public function setApiClient(ApiClient $apiClient)
+ public function setApiClient(\Swagger\Client\ApiClient $apiClient)
{
$this->apiClient = $apiClient;
return $this;
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php
index 96c9fa6fc09a..ed9744b82558 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php
@@ -60,7 +60,7 @@ class UserApi
* Constructor
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
*/
- function __construct($apiClient = null)
+ function __construct(\Swagger\Client\ApiClient $apiClient = null)
{
if ($apiClient == null) {
$apiClient = new ApiClient();
@@ -84,7 +84,7 @@ class UserApi
* @param \Swagger\Client\ApiClient $apiClient set the API client
* @return UserApi
*/
- public function setApiClient(ApiClient $apiClient)
+ public function setApiClient(\Swagger\Client\ApiClient $apiClient)
{
$this->apiClient = $apiClient;
return $this;
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php b/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php
index 65ee9d27f297..b28f2f261405 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php
@@ -69,7 +69,7 @@ class ApiClient
* Constructor of the class
* @param Configuration $config config for this ApiClient
*/
- public function __construct(Configuration $config = null)
+ public function __construct(\Swagger\Client\Configuration $config = null)
{
if ($config == null) {
$config = Configuration::getDefaultConfiguration();
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php
index 82d29699f8a4..032d74d40e53 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php
@@ -59,52 +59,62 @@ class Animal implements ArrayAccess
static $swaggerTypes = array(
'class_name' => 'string'
);
-
+
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
- * Array of attributes where the key is the local name, and the value is the original name
- * @var string[]
- */
+ * Array of attributes where the key is the local name, and the value is the original name
+ * @var string[]
+ */
static $attributeMap = array(
'class_name' => 'className'
);
-
+
static function attributeMap() {
return self::$attributeMap;
}
/**
- * Array of attributes to setter functions (for deserialization of responses)
- * @var string[]
- */
+ * Array of attributes to setter functions (for deserialization of responses)
+ * @var string[]
+ */
static $setters = array(
'class_name' => 'setClassName'
);
-
+
static function setters() {
return self::$setters;
}
/**
- * Array of attributes to getter functions (for serialization of requests)
- * @var string[]
- */
+ * Array of attributes to getter functions (for serialization of requests)
+ * @var string[]
+ */
static $getters = array(
'class_name' => 'getClassName'
);
-
+
static function getters() {
return self::$getters;
}
+
+
+
+
/**
- * $class_name
- * @var string
- */
- protected $class_name;
+ * Associative array for storing property values
+ * @var mixed[]
+ */
+ protected $container = array(
+ /**
+ * $container['class_name']
+ * @var string
+ */
+ 'class_name' => null,
+ );
/**
* Constructor
@@ -115,11 +125,11 @@ class Animal implements ArrayAccess
// Initialize discriminator property with the model name.
$discrimintor = array_search('className', self::$attributeMap);
- $this->{$discrimintor} = static::$swaggerModelName;
+ $this->container[$discrimintor] = static::$swaggerModelName;
if ($data != null) {
if (isset($data["class_name"])) {
- $this->class_name = $data["class_name"];
+ $this->container['class_name'] = $data["class_name"];
}
}
}
@@ -165,9 +175,9 @@ class Animal implements ArrayAccess
*/
public function getClassName()
{
- return $this->class_name;
+ return $this->container['class_name'];
}
-
+
/**
* Sets class_name
* @param string $class_name
@@ -177,7 +187,9 @@ class Animal implements ArrayAccess
{
- $this->class_name = $class_name;
+
+ $this->container['class_name'] = $class_name;
+
return $this;
}
/**
@@ -187,9 +199,9 @@ class Animal implements ArrayAccess
*/
public function offsetExists($offset)
{
- return isset($this->$offset);
+ return isset($this->container[$offset]);
}
-
+
/**
* Gets offset.
* @param integer $offset Offset
@@ -197,9 +209,9 @@ class Animal implements ArrayAccess
*/
public function offsetGet($offset)
{
- return $this->$offset;
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
-
+
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -208,9 +220,13 @@ class Animal implements ArrayAccess
*/
public function offsetSet($offset, $value)
{
- $this->$offset = $value;
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
}
-
+
/**
* Unsets offset.
* @param integer $offset Offset
@@ -218,9 +234,9 @@ class Animal implements ArrayAccess
*/
public function offsetUnset($offset)
{
- unset($this->$offset);
+ unset($this->container[$offset]);
}
-
+
/**
* Gets the string presentation of the object
* @return string
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/AnimalFarm.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/AnimalFarm.php
new file mode 100644
index 000000000000..394c146e532b
--- /dev/null
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/AnimalFarm.php
@@ -0,0 +1,207 @@
+container[$offset]);
+ }
+
+ /**
+ * Gets offset.
+ * @param integer $offset Offset
+ * @return mixed
+ */
+ public function offsetGet($offset)
+ {
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
+ }
+
+ /**
+ * Sets value based on offset.
+ * @param integer $offset Offset
+ * @param mixed $value Value to be set
+ * @return void
+ */
+ public function offsetSet($offset, $value)
+ {
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Unsets offset.
+ * @param integer $offset Offset
+ * @return void
+ */
+ public function offsetUnset($offset)
+ {
+ unset($this->container[$offset]);
+ }
+
+ /**
+ * Gets the string presentation of the object
+ * @return string
+ */
+ public function __toString()
+ {
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
+ return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
+ }
+
+ return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
+ }
+}
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ApiResponse.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ApiResponse.php
index e6e7b7bcd841..1f087295322d 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ApiResponse.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ApiResponse.php
@@ -61,68 +61,80 @@ class ApiResponse implements ArrayAccess
'type' => 'string',
'message' => 'string'
);
-
+
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
- * Array of attributes where the key is the local name, and the value is the original name
- * @var string[]
- */
+ * Array of attributes where the key is the local name, and the value is the original name
+ * @var string[]
+ */
static $attributeMap = array(
'code' => 'code',
'type' => 'type',
'message' => 'message'
);
-
+
static function attributeMap() {
return self::$attributeMap;
}
/**
- * Array of attributes to setter functions (for deserialization of responses)
- * @var string[]
- */
+ * Array of attributes to setter functions (for deserialization of responses)
+ * @var string[]
+ */
static $setters = array(
'code' => 'setCode',
'type' => 'setType',
'message' => 'setMessage'
);
-
+
static function setters() {
return self::$setters;
}
/**
- * Array of attributes to getter functions (for serialization of requests)
- * @var string[]
- */
+ * Array of attributes to getter functions (for serialization of requests)
+ * @var string[]
+ */
static $getters = array(
'code' => 'getCode',
'type' => 'getType',
'message' => 'getMessage'
);
-
+
static function getters() {
return self::$getters;
}
+
+
+
+
/**
- * $code
- * @var int
- */
- protected $code;
- /**
- * $type
- * @var string
- */
- protected $type;
- /**
- * $message
- * @var string
- */
- protected $message;
+ * Associative array for storing property values
+ * @var mixed[]
+ */
+ protected $container = array(
+ /**
+ * $container['code']
+ * @var int
+ */
+ 'code' => null,
+
+ /**
+ * $container['type']
+ * @var string
+ */
+ 'type' => null,
+
+ /**
+ * $container['message']
+ * @var string
+ */
+ 'message' => null,
+ );
/**
* Constructor
@@ -134,13 +146,13 @@ class ApiResponse implements ArrayAccess
if ($data != null) {
if (isset($data["code"])) {
- $this->code = $data["code"];
+ $this->container['code'] = $data["code"];
}
if (isset($data["type"])) {
- $this->type = $data["type"];
+ $this->container['type'] = $data["type"];
}
if (isset($data["message"])) {
- $this->message = $data["message"];
+ $this->container['message'] = $data["message"];
}
}
}
@@ -188,9 +200,9 @@ class ApiResponse implements ArrayAccess
*/
public function getCode()
{
- return $this->code;
+ return $this->container['code'];
}
-
+
/**
* Sets code
* @param int $code
@@ -200,7 +212,9 @@ class ApiResponse implements ArrayAccess
{
- $this->code = $code;
+
+ $this->container['code'] = $code;
+
return $this;
}
/**
@@ -209,9 +223,9 @@ class ApiResponse implements ArrayAccess
*/
public function getType()
{
- return $this->type;
+ return $this->container['type'];
}
-
+
/**
* Sets type
* @param string $type
@@ -221,7 +235,9 @@ class ApiResponse implements ArrayAccess
{
- $this->type = $type;
+
+ $this->container['type'] = $type;
+
return $this;
}
/**
@@ -230,9 +246,9 @@ class ApiResponse implements ArrayAccess
*/
public function getMessage()
{
- return $this->message;
+ return $this->container['message'];
}
-
+
/**
* Sets message
* @param string $message
@@ -242,7 +258,9 @@ class ApiResponse implements ArrayAccess
{
- $this->message = $message;
+
+ $this->container['message'] = $message;
+
return $this;
}
/**
@@ -252,9 +270,9 @@ class ApiResponse implements ArrayAccess
*/
public function offsetExists($offset)
{
- return isset($this->$offset);
+ return isset($this->container[$offset]);
}
-
+
/**
* Gets offset.
* @param integer $offset Offset
@@ -262,9 +280,9 @@ class ApiResponse implements ArrayAccess
*/
public function offsetGet($offset)
{
- return $this->$offset;
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
-
+
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -273,9 +291,13 @@ class ApiResponse implements ArrayAccess
*/
public function offsetSet($offset, $value)
{
- $this->$offset = $value;
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
}
-
+
/**
* Unsets offset.
* @param integer $offset Offset
@@ -283,9 +305,9 @@ class ApiResponse implements ArrayAccess
*/
public function offsetUnset($offset)
{
- unset($this->$offset);
+ unset($this->container[$offset]);
}
-
+
/**
* Gets the string presentation of the object
* @return string
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php
index 4bc0f89d9e28..929560e001e0 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php
@@ -59,52 +59,62 @@ class Cat extends Animal implements ArrayAccess
static $swaggerTypes = array(
'declawed' => 'bool'
);
-
+
static function swaggerTypes() {
return self::$swaggerTypes + parent::swaggerTypes();
}
/**
- * Array of attributes where the key is the local name, and the value is the original name
- * @var string[]
- */
+ * Array of attributes where the key is the local name, and the value is the original name
+ * @var string[]
+ */
static $attributeMap = array(
'declawed' => 'declawed'
);
-
+
static function attributeMap() {
return parent::attributeMap() + self::$attributeMap;
}
/**
- * Array of attributes to setter functions (for deserialization of responses)
- * @var string[]
- */
+ * Array of attributes to setter functions (for deserialization of responses)
+ * @var string[]
+ */
static $setters = array(
'declawed' => 'setDeclawed'
);
-
+
static function setters() {
return parent::setters() + self::$setters;
}
/**
- * Array of attributes to getter functions (for serialization of requests)
- * @var string[]
- */
+ * Array of attributes to getter functions (for serialization of requests)
+ * @var string[]
+ */
static $getters = array(
'declawed' => 'getDeclawed'
);
-
+
static function getters() {
return parent::getters() + self::$getters;
}
+
+
+
+
/**
- * $declawed
- * @var bool
- */
- protected $declawed;
+ * Associative array for storing property values
+ * @var mixed[]
+ */
+ protected $container = array(
+ /**
+ * $container['declawed']
+ * @var bool
+ */
+ 'declawed' => null,
+ );
/**
* Constructor
@@ -116,7 +126,7 @@ class Cat extends Animal implements ArrayAccess
if ($data != null) {
if (isset($data["declawed"])) {
- $this->declawed = $data["declawed"];
+ $this->container['declawed'] = $data["declawed"];
}
}
}
@@ -156,9 +166,9 @@ class Cat extends Animal implements ArrayAccess
*/
public function getDeclawed()
{
- return $this->declawed;
+ return $this->container['declawed'];
}
-
+
/**
* Sets declawed
* @param bool $declawed
@@ -168,7 +178,9 @@ class Cat extends Animal implements ArrayAccess
{
- $this->declawed = $declawed;
+
+ $this->container['declawed'] = $declawed;
+
return $this;
}
/**
@@ -178,9 +190,9 @@ class Cat extends Animal implements ArrayAccess
*/
public function offsetExists($offset)
{
- return isset($this->$offset);
+ return isset($this->container[$offset]);
}
-
+
/**
* Gets offset.
* @param integer $offset Offset
@@ -188,9 +200,9 @@ class Cat extends Animal implements ArrayAccess
*/
public function offsetGet($offset)
{
- return $this->$offset;
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
-
+
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -199,9 +211,13 @@ class Cat extends Animal implements ArrayAccess
*/
public function offsetSet($offset, $value)
{
- $this->$offset = $value;
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
}
-
+
/**
* Unsets offset.
* @param integer $offset Offset
@@ -209,9 +225,9 @@ class Cat extends Animal implements ArrayAccess
*/
public function offsetUnset($offset)
{
- unset($this->$offset);
+ unset($this->container[$offset]);
}
-
+
/**
* Gets the string presentation of the object
* @return string
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php
index 55b391feabd7..26d37a15e4a5 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php
@@ -60,60 +60,71 @@ class Category implements ArrayAccess
'id' => 'int',
'name' => 'string'
);
-
+
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
- * Array of attributes where the key is the local name, and the value is the original name
- * @var string[]
- */
+ * Array of attributes where the key is the local name, and the value is the original name
+ * @var string[]
+ */
static $attributeMap = array(
'id' => 'id',
'name' => 'name'
);
-
+
static function attributeMap() {
return self::$attributeMap;
}
/**
- * Array of attributes to setter functions (for deserialization of responses)
- * @var string[]
- */
+ * Array of attributes to setter functions (for deserialization of responses)
+ * @var string[]
+ */
static $setters = array(
'id' => 'setId',
'name' => 'setName'
);
-
+
static function setters() {
return self::$setters;
}
/**
- * Array of attributes to getter functions (for serialization of requests)
- * @var string[]
- */
+ * Array of attributes to getter functions (for serialization of requests)
+ * @var string[]
+ */
static $getters = array(
'id' => 'getId',
'name' => 'getName'
);
-
+
static function getters() {
return self::$getters;
}
+
+
+
+
/**
- * $id
- * @var int
- */
- protected $id;
- /**
- * $name
- * @var string
- */
- protected $name;
+ * Associative array for storing property values
+ * @var mixed[]
+ */
+ protected $container = array(
+ /**
+ * $container['id']
+ * @var int
+ */
+ 'id' => null,
+
+ /**
+ * $container['name']
+ * @var string
+ */
+ 'name' => null,
+ );
/**
* Constructor
@@ -125,10 +136,10 @@ class Category implements ArrayAccess
if ($data != null) {
if (isset($data["id"])) {
- $this->id = $data["id"];
+ $this->container['id'] = $data["id"];
}
if (isset($data["name"])) {
- $this->name = $data["name"];
+ $this->container['name'] = $data["name"];
}
}
}
@@ -172,9 +183,9 @@ class Category implements ArrayAccess
*/
public function getId()
{
- return $this->id;
+ return $this->container['id'];
}
-
+
/**
* Sets id
* @param int $id
@@ -184,7 +195,9 @@ class Category implements ArrayAccess
{
- $this->id = $id;
+
+ $this->container['id'] = $id;
+
return $this;
}
/**
@@ -193,9 +206,9 @@ class Category implements ArrayAccess
*/
public function getName()
{
- return $this->name;
+ return $this->container['name'];
}
-
+
/**
* Sets name
* @param string $name
@@ -205,7 +218,9 @@ class Category implements ArrayAccess
{
- $this->name = $name;
+
+ $this->container['name'] = $name;
+
return $this;
}
/**
@@ -215,9 +230,9 @@ class Category implements ArrayAccess
*/
public function offsetExists($offset)
{
- return isset($this->$offset);
+ return isset($this->container[$offset]);
}
-
+
/**
* Gets offset.
* @param integer $offset Offset
@@ -225,9 +240,9 @@ class Category implements ArrayAccess
*/
public function offsetGet($offset)
{
- return $this->$offset;
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
-
+
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -236,9 +251,13 @@ class Category implements ArrayAccess
*/
public function offsetSet($offset, $value)
{
- $this->$offset = $value;
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
}
-
+
/**
* Unsets offset.
* @param integer $offset Offset
@@ -246,9 +265,9 @@ class Category implements ArrayAccess
*/
public function offsetUnset($offset)
{
- unset($this->$offset);
+ unset($this->container[$offset]);
}
-
+
/**
* Gets the string presentation of the object
* @return string
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php
index d092850ab799..7a106519a815 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php
@@ -59,52 +59,62 @@ class Dog extends Animal implements ArrayAccess
static $swaggerTypes = array(
'breed' => 'string'
);
-
+
static function swaggerTypes() {
return self::$swaggerTypes + parent::swaggerTypes();
}
/**
- * Array of attributes where the key is the local name, and the value is the original name
- * @var string[]
- */
+ * Array of attributes where the key is the local name, and the value is the original name
+ * @var string[]
+ */
static $attributeMap = array(
'breed' => 'breed'
);
-
+
static function attributeMap() {
return parent::attributeMap() + self::$attributeMap;
}
/**
- * Array of attributes to setter functions (for deserialization of responses)
- * @var string[]
- */
+ * Array of attributes to setter functions (for deserialization of responses)
+ * @var string[]
+ */
static $setters = array(
'breed' => 'setBreed'
);
-
+
static function setters() {
return parent::setters() + self::$setters;
}
/**
- * Array of attributes to getter functions (for serialization of requests)
- * @var string[]
- */
+ * Array of attributes to getter functions (for serialization of requests)
+ * @var string[]
+ */
static $getters = array(
'breed' => 'getBreed'
);
-
+
static function getters() {
return parent::getters() + self::$getters;
}
+
+
+
+
/**
- * $breed
- * @var string
- */
- protected $breed;
+ * Associative array for storing property values
+ * @var mixed[]
+ */
+ protected $container = array(
+ /**
+ * $container['breed']
+ * @var string
+ */
+ 'breed' => null,
+ );
/**
* Constructor
@@ -116,7 +126,7 @@ class Dog extends Animal implements ArrayAccess
if ($data != null) {
if (isset($data["breed"])) {
- $this->breed = $data["breed"];
+ $this->container['breed'] = $data["breed"];
}
}
}
@@ -156,9 +166,9 @@ class Dog extends Animal implements ArrayAccess
*/
public function getBreed()
{
- return $this->breed;
+ return $this->container['breed'];
}
-
+
/**
* Sets breed
* @param string $breed
@@ -168,7 +178,9 @@ class Dog extends Animal implements ArrayAccess
{
- $this->breed = $breed;
+
+ $this->container['breed'] = $breed;
+
return $this;
}
/**
@@ -178,9 +190,9 @@ class Dog extends Animal implements ArrayAccess
*/
public function offsetExists($offset)
{
- return isset($this->$offset);
+ return isset($this->container[$offset]);
}
-
+
/**
* Gets offset.
* @param integer $offset Offset
@@ -188,9 +200,9 @@ class Dog extends Animal implements ArrayAccess
*/
public function offsetGet($offset)
{
- return $this->$offset;
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
-
+
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -199,9 +211,13 @@ class Dog extends Animal implements ArrayAccess
*/
public function offsetSet($offset, $value)
{
- $this->$offset = $value;
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
}
-
+
/**
* Unsets offset.
* @param integer $offset Offset
@@ -209,9 +225,9 @@ class Dog extends Animal implements ArrayAccess
*/
public function offsetUnset($offset)
{
- unset($this->$offset);
+ unset($this->container[$offset]);
}
-
+
/**
* Gets the string presentation of the object
* @return string
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumClass.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumClass.php
new file mode 100644
index 000000000000..6996674e02e8
--- /dev/null
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumClass.php
@@ -0,0 +1,207 @@
+container[$offset]);
+ }
+
+ /**
+ * Gets offset.
+ * @param integer $offset Offset
+ * @return mixed
+ */
+ public function offsetGet($offset)
+ {
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
+ }
+
+ /**
+ * Sets value based on offset.
+ * @param integer $offset Offset
+ * @param mixed $value Value to be set
+ * @return void
+ */
+ public function offsetSet($offset, $value)
+ {
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Unsets offset.
+ * @param integer $offset Offset
+ * @return void
+ */
+ public function offsetUnset($offset)
+ {
+ unset($this->container[$offset]);
+ }
+
+ /**
+ * Gets the string presentation of the object
+ * @return string
+ */
+ public function __toString()
+ {
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
+ return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
+ }
+
+ return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
+ }
+}
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumTest.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumTest.php
new file mode 100644
index 000000000000..2498f8629685
--- /dev/null
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumTest.php
@@ -0,0 +1,389 @@
+ 'string',
+ 'enum_integer' => 'int',
+ 'enum_number' => 'double'
+ );
+
+ static function swaggerTypes() {
+ return self::$swaggerTypes;
+ }
+
+ /**
+ * Array of attributes where the key is the local name, and the value is the original name
+ * @var string[]
+ */
+ static $attributeMap = array(
+ 'enum_string' => 'enum_string',
+ 'enum_integer' => 'enum_integer',
+ 'enum_number' => 'enum_number'
+ );
+
+ static function attributeMap() {
+ return self::$attributeMap;
+ }
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ * @var string[]
+ */
+ static $setters = array(
+ 'enum_string' => 'setEnumString',
+ 'enum_integer' => 'setEnumInteger',
+ 'enum_number' => 'setEnumNumber'
+ );
+
+ static function setters() {
+ return self::$setters;
+ }
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ * @var string[]
+ */
+ static $getters = array(
+ 'enum_string' => 'getEnumString',
+ 'enum_integer' => 'getEnumInteger',
+ 'enum_number' => 'getEnumNumber'
+ );
+
+ static function getters() {
+ return self::$getters;
+ }
+
+ const ENUM_STRING_UPPER = 'UPPER';
+ const ENUM_STRING_LOWER = 'lower';
+ const ENUM_INTEGER_1 = 1;
+ const ENUM_INTEGER_MINUS_1 = -1;
+ const ENUM_NUMBER_1_DOT_1 = 1.1;
+ const ENUM_NUMBER_MINUS_1_DOT_2 = -1.2;
+
+
+
+ /**
+ * Gets allowable values of the enum
+ * @return string[]
+ */
+ public function getEnumStringAllowableValues() {
+ return [
+ self::ENUM_STRING_UPPER,
+ self::ENUM_STRING_LOWER,
+ ];
+ }
+
+ /**
+ * Gets allowable values of the enum
+ * @return string[]
+ */
+ public function getEnumIntegerAllowableValues() {
+ return [
+ self::ENUM_INTEGER_1,
+ self::ENUM_INTEGER_MINUS_1,
+ ];
+ }
+
+ /**
+ * Gets allowable values of the enum
+ * @return string[]
+ */
+ public function getEnumNumberAllowableValues() {
+ return [
+ self::ENUM_NUMBER_1_DOT_1,
+ self::ENUM_NUMBER_MINUS_1_DOT_2,
+ ];
+ }
+
+
+ /**
+ * Associative array for storing property values
+ * @var mixed[]
+ */
+ protected $container = array(
+ /**
+ * $container['enum_string']
+ * @var string
+ */
+ 'enum_string' => null,
+
+ /**
+ * $container['enum_integer']
+ * @var int
+ */
+ 'enum_integer' => null,
+
+ /**
+ * $container['enum_number']
+ * @var double
+ */
+ 'enum_number' => null,
+ );
+
+ /**
+ * Constructor
+ * @param mixed[] $data Associated array of property value initalizing the model
+ */
+ public function __construct(array $data = null)
+ {
+
+
+ if ($data != null) {
+ if (isset($data["enum_string"])) {
+ $this->container['enum_string'] = $data["enum_string"];
+ }
+ if (isset($data["enum_integer"])) {
+ $this->container['enum_integer'] = $data["enum_integer"];
+ }
+ if (isset($data["enum_number"])) {
+ $this->container['enum_number'] = $data["enum_number"];
+ }
+ }
+ }
+
+ /**
+ * show all the invalid properties with reasons.
+ *
+ * @return array invalid properties with reasons
+ */
+ public function list_invalid_properties()
+ {
+ $invalid_properties = array();
+
+ $allowed_values = array("UPPER", "lower");
+ if (!in_array($this->enum_string, $allowed_values))) {
+ $invalid_properties[] = "invalid value for '$enum_string', must be one of #{allowed_values}.";
+ }
+
+ $allowed_values = array("1", "-1");
+ if (!in_array($this->enum_integer, $allowed_values))) {
+ $invalid_properties[] = "invalid value for '$enum_integer', must be one of #{allowed_values}.";
+ }
+
+ $allowed_values = array("1.1", "-1.2");
+ if (!in_array($this->enum_number, $allowed_values))) {
+ $invalid_properties[] = "invalid value for '$enum_number', must be one of #{allowed_values}.";
+ }
+
+ return $invalid_properties;
+ }
+
+ /**
+ * validate all the parameters in the model
+ * return true if all passed
+ *
+ * @return bool [description]
+ */
+ public function valid()
+ {
+
+ $allowed_values = array("UPPER", "lower");
+ if (!in_array($this->enum_string, $allowed_values))) {
+ return false;
+ }
+
+ $allowed_values = array("1", "-1");
+ if (!in_array($this->enum_integer, $allowed_values))) {
+ return false;
+ }
+
+ $allowed_values = array("1.1", "-1.2");
+ if (!in_array($this->enum_number, $allowed_values))) {
+ return false;
+ }
+
+ return true;
+ }
+
+
+ /**
+ * Gets enum_string
+ * @return string
+ */
+ public function getEnumString()
+ {
+ return $this->container['enum_string'];
+ }
+
+ /**
+ * Sets enum_string
+ * @param string $enum_string
+ * @return $this
+ */
+ public function setEnumString($enum_string)
+ {
+ $allowed_values = array('UPPER', 'lower');
+ if (!in_array($enum_string, $allowed_values)) {
+ throw new \InvalidArgumentException("Invalid value for 'enum_string', must be one of 'UPPER', 'lower'");
+ }
+
+
+ $this->container['enum_string'] = $enum_string;
+
+ return $this;
+ }
+ /**
+ * Gets enum_integer
+ * @return int
+ */
+ public function getEnumInteger()
+ {
+ return $this->container['enum_integer'];
+ }
+
+ /**
+ * Sets enum_integer
+ * @param int $enum_integer
+ * @return $this
+ */
+ public function setEnumInteger($enum_integer)
+ {
+ $allowed_values = array('1', '-1');
+ if (!in_array($enum_integer, $allowed_values)) {
+ throw new \InvalidArgumentException("Invalid value for 'enum_integer', must be one of '1', '-1'");
+ }
+
+
+ $this->container['enum_integer'] = $enum_integer;
+
+ return $this;
+ }
+ /**
+ * Gets enum_number
+ * @return double
+ */
+ public function getEnumNumber()
+ {
+ return $this->container['enum_number'];
+ }
+
+ /**
+ * Sets enum_number
+ * @param double $enum_number
+ * @return $this
+ */
+ public function setEnumNumber($enum_number)
+ {
+ $allowed_values = array('1.1', '-1.2');
+ if (!in_array($enum_number, $allowed_values)) {
+ throw new \InvalidArgumentException("Invalid value for 'enum_number', must be one of '1.1', '-1.2'");
+ }
+
+
+ $this->container['enum_number'] = $enum_number;
+
+ return $this;
+ }
+ /**
+ * Returns true if offset exists. False otherwise.
+ * @param integer $offset Offset
+ * @return boolean
+ */
+ public function offsetExists($offset)
+ {
+ return isset($this->container[$offset]);
+ }
+
+ /**
+ * Gets offset.
+ * @param integer $offset Offset
+ * @return mixed
+ */
+ public function offsetGet($offset)
+ {
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
+ }
+
+ /**
+ * Sets value based on offset.
+ * @param integer $offset Offset
+ * @param mixed $value Value to be set
+ * @return void
+ */
+ public function offsetSet($offset, $value)
+ {
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Unsets offset.
+ * @param integer $offset Offset
+ * @return void
+ */
+ public function offsetUnset($offset)
+ {
+ unset($this->container[$offset]);
+ }
+
+ /**
+ * Gets the string presentation of the object
+ * @return string
+ */
+ public function __toString()
+ {
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
+ return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
+ }
+
+ return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
+ }
+}
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php
index 6f5c75d28ebc..d34dd167d324 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php
@@ -68,17 +68,18 @@ class FormatTest implements ArrayAccess
'binary' => 'string',
'date' => '\DateTime',
'date_time' => '\DateTime',
+ 'uuid' => 'string',
'password' => 'string'
);
-
+
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
- * Array of attributes where the key is the local name, and the value is the original name
- * @var string[]
- */
+ * Array of attributes where the key is the local name, and the value is the original name
+ * @var string[]
+ */
static $attributeMap = array(
'integer' => 'integer',
'int32' => 'int32',
@@ -91,17 +92,18 @@ class FormatTest implements ArrayAccess
'binary' => 'binary',
'date' => 'date',
'date_time' => 'dateTime',
+ 'uuid' => 'uuid',
'password' => 'password'
);
-
+
static function attributeMap() {
return self::$attributeMap;
}
/**
- * Array of attributes to setter functions (for deserialization of responses)
- * @var string[]
- */
+ * Array of attributes to setter functions (for deserialization of responses)
+ * @var string[]
+ */
static $setters = array(
'integer' => 'setInteger',
'int32' => 'setInt32',
@@ -114,17 +116,18 @@ class FormatTest implements ArrayAccess
'binary' => 'setBinary',
'date' => 'setDate',
'date_time' => 'setDateTime',
+ 'uuid' => 'setUuid',
'password' => 'setPassword'
);
-
+
static function setters() {
return self::$setters;
}
/**
- * Array of attributes to getter functions (for serialization of requests)
- * @var string[]
- */
+ * Array of attributes to getter functions (for serialization of requests)
+ * @var string[]
+ */
static $getters = array(
'integer' => 'getInteger',
'int32' => 'getInt32',
@@ -137,73 +140,101 @@ class FormatTest implements ArrayAccess
'binary' => 'getBinary',
'date' => 'getDate',
'date_time' => 'getDateTime',
+ 'uuid' => 'getUuid',
'password' => 'getPassword'
);
-
+
static function getters() {
return self::$getters;
}
+
+
+
+
/**
- * $integer
- * @var int
- */
- protected $integer;
- /**
- * $int32
- * @var int
- */
- protected $int32;
- /**
- * $int64
- * @var int
- */
- protected $int64;
- /**
- * $number
- * @var float
- */
- protected $number;
- /**
- * $float
- * @var float
- */
- protected $float;
- /**
- * $double
- * @var double
- */
- protected $double;
- /**
- * $string
- * @var string
- */
- protected $string;
- /**
- * $byte
- * @var string
- */
- protected $byte;
- /**
- * $binary
- * @var string
- */
- protected $binary;
- /**
- * $date
- * @var \DateTime
- */
- protected $date;
- /**
- * $date_time
- * @var \DateTime
- */
- protected $date_time;
- /**
- * $password
- * @var string
- */
- protected $password;
+ * Associative array for storing property values
+ * @var mixed[]
+ */
+ protected $container = array(
+ /**
+ * $container['integer']
+ * @var int
+ */
+ 'integer' => null,
+
+ /**
+ * $container['int32']
+ * @var int
+ */
+ 'int32' => null,
+
+ /**
+ * $container['int64']
+ * @var int
+ */
+ 'int64' => null,
+
+ /**
+ * $container['number']
+ * @var float
+ */
+ 'number' => null,
+
+ /**
+ * $container['float']
+ * @var float
+ */
+ 'float' => null,
+
+ /**
+ * $container['double']
+ * @var double
+ */
+ 'double' => null,
+
+ /**
+ * $container['string']
+ * @var string
+ */
+ 'string' => null,
+
+ /**
+ * $container['byte']
+ * @var string
+ */
+ 'byte' => null,
+
+ /**
+ * $container['binary']
+ * @var string
+ */
+ 'binary' => null,
+
+ /**
+ * $container['date']
+ * @var \DateTime
+ */
+ 'date' => null,
+
+ /**
+ * $container['date_time']
+ * @var \DateTime
+ */
+ 'date_time' => null,
+
+ /**
+ * $container['uuid']
+ * @var string
+ */
+ 'uuid' => null,
+
+ /**
+ * $container['password']
+ * @var string
+ */
+ 'password' => null,
+ );
/**
* Constructor
@@ -215,40 +246,43 @@ class FormatTest implements ArrayAccess
if ($data != null) {
if (isset($data["integer"])) {
- $this->integer = $data["integer"];
+ $this->container['integer'] = $data["integer"];
}
if (isset($data["int32"])) {
- $this->int32 = $data["int32"];
+ $this->container['int32'] = $data["int32"];
}
if (isset($data["int64"])) {
- $this->int64 = $data["int64"];
+ $this->container['int64'] = $data["int64"];
}
if (isset($data["number"])) {
- $this->number = $data["number"];
+ $this->container['number'] = $data["number"];
}
if (isset($data["float"])) {
- $this->float = $data["float"];
+ $this->container['float'] = $data["float"];
}
if (isset($data["double"])) {
- $this->double = $data["double"];
+ $this->container['double'] = $data["double"];
}
if (isset($data["string"])) {
- $this->string = $data["string"];
+ $this->container['string'] = $data["string"];
}
if (isset($data["byte"])) {
- $this->byte = $data["byte"];
+ $this->container['byte'] = $data["byte"];
}
if (isset($data["binary"])) {
- $this->binary = $data["binary"];
+ $this->container['binary'] = $data["binary"];
}
if (isset($data["date"])) {
- $this->date = $data["date"];
+ $this->container['date'] = $data["date"];
}
if (isset($data["date_time"])) {
- $this->date_time = $data["date_time"];
+ $this->container['date_time'] = $data["date_time"];
+ }
+ if (isset($data["uuid"])) {
+ $this->container['uuid'] = $data["uuid"];
}
if (isset($data["password"])) {
- $this->password = $data["password"];
+ $this->container['password'] = $data["password"];
}
}
}
@@ -326,6 +360,8 @@ class FormatTest implements ArrayAccess
+
+
if ($this->password === null) {
$invalid_properties[] = "'$password' can't be null";
}
@@ -413,6 +449,8 @@ class FormatTest implements ArrayAccess
+
+
if ($this->password === null) {
return false;
}
@@ -434,9 +472,9 @@ class FormatTest implements ArrayAccess
*/
public function getInteger()
{
- return $this->integer;
+ return $this->container['integer'];
}
-
+
/**
* Sets integer
* @param int $integer
@@ -446,6 +484,7 @@ class FormatTest implements ArrayAccess
{
+
if ($integer > 100.0) {
throw new \InvalidArgumentException('invalid value for $integer when calling FormatTest., must be smaller than or equal to 100.0.');
}
@@ -453,7 +492,8 @@ class FormatTest implements ArrayAccess
throw new \InvalidArgumentException('invalid value for $integer when calling FormatTest., must be bigger than or equal to 10.0.');
}
- $this->integer = $integer;
+ $this->container['integer'] = $integer;
+
return $this;
}
/**
@@ -462,9 +502,9 @@ class FormatTest implements ArrayAccess
*/
public function getInt32()
{
- return $this->int32;
+ return $this->container['int32'];
}
-
+
/**
* Sets int32
* @param int $int32
@@ -474,6 +514,7 @@ class FormatTest implements ArrayAccess
{
+
if ($int32 > 200.0) {
throw new \InvalidArgumentException('invalid value for $int32 when calling FormatTest., must be smaller than or equal to 200.0.');
}
@@ -481,7 +522,8 @@ class FormatTest implements ArrayAccess
throw new \InvalidArgumentException('invalid value for $int32 when calling FormatTest., must be bigger than or equal to 20.0.');
}
- $this->int32 = $int32;
+ $this->container['int32'] = $int32;
+
return $this;
}
/**
@@ -490,9 +532,9 @@ class FormatTest implements ArrayAccess
*/
public function getInt64()
{
- return $this->int64;
+ return $this->container['int64'];
}
-
+
/**
* Sets int64
* @param int $int64
@@ -502,7 +544,9 @@ class FormatTest implements ArrayAccess
{
- $this->int64 = $int64;
+
+ $this->container['int64'] = $int64;
+
return $this;
}
/**
@@ -511,9 +555,9 @@ class FormatTest implements ArrayAccess
*/
public function getNumber()
{
- return $this->number;
+ return $this->container['number'];
}
-
+
/**
* Sets number
* @param float $number
@@ -523,6 +567,7 @@ class FormatTest implements ArrayAccess
{
+
if ($number > 543.2) {
throw new \InvalidArgumentException('invalid value for $number when calling FormatTest., must be smaller than or equal to 543.2.');
}
@@ -530,7 +575,8 @@ class FormatTest implements ArrayAccess
throw new \InvalidArgumentException('invalid value for $number when calling FormatTest., must be bigger than or equal to 32.1.');
}
- $this->number = $number;
+ $this->container['number'] = $number;
+
return $this;
}
/**
@@ -539,9 +585,9 @@ class FormatTest implements ArrayAccess
*/
public function getFloat()
{
- return $this->float;
+ return $this->container['float'];
}
-
+
/**
* Sets float
* @param float $float
@@ -551,6 +597,7 @@ class FormatTest implements ArrayAccess
{
+
if ($float > 987.6) {
throw new \InvalidArgumentException('invalid value for $float when calling FormatTest., must be smaller than or equal to 987.6.');
}
@@ -558,7 +605,8 @@ class FormatTest implements ArrayAccess
throw new \InvalidArgumentException('invalid value for $float when calling FormatTest., must be bigger than or equal to 54.3.');
}
- $this->float = $float;
+ $this->container['float'] = $float;
+
return $this;
}
/**
@@ -567,9 +615,9 @@ class FormatTest implements ArrayAccess
*/
public function getDouble()
{
- return $this->double;
+ return $this->container['double'];
}
-
+
/**
* Sets double
* @param double $double
@@ -579,6 +627,7 @@ class FormatTest implements ArrayAccess
{
+
if ($double > 123.4) {
throw new \InvalidArgumentException('invalid value for $double when calling FormatTest., must be smaller than or equal to 123.4.');
}
@@ -586,7 +635,8 @@ class FormatTest implements ArrayAccess
throw new \InvalidArgumentException('invalid value for $double when calling FormatTest., must be bigger than or equal to 67.8.');
}
- $this->double = $double;
+ $this->container['double'] = $double;
+
return $this;
}
/**
@@ -595,9 +645,9 @@ class FormatTest implements ArrayAccess
*/
public function getString()
{
- return $this->string;
+ return $this->container['string'];
}
-
+
/**
* Sets string
* @param string $string
@@ -607,11 +657,13 @@ class FormatTest implements ArrayAccess
{
+
if (!preg_match("/[a-z]/i", $string)) {
throw new \InvalidArgumentException('invalid value for $string when calling FormatTest., must be conform to the pattern /[a-z]/i.');
}
- $this->string = $string;
+ $this->container['string'] = $string;
+
return $this;
}
/**
@@ -620,9 +672,9 @@ class FormatTest implements ArrayAccess
*/
public function getByte()
{
- return $this->byte;
+ return $this->container['byte'];
}
-
+
/**
* Sets byte
* @param string $byte
@@ -632,7 +684,9 @@ class FormatTest implements ArrayAccess
{
- $this->byte = $byte;
+
+ $this->container['byte'] = $byte;
+
return $this;
}
/**
@@ -641,9 +695,9 @@ class FormatTest implements ArrayAccess
*/
public function getBinary()
{
- return $this->binary;
+ return $this->container['binary'];
}
-
+
/**
* Sets binary
* @param string $binary
@@ -653,7 +707,9 @@ class FormatTest implements ArrayAccess
{
- $this->binary = $binary;
+
+ $this->container['binary'] = $binary;
+
return $this;
}
/**
@@ -662,9 +718,9 @@ class FormatTest implements ArrayAccess
*/
public function getDate()
{
- return $this->date;
+ return $this->container['date'];
}
-
+
/**
* Sets date
* @param \DateTime $date
@@ -674,7 +730,9 @@ class FormatTest implements ArrayAccess
{
- $this->date = $date;
+
+ $this->container['date'] = $date;
+
return $this;
}
/**
@@ -683,9 +741,9 @@ class FormatTest implements ArrayAccess
*/
public function getDateTime()
{
- return $this->date_time;
+ return $this->container['date_time'];
}
-
+
/**
* Sets date_time
* @param \DateTime $date_time
@@ -695,7 +753,32 @@ class FormatTest implements ArrayAccess
{
- $this->date_time = $date_time;
+
+ $this->container['date_time'] = $date_time;
+
+ return $this;
+ }
+ /**
+ * Gets uuid
+ * @return string
+ */
+ public function getUuid()
+ {
+ return $this->container['uuid'];
+ }
+
+ /**
+ * Sets uuid
+ * @param string $uuid
+ * @return $this
+ */
+ public function setUuid($uuid)
+ {
+
+
+
+ $this->container['uuid'] = $uuid;
+
return $this;
}
/**
@@ -704,9 +787,9 @@ class FormatTest implements ArrayAccess
*/
public function getPassword()
{
- return $this->password;
+ return $this->container['password'];
}
-
+
/**
* Sets password
* @param string $password
@@ -715,6 +798,7 @@ class FormatTest implements ArrayAccess
public function setPassword($password)
{
+
if (strlen($password) > 64) {
throw new \InvalidArgumentException('invalid length for $password when calling FormatTest., must be smaller than or equal to 64.');
}
@@ -722,7 +806,8 @@ class FormatTest implements ArrayAccess
throw new \InvalidArgumentException('invalid length for $password when calling FormatTest., must be bigger than or equal to 10.');
}
- $this->password = $password;
+ $this->container['password'] = $password;
+
return $this;
}
/**
@@ -732,9 +817,9 @@ class FormatTest implements ArrayAccess
*/
public function offsetExists($offset)
{
- return isset($this->$offset);
+ return isset($this->container[$offset]);
}
-
+
/**
* Gets offset.
* @param integer $offset Offset
@@ -742,9 +827,9 @@ class FormatTest implements ArrayAccess
*/
public function offsetGet($offset)
{
- return $this->$offset;
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
-
+
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -753,9 +838,13 @@ class FormatTest implements ArrayAccess
*/
public function offsetSet($offset, $value)
{
- $this->$offset = $value;
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
}
-
+
/**
* Unsets offset.
* @param integer $offset Offset
@@ -763,9 +852,9 @@ class FormatTest implements ArrayAccess
*/
public function offsetUnset($offset)
{
- unset($this->$offset);
+ unset($this->container[$offset]);
}
-
+
/**
* Gets the string presentation of the object
* @return string
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/InlineResponse200.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/InlineResponse200.php
index 3bd2106ba0e5..d66a078a4e0d 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/InlineResponse200.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/InlineResponse200.php
@@ -47,15 +47,9 @@ use \ArrayAccess;
class InlineResponse200 implements ArrayAccess
{
/**
- * The original name of the model.
- * @var string
- */
- static $swaggerModelName = 'inline_response_200';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- * @var string[]
- */
+ * Array of property to type mappings. Used for (de)serialization
+ * @var string[]
+ */
static $swaggerTypes = array(
'tags' => '\Swagger\Client\Model\Tag[]',
'id' => 'int',
@@ -64,15 +58,15 @@ class InlineResponse200 implements ArrayAccess
'name' => 'string',
'photo_urls' => 'string[]'
);
-
+
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
- * Array of attributes where the key is the local name, and the value is the original name
- * @var string[]
- */
+ * Array of attributes where the key is the local name, and the value is the original name
+ * @var string[]
+ */
static $attributeMap = array(
'tags' => 'tags',
'id' => 'id',
@@ -81,15 +75,15 @@ class InlineResponse200 implements ArrayAccess
'name' => 'name',
'photo_urls' => 'photoUrls'
);
-
+
static function attributeMap() {
return self::$attributeMap;
}
/**
- * Array of attributes to setter functions (for deserialization of responses)
- * @var string[]
- */
+ * Array of attributes to setter functions (for deserialization of responses)
+ * @var string[]
+ */
static $setters = array(
'tags' => 'setTags',
'id' => 'setId',
@@ -98,15 +92,15 @@ class InlineResponse200 implements ArrayAccess
'name' => 'setName',
'photo_urls' => 'setPhotoUrls'
);
-
+
static function setters() {
return self::$setters;
}
/**
- * Array of attributes to getter functions (for serialization of requests)
- * @var string[]
- */
+ * Array of attributes to getter functions (for serialization of requests)
+ * @var string[]
+ */
static $getters = array(
'tags' => 'getTags',
'id' => 'getId',
@@ -115,41 +109,67 @@ class InlineResponse200 implements ArrayAccess
'name' => 'getName',
'photo_urls' => 'getPhotoUrls'
);
-
+
static function getters() {
return self::$getters;
}
+ const STATUS_AVAILABLE = 'available';
+ const STATUS_PENDING = 'pending';
+ const STATUS_SOLD = 'sold';
+
+
+
/**
- * $tags
- * @var \Swagger\Client\Model\Tag[]
- */
+ * Gets allowable values of the enum
+ * @return string[]
+ */
+ public function getStatusAllowableValues() {
+ return [
+ self::STATUS_AVAILABLE,
+ self::STATUS_PENDING,
+ self::STATUS_SOLD,
+ ];
+ }
+
+
+
+ /**
+ * $tags
+ * @var \Swagger\Client\Model\Tag[]
+ */
protected $tags;
+
/**
- * $id
- * @var int
- */
+ * $id
+ * @var int
+ */
protected $id;
+
/**
- * $category
- * @var object
- */
+ * $category
+ * @var object
+ */
protected $category;
+
/**
- * $status pet status in the store
- * @var string
- */
+ * $status pet status in the store
+ * @var string
+ */
protected $status;
+
/**
- * $name
- * @var string
- */
+ * $name
+ * @var string
+ */
protected $name;
+
/**
- * $photo_urls
- * @var string[]
- */
+ * $photo_urls
+ * @var string[]
+ */
protected $photo_urls;
+
/**
* Constructor
@@ -158,7 +178,6 @@ class InlineResponse200 implements ArrayAccess
public function __construct(array $data = null)
{
-
if ($data != null) {
$this->tags = $data["tags"];
$this->id = $data["id"];
@@ -168,17 +187,18 @@ class InlineResponse200 implements ArrayAccess
$this->photo_urls = $data["photo_urls"];
}
}
+
/**
- * Gets tags
+ * Gets tags.
* @return \Swagger\Client\Model\Tag[]
*/
public function getTags()
{
return $this->tags;
}
-
+
/**
- * Sets tags
+ * Sets tags.
* @param \Swagger\Client\Model\Tag[] $tags
* @return $this
*/
@@ -188,17 +208,18 @@ class InlineResponse200 implements ArrayAccess
$this->tags = $tags;
return $this;
}
+
/**
- * Gets id
+ * Gets id.
* @return int
*/
public function getId()
{
return $this->id;
}
-
+
/**
- * Sets id
+ * Sets id.
* @param int $id
* @return $this
*/
@@ -208,17 +229,18 @@ class InlineResponse200 implements ArrayAccess
$this->id = $id;
return $this;
}
+
/**
- * Gets category
+ * Gets category.
* @return object
*/
public function getCategory()
{
return $this->category;
}
-
+
/**
- * Sets category
+ * Sets category.
* @param object $category
* @return $this
*/
@@ -228,17 +250,18 @@ class InlineResponse200 implements ArrayAccess
$this->category = $category;
return $this;
}
+
/**
- * Gets status
+ * Gets status.
* @return string
*/
public function getStatus()
{
return $this->status;
}
-
+
/**
- * Sets status
+ * Sets status.
* @param string $status pet status in the store
* @return $this
*/
@@ -251,17 +274,18 @@ class InlineResponse200 implements ArrayAccess
$this->status = $status;
return $this;
}
+
/**
- * Gets name
+ * Gets name.
* @return string
*/
public function getName()
{
return $this->name;
}
-
+
/**
- * Sets name
+ * Sets name.
* @param string $name
* @return $this
*/
@@ -271,17 +295,18 @@ class InlineResponse200 implements ArrayAccess
$this->name = $name;
return $this;
}
+
/**
- * Gets photo_urls
+ * Gets photo_urls.
* @return string[]
*/
public function getPhotoUrls()
{
return $this->photo_urls;
}
-
+
/**
- * Sets photo_urls
+ * Sets photo_urls.
* @param string[] $photo_urls
* @return $this
*/
@@ -291,6 +316,7 @@ class InlineResponse200 implements ArrayAccess
$this->photo_urls = $photo_urls;
return $this;
}
+
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@@ -300,7 +326,7 @@ class InlineResponse200 implements ArrayAccess
{
return isset($this->$offset);
}
-
+
/**
* Gets offset.
* @param integer $offset Offset
@@ -310,7 +336,7 @@ class InlineResponse200 implements ArrayAccess
{
return $this->$offset;
}
-
+
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -321,7 +347,7 @@ class InlineResponse200 implements ArrayAccess
{
$this->$offset = $value;
}
-
+
/**
* Unsets offset.
* @param integer $offset Offset
@@ -331,17 +357,19 @@ class InlineResponse200 implements ArrayAccess
{
unset($this->$offset);
}
-
+
/**
- * Gets the string presentation of the object
+ * Gets the string presentation of the object.
* @return string
*/
public function __toString()
{
- if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
+ if (defined('JSON_PRETTY_PRINT')) {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
+ } else {
+ return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
-
- return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
+
+?>
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php
index 1ee9011b8f74..263311b9d31d 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php
@@ -59,52 +59,62 @@ class Model200Response implements ArrayAccess
static $swaggerTypes = array(
'name' => 'int'
);
-
+
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
- * Array of attributes where the key is the local name, and the value is the original name
- * @var string[]
- */
+ * Array of attributes where the key is the local name, and the value is the original name
+ * @var string[]
+ */
static $attributeMap = array(
'name' => 'name'
);
-
+
static function attributeMap() {
return self::$attributeMap;
}
/**
- * Array of attributes to setter functions (for deserialization of responses)
- * @var string[]
- */
+ * Array of attributes to setter functions (for deserialization of responses)
+ * @var string[]
+ */
static $setters = array(
'name' => 'setName'
);
-
+
static function setters() {
return self::$setters;
}
/**
- * Array of attributes to getter functions (for serialization of requests)
- * @var string[]
- */
+ * Array of attributes to getter functions (for serialization of requests)
+ * @var string[]
+ */
static $getters = array(
'name' => 'getName'
);
-
+
static function getters() {
return self::$getters;
}
+
+
+
+
/**
- * $name
- * @var int
- */
- protected $name;
+ * Associative array for storing property values
+ * @var mixed[]
+ */
+ protected $container = array(
+ /**
+ * $container['name']
+ * @var int
+ */
+ 'name' => null,
+ );
/**
* Constructor
@@ -116,7 +126,7 @@ class Model200Response implements ArrayAccess
if ($data != null) {
if (isset($data["name"])) {
- $this->name = $data["name"];
+ $this->container['name'] = $data["name"];
}
}
}
@@ -156,9 +166,9 @@ class Model200Response implements ArrayAccess
*/
public function getName()
{
- return $this->name;
+ return $this->container['name'];
}
-
+
/**
* Sets name
* @param int $name
@@ -168,7 +178,9 @@ class Model200Response implements ArrayAccess
{
- $this->name = $name;
+
+ $this->container['name'] = $name;
+
return $this;
}
/**
@@ -178,9 +190,9 @@ class Model200Response implements ArrayAccess
*/
public function offsetExists($offset)
{
- return isset($this->$offset);
+ return isset($this->container[$offset]);
}
-
+
/**
* Gets offset.
* @param integer $offset Offset
@@ -188,9 +200,9 @@ class Model200Response implements ArrayAccess
*/
public function offsetGet($offset)
{
- return $this->$offset;
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
-
+
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -199,9 +211,13 @@ class Model200Response implements ArrayAccess
*/
public function offsetSet($offset, $value)
{
- $this->$offset = $value;
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
}
-
+
/**
* Unsets offset.
* @param integer $offset Offset
@@ -209,9 +225,9 @@ class Model200Response implements ArrayAccess
*/
public function offsetUnset($offset)
{
- unset($this->$offset);
+ unset($this->container[$offset]);
}
-
+
/**
* Gets the string presentation of the object
* @return string
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php
index d15f82a5057f..15298ff50eb0 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php
@@ -59,52 +59,62 @@ class ModelReturn implements ArrayAccess
static $swaggerTypes = array(
'return' => 'int'
);
-
+
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
- * Array of attributes where the key is the local name, and the value is the original name
- * @var string[]
- */
+ * Array of attributes where the key is the local name, and the value is the original name
+ * @var string[]
+ */
static $attributeMap = array(
'return' => 'return'
);
-
+
static function attributeMap() {
return self::$attributeMap;
}
/**
- * Array of attributes to setter functions (for deserialization of responses)
- * @var string[]
- */
+ * Array of attributes to setter functions (for deserialization of responses)
+ * @var string[]
+ */
static $setters = array(
'return' => 'setReturn'
);
-
+
static function setters() {
return self::$setters;
}
/**
- * Array of attributes to getter functions (for serialization of requests)
- * @var string[]
- */
+ * Array of attributes to getter functions (for serialization of requests)
+ * @var string[]
+ */
static $getters = array(
'return' => 'getReturn'
);
-
+
static function getters() {
return self::$getters;
}
+
+
+
+
/**
- * $return
- * @var int
- */
- protected $return;
+ * Associative array for storing property values
+ * @var mixed[]
+ */
+ protected $container = array(
+ /**
+ * $container['return']
+ * @var int
+ */
+ 'return' => null,
+ );
/**
* Constructor
@@ -116,7 +126,7 @@ class ModelReturn implements ArrayAccess
if ($data != null) {
if (isset($data["return"])) {
- $this->return = $data["return"];
+ $this->container['return'] = $data["return"];
}
}
}
@@ -156,9 +166,9 @@ class ModelReturn implements ArrayAccess
*/
public function getReturn()
{
- return $this->return;
+ return $this->container['return'];
}
-
+
/**
* Sets return
* @param int $return
@@ -168,7 +178,9 @@ class ModelReturn implements ArrayAccess
{
- $this->return = $return;
+
+ $this->container['return'] = $return;
+
return $this;
}
/**
@@ -178,9 +190,9 @@ class ModelReturn implements ArrayAccess
*/
public function offsetExists($offset)
{
- return isset($this->$offset);
+ return isset($this->container[$offset]);
}
-
+
/**
* Gets offset.
* @param integer $offset Offset
@@ -188,9 +200,9 @@ class ModelReturn implements ArrayAccess
*/
public function offsetGet($offset)
{
- return $this->$offset;
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
-
+
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -199,9 +211,13 @@ class ModelReturn implements ArrayAccess
*/
public function offsetSet($offset, $value)
{
- $this->$offset = $value;
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
}
-
+
/**
* Unsets offset.
* @param integer $offset Offset
@@ -209,9 +225,9 @@ class ModelReturn implements ArrayAccess
*/
public function offsetUnset($offset)
{
- unset($this->$offset);
+ unset($this->container[$offset]);
}
-
+
/**
* Gets the string presentation of the object
* @return string
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php
index 991ab945b4e4..5d1625008894 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php
@@ -61,68 +61,80 @@ class Name implements ArrayAccess
'snake_case' => 'int',
'property' => 'string'
);
-
+
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
- * Array of attributes where the key is the local name, and the value is the original name
- * @var string[]
- */
+ * Array of attributes where the key is the local name, and the value is the original name
+ * @var string[]
+ */
static $attributeMap = array(
'name' => 'name',
'snake_case' => 'snake_case',
'property' => 'property'
);
-
+
static function attributeMap() {
return self::$attributeMap;
}
/**
- * Array of attributes to setter functions (for deserialization of responses)
- * @var string[]
- */
+ * Array of attributes to setter functions (for deserialization of responses)
+ * @var string[]
+ */
static $setters = array(
'name' => 'setName',
'snake_case' => 'setSnakeCase',
'property' => 'setProperty'
);
-
+
static function setters() {
return self::$setters;
}
/**
- * Array of attributes to getter functions (for serialization of requests)
- * @var string[]
- */
+ * Array of attributes to getter functions (for serialization of requests)
+ * @var string[]
+ */
static $getters = array(
'name' => 'getName',
'snake_case' => 'getSnakeCase',
'property' => 'getProperty'
);
-
+
static function getters() {
return self::$getters;
}
+
+
+
+
/**
- * $name
- * @var int
- */
- protected $name;
- /**
- * $snake_case
- * @var int
- */
- protected $snake_case;
- /**
- * $property
- * @var string
- */
- protected $property;
+ * Associative array for storing property values
+ * @var mixed[]
+ */
+ protected $container = array(
+ /**
+ * $container['name']
+ * @var int
+ */
+ 'name' => null,
+
+ /**
+ * $container['snake_case']
+ * @var int
+ */
+ 'snake_case' => null,
+
+ /**
+ * $container['property']
+ * @var string
+ */
+ 'property' => null,
+ );
/**
* Constructor
@@ -134,13 +146,13 @@ class Name implements ArrayAccess
if ($data != null) {
if (isset($data["name"])) {
- $this->name = $data["name"];
+ $this->container['name'] = $data["name"];
}
if (isset($data["snake_case"])) {
- $this->snake_case = $data["snake_case"];
+ $this->container['snake_case'] = $data["snake_case"];
}
if (isset($data["property"])) {
- $this->property = $data["property"];
+ $this->container['property'] = $data["property"];
}
}
}
@@ -194,9 +206,9 @@ class Name implements ArrayAccess
*/
public function getName()
{
- return $this->name;
+ return $this->container['name'];
}
-
+
/**
* Sets name
* @param int $name
@@ -206,7 +218,9 @@ class Name implements ArrayAccess
{
- $this->name = $name;
+
+ $this->container['name'] = $name;
+
return $this;
}
/**
@@ -215,9 +229,9 @@ class Name implements ArrayAccess
*/
public function getSnakeCase()
{
- return $this->snake_case;
+ return $this->container['snake_case'];
}
-
+
/**
* Sets snake_case
* @param int $snake_case
@@ -227,7 +241,9 @@ class Name implements ArrayAccess
{
- $this->snake_case = $snake_case;
+
+ $this->container['snake_case'] = $snake_case;
+
return $this;
}
/**
@@ -236,9 +252,9 @@ class Name implements ArrayAccess
*/
public function getProperty()
{
- return $this->property;
+ return $this->container['property'];
}
-
+
/**
* Sets property
* @param string $property
@@ -248,7 +264,9 @@ class Name implements ArrayAccess
{
- $this->property = $property;
+
+ $this->container['property'] = $property;
+
return $this;
}
/**
@@ -258,9 +276,9 @@ class Name implements ArrayAccess
*/
public function offsetExists($offset)
{
- return isset($this->$offset);
+ return isset($this->container[$offset]);
}
-
+
/**
* Gets offset.
* @param integer $offset Offset
@@ -268,9 +286,9 @@ class Name implements ArrayAccess
*/
public function offsetGet($offset)
{
- return $this->$offset;
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
-
+
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -279,9 +297,13 @@ class Name implements ArrayAccess
*/
public function offsetSet($offset, $value)
{
- $this->$offset = $value;
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
}
-
+
/**
* Unsets offset.
* @param integer $offset Offset
@@ -289,9 +311,9 @@ class Name implements ArrayAccess
*/
public function offsetUnset($offset)
{
- unset($this->$offset);
+ unset($this->container[$offset]);
}
-
+
/**
* Gets the string presentation of the object
* @return string
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php
index a7b6b22f4c74..9928ddeea0ba 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php
@@ -64,15 +64,15 @@ class Order implements ArrayAccess
'status' => 'string',
'complete' => 'bool'
);
-
+
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
- * Array of attributes where the key is the local name, and the value is the original name
- * @var string[]
- */
+ * Array of attributes where the key is the local name, and the value is the original name
+ * @var string[]
+ */
static $attributeMap = array(
'id' => 'id',
'pet_id' => 'petId',
@@ -81,15 +81,15 @@ class Order implements ArrayAccess
'status' => 'status',
'complete' => 'complete'
);
-
+
static function attributeMap() {
return self::$attributeMap;
}
/**
- * Array of attributes to setter functions (for deserialization of responses)
- * @var string[]
- */
+ * Array of attributes to setter functions (for deserialization of responses)
+ * @var string[]
+ */
static $setters = array(
'id' => 'setId',
'pet_id' => 'setPetId',
@@ -98,15 +98,15 @@ class Order implements ArrayAccess
'status' => 'setStatus',
'complete' => 'setComplete'
);
-
+
static function setters() {
return self::$setters;
}
/**
- * Array of attributes to getter functions (for serialization of requests)
- * @var string[]
- */
+ * Array of attributes to getter functions (for serialization of requests)
+ * @var string[]
+ */
static $getters = array(
'id' => 'getId',
'pet_id' => 'getPetId',
@@ -115,41 +115,71 @@ class Order implements ArrayAccess
'status' => 'getStatus',
'complete' => 'getComplete'
);
-
+
static function getters() {
return self::$getters;
}
+ const STATUS_PLACED = 'placed';
+ const STATUS_APPROVED = 'approved';
+ const STATUS_DELIVERED = 'delivered';
+
+
+
/**
- * $id
- * @var int
- */
- protected $id;
+ * Gets allowable values of the enum
+ * @return string[]
+ */
+ public function getStatusAllowableValues() {
+ return [
+ self::STATUS_PLACED,
+ self::STATUS_APPROVED,
+ self::STATUS_DELIVERED,
+ ];
+ }
+
+
/**
- * $pet_id
- * @var int
- */
- protected $pet_id;
- /**
- * $quantity
- * @var int
- */
- protected $quantity;
- /**
- * $ship_date
- * @var \DateTime
- */
- protected $ship_date;
- /**
- * $status Order Status
- * @var string
- */
- protected $status;
- /**
- * $complete
- * @var bool
- */
- protected $complete = false;
+ * Associative array for storing property values
+ * @var mixed[]
+ */
+ protected $container = array(
+ /**
+ * $container['id']
+ * @var int
+ */
+ 'id' => null,
+
+ /**
+ * $container['pet_id']
+ * @var int
+ */
+ 'pet_id' => null,
+
+ /**
+ * $container['quantity']
+ * @var int
+ */
+ 'quantity' => null,
+
+ /**
+ * $container['ship_date']
+ * @var \DateTime
+ */
+ 'ship_date' => null,
+
+ /**
+ * $container['status'] Order Status
+ * @var string
+ */
+ 'status' => null,
+
+ /**
+ * $container['complete']
+ * @var bool
+ */
+ 'complete' => false,
+ );
/**
* Constructor
@@ -161,22 +191,22 @@ class Order implements ArrayAccess
if ($data != null) {
if (isset($data["id"])) {
- $this->id = $data["id"];
+ $this->container['id'] = $data["id"];
}
if (isset($data["pet_id"])) {
- $this->pet_id = $data["pet_id"];
+ $this->container['pet_id'] = $data["pet_id"];
}
if (isset($data["quantity"])) {
- $this->quantity = $data["quantity"];
+ $this->container['quantity'] = $data["quantity"];
}
if (isset($data["ship_date"])) {
- $this->ship_date = $data["ship_date"];
+ $this->container['ship_date'] = $data["ship_date"];
}
if (isset($data["status"])) {
- $this->status = $data["status"];
+ $this->container['status'] = $data["status"];
}
if (isset($data["complete"])) {
- $this->complete = $data["complete"];
+ $this->container['complete'] = $data["complete"];
}
}
}
@@ -242,9 +272,9 @@ class Order implements ArrayAccess
*/
public function getId()
{
- return $this->id;
+ return $this->container['id'];
}
-
+
/**
* Sets id
* @param int $id
@@ -254,7 +284,9 @@ class Order implements ArrayAccess
{
- $this->id = $id;
+
+ $this->container['id'] = $id;
+
return $this;
}
/**
@@ -263,9 +295,9 @@ class Order implements ArrayAccess
*/
public function getPetId()
{
- return $this->pet_id;
+ return $this->container['pet_id'];
}
-
+
/**
* Sets pet_id
* @param int $pet_id
@@ -275,7 +307,9 @@ class Order implements ArrayAccess
{
- $this->pet_id = $pet_id;
+
+ $this->container['pet_id'] = $pet_id;
+
return $this;
}
/**
@@ -284,9 +318,9 @@ class Order implements ArrayAccess
*/
public function getQuantity()
{
- return $this->quantity;
+ return $this->container['quantity'];
}
-
+
/**
* Sets quantity
* @param int $quantity
@@ -296,7 +330,9 @@ class Order implements ArrayAccess
{
- $this->quantity = $quantity;
+
+ $this->container['quantity'] = $quantity;
+
return $this;
}
/**
@@ -305,9 +341,9 @@ class Order implements ArrayAccess
*/
public function getShipDate()
{
- return $this->ship_date;
+ return $this->container['ship_date'];
}
-
+
/**
* Sets ship_date
* @param \DateTime $ship_date
@@ -317,7 +353,9 @@ class Order implements ArrayAccess
{
- $this->ship_date = $ship_date;
+
+ $this->container['ship_date'] = $ship_date;
+
return $this;
}
/**
@@ -326,9 +364,9 @@ class Order implements ArrayAccess
*/
public function getStatus()
{
- return $this->status;
+ return $this->container['status'];
}
-
+
/**
* Sets status
* @param string $status Order Status
@@ -336,12 +374,14 @@ class Order implements ArrayAccess
*/
public function setStatus($status)
{
- $allowed_values = array("placed", "approved", "delivered");
+ $allowed_values = array('placed', 'approved', 'delivered');
if (!in_array($status, $allowed_values)) {
throw new \InvalidArgumentException("Invalid value for 'status', must be one of 'placed', 'approved', 'delivered'");
}
- $this->status = $status;
+
+ $this->container['status'] = $status;
+
return $this;
}
/**
@@ -350,9 +390,9 @@ class Order implements ArrayAccess
*/
public function getComplete()
{
- return $this->complete;
+ return $this->container['complete'];
}
-
+
/**
* Sets complete
* @param bool $complete
@@ -362,7 +402,9 @@ class Order implements ArrayAccess
{
- $this->complete = $complete;
+
+ $this->container['complete'] = $complete;
+
return $this;
}
/**
@@ -372,9 +414,9 @@ class Order implements ArrayAccess
*/
public function offsetExists($offset)
{
- return isset($this->$offset);
+ return isset($this->container[$offset]);
}
-
+
/**
* Gets offset.
* @param integer $offset Offset
@@ -382,9 +424,9 @@ class Order implements ArrayAccess
*/
public function offsetGet($offset)
{
- return $this->$offset;
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
-
+
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -393,9 +435,13 @@ class Order implements ArrayAccess
*/
public function offsetSet($offset, $value)
{
- $this->$offset = $value;
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
}
-
+
/**
* Unsets offset.
* @param integer $offset Offset
@@ -403,9 +449,9 @@ class Order implements ArrayAccess
*/
public function offsetUnset($offset)
{
- unset($this->$offset);
+ unset($this->container[$offset]);
}
-
+
/**
* Gets the string presentation of the object
* @return string
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php
index 319d23a839e5..8fc13a040521 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php
@@ -64,15 +64,15 @@ class Pet implements ArrayAccess
'tags' => '\Swagger\Client\Model\Tag[]',
'status' => 'string'
);
-
+
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
- * Array of attributes where the key is the local name, and the value is the original name
- * @var string[]
- */
+ * Array of attributes where the key is the local name, and the value is the original name
+ * @var string[]
+ */
static $attributeMap = array(
'id' => 'id',
'category' => 'category',
@@ -81,15 +81,15 @@ class Pet implements ArrayAccess
'tags' => 'tags',
'status' => 'status'
);
-
+
static function attributeMap() {
return self::$attributeMap;
}
/**
- * Array of attributes to setter functions (for deserialization of responses)
- * @var string[]
- */
+ * Array of attributes to setter functions (for deserialization of responses)
+ * @var string[]
+ */
static $setters = array(
'id' => 'setId',
'category' => 'setCategory',
@@ -98,15 +98,15 @@ class Pet implements ArrayAccess
'tags' => 'setTags',
'status' => 'setStatus'
);
-
+
static function setters() {
return self::$setters;
}
/**
- * Array of attributes to getter functions (for serialization of requests)
- * @var string[]
- */
+ * Array of attributes to getter functions (for serialization of requests)
+ * @var string[]
+ */
static $getters = array(
'id' => 'getId',
'category' => 'getCategory',
@@ -115,41 +115,71 @@ class Pet implements ArrayAccess
'tags' => 'getTags',
'status' => 'getStatus'
);
-
+
static function getters() {
return self::$getters;
}
+ const STATUS_AVAILABLE = 'available';
+ const STATUS_PENDING = 'pending';
+ const STATUS_SOLD = 'sold';
+
+
+
/**
- * $id
- * @var int
- */
- protected $id;
+ * Gets allowable values of the enum
+ * @return string[]
+ */
+ public function getStatusAllowableValues() {
+ return [
+ self::STATUS_AVAILABLE,
+ self::STATUS_PENDING,
+ self::STATUS_SOLD,
+ ];
+ }
+
+
/**
- * $category
- * @var \Swagger\Client\Model\Category
- */
- protected $category;
- /**
- * $name
- * @var string
- */
- protected $name;
- /**
- * $photo_urls
- * @var string[]
- */
- protected $photo_urls;
- /**
- * $tags
- * @var \Swagger\Client\Model\Tag[]
- */
- protected $tags;
- /**
- * $status pet status in the store
- * @var string
- */
- protected $status;
+ * Associative array for storing property values
+ * @var mixed[]
+ */
+ protected $container = array(
+ /**
+ * $container['id']
+ * @var int
+ */
+ 'id' => null,
+
+ /**
+ * $container['category']
+ * @var \Swagger\Client\Model\Category
+ */
+ 'category' => null,
+
+ /**
+ * $container['name']
+ * @var string
+ */
+ 'name' => null,
+
+ /**
+ * $container['photo_urls']
+ * @var string[]
+ */
+ 'photo_urls' => null,
+
+ /**
+ * $container['tags']
+ * @var \Swagger\Client\Model\Tag[]
+ */
+ 'tags' => null,
+
+ /**
+ * $container['status'] pet status in the store
+ * @var string
+ */
+ 'status' => null,
+ );
/**
* Constructor
@@ -161,22 +191,22 @@ class Pet implements ArrayAccess
if ($data != null) {
if (isset($data["id"])) {
- $this->id = $data["id"];
+ $this->container['id'] = $data["id"];
}
if (isset($data["category"])) {
- $this->category = $data["category"];
+ $this->container['category'] = $data["category"];
}
if (isset($data["name"])) {
- $this->name = $data["name"];
+ $this->container['name'] = $data["name"];
}
if (isset($data["photo_urls"])) {
- $this->photo_urls = $data["photo_urls"];
+ $this->container['photo_urls'] = $data["photo_urls"];
}
if (isset($data["tags"])) {
- $this->tags = $data["tags"];
+ $this->container['tags'] = $data["tags"];
}
if (isset($data["status"])) {
- $this->status = $data["status"];
+ $this->container['status'] = $data["status"];
}
}
}
@@ -254,9 +284,9 @@ class Pet implements ArrayAccess
*/
public function getId()
{
- return $this->id;
+ return $this->container['id'];
}
-
+
/**
* Sets id
* @param int $id
@@ -266,7 +296,9 @@ class Pet implements ArrayAccess
{
- $this->id = $id;
+
+ $this->container['id'] = $id;
+
return $this;
}
/**
@@ -275,9 +307,9 @@ class Pet implements ArrayAccess
*/
public function getCategory()
{
- return $this->category;
+ return $this->container['category'];
}
-
+
/**
* Sets category
* @param \Swagger\Client\Model\Category $category
@@ -287,7 +319,9 @@ class Pet implements ArrayAccess
{
- $this->category = $category;
+
+ $this->container['category'] = $category;
+
return $this;
}
/**
@@ -296,9 +330,9 @@ class Pet implements ArrayAccess
*/
public function getName()
{
- return $this->name;
+ return $this->container['name'];
}
-
+
/**
* Sets name
* @param string $name
@@ -308,7 +342,9 @@ class Pet implements ArrayAccess
{
- $this->name = $name;
+
+ $this->container['name'] = $name;
+
return $this;
}
/**
@@ -317,9 +353,9 @@ class Pet implements ArrayAccess
*/
public function getPhotoUrls()
{
- return $this->photo_urls;
+ return $this->container['photo_urls'];
}
-
+
/**
* Sets photo_urls
* @param string[] $photo_urls
@@ -329,7 +365,9 @@ class Pet implements ArrayAccess
{
- $this->photo_urls = $photo_urls;
+
+ $this->container['photo_urls'] = $photo_urls;
+
return $this;
}
/**
@@ -338,9 +376,9 @@ class Pet implements ArrayAccess
*/
public function getTags()
{
- return $this->tags;
+ return $this->container['tags'];
}
-
+
/**
* Sets tags
* @param \Swagger\Client\Model\Tag[] $tags
@@ -350,7 +388,9 @@ class Pet implements ArrayAccess
{
- $this->tags = $tags;
+
+ $this->container['tags'] = $tags;
+
return $this;
}
/**
@@ -359,9 +399,9 @@ class Pet implements ArrayAccess
*/
public function getStatus()
{
- return $this->status;
+ return $this->container['status'];
}
-
+
/**
* Sets status
* @param string $status pet status in the store
@@ -369,12 +409,14 @@ class Pet implements ArrayAccess
*/
public function setStatus($status)
{
- $allowed_values = array("available", "pending", "sold");
+ $allowed_values = array('available', 'pending', 'sold');
if (!in_array($status, $allowed_values)) {
throw new \InvalidArgumentException("Invalid value for 'status', must be one of 'available', 'pending', 'sold'");
}
- $this->status = $status;
+
+ $this->container['status'] = $status;
+
return $this;
}
/**
@@ -384,9 +426,9 @@ class Pet implements ArrayAccess
*/
public function offsetExists($offset)
{
- return isset($this->$offset);
+ return isset($this->container[$offset]);
}
-
+
/**
* Gets offset.
* @param integer $offset Offset
@@ -394,9 +436,9 @@ class Pet implements ArrayAccess
*/
public function offsetGet($offset)
{
- return $this->$offset;
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
-
+
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -405,9 +447,13 @@ class Pet implements ArrayAccess
*/
public function offsetSet($offset, $value)
{
- $this->$offset = $value;
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
}
-
+
/**
* Unsets offset.
* @param integer $offset Offset
@@ -415,9 +461,9 @@ class Pet implements ArrayAccess
*/
public function offsetUnset($offset)
{
- unset($this->$offset);
+ unset($this->container[$offset]);
}
-
+
/**
* Gets the string presentation of the object
* @return string
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php
index 200470d99d27..680868dbd0b7 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php
@@ -59,52 +59,62 @@ class SpecialModelName implements ArrayAccess
static $swaggerTypes = array(
'special_property_name' => 'int'
);
-
+
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
- * Array of attributes where the key is the local name, and the value is the original name
- * @var string[]
- */
+ * Array of attributes where the key is the local name, and the value is the original name
+ * @var string[]
+ */
static $attributeMap = array(
'special_property_name' => '$special[property.name]'
);
-
+
static function attributeMap() {
return self::$attributeMap;
}
/**
- * Array of attributes to setter functions (for deserialization of responses)
- * @var string[]
- */
+ * Array of attributes to setter functions (for deserialization of responses)
+ * @var string[]
+ */
static $setters = array(
'special_property_name' => 'setSpecialPropertyName'
);
-
+
static function setters() {
return self::$setters;
}
/**
- * Array of attributes to getter functions (for serialization of requests)
- * @var string[]
- */
+ * Array of attributes to getter functions (for serialization of requests)
+ * @var string[]
+ */
static $getters = array(
'special_property_name' => 'getSpecialPropertyName'
);
-
+
static function getters() {
return self::$getters;
}
+
+
+
+
/**
- * $special_property_name
- * @var int
- */
- protected $special_property_name;
+ * Associative array for storing property values
+ * @var mixed[]
+ */
+ protected $container = array(
+ /**
+ * $container['special_property_name']
+ * @var int
+ */
+ 'special_property_name' => null,
+ );
/**
* Constructor
@@ -116,7 +126,7 @@ class SpecialModelName implements ArrayAccess
if ($data != null) {
if (isset($data["special_property_name"])) {
- $this->special_property_name = $data["special_property_name"];
+ $this->container['special_property_name'] = $data["special_property_name"];
}
}
}
@@ -156,9 +166,9 @@ class SpecialModelName implements ArrayAccess
*/
public function getSpecialPropertyName()
{
- return $this->special_property_name;
+ return $this->container['special_property_name'];
}
-
+
/**
* Sets special_property_name
* @param int $special_property_name
@@ -168,7 +178,9 @@ class SpecialModelName implements ArrayAccess
{
- $this->special_property_name = $special_property_name;
+
+ $this->container['special_property_name'] = $special_property_name;
+
return $this;
}
/**
@@ -178,9 +190,9 @@ class SpecialModelName implements ArrayAccess
*/
public function offsetExists($offset)
{
- return isset($this->$offset);
+ return isset($this->container[$offset]);
}
-
+
/**
* Gets offset.
* @param integer $offset Offset
@@ -188,9 +200,9 @@ class SpecialModelName implements ArrayAccess
*/
public function offsetGet($offset)
{
- return $this->$offset;
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
-
+
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -199,9 +211,13 @@ class SpecialModelName implements ArrayAccess
*/
public function offsetSet($offset, $value)
{
- $this->$offset = $value;
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
}
-
+
/**
* Unsets offset.
* @param integer $offset Offset
@@ -209,9 +225,9 @@ class SpecialModelName implements ArrayAccess
*/
public function offsetUnset($offset)
{
- unset($this->$offset);
+ unset($this->container[$offset]);
}
-
+
/**
* Gets the string presentation of the object
* @return string
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php
index e493bdfd3e39..69c853bbef34 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php
@@ -60,60 +60,71 @@ class Tag implements ArrayAccess
'id' => 'int',
'name' => 'string'
);
-
+
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
- * Array of attributes where the key is the local name, and the value is the original name
- * @var string[]
- */
+ * Array of attributes where the key is the local name, and the value is the original name
+ * @var string[]
+ */
static $attributeMap = array(
'id' => 'id',
'name' => 'name'
);
-
+
static function attributeMap() {
return self::$attributeMap;
}
/**
- * Array of attributes to setter functions (for deserialization of responses)
- * @var string[]
- */
+ * Array of attributes to setter functions (for deserialization of responses)
+ * @var string[]
+ */
static $setters = array(
'id' => 'setId',
'name' => 'setName'
);
-
+
static function setters() {
return self::$setters;
}
/**
- * Array of attributes to getter functions (for serialization of requests)
- * @var string[]
- */
+ * Array of attributes to getter functions (for serialization of requests)
+ * @var string[]
+ */
static $getters = array(
'id' => 'getId',
'name' => 'getName'
);
-
+
static function getters() {
return self::$getters;
}
+
+
+
+
/**
- * $id
- * @var int
- */
- protected $id;
- /**
- * $name
- * @var string
- */
- protected $name;
+ * Associative array for storing property values
+ * @var mixed[]
+ */
+ protected $container = array(
+ /**
+ * $container['id']
+ * @var int
+ */
+ 'id' => null,
+
+ /**
+ * $container['name']
+ * @var string
+ */
+ 'name' => null,
+ );
/**
* Constructor
@@ -125,10 +136,10 @@ class Tag implements ArrayAccess
if ($data != null) {
if (isset($data["id"])) {
- $this->id = $data["id"];
+ $this->container['id'] = $data["id"];
}
if (isset($data["name"])) {
- $this->name = $data["name"];
+ $this->container['name'] = $data["name"];
}
}
}
@@ -172,9 +183,9 @@ class Tag implements ArrayAccess
*/
public function getId()
{
- return $this->id;
+ return $this->container['id'];
}
-
+
/**
* Sets id
* @param int $id
@@ -184,7 +195,9 @@ class Tag implements ArrayAccess
{
- $this->id = $id;
+
+ $this->container['id'] = $id;
+
return $this;
}
/**
@@ -193,9 +206,9 @@ class Tag implements ArrayAccess
*/
public function getName()
{
- return $this->name;
+ return $this->container['name'];
}
-
+
/**
* Sets name
* @param string $name
@@ -205,7 +218,9 @@ class Tag implements ArrayAccess
{
- $this->name = $name;
+
+ $this->container['name'] = $name;
+
return $this;
}
/**
@@ -215,9 +230,9 @@ class Tag implements ArrayAccess
*/
public function offsetExists($offset)
{
- return isset($this->$offset);
+ return isset($this->container[$offset]);
}
-
+
/**
* Gets offset.
* @param integer $offset Offset
@@ -225,9 +240,9 @@ class Tag implements ArrayAccess
*/
public function offsetGet($offset)
{
- return $this->$offset;
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
-
+
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -236,9 +251,13 @@ class Tag implements ArrayAccess
*/
public function offsetSet($offset, $value)
{
- $this->$offset = $value;
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
}
-
+
/**
* Unsets offset.
* @param integer $offset Offset
@@ -246,9 +265,9 @@ class Tag implements ArrayAccess
*/
public function offsetUnset($offset)
{
- unset($this->$offset);
+ unset($this->container[$offset]);
}
-
+
/**
* Gets the string presentation of the object
* @return string
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php
index 3b09cea0fd23..4ca0b8fb3e1d 100644
--- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php
@@ -66,15 +66,15 @@ class User implements ArrayAccess
'phone' => 'string',
'user_status' => 'int'
);
-
+
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
- * Array of attributes where the key is the local name, and the value is the original name
- * @var string[]
- */
+ * Array of attributes where the key is the local name, and the value is the original name
+ * @var string[]
+ */
static $attributeMap = array(
'id' => 'id',
'username' => 'username',
@@ -85,15 +85,15 @@ class User implements ArrayAccess
'phone' => 'phone',
'user_status' => 'userStatus'
);
-
+
static function attributeMap() {
return self::$attributeMap;
}
/**
- * Array of attributes to setter functions (for deserialization of responses)
- * @var string[]
- */
+ * Array of attributes to setter functions (for deserialization of responses)
+ * @var string[]
+ */
static $setters = array(
'id' => 'setId',
'username' => 'setUsername',
@@ -104,15 +104,15 @@ class User implements ArrayAccess
'phone' => 'setPhone',
'user_status' => 'setUserStatus'
);
-
+
static function setters() {
return self::$setters;
}
/**
- * Array of attributes to getter functions (for serialization of requests)
- * @var string[]
- */
+ * Array of attributes to getter functions (for serialization of requests)
+ * @var string[]
+ */
static $getters = array(
'id' => 'getId',
'username' => 'getUsername',
@@ -123,51 +123,68 @@ class User implements ArrayAccess
'phone' => 'getPhone',
'user_status' => 'getUserStatus'
);
-
+
static function getters() {
return self::$getters;
}
+
+
+
+
/**
- * $id
- * @var int
- */
- protected $id;
- /**
- * $username
- * @var string
- */
- protected $username;
- /**
- * $first_name
- * @var string
- */
- protected $first_name;
- /**
- * $last_name
- * @var string
- */
- protected $last_name;
- /**
- * $email
- * @var string
- */
- protected $email;
- /**
- * $password
- * @var string
- */
- protected $password;
- /**
- * $phone
- * @var string
- */
- protected $phone;
- /**
- * $user_status User Status
- * @var int
- */
- protected $user_status;
+ * Associative array for storing property values
+ * @var mixed[]
+ */
+ protected $container = array(
+ /**
+ * $container['id']
+ * @var int
+ */
+ 'id' => null,
+
+ /**
+ * $container['username']
+ * @var string
+ */
+ 'username' => null,
+
+ /**
+ * $container['first_name']
+ * @var string
+ */
+ 'first_name' => null,
+
+ /**
+ * $container['last_name']
+ * @var string
+ */
+ 'last_name' => null,
+
+ /**
+ * $container['email']
+ * @var string
+ */
+ 'email' => null,
+
+ /**
+ * $container['password']
+ * @var string
+ */
+ 'password' => null,
+
+ /**
+ * $container['phone']
+ * @var string
+ */
+ 'phone' => null,
+
+ /**
+ * $container['user_status'] User Status
+ * @var int
+ */
+ 'user_status' => null,
+ );
/**
* Constructor
@@ -179,28 +196,28 @@ class User implements ArrayAccess
if ($data != null) {
if (isset($data["id"])) {
- $this->id = $data["id"];
+ $this->container['id'] = $data["id"];
}
if (isset($data["username"])) {
- $this->username = $data["username"];
+ $this->container['username'] = $data["username"];
}
if (isset($data["first_name"])) {
- $this->first_name = $data["first_name"];
+ $this->container['first_name'] = $data["first_name"];
}
if (isset($data["last_name"])) {
- $this->last_name = $data["last_name"];
+ $this->container['last_name'] = $data["last_name"];
}
if (isset($data["email"])) {
- $this->email = $data["email"];
+ $this->container['email'] = $data["email"];
}
if (isset($data["password"])) {
- $this->password = $data["password"];
+ $this->container['password'] = $data["password"];
}
if (isset($data["phone"])) {
- $this->phone = $data["phone"];
+ $this->container['phone'] = $data["phone"];
}
if (isset($data["user_status"])) {
- $this->user_status = $data["user_status"];
+ $this->container['user_status'] = $data["user_status"];
}
}
}
@@ -268,9 +285,9 @@ class User implements ArrayAccess
*/
public function getId()
{
- return $this->id;
+ return $this->container['id'];
}
-
+
/**
* Sets id
* @param int $id
@@ -280,7 +297,9 @@ class User implements ArrayAccess
{
- $this->id = $id;
+
+ $this->container['id'] = $id;
+
return $this;
}
/**
@@ -289,9 +308,9 @@ class User implements ArrayAccess
*/
public function getUsername()
{
- return $this->username;
+ return $this->container['username'];
}
-
+
/**
* Sets username
* @param string $username
@@ -301,7 +320,9 @@ class User implements ArrayAccess
{
- $this->username = $username;
+
+ $this->container['username'] = $username;
+
return $this;
}
/**
@@ -310,9 +331,9 @@ class User implements ArrayAccess
*/
public function getFirstName()
{
- return $this->first_name;
+ return $this->container['first_name'];
}
-
+
/**
* Sets first_name
* @param string $first_name
@@ -322,7 +343,9 @@ class User implements ArrayAccess
{
- $this->first_name = $first_name;
+
+ $this->container['first_name'] = $first_name;
+
return $this;
}
/**
@@ -331,9 +354,9 @@ class User implements ArrayAccess
*/
public function getLastName()
{
- return $this->last_name;
+ return $this->container['last_name'];
}
-
+
/**
* Sets last_name
* @param string $last_name
@@ -343,7 +366,9 @@ class User implements ArrayAccess
{
- $this->last_name = $last_name;
+
+ $this->container['last_name'] = $last_name;
+
return $this;
}
/**
@@ -352,9 +377,9 @@ class User implements ArrayAccess
*/
public function getEmail()
{
- return $this->email;
+ return $this->container['email'];
}
-
+
/**
* Sets email
* @param string $email
@@ -364,7 +389,9 @@ class User implements ArrayAccess
{
- $this->email = $email;
+
+ $this->container['email'] = $email;
+
return $this;
}
/**
@@ -373,9 +400,9 @@ class User implements ArrayAccess
*/
public function getPassword()
{
- return $this->password;
+ return $this->container['password'];
}
-
+
/**
* Sets password
* @param string $password
@@ -385,7 +412,9 @@ class User implements ArrayAccess
{
- $this->password = $password;
+
+ $this->container['password'] = $password;
+
return $this;
}
/**
@@ -394,9 +423,9 @@ class User implements ArrayAccess
*/
public function getPhone()
{
- return $this->phone;
+ return $this->container['phone'];
}
-
+
/**
* Sets phone
* @param string $phone
@@ -406,7 +435,9 @@ class User implements ArrayAccess
{
- $this->phone = $phone;
+
+ $this->container['phone'] = $phone;
+
return $this;
}
/**
@@ -415,9 +446,9 @@ class User implements ArrayAccess
*/
public function getUserStatus()
{
- return $this->user_status;
+ return $this->container['user_status'];
}
-
+
/**
* Sets user_status
* @param int $user_status User Status
@@ -427,7 +458,9 @@ class User implements ArrayAccess
{
- $this->user_status = $user_status;
+
+ $this->container['user_status'] = $user_status;
+
return $this;
}
/**
@@ -437,9 +470,9 @@ class User implements ArrayAccess
*/
public function offsetExists($offset)
{
- return isset($this->$offset);
+ return isset($this->container[$offset]);
}
-
+
/**
* Gets offset.
* @param integer $offset Offset
@@ -447,9 +480,9 @@ class User implements ArrayAccess
*/
public function offsetGet($offset)
{
- return $this->$offset;
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
-
+
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -458,9 +491,13 @@ class User implements ArrayAccess
*/
public function offsetSet($offset, $value)
{
- $this->$offset = $value;
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
}
-
+
/**
* Unsets offset.
* @param integer $offset Offset
@@ -468,9 +505,9 @@ class User implements ArrayAccess
*/
public function offsetUnset($offset)
{
- unset($this->$offset);
+ unset($this->container[$offset]);
}
-
+
/**
* Gets the string presentation of the object
* @return string
diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Tests/AnimalFarmTest.php b/samples/client/petstore/php/SwaggerClient-php/lib/Tests/AnimalFarmTest.php
new file mode 100644
index 000000000000..f154716c064f
--- /dev/null
+++ b/samples/client/petstore/php/SwaggerClient-php/lib/Tests/AnimalFarmTest.php
@@ -0,0 +1,70 @@
+assertSame(Swagger\Client\Model\Order::STATUS_PLACED, "placed");
+ $this->assertSame(Swagger\Client\Model\Order::STATUS_APPROVED, "approved");
+ }
+
// test get inventory
public function testOrder()
{
diff --git a/samples/client/petstore/php/SwaggerClient-php/tests/PetApiTest.php b/samples/client/petstore/php/SwaggerClient-php/tests/PetApiTest.php
index 4c4585632aeb..0695eb9d981a 100644
--- a/samples/client/petstore/php/SwaggerClient-php/tests/PetApiTest.php
+++ b/samples/client/petstore/php/SwaggerClient-php/tests/PetApiTest.php
@@ -423,6 +423,33 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
$this->assertSame('Dog', $new_dog->getClassName());
}
+ // test if ArrayAccess interface works
+ public function testArrayStuff()
+ {
+ // create an AnimalFarm which is an object implementing the
+ // ArrayAccess interface
+ $farm = new Swagger\Client\Model\AnimalFarm();
+
+ // add some animals to the farm to make sure the ArrayAccess
+ // interface works
+ $farm[] = new Swagger\Client\Model\Dog();
+ $farm[] = new Swagger\Client\Model\Cat();
+ $farm[] = new Swagger\Client\Model\Animal();
+
+ // assert we can look up the animals in the farm by array
+ // indices (let's try a random order)
+ $this->assertInstanceOf('Swagger\Client\Model\Cat', $farm[1]);
+ $this->assertInstanceOf('Swagger\Client\Model\Dog', $farm[0]);
+ $this->assertInstanceOf('Swagger\Client\Model\Animal', $farm[2]);
+
+ // let's try to `foreach` the animals in the farm and let's
+ // try to use the objects we loop through
+ foreach ($farm as $animal) {
+ $this->assertContains($animal->getClassName(), array('Dog', 'Cat', 'Animal'));
+ $this->assertInstanceOf('Swagger\Client\Model\Animal', $animal);
+ }
+ }
+
}
?>
diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md
index 79eef5803264..6640785fae99 100644
--- a/samples/client/petstore/python/README.md
+++ b/samples/client/petstore/python/README.md
@@ -5,7 +5,7 @@ This Python package is automatically generated by the [Swagger Codegen](https://
- API version: 1.0.0
- Package version: 1.0.0
-- Build date: 2016-04-20T22:11:45.927+08:00
+- Build date: 2016-04-27T22:50:21.115+01:00
- Build package: class io.swagger.codegen.languages.PythonClientCodegen
## Requirements.
@@ -50,18 +50,26 @@ import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
-swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
-api_instance = swagger_client.PetApi
-body = swagger_client.Pet() # Pet | Pet object that needs to be added to the store
+api_instance = swagger_client.FakeApi
+number = 3.4 # float | None
+double = 1.2 # float | None
+string = 'string_example' # str | None
+byte = 'B' # str | None
+integer = 56 # int | None (optional)
+int32 = 56 # int | None (optional)
+int64 = 789 # int | None (optional)
+float = 3.4 # float | None (optional)
+binary = 'B' # str | None (optional)
+date = '2013-10-20' # date | None (optional)
+date_time = '2013-10-20T19:20:30+01:00' # datetime | None (optional)
+password = 'password_example' # str | None (optional)
try:
- # Add a new pet to the store
- api_instance.add_pet(body)
+ # Fake endpoint for testing various parameters
+ api_instance.test_endpoint_parameters(number, double, string, byte, integer=integer, int32=int32, int64=int64, float=float, binary=binary, date=date, date_time=date_time, password=password)
except ApiException as e:
- print "Exception when calling PetApi->add_pet: %s\n" % e
+ print "Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e
```
@@ -71,6 +79,7 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
+*FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters
*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
diff --git a/samples/client/petstore/python/docs/FakeApi.md b/samples/client/petstore/python/docs/FakeApi.md
new file mode 100644
index 000000000000..66d9a04434a5
--- /dev/null
+++ b/samples/client/petstore/python/docs/FakeApi.md
@@ -0,0 +1,77 @@
+# swagger_client.FakeApi
+
+All URIs are relative to *http://petstore.swagger.io/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters
+
+
+# **test_endpoint_parameters**
+> test_endpoint_parameters(number, double, string, byte, integer=integer, int32=int32, int64=int64, float=float, binary=binary, date=date, date_time=date_time, password=password)
+
+Fake endpoint for testing various parameters
+
+Fake endpoint for testing various parameters
+
+### Example
+```python
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.FakeApi()
+number = 3.4 # float | None
+double = 1.2 # float | None
+string = 'string_example' # str | None
+byte = 'B' # str | None
+integer = 56 # int | None (optional)
+int32 = 56 # int | None (optional)
+int64 = 789 # int | None (optional)
+float = 3.4 # float | None (optional)
+binary = 'B' # str | None (optional)
+date = '2013-10-20' # date | None (optional)
+date_time = '2013-10-20T19:20:30+01:00' # datetime | None (optional)
+password = 'password_example' # str | None (optional)
+
+try:
+ # Fake endpoint for testing various parameters
+ api_instance.test_endpoint_parameters(number, double, string, byte, integer=integer, int32=int32, int64=int64, float=float, binary=binary, date=date, date_time=date_time, password=password)
+except ApiException as e:
+ print "Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **number** | **float**| None |
+ **double** | **float**| None |
+ **string** | **str**| None |
+ **byte** | **str**| None |
+ **integer** | **int**| None | [optional]
+ **int32** | **int**| None | [optional]
+ **int64** | **int**| None | [optional]
+ **float** | **float**| None | [optional]
+ **binary** | **str**| None | [optional]
+ **date** | **date**| None | [optional]
+ **date_time** | **datetime**| None | [optional]
+ **password** | **str**| None | [optional]
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/python/docs/FormatTest.md b/samples/client/petstore/python/docs/FormatTest.md
index 4182a4470860..3e489e863fa0 100644
--- a/samples/client/petstore/python/docs/FormatTest.md
+++ b/samples/client/petstore/python/docs/FormatTest.md
@@ -10,11 +10,12 @@ Name | Type | Description | Notes
**float** | **float** | | [optional]
**double** | **float** | | [optional]
**string** | **str** | | [optional]
-**byte** | **str** | | [optional]
+**byte** | **str** | |
**binary** | **str** | | [optional]
-**date** | **date** | | [optional]
+**date** | **date** | |
**date_time** | **datetime** | | [optional]
-**password** | **str** | | [optional]
+**uuid** | **str** | | [optional]
+**password** | **str** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/PetApi.md b/samples/client/petstore/python/docs/PetApi.md
index 3b14d2b80621..fb69778f6115 100644
--- a/samples/client/petstore/python/docs/PetApi.md
+++ b/samples/client/petstore/python/docs/PetApi.md
@@ -230,8 +230,8 @@ from pprint import pprint
# Configure API key authorization: api_key
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
-# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
-# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# swagger_client.configuration.api_key_prefix['api_key'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.PetApi()
diff --git a/samples/client/petstore/python/docs/StoreApi.md b/samples/client/petstore/python/docs/StoreApi.md
index 04b4300d58de..537009bde523 100644
--- a/samples/client/petstore/python/docs/StoreApi.md
+++ b/samples/client/petstore/python/docs/StoreApi.md
@@ -72,8 +72,8 @@ from pprint import pprint
# Configure API key authorization: api_key
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
-# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
-# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# swagger_client.configuration.api_key_prefix['api_key'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.StoreApi()
diff --git a/samples/client/petstore/python/swagger_client.egg-info/top_level.txt b/samples/client/petstore/python/swagger_client.egg-info/top_level.txt
index 9a02a75c0585..01f6691e7caf 100644
--- a/samples/client/petstore/python/swagger_client.egg-info/top_level.txt
+++ b/samples/client/petstore/python/swagger_client.egg-info/top_level.txt
@@ -1,2 +1,3 @@
swagger_client
+test
tests
diff --git a/samples/client/petstore/python/swagger_client/__init__.py b/samples/client/petstore/python/swagger_client/__init__.py
index 2169ecd37e79..783f8b9713ad 100644
--- a/samples/client/petstore/python/swagger_client/__init__.py
+++ b/samples/client/petstore/python/swagger_client/__init__.py
@@ -17,6 +17,7 @@ from .models.tag import Tag
from .models.user import User
# import apis into sdk package
+from .apis.fake_api import FakeApi
from .apis.pet_api import PetApi
from .apis.store_api import StoreApi
from .apis.user_api import UserApi
diff --git a/samples/client/petstore/python/swagger_client/apis/__init__.py b/samples/client/petstore/python/swagger_client/apis/__init__.py
index a3a12ea9ac1a..ddde8c164bf4 100644
--- a/samples/client/petstore/python/swagger_client/apis/__init__.py
+++ b/samples/client/petstore/python/swagger_client/apis/__init__.py
@@ -1,6 +1,7 @@
from __future__ import absolute_import
# import apis into api package
+from .fake_api import FakeApi
from .pet_api import PetApi
from .store_api import StoreApi
from .user_api import UserApi
diff --git a/samples/client/petstore/python/swagger_client/apis/fake_api.py b/samples/client/petstore/python/swagger_client/apis/fake_api.py
new file mode 100644
index 000000000000..2b183794ef16
--- /dev/null
+++ b/samples/client/petstore/python/swagger_client/apis/fake_api.py
@@ -0,0 +1,165 @@
+# coding: utf-8
+
+"""
+FakeApi.py
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
+
+from __future__ import absolute_import
+
+import sys
+import os
+
+# python 2 and python 3 compatibility library
+from six import iteritems
+
+from ..configuration import Configuration
+from ..api_client import ApiClient
+
+
+class FakeApi(object):
+ """
+ NOTE: This class is auto generated by the swagger code generator program.
+ Do not edit the class manually.
+ Ref: https://github.com/swagger-api/swagger-codegen
+ """
+
+ def __init__(self, api_client=None):
+ config = Configuration()
+ if api_client:
+ self.api_client = api_client
+ else:
+ if not config.api_client:
+ config.api_client = ApiClient()
+ self.api_client = config.api_client
+
+ def test_endpoint_parameters(self, number, double, string, byte, **kwargs):
+ """
+ Fake endpoint for testing various parameters
+ Fake endpoint for testing various parameters
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please define a `callback` function
+ to be invoked when receiving the response.
+ >>> def callback_function(response):
+ >>> pprint(response)
+ >>>
+ >>> thread = api.test_endpoint_parameters(number, double, string, byte, callback=callback_function)
+
+ :param callback function: The callback function
+ for asynchronous request. (optional)
+ :param float number: None (required)
+ :param float double: None (required)
+ :param str string: None (required)
+ :param str byte: None (required)
+ :param int integer: None
+ :param int int32: None
+ :param int int64: None
+ :param float float: None
+ :param str binary: None
+ :param date date: None
+ :param datetime date_time: None
+ :param str password: None
+ :return: None
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['number', 'double', 'string', 'byte', 'integer', 'int32', 'int64', 'float', 'binary', 'date', 'date_time', 'password']
+ all_params.append('callback')
+
+ params = locals()
+ for key, val in iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method test_endpoint_parameters" % key
+ )
+ params[key] = val
+ del params['kwargs']
+
+ # verify the required parameter 'number' is set
+ if ('number' not in params) or (params['number'] is None):
+ raise ValueError("Missing the required parameter `number` when calling `test_endpoint_parameters`")
+ # verify the required parameter 'double' is set
+ if ('double' not in params) or (params['double'] is None):
+ raise ValueError("Missing the required parameter `double` when calling `test_endpoint_parameters`")
+ # verify the required parameter 'string' is set
+ if ('string' not in params) or (params['string'] is None):
+ raise ValueError("Missing the required parameter `string` when calling `test_endpoint_parameters`")
+ # verify the required parameter 'byte' is set
+ if ('byte' not in params) or (params['byte'] is None):
+ raise ValueError("Missing the required parameter `byte` when calling `test_endpoint_parameters`")
+
+ resource_path = '/fake'.replace('{format}', 'json')
+ path_params = {}
+
+ query_params = {}
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+ if 'integer' in params:
+ form_params.append(('integer', params['integer']))
+ if 'int32' in params:
+ form_params.append(('int32', params['int32']))
+ if 'int64' in params:
+ form_params.append(('int64', params['int64']))
+ if 'number' in params:
+ form_params.append(('number', params['number']))
+ if 'float' in params:
+ form_params.append(('float', params['float']))
+ if 'double' in params:
+ form_params.append(('double', params['double']))
+ if 'string' in params:
+ form_params.append(('string', params['string']))
+ if 'byte' in params:
+ form_params.append(('byte', params['byte']))
+ if 'binary' in params:
+ form_params.append(('binary', params['binary']))
+ if 'date' in params:
+ form_params.append(('date', params['date']))
+ if 'date_time' in params:
+ form_params.append(('dateTime', params['date_time']))
+ if 'password' in params:
+ form_params.append(('password', params['password']))
+
+ body_params = None
+
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.\
+ select_header_accept(['application/xml', 'application/json'])
+ if not header_params['Accept']:
+ del header_params['Accept']
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.\
+ select_header_content_type([])
+
+ # Authentication setting
+ auth_settings = []
+
+ response = self.api_client.call_api(resource_path, 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type=None,
+ auth_settings=auth_settings,
+ callback=params.get('callback'))
+ return response
diff --git a/samples/client/petstore/python/swagger_client/models/format_test.py b/samples/client/petstore/python/swagger_client/models/format_test.py
index 8654d79bc3c6..28f348edf047 100644
--- a/samples/client/petstore/python/swagger_client/models/format_test.py
+++ b/samples/client/petstore/python/swagger_client/models/format_test.py
@@ -48,6 +48,7 @@ class FormatTest(object):
'binary': 'str',
'date': 'date',
'date_time': 'datetime',
+ 'uuid': 'str',
'password': 'str'
}
@@ -63,6 +64,7 @@ class FormatTest(object):
'binary': 'binary',
'date': 'date',
'date_time': 'dateTime',
+ 'uuid': 'uuid',
'password': 'password'
}
@@ -77,6 +79,7 @@ class FormatTest(object):
self._binary = None
self._date = None
self._date_time = None
+ self._uuid = None
self._password = None
@property
@@ -321,6 +324,28 @@ class FormatTest(object):
"""
self._date_time = date_time
+ @property
+ def uuid(self):
+ """
+ Gets the uuid of this FormatTest.
+
+
+ :return: The uuid of this FormatTest.
+ :rtype: str
+ """
+ return self._uuid
+
+ @uuid.setter
+ def uuid(self, uuid):
+ """
+ Sets the uuid of this FormatTest.
+
+
+ :param uuid: The uuid of this FormatTest.
+ :type: str
+ """
+ self._uuid = uuid
+
@property
def password(self):
"""
diff --git a/samples/client/petstore/python/test/__init__.py b/samples/client/petstore/python/test/__init__.py
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/samples/client/petstore/python/test/test_animal.py b/samples/client/petstore/python/test/test_animal.py
new file mode 100644
index 000000000000..279ed1850dd7
--- /dev/null
+++ b/samples/client/petstore/python/test/test_animal.py
@@ -0,0 +1,49 @@
+# coding: utf-8
+
+"""
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ref: https://github.com/swagger-api/swagger-codegen
+"""
+
+from __future__ import absolute_import
+
+import os
+import sys
+import unittest
+
+import swagger_client
+from swagger_client.rest import ApiException
+from swagger_client.models.animal import Animal
+
+
+class TestAnimal(unittest.TestCase):
+ """ Animal unit test stubs """
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testAnimal(self):
+ """
+ Test Animal
+ """
+ model = swagger_client.models.animal.Animal()
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/samples/client/petstore/python/test/test_api_response.py b/samples/client/petstore/python/test/test_api_response.py
new file mode 100644
index 000000000000..be73dbf373d2
--- /dev/null
+++ b/samples/client/petstore/python/test/test_api_response.py
@@ -0,0 +1,49 @@
+# coding: utf-8
+
+"""
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ref: https://github.com/swagger-api/swagger-codegen
+"""
+
+from __future__ import absolute_import
+
+import os
+import sys
+import unittest
+
+import swagger_client
+from swagger_client.rest import ApiException
+from swagger_client.models.api_response import ApiResponse
+
+
+class TestApiResponse(unittest.TestCase):
+ """ ApiResponse unit test stubs """
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testApiResponse(self):
+ """
+ Test ApiResponse
+ """
+ model = swagger_client.models.api_response.ApiResponse()
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/samples/client/petstore/python/test/test_cat.py b/samples/client/petstore/python/test/test_cat.py
new file mode 100644
index 000000000000..728a824fa5b1
--- /dev/null
+++ b/samples/client/petstore/python/test/test_cat.py
@@ -0,0 +1,49 @@
+# coding: utf-8
+
+"""
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ref: https://github.com/swagger-api/swagger-codegen
+"""
+
+from __future__ import absolute_import
+
+import os
+import sys
+import unittest
+
+import swagger_client
+from swagger_client.rest import ApiException
+from swagger_client.models.cat import Cat
+
+
+class TestCat(unittest.TestCase):
+ """ Cat unit test stubs """
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testCat(self):
+ """
+ Test Cat
+ """
+ model = swagger_client.models.cat.Cat()
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/samples/client/petstore/python/test/test_category.py b/samples/client/petstore/python/test/test_category.py
new file mode 100644
index 000000000000..793fbdf41b05
--- /dev/null
+++ b/samples/client/petstore/python/test/test_category.py
@@ -0,0 +1,49 @@
+# coding: utf-8
+
+"""
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ref: https://github.com/swagger-api/swagger-codegen
+"""
+
+from __future__ import absolute_import
+
+import os
+import sys
+import unittest
+
+import swagger_client
+from swagger_client.rest import ApiException
+from swagger_client.models.category import Category
+
+
+class TestCategory(unittest.TestCase):
+ """ Category unit test stubs """
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testCategory(self):
+ """
+ Test Category
+ """
+ model = swagger_client.models.category.Category()
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/samples/client/petstore/python/test/test_dog.py b/samples/client/petstore/python/test/test_dog.py
new file mode 100644
index 000000000000..044dc5be51fc
--- /dev/null
+++ b/samples/client/petstore/python/test/test_dog.py
@@ -0,0 +1,49 @@
+# coding: utf-8
+
+"""
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ref: https://github.com/swagger-api/swagger-codegen
+"""
+
+from __future__ import absolute_import
+
+import os
+import sys
+import unittest
+
+import swagger_client
+from swagger_client.rest import ApiException
+from swagger_client.models.dog import Dog
+
+
+class TestDog(unittest.TestCase):
+ """ Dog unit test stubs """
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testDog(self):
+ """
+ Test Dog
+ """
+ model = swagger_client.models.dog.Dog()
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/samples/client/petstore/python/test/test_fake_api.py b/samples/client/petstore/python/test/test_fake_api.py
new file mode 100644
index 000000000000..29b71bdf81a2
--- /dev/null
+++ b/samples/client/petstore/python/test/test_fake_api.py
@@ -0,0 +1,51 @@
+# coding: utf-8
+
+"""
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ref: https://github.com/swagger-api/swagger-codegen
+"""
+
+from __future__ import absolute_import
+
+import os
+import sys
+import unittest
+
+import swagger_client
+from swagger_client.rest import ApiException
+from swagger_client.apis.fake_api import FakeApi
+
+
+class TestFakeApi(unittest.TestCase):
+ """ FakeApi unit test stubs """
+
+ def setUp(self):
+ self.api = swagger_client.apis.fake_api.FakeApi()
+
+ def tearDown(self):
+ pass
+
+ def test_test_endpoint_parameters(self):
+ """
+ Test case for test_endpoint_parameters
+
+ Fake endpoint for testing various parameters
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/samples/client/petstore/python/test/test_format_test.py b/samples/client/petstore/python/test/test_format_test.py
new file mode 100644
index 000000000000..11101ad52da3
--- /dev/null
+++ b/samples/client/petstore/python/test/test_format_test.py
@@ -0,0 +1,49 @@
+# coding: utf-8
+
+"""
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ref: https://github.com/swagger-api/swagger-codegen
+"""
+
+from __future__ import absolute_import
+
+import os
+import sys
+import unittest
+
+import swagger_client
+from swagger_client.rest import ApiException
+from swagger_client.models.format_test import FormatTest
+
+
+class TestFormatTest(unittest.TestCase):
+ """ FormatTest unit test stubs """
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testFormatTest(self):
+ """
+ Test FormatTest
+ """
+ model = swagger_client.models.format_test.FormatTest()
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/samples/client/petstore/python/test/test_model_200_response.py b/samples/client/petstore/python/test/test_model_200_response.py
new file mode 100644
index 000000000000..8328d2b97578
--- /dev/null
+++ b/samples/client/petstore/python/test/test_model_200_response.py
@@ -0,0 +1,49 @@
+# coding: utf-8
+
+"""
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ref: https://github.com/swagger-api/swagger-codegen
+"""
+
+from __future__ import absolute_import
+
+import os
+import sys
+import unittest
+
+import swagger_client
+from swagger_client.rest import ApiException
+from swagger_client.models.model_200_response import Model200Response
+
+
+class TestModel200Response(unittest.TestCase):
+ """ Model200Response unit test stubs """
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testModel200Response(self):
+ """
+ Test Model200Response
+ """
+ model = swagger_client.models.model_200_response.Model200Response()
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/samples/client/petstore/python/test/test_model_return.py b/samples/client/petstore/python/test/test_model_return.py
new file mode 100644
index 000000000000..4ff3f38b2eb5
--- /dev/null
+++ b/samples/client/petstore/python/test/test_model_return.py
@@ -0,0 +1,49 @@
+# coding: utf-8
+
+"""
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ref: https://github.com/swagger-api/swagger-codegen
+"""
+
+from __future__ import absolute_import
+
+import os
+import sys
+import unittest
+
+import swagger_client
+from swagger_client.rest import ApiException
+from swagger_client.models.model_return import ModelReturn
+
+
+class TestModelReturn(unittest.TestCase):
+ """ ModelReturn unit test stubs """
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testModelReturn(self):
+ """
+ Test ModelReturn
+ """
+ model = swagger_client.models.model_return.ModelReturn()
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/samples/client/petstore/python/test/test_name.py b/samples/client/petstore/python/test/test_name.py
new file mode 100644
index 000000000000..c3b27897eb1e
--- /dev/null
+++ b/samples/client/petstore/python/test/test_name.py
@@ -0,0 +1,49 @@
+# coding: utf-8
+
+"""
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ref: https://github.com/swagger-api/swagger-codegen
+"""
+
+from __future__ import absolute_import
+
+import os
+import sys
+import unittest
+
+import swagger_client
+from swagger_client.rest import ApiException
+from swagger_client.models.name import Name
+
+
+class TestName(unittest.TestCase):
+ """ Name unit test stubs """
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testName(self):
+ """
+ Test Name
+ """
+ model = swagger_client.models.name.Name()
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/samples/client/petstore/python/test/test_order.py b/samples/client/petstore/python/test/test_order.py
new file mode 100644
index 000000000000..23beefe346c6
--- /dev/null
+++ b/samples/client/petstore/python/test/test_order.py
@@ -0,0 +1,49 @@
+# coding: utf-8
+
+"""
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ref: https://github.com/swagger-api/swagger-codegen
+"""
+
+from __future__ import absolute_import
+
+import os
+import sys
+import unittest
+
+import swagger_client
+from swagger_client.rest import ApiException
+from swagger_client.models.order import Order
+
+
+class TestOrder(unittest.TestCase):
+ """ Order unit test stubs """
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testOrder(self):
+ """
+ Test Order
+ """
+ model = swagger_client.models.order.Order()
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/samples/client/petstore/python/test/test_pet.py b/samples/client/petstore/python/test/test_pet.py
new file mode 100644
index 000000000000..471b7b4f67c8
--- /dev/null
+++ b/samples/client/petstore/python/test/test_pet.py
@@ -0,0 +1,49 @@
+# coding: utf-8
+
+"""
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ref: https://github.com/swagger-api/swagger-codegen
+"""
+
+from __future__ import absolute_import
+
+import os
+import sys
+import unittest
+
+import swagger_client
+from swagger_client.rest import ApiException
+from swagger_client.models.pet import Pet
+
+
+class TestPet(unittest.TestCase):
+ """ Pet unit test stubs """
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testPet(self):
+ """
+ Test Pet
+ """
+ model = swagger_client.models.pet.Pet()
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/samples/client/petstore/python/test/test_pet_api.py b/samples/client/petstore/python/test/test_pet_api.py
new file mode 100644
index 000000000000..81ee6c76e9c7
--- /dev/null
+++ b/samples/client/petstore/python/test/test_pet_api.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ref: https://github.com/swagger-api/swagger-codegen
+"""
+
+from __future__ import absolute_import
+
+import os
+import sys
+import unittest
+
+import swagger_client
+from swagger_client.rest import ApiException
+from swagger_client.apis.pet_api import PetApi
+
+
+class TestPetApi(unittest.TestCase):
+ """ PetApi unit test stubs """
+
+ def setUp(self):
+ self.api = swagger_client.apis.pet_api.PetApi()
+
+ def tearDown(self):
+ pass
+
+ def test_add_pet(self):
+ """
+ Test case for add_pet
+
+ Add a new pet to the store
+ """
+ pass
+
+ def test_delete_pet(self):
+ """
+ Test case for delete_pet
+
+ Deletes a pet
+ """
+ pass
+
+ def test_find_pets_by_status(self):
+ """
+ Test case for find_pets_by_status
+
+ Finds Pets by status
+ """
+ pass
+
+ def test_find_pets_by_tags(self):
+ """
+ Test case for find_pets_by_tags
+
+ Finds Pets by tags
+ """
+ pass
+
+ def test_get_pet_by_id(self):
+ """
+ Test case for get_pet_by_id
+
+ Find pet by ID
+ """
+ pass
+
+ def test_update_pet(self):
+ """
+ Test case for update_pet
+
+ Update an existing pet
+ """
+ pass
+
+ def test_update_pet_with_form(self):
+ """
+ Test case for update_pet_with_form
+
+ Updates a pet in the store with form data
+ """
+ pass
+
+ def test_upload_file(self):
+ """
+ Test case for upload_file
+
+ uploads an image
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/samples/client/petstore/python/test/test_special_model_name.py b/samples/client/petstore/python/test/test_special_model_name.py
new file mode 100644
index 000000000000..17c12655031e
--- /dev/null
+++ b/samples/client/petstore/python/test/test_special_model_name.py
@@ -0,0 +1,49 @@
+# coding: utf-8
+
+"""
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ref: https://github.com/swagger-api/swagger-codegen
+"""
+
+from __future__ import absolute_import
+
+import os
+import sys
+import unittest
+
+import swagger_client
+from swagger_client.rest import ApiException
+from swagger_client.models.special_model_name import SpecialModelName
+
+
+class TestSpecialModelName(unittest.TestCase):
+ """ SpecialModelName unit test stubs """
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testSpecialModelName(self):
+ """
+ Test SpecialModelName
+ """
+ model = swagger_client.models.special_model_name.SpecialModelName()
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/samples/client/petstore/python/test/test_store_api.py b/samples/client/petstore/python/test/test_store_api.py
new file mode 100644
index 000000000000..e8dc0a64b1ca
--- /dev/null
+++ b/samples/client/petstore/python/test/test_store_api.py
@@ -0,0 +1,75 @@
+# coding: utf-8
+
+"""
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ref: https://github.com/swagger-api/swagger-codegen
+"""
+
+from __future__ import absolute_import
+
+import os
+import sys
+import unittest
+
+import swagger_client
+from swagger_client.rest import ApiException
+from swagger_client.apis.store_api import StoreApi
+
+
+class TestStoreApi(unittest.TestCase):
+ """ StoreApi unit test stubs """
+
+ def setUp(self):
+ self.api = swagger_client.apis.store_api.StoreApi()
+
+ def tearDown(self):
+ pass
+
+ def test_delete_order(self):
+ """
+ Test case for delete_order
+
+ Delete purchase order by ID
+ """
+ pass
+
+ def test_get_inventory(self):
+ """
+ Test case for get_inventory
+
+ Returns pet inventories by status
+ """
+ pass
+
+ def test_get_order_by_id(self):
+ """
+ Test case for get_order_by_id
+
+ Find purchase order by ID
+ """
+ pass
+
+ def test_place_order(self):
+ """
+ Test case for place_order
+
+ Place an order for a pet
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/samples/client/petstore/python/test/test_tag.py b/samples/client/petstore/python/test/test_tag.py
new file mode 100644
index 000000000000..35b51e4d7d2e
--- /dev/null
+++ b/samples/client/petstore/python/test/test_tag.py
@@ -0,0 +1,49 @@
+# coding: utf-8
+
+"""
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ref: https://github.com/swagger-api/swagger-codegen
+"""
+
+from __future__ import absolute_import
+
+import os
+import sys
+import unittest
+
+import swagger_client
+from swagger_client.rest import ApiException
+from swagger_client.models.tag import Tag
+
+
+class TestTag(unittest.TestCase):
+ """ Tag unit test stubs """
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testTag(self):
+ """
+ Test Tag
+ """
+ model = swagger_client.models.tag.Tag()
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/samples/client/petstore/python/test/test_user.py b/samples/client/petstore/python/test/test_user.py
new file mode 100644
index 000000000000..1aad154cbf8c
--- /dev/null
+++ b/samples/client/petstore/python/test/test_user.py
@@ -0,0 +1,49 @@
+# coding: utf-8
+
+"""
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ref: https://github.com/swagger-api/swagger-codegen
+"""
+
+from __future__ import absolute_import
+
+import os
+import sys
+import unittest
+
+import swagger_client
+from swagger_client.rest import ApiException
+from swagger_client.models.user import User
+
+
+class TestUser(unittest.TestCase):
+ """ User unit test stubs """
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testUser(self):
+ """
+ Test User
+ """
+ model = swagger_client.models.user.User()
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/samples/client/petstore/python/test/test_user_api.py b/samples/client/petstore/python/test/test_user_api.py
new file mode 100644
index 000000000000..0205fe7383ab
--- /dev/null
+++ b/samples/client/petstore/python/test/test_user_api.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+Copyright 2016 SmartBear Software
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ref: https://github.com/swagger-api/swagger-codegen
+"""
+
+from __future__ import absolute_import
+
+import os
+import sys
+import unittest
+
+import swagger_client
+from swagger_client.rest import ApiException
+from swagger_client.apis.user_api import UserApi
+
+
+class TestUserApi(unittest.TestCase):
+ """ UserApi unit test stubs """
+
+ def setUp(self):
+ self.api = swagger_client.apis.user_api.UserApi()
+
+ def tearDown(self):
+ pass
+
+ def test_create_user(self):
+ """
+ Test case for create_user
+
+ Create user
+ """
+ pass
+
+ def test_create_users_with_array_input(self):
+ """
+ Test case for create_users_with_array_input
+
+ Creates list of users with given input array
+ """
+ pass
+
+ def test_create_users_with_list_input(self):
+ """
+ Test case for create_users_with_list_input
+
+ Creates list of users with given input array
+ """
+ pass
+
+ def test_delete_user(self):
+ """
+ Test case for delete_user
+
+ Delete user
+ """
+ pass
+
+ def test_get_user_by_name(self):
+ """
+ Test case for get_user_by_name
+
+ Get user by user name
+ """
+ pass
+
+ def test_login_user(self):
+ """
+ Test case for login_user
+
+ Logs user into the system
+ """
+ pass
+
+ def test_logout_user(self):
+ """
+ Test case for logout_user
+
+ Logs out current logged in user session
+ """
+ pass
+
+ def test_update_user(self):
+ """
+ Test case for update_user
+
+ Updated user
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md
index cab06a92ce16..62b0d52dc7b1 100644
--- a/samples/client/petstore/ruby/README.md
+++ b/samples/client/petstore/ruby/README.md
@@ -8,7 +8,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
- API version: 1.0.0
- Package version: 1.0.0
-- Build date: 2016-04-26T10:05:22.048-07:00
+- Build date: 2016-05-02T21:47:16.723+08:00
- Build package: class io.swagger.codegen.languages.RubyClientCodegen
## Installation
@@ -36,9 +36,9 @@ Finally add this to the Gemfile:
### Install from Git
-If the Ruby gem is hosted at a git repository: https://github.com/YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID, then add the following in the Gemfile:
+If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
- gem 'petstore', :git => 'https://github.com/YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID.git'
+ gem 'petstore', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
### Include the Ruby code directly
@@ -57,7 +57,7 @@ require 'petstore'
api_instance = Petstore::FakeApi.new
-number = "number_example" # String | None
+number = 3.4 # Float | None
double = 1.2 # Float | None
diff --git a/samples/client/petstore/ruby/docs/200Response.md b/samples/client/petstore/ruby/docs/200Response.md
new file mode 100644
index 000000000000..2e0f1ec92f36
--- /dev/null
+++ b/samples/client/petstore/ruby/docs/200Response.md
@@ -0,0 +1,8 @@
+# Petstore::200Response
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **Integer** | | [optional]
+
+
diff --git a/samples/client/petstore/ruby/docs/FakeApi.md b/samples/client/petstore/ruby/docs/FakeApi.md
index a7c0b42a4759..32f2902d930a 100644
--- a/samples/client/petstore/ruby/docs/FakeApi.md
+++ b/samples/client/petstore/ruby/docs/FakeApi.md
@@ -21,7 +21,7 @@ require 'petstore'
api_instance = Petstore::FakeApi.new
-number = "number_example" # String | None
+number = 3.4 # Float | None
double = 1.2 # Float | None
@@ -52,7 +52,7 @@ end
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **number** | **String**| None |
+ **number** | **Float**| None |
**double** | **Float**| None |
**string** | **String**| None |
**byte** | **String**| None |
diff --git a/samples/client/petstore/ruby/docs/FormatTest.md b/samples/client/petstore/ruby/docs/FormatTest.md
index 7197a7a6584f..79cf9b5a8663 100644
--- a/samples/client/petstore/ruby/docs/FormatTest.md
+++ b/samples/client/petstore/ruby/docs/FormatTest.md
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
**binary** | **String** | | [optional]
**date** | **Date** | |
**date_time** | **DateTime** | | [optional]
+**uuid** | **String** | | [optional]
**password** | **String** | |
diff --git a/samples/client/petstore/ruby/docs/PetApi.md b/samples/client/petstore/ruby/docs/PetApi.md
index d485993c6ed3..d5a498c6ff09 100644
--- a/samples/client/petstore/ruby/docs/PetApi.md
+++ b/samples/client/petstore/ruby/docs/PetApi.md
@@ -239,8 +239,8 @@ require 'petstore'
Petstore.configure do |config|
# Configure API key authorization: api_key
config.api_key['api_key'] = 'YOUR API KEY'
- # Uncomment the following line to set a prefix for the API key, e.g. 'BEARER' (defaults to nil)
- #config.api_key_prefix['api_key'] = 'BEARER'
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
+ #config.api_key_prefix['api_key'] = 'Bearer'
end
api_instance = Petstore::PetApi.new
diff --git a/samples/client/petstore/ruby/docs/StoreApi.md b/samples/client/petstore/ruby/docs/StoreApi.md
index 8c607b9d7c9b..c38a41eeef44 100644
--- a/samples/client/petstore/ruby/docs/StoreApi.md
+++ b/samples/client/petstore/ruby/docs/StoreApi.md
@@ -71,8 +71,8 @@ require 'petstore'
Petstore.configure do |config|
# Configure API key authorization: api_key
config.api_key['api_key'] = 'YOUR API KEY'
- # Uncomment the following line to set a prefix for the API key, e.g. 'BEARER' (defaults to nil)
- #config.api_key_prefix['api_key'] = 'BEARER'
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
+ #config.api_key_prefix['api_key'] = 'Bearer'
end
api_instance = Petstore::StoreApi.new
diff --git a/samples/client/petstore/ruby/git_push.sh b/samples/client/petstore/ruby/git_push.sh
index 1a36388db023..ed374619b139 100644
--- a/samples/client/petstore/ruby/git_push.sh
+++ b/samples/client/petstore/ruby/git_push.sh
@@ -8,12 +8,12 @@ git_repo_id=$2
release_note=$3
if [ "$git_user_id" = "" ]; then
- git_user_id="YOUR_GIT_USR_ID"
+ git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
- git_repo_id="YOUR_GIT_REPO_ID"
+ git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb
index a7ebd095f9d4..946e00015552 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb
@@ -40,6 +40,8 @@ module Petstore
attr_accessor :date_time
+ attr_accessor :uuid
+
attr_accessor :password
# Attribute mapping from ruby-style variable name to JSON key.
@@ -56,6 +58,7 @@ module Petstore
:'binary' => :'binary',
:'date' => :'date',
:'date_time' => :'dateTime',
+ :'uuid' => :'uuid',
:'password' => :'password'
}
end
@@ -74,6 +77,7 @@ module Petstore
:'binary' => :'String',
:'date' => :'Date',
:'date_time' => :'DateTime',
+ :'uuid' => :'String',
:'password' => :'String'
}
end
@@ -130,6 +134,10 @@ module Petstore
self.date_time = attributes[:'dateTime']
end
+ if attributes.has_key?(:'uuid')
+ self.uuid = attributes[:'uuid']
+ end
+
if attributes.has_key?(:'password')
self.password = attributes[:'password']
end
@@ -354,6 +362,7 @@ module Petstore
binary == o.binary &&
date == o.date &&
date_time == o.date_time &&
+ uuid == o.uuid &&
password == o.password
end
@@ -366,7 +375,7 @@ module Petstore
# Calculates hash code according to all attributes.
# @return [Fixnum] Hash code
def hash
- [integer, int32, int64, number, float, double, string, byte, binary, date, date_time, password].hash
+ [integer, int32, int64, number, float, double, string, byte, binary, date, date_time, uuid, password].hash
end
# Builds the object from hash
diff --git a/samples/client/petstore/ruby/spec/api/store_api_spec.rb b/samples/client/petstore/ruby/spec/api/store_api_spec.rb
index 479891e9308c..015d1d8e39d4 100644
--- a/samples/client/petstore/ruby/spec/api/store_api_spec.rb
+++ b/samples/client/petstore/ruby/spec/api/store_api_spec.rb
@@ -69,7 +69,7 @@ describe 'StoreApi' do
# unit tests for get_order_by_id
# Find purchase order by ID
- # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
# @param order_id ID of pet that needs to be fetched
# @param [Hash] opts the optional parameters
# @return [Order]
diff --git a/samples/client/petstore/ruby/spec/api/user_api_spec.rb b/samples/client/petstore/ruby/spec/api/user_api_spec.rb
index 4564491d5076..272980a6db02 100644
--- a/samples/client/petstore/ruby/spec/api/user_api_spec.rb
+++ b/samples/client/petstore/ruby/spec/api/user_api_spec.rb
@@ -103,7 +103,7 @@ describe 'UserApi' do
# unit tests for get_user_by_name
# Get user by user name
#
- # @param username The name that needs to be fetched. Use user1 for testing.
+ # @param username The name that needs to be fetched. Use user1 for testing.
# @param [Hash] opts the optional parameters
# @return [User]
describe 'get_user_by_name test' do
diff --git a/samples/client/petstore/ruby/spec/models/dog_spec.rb b/samples/client/petstore/ruby/spec/models/dog_spec.rb
index 20375338c7ee..b319d72b80aa 100644
--- a/samples/client/petstore/ruby/spec/models/dog_spec.rb
+++ b/samples/client/petstore/ruby/spec/models/dog_spec.rb
@@ -36,7 +36,7 @@ describe 'Dog' do
@instance.should be_a(Petstore::Dog)
end
end
- describe 'test attribute "class_name"' do
+ describe 'test attribute "breed"' do
it 'should work' do
# assertion here
# should be_a()
@@ -46,7 +46,7 @@ describe 'Dog' do
end
end
- describe 'test attribute "breed"' do
+ describe 'test attribute "class_name"' do
it 'should work' do
# assertion here
# should be_a()
diff --git a/samples/client/petstore/ruby/spec/models/format_test_spec.rb b/samples/client/petstore/ruby/spec/models/format_test_spec.rb
index e44131192a35..50b2980d17bf 100644
--- a/samples/client/petstore/ruby/spec/models/format_test_spec.rb
+++ b/samples/client/petstore/ruby/spec/models/format_test_spec.rb
@@ -146,6 +146,16 @@ describe 'FormatTest' do
end
end
+ describe 'test attribute "uuid"' do
+ it 'should work' do
+ # assertion here
+ # should be_a()
+ # should be_nil
+ # should ==
+ # should_not ==
+ end
+ end
+
describe 'test attribute "password"' do
it 'should work' do
# assertion here
diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models.swift
index f9e2f72b9082..0aa3b3e381c9 100644
--- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models.swift
+++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models.swift
@@ -156,7 +156,7 @@ class Decoders {
instance.petId = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["petId"])
instance.quantity = Decoders.decodeOptional(clazz: Int32.self, source: sourceDictionary["quantity"])
instance.shipDate = Decoders.decodeOptional(clazz: NSDate.self, source: sourceDictionary["shipDate"])
- instance.status = Order.Status(rawValue: (sourceDictionary["status"] as? String) ?? "")
+ instance.status = Order.ST(rawValue: (sourceDictionary["status"] as? String) ?? "")
instance.complete = Decoders.decodeOptional(clazz: Bool.self, source: sourceDictionary["complete"])
return instance
}
@@ -175,7 +175,7 @@ class Decoders {
instance.name = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["name"])
instance.photoUrls = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["photoUrls"])
instance.tags = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["tags"])
- instance.status = Pet.Status(rawValue: (sourceDictionary["status"] as? String) ?? "")
+ instance.status = Pet.ST(rawValue: (sourceDictionary["status"] as? String) ?? "")
return instance
}
diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Category.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Category.swift
index 19f31d266efd..89ce2ccb616e 100644
--- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Category.swift
+++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Category.swift
@@ -18,7 +18,6 @@ public class Category: JSONEncodable {
func encodeToJSON() -> AnyObject {
var nillableDictionary = [String:AnyObject?]()
nillableDictionary["id"] = self.id?.encodeToJSON()
- nillableDictionary["id"] = self.id?.encodeToJSON()
nillableDictionary["name"] = self.name
let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:]
return dictionary
diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Order.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Order.swift
index 4374d95ed470..e40861432665 100644
--- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Order.swift
+++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Order.swift
@@ -9,7 +9,7 @@ import Foundation
public class Order: JSONEncodable {
- public enum Status: String {
+ public enum ST: String {
case Placed = "placed"
case Approved = "approved"
case Delivered = "delivered"
@@ -19,7 +19,7 @@ public class Order: JSONEncodable {
public var quantity: Int32?
public var shipDate: NSDate?
/** Order Status */
- public var status: Status?
+ public var status: ST?
public var complete: Bool?
public init() {}
@@ -28,8 +28,6 @@ public class Order: JSONEncodable {
func encodeToJSON() -> AnyObject {
var nillableDictionary = [String:AnyObject?]()
nillableDictionary["id"] = self.id?.encodeToJSON()
- nillableDictionary["id"] = self.id?.encodeToJSON()
- nillableDictionary["petId"] = self.petId?.encodeToJSON()
nillableDictionary["petId"] = self.petId?.encodeToJSON()
nillableDictionary["quantity"] = self.quantity?.encodeToJSON()
nillableDictionary["shipDate"] = self.shipDate?.encodeToJSON()
diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Pet.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Pet.swift
index 8a467a5bf0b5..ee9aa295a53d 100644
--- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Pet.swift
+++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Pet.swift
@@ -9,7 +9,7 @@ import Foundation
public class Pet: JSONEncodable {
- public enum Status: String {
+ public enum ST: String {
case Available = "available"
case Pending = "pending"
case Sold = "sold"
@@ -20,7 +20,7 @@ public class Pet: JSONEncodable {
public var photoUrls: [String]?
public var tags: [Tag]?
/** pet status in the store */
- public var status: Status?
+ public var status: ST?
public init() {}
@@ -28,7 +28,6 @@ public class Pet: JSONEncodable {
func encodeToJSON() -> AnyObject {
var nillableDictionary = [String:AnyObject?]()
nillableDictionary["id"] = self.id?.encodeToJSON()
- nillableDictionary["id"] = self.id?.encodeToJSON()
nillableDictionary["category"] = self.category?.encodeToJSON()
nillableDictionary["name"] = self.name
nillableDictionary["photoUrls"] = self.photoUrls?.encodeToJSON()
diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Tag.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Tag.swift
index a3916f59b137..774f91557e66 100644
--- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Tag.swift
+++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Tag.swift
@@ -18,7 +18,6 @@ public class Tag: JSONEncodable {
func encodeToJSON() -> AnyObject {
var nillableDictionary = [String:AnyObject?]()
nillableDictionary["id"] = self.id?.encodeToJSON()
- nillableDictionary["id"] = self.id?.encodeToJSON()
nillableDictionary["name"] = self.name
let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:]
return dictionary
diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/User.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/User.swift
index 26e9c619927b..67b72a619221 100644
--- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/User.swift
+++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/User.swift
@@ -25,7 +25,6 @@ public class User: JSONEncodable {
func encodeToJSON() -> AnyObject {
var nillableDictionary = [String:AnyObject?]()
nillableDictionary["id"] = self.id?.encodeToJSON()
- nillableDictionary["id"] = self.id?.encodeToJSON()
nillableDictionary["username"] = self.username
nillableDictionary["firstName"] = self.firstName
nillableDictionary["lastName"] = self.lastName
diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj b/samples/client/petstore/swift/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj
index fe35821d6e0c..da35c633e44c 100644
--- a/samples/client/petstore/swift/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj
+++ b/samples/client/petstore/swift/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj
@@ -7,113 +7,103 @@
objects = {
/* Begin PBXBuildFile section */
+ 01BD61BBC475EB3369237B84FE24D3EE /* UIViewController+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BA017E288BB42E06EBEE9C6E6993EAF /* UIViewController+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 0268F9278E32ACC1F996F4E2E45622B5 /* UIActionSheet+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 6846D22C9F0CCBC48DF833E309A8E84F /* UIActionSheet+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; };
03F494989CC1A8857B68A317D5D6860F /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DF5FC3AF99846209C5FCE55A2E12D9A /* Response.swift */; };
0681ADC8BAE2C3185F13487BAAB4D9DD /* Upload.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCE38472832BBCC541E646DA6C18EF9C /* Upload.swift */; };
- 0B0F79070CD75DE3CF053E58B491A3AC /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD05F019D163F2D5FE7C8E64C1D2E299 /* UserAPI.swift */; };
+ 06F7C0C55DF4C09C015159F6B0802EB1 /* join.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84319E048FE6DD89B905FA3A81005C5F /* join.swift */; };
0B34EB4425C08BB021C2D09F75C9C146 /* OMGHTTPURLRQ.h in Headers */ = {isa = PBXBuildFile; fileRef = 450166FEA2155A5821D97744A0127DF8 /* OMGHTTPURLRQ.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 0BB1E79782E3BE258C30A65A20C85FC1 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC4BF94DC4B3D8B88FC160B00931B0EC /* QuartzCore.framework */; };
- 10E93502CF9CED0B6341DB95B658F2F9 /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C24509ECAD94A91B30D87D8B2DEEB9B /* Model200Response.swift */; };
- 14FD108A5B931460A799BDCB874A99C3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = DED58811444E6D32A1F7B372F034DB7A /* SpecialModelName.swift */; };
- 1A4D55F76DCB3489302BC425F4DB1C04 /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 143BC30E5DDAF52A3D9578F507EC6A41 /* when.m */; };
- 1DB7E23C2A2A8D4B5CE046135E4540C6 /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BFFA6FD621E9ED341AA89AEAC1604D7 /* PromiseKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 2308448E8874D3DAA33A1AEFEFCFBA2D /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BAE461B3A62164A09480E8967D29E64 /* Extensions.swift */; };
+ 0BDA43D8F48C8B0D504C440046FAF681 /* Umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A8906F6D6920DF197965D1740A7E283 /* Umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 0D240D796AAD10F0119A1D7AC2570AAA /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6EB54C331FED437583A5F01EB2757D1 /* NSObject+Promise.swift */; };
+ 11C221075C5B20BDEEB3DDF8EAC99E63 /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 4798BAC01B0E3F07E3BBBB07BA57F2D7 /* NSNotificationCenter+AnyPromise.m */; };
+ 11EA8D6B0352FD31F520F983CFB9D993 /* UIAlertView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = F075F63EFE77F7B59FF77CBA95B9AADF /* UIAlertView+AnyPromise.m */; };
+ 12348513CB81BD05B497C210905CDF65 /* UIAlertView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 92D340D66F03F31237B70F23FE9B00D0 /* UIAlertView+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 124EFF5E3C46EC88F47C52479FA6ACAF /* CALayer+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A22F2595054D39018E03961CA7283A /* CALayer+AnyPromise.m */; };
+ 1287903F965945AEB5EFC4EE768C7B38 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC4BF94DC4B3D8B88FC160B00931B0EC /* QuartzCore.framework */; };
+ 15ECEBA1EFBD023AEA47F36524270D2C /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F0266C5AE0B23A436291F6647902086 /* Models.swift */; };
+ 18FAC6B4FD3B44CB353C7A6027286100 /* NSURLConnection+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = BAE48ACA10E8895BB8BF5CE8C0846B4B /* NSURLConnection+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 1AC7E88F0EC64D1D4E83CE7767BFD2B7 /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = C476B916B763E55E4161F0B30760C4E8 /* afterlife.swift */; };
+ 1CDA074C6DC95876D85E13ECF882B93A /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 284B3DE9B793FCC633E971DB1798AFAF /* Pet.swift */; };
+ 1E1010EA437F154A554D04F7F3A894EC /* Promise+Properties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E0DBDE561A6C2E7AC7A24160F8A5F28 /* Promise+Properties.swift */; };
+ 25FBB92AFB8F5A777CE8E40EC3B9DACA /* PetstoreClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A8E0328DC896E0893B565FE8742167 /* PetstoreClient-dummy.m */; };
+ 2B38BB4603B4286FF8D7A780372E947F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 261F03A3C73374FD19333EEA59CCD59F /* PetAPI.swift */; };
2C5450AC69398958CF6F7539EF7D99E5 /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 30CE7341A995EF6812D71771E74CF7F7 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 2DF2D3E610EB6F19375570C0EBA9E77F /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = B868468092D7B2489B889A50981C9247 /* after.m */; };
- 30F9F020F5B35577080063E71CDAB08C /* OMGHTTPURLRQ.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3530BF15E14D1F6D7134EE67377D5C8C /* OMGHTTPURLRQ.framework */; };
- 33326318BF830A838DA62D54ADAA5ECA /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D172F6D749B7735D04B495330AB7FE3 /* Cat.swift */; };
+ 2D9379807BA243E1CE457D1BE963DA09 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 552D15E0340BF58CC1922B82E864AEC9 /* UserAPI.swift */; };
35F6B35131F89EA23246C6508199FB05 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB15A61DB7ABCB74565286162157C5A0 /* Foundation.framework */; };
- 38FE2977C973FA258977E86E1E964E02 /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5973BC143AE488C12FFB1E83E71F0C45 /* AnyPromise.swift */; };
- 39E7AFE23097B4BC393D43A44093FB63 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB15A61DB7ABCB74565286162157C5A0 /* Foundation.framework */; };
+ 3860D960E37C1257BDA54626CA592E86 /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F19945EE403F7B29D8B1939EA6D579A /* AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 387C7387FDC662D23D743879B6143D59 /* UIActionSheet+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD570E28B63274E742E7D1FBBD55BB41 /* UIActionSheet+Promise.swift */; };
3A8D316D4266A3309D0A98ED74F8A13A /* OMGUserAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 87BC7910B8D7D31310A07C32438A8C67 /* OMGUserAgent.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 41C531C4CEDCAE196A6F92FEAE66CCF3 /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7FF1C1E487B6795C5F6734CCA49DF3 /* StoreAPI.swift */; };
- 445F515F4FAB3537878E1377562BBBA7 /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 4798BAC01B0E3F07E3BBBB07BA57F2D7 /* NSNotificationCenter+AnyPromise.m */; };
- 4827FED90242878355B47A6D34BAABCA /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 323E5DCC342B03D7AE59F37523D2626A /* APIs.swift */; };
+ 443361437B359830308B93A7B98BE039 /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A3E5E3CD673B025FD8AC260E67AB47E /* StoreAPI.swift */; };
+ 46F838880F41F56ABD91796FC956B4BF /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2BAD338E56EF3CAA6E54490FE0C5DF9 /* APIHelper.swift */; };
48CB8E7E16443CA771E4DCFB3E0709A2 /* OMGHTTPURLRQ.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D579267FC1F163C8F04B444DAEFED0D /* OMGHTTPURLRQ.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
+ 4C22563311AC2B52651A6525A979E076 /* UIView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F0F4EDC2236E1C270DC2014181D6506 /* UIView+AnyPromise.m */; };
4DE5FCC41D100B113B6645EA64410F16 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FBD351D007CF4095C98C9DFD9D83D61 /* ParameterEncoding.swift */; };
- 4E07AC40078EBB1C88ED8700859F5A1B /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E506C8F40F5AD602D83B383EAA7C0CD /* APIHelper.swift */; };
+ 516D41E4D035A817CC5116C11302E408 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92734297B64DFE0EB0EDE1EA821163DB /* AlamofireImplementations.swift */; };
5192A7466019F9B3D7F1E987124E96BC /* OMGHTTPURLRQ-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F7EBDD2EEED520E06ACB3538B3832049 /* OMGHTTPURLRQ-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 523C1819FC864864A9715CF713DD12E9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB15A61DB7ABCB74565286162157C5A0 /* Foundation.framework */; };
5480169E42C456C49BE59E273D7E0115 /* OMGFormURLEncode.h in Headers */ = {isa = PBXBuildFile; fileRef = 51ADA0B6B6B00CB0E818AA8CBC311677 /* OMGFormURLEncode.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 5E46AC6FA35723E095C2EB6ED23C0510 /* PromiseKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9042667D08D783E45394FE8B97EE6468 /* PromiseKit-dummy.m */; };
- 5EECE3F98893B2D4E03DC027C57C21F3 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A60B64E388679F589CB959AA5FC4787 /* Models.swift */; };
- 5FDCAFE73B791C4A4B863C9D65F6CF7B /* UIAlertView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA854180C132DB5511D64C82535C5FDE /* UIAlertView+Promise.swift */; };
- 623677B20997F5EC0F6CA695CADD410B /* ObjectReturn.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3CC2D1A2A451C0A3C4DBD6D7E117C01 /* ObjectReturn.swift */; };
- 63AF5DF795F5D610768B4AF53C7E9976 /* UIActionSheet+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 6846D22C9F0CCBC48DF833E309A8E84F /* UIActionSheet+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 655C3826275A76D04835F2336AC87A91 /* UIAlertView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = F075F63EFE77F7B59FF77CBA95B9AADF /* UIAlertView+AnyPromise.m */; };
- 660435DF96CE68B3A3E078030C5F54FA /* UIView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3CDA0958D6247505ECD9098D662EA74 /* UIView+Promise.swift */; };
- 66B8591A8CCC9760D933506B71A13962 /* UIViewController+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BA017E288BB42E06EBEE9C6E6993EAF /* UIViewController+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 5D7EAE5725A7E750B51FD27AECB5F0FD /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = 6AD59903FAA8315AD0036AC459FFB97F /* join.m */; };
+ 5EE5E1CA27F3CB04A5DCF5BB90B76000 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5412898DEB10F1983487A10453C6B9CB /* Extensions.swift */; };
+ 5FFED823C0BDD412FA41B01EA47394D1 /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = F4B6A98D6DAF474045210F5A74FF1C3C /* hang.m */; };
+ 60EBBACB76CD5879FB7B9B3E0AA5E2C1 /* UIViewController+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = AA24C5EC82CF437D8D1FFFAB68975408 /* UIViewController+AnyPromise.m */; };
+ 656BED6137A9FFA3B2DF03861F525022 /* PetstoreClient-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F681D2C508D1BA8F62893120D9343A4 /* PetstoreClient-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 6A128FE350973D8A693E3F063C5E4A49 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = A92242715FB4C0608F8DCEBF8F3791E2 /* dispatch_promise.m */; };
+ 6B0A17CD24331793D2504E0FBBAF5EB2 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 211F73A46D90346F7FC6D0D29640EE4F /* Tag.swift */; };
6CB84A616D7B4D189A4E94BD37621575 /* OMGUserAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = E11BFB27B43B742CB5D6086C4233A909 /* OMGUserAgent.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
6D264CCBD7DAC0A530076FB1A847EEC7 /* Pods-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 894E5DA93A9F359521A89826BE6DA777 /* Pods-dummy.m */; };
6F63943B0E954F701F32BC7A1F4C2FEC /* OMGFormURLEncode.m in Sources */ = {isa = PBXBuildFile; fileRef = 25614E715DDC170DAFB0DF50C5503E33 /* OMGFormURLEncode.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
- 7120EA2BF0D3942FF9CE0EDABBF86BA1 /* NSURLConnection+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 412985229DA7A4DF9E129B7E8F0C09BB /* NSURLConnection+Promise.swift */; };
- 72B2C8A6E81C1E99E6093BE3BDBDE554 /* join.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84319E048FE6DD89B905FA3A81005C5F /* join.swift */; };
- 752EACD07B4F948C1F24E0583C5DA165 /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 3616971BAEF40302B7F2F8B1007C0B2B /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 7BCBC4FD2E385CAFC5F3949FFFFE2095 /* NSError+Cancellation.h in Headers */ = {isa = PBXBuildFile; fileRef = 045C1F608ADE57757E6732D721779F22 /* NSError+Cancellation.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 7C87E63D6733AC0FE083373A5FAF86CB /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71B762588C78E0A95319F5BB534965BE /* Category.swift */; };
- 7CE6DE14AB43CB51B4D5C5BA4293C47B /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = 6AD59903FAA8315AD0036AC459FFB97F /* join.m */; };
- 7D38A3624822DA504D0FBD9F4EA485BA /* UIViewController+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6D459D0AB2361B48F81C4D14C6D0DAA /* UIViewController+Promise.swift */; };
- 7DAC8F56FC00F6400AC3BF3AF79ACAFD /* ModelReturn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17CBD3DEAD30C207791B4B1A5AD66991 /* ModelReturn.swift */; };
+ 73FA79FDB37E5C458B996012BFB0CF04 /* PMKAlertController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C731FBFCC690050C6C08E5AC9D9DC724 /* PMKAlertController.swift */; };
+ 7D7A40DBAC93241786E8C553921E8C86 /* OMGHTTPURLRQ.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3530BF15E14D1F6D7134EE67377D5C8C /* OMGHTTPURLRQ.framework */; };
80F496237530D382A045A29654D8C11C /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 400A6910E83F606BCD67DC11FA706697 /* ServerTrustPolicy.swift */; };
- 81970BD13A497C0962CBEA922C1DAB3E /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = 980FD13F87B44BFD90F8AC129BEB2E61 /* race.swift */; };
+ 81A2DB65C0742D785DE7C2609CC14140 /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 535DF88FC12304114DEF55E4003421B2 /* NSURLSession+Promise.swift */; };
82971968CBDAB224212EEB4607C9FB8D /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53F8B2513042BD6DB957E8063EF895BD /* Result.swift */; };
- 82BEAE7085889DB1A860FE690273EA7E /* PMKAlertController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C731FBFCC690050C6C08E5AC9D9DC724 /* PMKAlertController.swift */; };
8399DBEE3E2D98EB1F466132E476F4D9 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F14E17B4D6BDF8BD3E384BE6528F744 /* MultipartFormData.swift */; };
- 8809E3D6CC478B4AC9FA6C2389A5447F /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6EB54C331FED437583A5F01EB2757D1 /* NSObject+Promise.swift */; };
- 8955A9B8A34594437C8D27C4C55BFC9E /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93B41BBA87E8FD7BD3513CD49733EB30 /* FormatTest.swift */; };
- 895CB65D12461DA4EA243ACE8346D21F /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = D513E5F3C28C7B452E79AE279B71813D /* User.swift */; };
- 8C749DAB8EA0585A7A5769F38CB33CBC /* NSURLConnection+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = A7F0DAACAC89A93B940BBE54E6A87E9F /* NSURLConnection+AnyPromise.m */; };
- 92EEF6DC60C3CA25AA3997D2652A28F9 /* PetstoreClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A8E0328DC896E0893B565FE8742167 /* PetstoreClient-dummy.m */; };
+ 857E5961D9F6E23BD86DEB613A1499C7 /* NSError+Cancellation.h in Headers */ = {isa = PBXBuildFile; fileRef = 045C1F608ADE57757E6732D721779F22 /* NSError+Cancellation.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 88B3F911629C08DEEB226F3B294AAB36 /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = B93FB4BB16CFB41DCA35A8CFAD7A7FEF /* NSNotificationCenter+Promise.swift */; };
+ 8C4A96A3E69C772990E3E922D0FD1BC4 /* UIView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = BCDD82DB3E6D43BA9769FCA9B744CB5E /* UIView+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 8D3A68D3CBD8A1D89099F704A04A04FC /* PromiseKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9042667D08D783E45394FE8B97EE6468 /* PromiseKit-dummy.m */; };
+ 8E3861989641484EE3095722EC08B5A9 /* NSURLConnection+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = A7F0DAACAC89A93B940BBE54E6A87E9F /* NSURLConnection+AnyPromise.m */; };
+ 909B0A29022956D90C32C4AA319F75D1 /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B7E90A568681E000EF3CB0917584F3C /* AnyPromise.m */; };
96D99D0C2472535A169DED65CB231CD7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB15A61DB7ABCB74565286162157C5A0 /* Foundation.framework */; };
- 97BDDBBB6BA36B90E98FCD53B9AE171A /* UIAlertView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 92D340D66F03F31237B70F23FE9B00D0 /* UIAlertView+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 994580EAAB3547FFCA0E969378A7AC2E /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D23C407A7CDBFD244D6115899F9D45D /* Promise.swift */; };
- 995CE773471ADA3D5FEB52DF624174C6 /* CALayer+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 27E0FE41D771BE8BE3F0D4F1DAD0B179 /* CALayer+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 9D7DE077DBB18ADD8C4272A59BEB323A /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1D1571AB15108DF6F9C4FE2064E3C43 /* Alamofire.framework */; };
- 9E7DA5C2386E5EA1D57B8C9A38D0A509 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = A92242715FB4C0608F8DCEBF8F3791E2 /* dispatch_promise.m */; };
+ 97D71F12142A541BEEF425805D51379E /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = 980FD13F87B44BFD90F8AC129BEB2E61 /* race.swift */; };
+ 9CFBA896DF45B68C788F80013AC3FDBB /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1D1571AB15108DF6F9C4FE2064E3C43 /* Alamofire.framework */; };
A2C172FE407C0BC3478ADCA91A6C9CEC /* Manager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D51C929AC51E34493AA757180C09C3B /* Manager.swift */; };
A3505FA2FB3067D53847AD288AC04F03 /* Download.swift in Sources */ = {isa = PBXBuildFile; fileRef = A04177B09D9596450D827FE49A36C4C4 /* Download.swift */; };
- A5EBC0528F4371B43BFA5A2293089BB5 /* dispatch_promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 392FA21A33296B88F790D62A4FAA4E4E /* dispatch_promise.swift */; };
- AA38773839F0E81980834A7A374BA9DC /* InlineResponse200.swift in Sources */ = {isa = PBXBuildFile; fileRef = 176079DAA9CD16ADABA2C18C289C529D /* InlineResponse200.swift */; };
- AC6DCF4BF95F44A46CF6BC9230AD6604 /* UIActionSheet+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD570E28B63274E742E7D1FBBD55BB41 /* UIActionSheet+Promise.swift */; };
- B0AB13A8C68D6972CEDF64FB39D38CB4 /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = 275DA9A664C70DD40A4059090D1A00D4 /* after.swift */; };
+ ADEEE5F368B5D707D03E78FD75C59048 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D23C407A7CDBFD244D6115899F9D45D /* Promise.swift */; };
B0FB4B01682814B9E3D32F9DC4A5E762 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B476A57549D7994745E17A6DE5BE745 /* Alamofire.swift */; };
- B26D78FFEBAA030D8E8D44B67888C4C2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB15A61DB7ABCB74565286162157C5A0 /* Foundation.framework */; };
- B2C0216914777E4B58E1827D854886C2 /* URLDataPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7CE161ED0CF68954A63F30528ACAD9B /* URLDataPromise.swift */; };
B6D2DC3E3DA44CD382B9B425F40E11C1 /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 139346EB669CBE2DE8FE506E14A2BA9C /* Alamofire-dummy.m */; };
- B9096C0EE89EC783BDDC77E1F07314E4 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = C716D7A2A32272C40DFA0AAC76DC0E1E /* Tag.swift */; };
- BC9F5678D442E5AA1B14083554B7B1C8 /* CALayer+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A22F2595054D39018E03961CA7283A /* CALayer+AnyPromise.m */; };
- BCCC0421EE641F782CA295FBD240E2E1 /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 535DF88FC12304114DEF55E4003421B2 /* NSURLSession+Promise.swift */; };
- BEE4B5067218AB107DDECC8B09569EFC /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B7E90A568681E000EF3CB0917584F3C /* AnyPromise.m */; };
- C5EEED0AFF5E2C5AAE2A646689B73DA3 /* UIViewController+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = AA24C5EC82CF437D8D1FFFAB68975408 /* UIViewController+AnyPromise.m */; };
C75519F0450166A6F28126ECC7664E9C /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA1AD92813B887E2D017D051B8C0E3D2 /* Validation.swift */; };
- CA0AABE1706F8B94DC37330AB2BC062C /* Umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A8906F6D6920DF197965D1740A7E283 /* Umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
- CB4E6EA27EA59B8851C744CA7D98A2BA /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A112EF8BB3933C1C1E42F11B3DD3B02A /* PromiseKit.framework */; };
- CE7DAD64CE27C4B98432BDB1CB0E21C7 /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AEDC82569B65EDA2A3D12E1F9B8A2D8 /* Dog.swift */; };
- D1E26E1C25F870E9A0AEC9240E589D75 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = C295084120B300E8BDB7B91981B104FC /* Name.swift */; };
+ C86881D2285095255829A578F0A85300 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = B868468092D7B2489B889A50981C9247 /* after.m */; };
+ C86CE0A47FAD4C9B2929A335D62A179E /* UIViewController+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6D459D0AB2361B48F81C4D14C6D0DAA /* UIViewController+Promise.swift */; };
+ CAF12A3EDA2376FFEAD4A12E413C1AAD /* UIActionSheet+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 9774D31336C85248A115B569E7D95283 /* UIActionSheet+AnyPromise.m */; };
+ CB2A58CBAB5A2E63D0CB70F2697CAE87 /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 143BC30E5DDAF52A3D9578F507EC6A41 /* when.m */; };
+ CD97970D21D3CB8C459FAFEF11EE60F3 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4DF0604EDC1460935E6E445A47023A4 /* Category.swift */; };
+ CE225CF07E6E385F014883D607AFA44D /* URLDataPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7CE161ED0CF68954A63F30528ACAD9B /* URLDataPromise.swift */; };
+ CE89E5C528D52BBCBCD23309603BA6D1 /* CALayer+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 27E0FE41D771BE8BE3F0D4F1DAD0B179 /* CALayer+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ D1735D6C4D574339EB49024228448459 /* UIView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3CDA0958D6247505ECD9098D662EA74 /* UIView+Promise.swift */; };
D1E8B31EFCBDE00F108E739AD69425C0 /* Pods-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BCC458FDD5F692BBB2BFC64BB5701FC /* Pods-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
D21B7325B3642887BFBE977E021F2D26 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD558DDCDDA1B46951548B02C34277EF /* ResponseSerialization.swift */; };
- D258F1E893340393ADABCB02B9FBA206 /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F19945EE403F7B29D8B1939EA6D579A /* AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; };
- D2C7190FC2A0F2868EB7C89F5CFA526B /* State.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DC63EB77B3791891517B98CAA115DE8 /* State.swift */; };
D358A828E68E152D06FC8E35533BF00B /* OMGHTTPURLRQ-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F36B65CF990C57DC527824ED0BA1915 /* OMGHTTPURLRQ-dummy.m */; };
- D39F4FBEE42A57E59471B2A0997FE4CF /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = F4B6A98D6DAF474045210F5A74FF1C3C /* hang.m */; };
- D57DA5AC37CE3CEA92958C9528F80FD9 /* UIActionSheet+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 9774D31336C85248A115B569E7D95283 /* UIActionSheet+AnyPromise.m */; };
+ D546A4DBA3F7750F45A6F63B994C081C /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B248364ABF60ACD7DB31A17DCFDFD0C /* User.swift */; };
D75CA395D510E08C404E55F5BDAE55CE /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A9CB35983E4859DFFBAD8840196A094 /* Error.swift */; };
- D839A38DEEDDB887F186714D75E73431 /* Promise+Properties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E0DBDE561A6C2E7AC7A24160F8A5F28 /* Promise+Properties.swift */; };
- DC710F75309F7DFEA3C5AB01E9288681 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAA644003A8DF304D35F77FE04B8AB17 /* AlamofireImplementations.swift */; };
- DCFE64070EE0BB77557935AD2A4ABF62 /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16730DAF3E51C161D8247E473F069E71 /* when.swift */; };
+ D93596046CD3B301F4EC99A7A118C82C /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 558DFECE2C740177CA6357DA71A1DFBB /* Error.swift */; };
+ DBD1F4247E1C591AE4EE5531599AB170 /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 3616971BAEF40302B7F2F8B1007C0B2B /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; };
DD8D067A7F742F39B87FA04CE12DD118 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB15A61DB7ABCB74565286162157C5A0 /* Foundation.framework */; };
- E1EB5507436EFBD58AF7B9FF051A5AC4 /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = C476B916B763E55E4161F0B30760C4E8 /* afterlife.swift */; };
- E3AB1EE3B8DECE5D55D9EB64B0D05E93 /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = A29C027BA870C5E7975BF50087CAE384 /* Pet.swift */; };
- E62ABEDB4D7B179589B75C8423C5BF9B /* NSURLConnection+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = BAE48ACA10E8895BB8BF5CE8C0846B4B /* NSURLConnection+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; };
- E74976C9C4A5EF60B0A9CA1285693DDF /* UIView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = BCDD82DB3E6D43BA9769FCA9B744CB5E /* UIView+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; };
- EB0C1A986BDF161D01919BCCCAE40D7E /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 076251AD10B5F4E8880F4C350E1D9D5A /* Animal.swift */; };
- F0E47CCDA10383F8489C3839FD0DF755 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A1DC80A0773C5A569348DC442EAFD1D /* UIKit.framework */; };
- F1E37BB11F68A6A76DF44B230F965E05 /* PetstoreClient-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F681D2C508D1BA8F62893120D9343A4 /* PetstoreClient-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
- F3D3D4088EDA3359CC0E5EBA9B683959 /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F2773E2F96E394825BE86FA45E48132 /* PetAPI.swift */; };
- F4448E76D51EBACC2B20CDFE3D2D90D7 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91579AC4E335E76904DB4DB54228CC42 /* Order.swift */; };
- F4C2BD51185019A010DA83458B007F81 /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = B93FB4BB16CFB41DCA35A8CFAD7A7FEF /* NSNotificationCenter+Promise.swift */; };
- F4E24EB57CB59F112060100A4B9E5D10 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 558DFECE2C740177CA6357DA71A1DFBB /* Error.swift */; };
+ E2B0094FAAEA55C55AD141136F650E35 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A545673F09F49CDD60A13B4B0AF1020 /* Order.swift */; };
+ EA35E77B4F31DC3E1D224458E0BC959D /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8072E1108951F272C003553FC8926C7 /* APIs.swift */; };
+ EA67B414E392EFD2B14742F55A595596 /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = 275DA9A664C70DD40A4059090D1A00D4 /* after.swift */; };
+ EA691570F0F8066651EE2A7066426384 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A1DC80A0773C5A569348DC442EAFD1D /* UIKit.framework */; };
+ EB3C88CDAF122BA763FEF85758370C7C /* UIAlertView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA854180C132DB5511D64C82535C5FDE /* UIAlertView+Promise.swift */; };
+ EB9A1F33DB49ADA09F6E7F19A2C30357 /* NSURLConnection+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 412985229DA7A4DF9E129B7E8F0C09BB /* NSURLConnection+Promise.swift */; };
+ ED30A8B82BA1D53CBC370B1DC18DA1EB /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16730DAF3E51C161D8247E473F069E71 /* when.swift */; };
+ EEF6E654182421FEBC0CC202E72F71A8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB15A61DB7ABCB74565286162157C5A0 /* Foundation.framework */; };
+ F4582E8DC1C9F362ADA4BAE9CEF8B681 /* dispatch_promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 392FA21A33296B88F790D62A4FAA4E4E /* dispatch_promise.swift */; };
+ F700EAA9F9F6C1F99C83B45D05C5AD14 /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BFFA6FD621E9ED341AA89AEAC1604D7 /* PromiseKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ F7161E50F083B2267363F243C4E4B78F /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5973BC143AE488C12FFB1E83E71F0C45 /* AnyPromise.swift */; };
+ F898D4270885EF1114608E76B0C09E21 /* State.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DC63EB77B3791891517B98CAA115DE8 /* State.swift */; };
+ FB0B33F03AC2BC8A7FC7FD912C12CC22 /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A112EF8BB3933C1C1E42F11B3DD3B02A /* PromiseKit.framework */; };
FC14480CECE872865A9C6E584F886DA3 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 133C5287CFDCB3B67578A7B1221E132C /* Request.swift */; };
FEF0D7653948988B804226129471C1EC /* Stream.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A8F373B23E0F7FB68B0BA71D92D1C60 /* Stream.swift */; };
- FF5CD62C722D6A68AD65462B56D7CB72 /* UIView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F0F4EDC2236E1C270DC2014181D6506 /* UIView+AnyPromise.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -121,17 +111,10 @@
isa = PBXContainerItemProxy;
containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;
proxyType = 1;
- remoteGlobalIDString = 57958C5706F810052A634C1714567A9F;
+ remoteGlobalIDString = 2FD913B4E24277823983BABFDB071664;
remoteInfo = PetstoreClient;
};
- 23252B1F29F10BD972ECD7BA34F20EA8 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 190ACD3A51BC90B85EADB13E9CDD207B;
- remoteInfo = OMGHTTPURLRQ;
- };
- 56AF0748FFC13AD34ECC967C04930EF8 /* PBXContainerItemProxy */ = {
+ 4BED27A854EA6600536518D29BBB3670 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;
proxyType = 1;
@@ -145,6 +128,13 @@
remoteGlobalIDString = 432ECC54282C84882B482CCB4CF227FC;
remoteInfo = Alamofire;
};
+ 8059767A82D94C9F7F7C16D030819C4E /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 190ACD3A51BC90B85EADB13E9CDD207B;
+ remoteInfo = OMGHTTPURLRQ;
+ };
9AD20158D23CE70A2A91E5B7859090C3 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;
@@ -156,14 +146,14 @@
isa = PBXContainerItemProxy;
containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;
proxyType = 1;
- remoteGlobalIDString = D9A01D449983C8E3EF61C0CA4A7D8F59;
+ remoteGlobalIDString = 25EDA9CFC641C69402B3857A2C4A39F0;
remoteInfo = PromiseKit;
};
- EEB067570D28F14A138B737F596BCB1A /* PBXContainerItemProxy */ = {
+ ECAC5E4454026C822004659466983ADD /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;
proxyType = 1;
- remoteGlobalIDString = D9A01D449983C8E3EF61C0CA4A7D8F59;
+ remoteGlobalIDString = 25EDA9CFC641C69402B3857A2C4A39F0;
remoteInfo = PromiseKit;
};
/* End PBXContainerItemProxy section */
@@ -171,10 +161,9 @@
/* Begin PBXFileReference section */
045C1F608ADE57757E6732D721779F22 /* NSError+Cancellation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSError+Cancellation.h"; path = "Sources/NSError+Cancellation.h"; sourceTree = "