From 6ac497d774618509ef362e7466a1929e291b5811 Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Tue, 31 Mar 2015 16:12:42 -0700 Subject: [PATCH] rebuilt --- bin/objc-petstore.sh | 2 +- pom.xml | 13 +++++++ .../io/swagger/client/model/Category.java | 4 +- .../java/io/swagger/client/model/Order.java | 12 +++--- .../java/io/swagger/client/model/Pet.java | 8 ++-- .../java/io/swagger/client/model/Tag.java | 4 +- .../java/io/swagger/client/model/User.java | 16 ++++---- .../io/swagger/client/model/Category.java | 4 +- .../java/io/swagger/client/model/Order.java | 12 +++--- .../java/io/swagger/client/model/Pet.java | 8 ++-- .../java/io/swagger/client/model/Tag.java | 4 +- .../java/io/swagger/client/model/User.java | 16 ++++---- .../client/petstore/python/client/PetApi.py | 37 +++++++++++-------- .../client/petstore/python/client/StoreApi.py | 19 ++++++---- .../client/petstore/python/client/UserApi.py | 36 ++++++++++-------- .../client/petstore/python/client/swagger.py | 24 +++++++----- .../dynamic-html/docs/models/Category.html | 4 +- samples/dynamic-html/docs/models/Order.html | 12 +++--- samples/dynamic-html/docs/models/Pet.html | 8 ++-- samples/dynamic-html/docs/models/Tag.html | 4 +- samples/dynamic-html/docs/models/User.html | 16 ++++---- samples/html/index.html | 10 ++--- 22 files changed, 151 insertions(+), 122 deletions(-) diff --git a/bin/objc-petstore.sh b/bin/objc-petstore.sh index 7dfcd2d8d28..513b7535786 100755 --- a/bin/objc-petstore.sh +++ b/bin/objc-petstore.sh @@ -28,4 +28,4 @@ fi export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" ags="$@ generate -t modules/swagger-codegen/src/main/resources/objc -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l objc -o samples/client/petstore/objc" -java -DdebugModels -DappName=PetstoreClient $JAVA_OPTS -jar $executable $ags +java -DappName=PetstoreClient $JAVA_OPTS -jar $executable $ags diff --git a/pom.xml b/pom.xml index c5c43847826..d2b6e882178 100644 --- a/pom.xml +++ b/pom.xml @@ -278,6 +278,18 @@ + + android-client + + + env + java + + + + samples/client/petstore/android-java + + java-client @@ -335,6 +347,7 @@ + samples/client/petstore/android-java samples/client/petstore/java samples/server/petstore/jaxrs samples/client/petstore/objc diff --git a/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/Category.java index 3a7a84f89bb..ad67267a2f6 100644 --- a/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/Category.java @@ -14,7 +14,7 @@ public class Category { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -26,7 +26,7 @@ public class Category { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { return name; diff --git a/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/Order.java index f516f66e1fe..b9f7d1dc897 100644 --- a/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/Order.java @@ -22,7 +22,7 @@ public class Order { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -34,7 +34,7 @@ public class Order { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { return petId; @@ -46,7 +46,7 @@ public class Order { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { return quantity; @@ -58,7 +58,7 @@ public class Order { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("shipDate") public Date getShipDate() { return shipDate; @@ -71,7 +71,7 @@ public class Order { /** * Order Status **/ - @ApiModelProperty(required = false, value = "Order Status") + @ApiModelProperty(value = "Order Status") @JsonProperty("status") public StatusEnum getStatus() { return status; @@ -83,7 +83,7 @@ public class Order { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { return complete; diff --git a/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/Pet.java index 297e1360c70..d685a8c1cbf 100644 --- a/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/Pet.java @@ -24,7 +24,7 @@ public class Pet { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -36,7 +36,7 @@ public class Pet { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("category") public Category getCategory() { return category; @@ -72,7 +72,7 @@ public class Pet { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("tags") public List getTags() { return tags; @@ -85,7 +85,7 @@ public class Pet { /** * pet status in the store **/ - @ApiModelProperty(required = false, value = "pet status in the store") + @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") public StatusEnum getStatus() { return status; diff --git a/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/Tag.java index d9bf765477b..b9dddc92f1b 100644 --- a/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/Tag.java @@ -14,7 +14,7 @@ public class Tag { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -26,7 +26,7 @@ public class Tag { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { return name; diff --git a/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/User.java index d82288e8c25..9811a7741f9 100644 --- a/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/android-java/src/main/java/io/swagger/client/model/User.java @@ -20,7 +20,7 @@ public class User { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -32,7 +32,7 @@ public class User { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { return username; @@ -44,7 +44,7 @@ public class User { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { return firstName; @@ -56,7 +56,7 @@ public class User { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { return lastName; @@ -68,7 +68,7 @@ public class User { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { return email; @@ -80,7 +80,7 @@ public class User { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { return password; @@ -92,7 +92,7 @@ public class User { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { return phone; @@ -105,7 +105,7 @@ public class User { /** * User Status **/ - @ApiModelProperty(required = false, value = "User Status") + @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { return userStatus; diff --git a/samples/client/petstore/java/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/src/main/java/io/swagger/client/model/Category.java index 3a7a84f89bb..ad67267a2f6 100644 --- a/samples/client/petstore/java/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/src/main/java/io/swagger/client/model/Category.java @@ -14,7 +14,7 @@ public class Category { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -26,7 +26,7 @@ public class Category { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { return name; diff --git a/samples/client/petstore/java/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/src/main/java/io/swagger/client/model/Order.java index f516f66e1fe..b9f7d1dc897 100644 --- a/samples/client/petstore/java/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/src/main/java/io/swagger/client/model/Order.java @@ -22,7 +22,7 @@ public class Order { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -34,7 +34,7 @@ public class Order { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { return petId; @@ -46,7 +46,7 @@ public class Order { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { return quantity; @@ -58,7 +58,7 @@ public class Order { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("shipDate") public Date getShipDate() { return shipDate; @@ -71,7 +71,7 @@ public class Order { /** * Order Status **/ - @ApiModelProperty(required = false, value = "Order Status") + @ApiModelProperty(value = "Order Status") @JsonProperty("status") public StatusEnum getStatus() { return status; @@ -83,7 +83,7 @@ public class Order { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { return complete; diff --git a/samples/client/petstore/java/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/src/main/java/io/swagger/client/model/Pet.java index 297e1360c70..d685a8c1cbf 100644 --- a/samples/client/petstore/java/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/src/main/java/io/swagger/client/model/Pet.java @@ -24,7 +24,7 @@ public class Pet { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -36,7 +36,7 @@ public class Pet { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("category") public Category getCategory() { return category; @@ -72,7 +72,7 @@ public class Pet { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("tags") public List getTags() { return tags; @@ -85,7 +85,7 @@ public class Pet { /** * pet status in the store **/ - @ApiModelProperty(required = false, value = "pet status in the store") + @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") public StatusEnum getStatus() { return status; diff --git a/samples/client/petstore/java/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/src/main/java/io/swagger/client/model/Tag.java index d9bf765477b..b9dddc92f1b 100644 --- a/samples/client/petstore/java/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/src/main/java/io/swagger/client/model/Tag.java @@ -14,7 +14,7 @@ public class Tag { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -26,7 +26,7 @@ public class Tag { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { return name; diff --git a/samples/client/petstore/java/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/src/main/java/io/swagger/client/model/User.java index d82288e8c25..9811a7741f9 100644 --- a/samples/client/petstore/java/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/src/main/java/io/swagger/client/model/User.java @@ -20,7 +20,7 @@ public class User { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -32,7 +32,7 @@ public class User { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { return username; @@ -44,7 +44,7 @@ public class User { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { return firstName; @@ -56,7 +56,7 @@ public class User { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { return lastName; @@ -68,7 +68,7 @@ public class User { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { return email; @@ -80,7 +80,7 @@ public class User { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { return password; @@ -92,7 +92,7 @@ public class User { /** **/ - @ApiModelProperty(required = false, value = "") + @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { return phone; @@ -105,7 +105,7 @@ public class User { /** * User Status **/ - @ApiModelProperty(required = false, value = "User Status") + @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { return userStatus; diff --git a/samples/client/petstore/python/client/PetApi.py b/samples/client/petstore/python/client/PetApi.py index 4b99f62a935..519e2ea777b 100644 --- a/samples/client/petstore/python/client/PetApi.py +++ b/samples/client/petstore/python/client/PetApi.py @@ -19,6 +19,7 @@ NOTE: This class is auto generated by the swagger code generator program. Do not """ import sys import os +import urllib from models import * @@ -61,8 +62,8 @@ class PetApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = 'application/json,application/xml'; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = 'application/json,application/xml' @@ -117,8 +118,8 @@ class PetApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = 'application/json,application/xml'; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = 'application/json,application/xml' @@ -173,8 +174,8 @@ class PetApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = ''; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = '' if ('status' in params): @@ -235,8 +236,8 @@ class PetApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = ''; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = '' if ('tags' in params): @@ -297,8 +298,8 @@ class PetApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = ''; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = '' @@ -307,6 +308,7 @@ class PetApi(object): if ('petId' in params): replacement = str(self.apiClient.toPathValue(params['petId'])) + replacement = urllib.quote(replacement) resourcePath = resourcePath.replace('{' + 'petId' + '}', replacement) @@ -367,8 +369,8 @@ class PetApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = 'application/x-www-form-urlencoded'; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = 'application/x-www-form-urlencoded' @@ -377,6 +379,7 @@ class PetApi(object): if ('petId' in params): replacement = str(self.apiClient.toPathValue(params['petId'])) + replacement = urllib.quote(replacement) resourcePath = resourcePath.replace('{' + 'petId' + '}', replacement) @@ -434,8 +437,8 @@ class PetApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = ''; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = '' @@ -447,6 +450,7 @@ class PetApi(object): if ('petId' in params): replacement = str(self.apiClient.toPathValue(params['petId'])) + replacement = urllib.quote(replacement) resourcePath = resourcePath.replace('{' + 'petId' + '}', replacement) @@ -501,8 +505,8 @@ class PetApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = 'multipart/form-data'; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = 'multipart/form-data' @@ -511,6 +515,7 @@ class PetApi(object): if ('petId' in params): replacement = str(self.apiClient.toPathValue(params['petId'])) + replacement = urllib.quote(replacement) resourcePath = resourcePath.replace('{' + 'petId' + '}', replacement) diff --git a/samples/client/petstore/python/client/StoreApi.py b/samples/client/petstore/python/client/StoreApi.py index f47a4408cbb..5f7a1b37d7a 100644 --- a/samples/client/petstore/python/client/StoreApi.py +++ b/samples/client/petstore/python/client/StoreApi.py @@ -19,6 +19,7 @@ NOTE: This class is auto generated by the swagger code generator program. Do not """ import sys import os +import urllib from models import * @@ -58,8 +59,8 @@ class StoreApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = ''; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = '' @@ -117,8 +118,8 @@ class StoreApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = ''; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = '' @@ -179,8 +180,8 @@ class StoreApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = ''; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = '' @@ -189,6 +190,7 @@ class StoreApi(object): if ('orderId' in params): replacement = str(self.apiClient.toPathValue(params['orderId'])) + replacement = urllib.quote(replacement) resourcePath = resourcePath.replace('{' + 'orderId' + '}', replacement) @@ -243,8 +245,8 @@ class StoreApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = ''; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = '' @@ -253,6 +255,7 @@ class StoreApi(object): if ('orderId' in params): replacement = str(self.apiClient.toPathValue(params['orderId'])) + replacement = urllib.quote(replacement) resourcePath = resourcePath.replace('{' + 'orderId' + '}', replacement) diff --git a/samples/client/petstore/python/client/UserApi.py b/samples/client/petstore/python/client/UserApi.py index a357b785c57..5b54b57f5b0 100644 --- a/samples/client/petstore/python/client/UserApi.py +++ b/samples/client/petstore/python/client/UserApi.py @@ -19,6 +19,7 @@ NOTE: This class is auto generated by the swagger code generator program. Do not """ import sys import os +import urllib from models import * @@ -61,8 +62,8 @@ class UserApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = ''; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = '' @@ -117,8 +118,8 @@ class UserApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = ''; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = '' @@ -173,8 +174,8 @@ class UserApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = ''; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = '' @@ -232,8 +233,8 @@ class UserApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = ''; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = '' if ('username' in params): @@ -294,8 +295,8 @@ class UserApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = ''; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = '' @@ -347,8 +348,8 @@ class UserApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = ''; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = '' @@ -357,6 +358,7 @@ class UserApi(object): if ('username' in params): replacement = str(self.apiClient.toPathValue(params['username'])) + replacement = urllib.quote(replacement) resourcePath = resourcePath.replace('{' + 'username' + '}', replacement) @@ -414,8 +416,8 @@ class UserApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = ''; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = '' @@ -424,6 +426,7 @@ class UserApi(object): if ('username' in params): replacement = str(self.apiClient.toPathValue(params['username'])) + replacement = urllib.quote(replacement) resourcePath = resourcePath.replace('{' + 'username' + '}', replacement) @@ -475,8 +478,8 @@ class UserApi(object): files = {} bodyParam = None - headerParams['Accept'] = 'application/json,application/xml'; - headerParams['Content-Type'] = ''; + headerParams['Accept'] = 'application/json,application/xml' + headerParams['Content-Type'] = '' @@ -485,6 +488,7 @@ class UserApi(object): if ('username' in params): replacement = str(self.apiClient.toPathValue(params['username'])) + replacement = urllib.quote(replacement) resourcePath = resourcePath.replace('{' + 'username' + '}', replacement) diff --git a/samples/client/petstore/python/client/swagger.py b/samples/client/petstore/python/client/swagger.py index 1cfc60981be..693c9fa6296 100644 --- a/samples/client/petstore/python/client/swagger.py +++ b/samples/client/petstore/python/client/swagger.py @@ -28,23 +28,27 @@ class ApiClient(object): headerValue: a header value to pass when making calls to the API """ def __init__(self, host=None, headerName=None, headerValue=None): - self.headerName = headerName - self.headerValue = headerValue + self.defaultHeaders = {} + if (headerName is not None): + self.defaultHeaders[headerName] = headerValue self.host = host self.cookie = None self.boundary = ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(30)) + def setDefaultHeader(self, headerName, headerValue): + self.defaultHeaders[headerName] = headerValue + def callAPI(self, resourcePath, method, queryParams, postData, headerParams=None, files=None): url = self.host + resourcePath - headers = {} - if headerParams: - for param, value in headerParams.iteritems(): - headers[param] = ApiClient.sanitizeForSerialization(value) - if self.headerName: - headers[self.headerName] = ApiClient.sanitizeForSerialization(self.headerValue) + mergedHeaderParams = self.defaultHeaders.copy() + mergedHeaderParams.update(headerParams) + headers = {} + if mergedHeaderParams: + for param, value in mergedHeaderParams.iteritems(): + headers[param] = ApiClient.sanitizeForSerialization(value) if self.cookie: headers['Cookie'] = ApiClient.sanitizeForSerialization(self.cookie) @@ -103,9 +107,9 @@ class ApiClient(object): string -- quoted value """ if type(obj) == list: - return urllib.quote(','.join(obj)) + return ','.join(obj) else: - return urllib.quote(str(obj)) + return str(obj) @staticmethod def sanitizeForSerialization(obj): diff --git a/samples/dynamic-html/docs/models/Category.html b/samples/dynamic-html/docs/models/Category.html index 52e04b2072a..15c6820eead 100644 --- a/samples/dynamic-html/docs/models/Category.html +++ b/samples/dynamic-html/docs/models/Category.html @@ -2,13 +2,13 @@

Category

    -
  • id : Long +
  • id : Long
    -
  • name : String +
  • name : String
diff --git a/samples/dynamic-html/docs/models/Order.html b/samples/dynamic-html/docs/models/Order.html index cea3cef3fd6..82278a470c2 100644 --- a/samples/dynamic-html/docs/models/Order.html +++ b/samples/dynamic-html/docs/models/Order.html @@ -2,37 +2,37 @@

Order

    -
  • id : Long +
  • id : Long
    -
  • petId : Long +
  • petId : Long
    -
  • quantity : Integer +
  • quantity : Integer
    -
  • shipDate : Date +
  • shipDate : Date
    -
  • status : String +
  • status : String
    Order Status
    -
  • complete : Boolean +
  • complete : Boolean
diff --git a/samples/dynamic-html/docs/models/Pet.html b/samples/dynamic-html/docs/models/Pet.html index ea50d7f0299..17468477704 100644 --- a/samples/dynamic-html/docs/models/Pet.html +++ b/samples/dynamic-html/docs/models/Pet.html @@ -2,13 +2,13 @@

Pet

    -
  • id : Long +
  • id : Long
    -
  • category : Category +
  • category : Category
@@ -26,13 +26,13 @@
    -
  • tags : List +
  • tags : List
    -
  • status : String +
  • status : String
    pet status in the store
diff --git a/samples/dynamic-html/docs/models/Tag.html b/samples/dynamic-html/docs/models/Tag.html index ba0314f1c41..e84b50d73d6 100644 --- a/samples/dynamic-html/docs/models/Tag.html +++ b/samples/dynamic-html/docs/models/Tag.html @@ -2,13 +2,13 @@

Tag

    -
  • id : Long +
  • id : Long
    -
  • name : String +
  • name : String
diff --git a/samples/dynamic-html/docs/models/User.html b/samples/dynamic-html/docs/models/User.html index 41f7e2376f1..c71cf6649d7 100644 --- a/samples/dynamic-html/docs/models/User.html +++ b/samples/dynamic-html/docs/models/User.html @@ -2,49 +2,49 @@

User

    -
  • id : Long +
  • id : Long
    -
  • username : String +
  • username : String
    -
  • firstName : String +
  • firstName : String
    -
  • lastName : String +
  • lastName : String
    -
  • email : String +
  • email : String
    -
  • password : String +
  • password : String
    -
  • phone : String +
  • phone : String
    -
  • userStatus : Integer +
  • userStatus : Integer
    User Status
diff --git a/samples/html/index.html b/samples/html/index.html index 4f6ab3da6c9..301c8b288d3 100644 --- a/samples/html/index.html +++ b/samples/html/index.html @@ -420,7 +420,7 @@

Example data

Content-Type: application/xml
-
not implemented com.wordnik.swagger.models.properties.MapProperty@64e17c9c
+
not implemented com.wordnik.swagger.models.properties.MapProperty@12e335ef

@@ -444,11 +444,11 @@

Example data

Content-Type: application/json
-
{\n  "id" : 123456789,\n  "petId" : 123456789,\n  "complete" : true,\n  "status" : "aeiou",\n  "quantity" : 123,\n  "shipDate" : "2015-03-30T01:51:23.181+0000"\n}
+
{\n  "id" : 123456789,\n  "petId" : 123456789,\n  "complete" : true,\n  "status" : "aeiou",\n  "quantity" : 123,\n  "shipDate" : "2015-03-31T23:09:59.239+0000"\n}

Example data

Content-Type: application/xml
-
\n  123456\n  123456\n  0\n  2015-03-29T18:51:23.183Z\n  string\n  true\n
+
\n  123456\n  123456\n  0\n  2015-03-31T16:09:59.242Z\n  string\n  true\n

@@ -472,11 +472,11 @@

Example data

Content-Type: application/json
-
{\n  "id" : 123456789,\n  "petId" : 123456789,\n  "complete" : true,\n  "status" : "aeiou",\n  "quantity" : 123,\n  "shipDate" : "2015-03-30T01:51:23.184+0000"\n}
+
{\n  "id" : 123456789,\n  "petId" : 123456789,\n  "complete" : true,\n  "status" : "aeiou",\n  "quantity" : 123,\n  "shipDate" : "2015-03-31T23:09:59.243+0000"\n}

Example data

Content-Type: application/xml
-
\n  123456\n  123456\n  0\n  2015-03-29T18:51:23.185Z\n  string\n  true\n
+
\n  123456\n  123456\n  0\n  2015-03-31T16:09:59.243Z\n  string\n  true\n