mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-01 06:20:53 +00:00
rebuilt
This commit is contained in:
parent
cd2c8f6527
commit
6ac497d774
@ -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
|
||||
|
13
pom.xml
13
pom.xml
@ -278,6 +278,18 @@
|
||||
</build>
|
||||
</profile>
|
||||
<!-- Samples -->
|
||||
<profile>
|
||||
<id>android-client</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>env</name>
|
||||
<value>java</value>
|
||||
</property>
|
||||
</activation>
|
||||
<modules>
|
||||
<module>samples/client/petstore/android-java</module>
|
||||
</modules>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>java-client</id>
|
||||
<activation>
|
||||
@ -335,6 +347,7 @@
|
||||
</property>
|
||||
</activation>
|
||||
<modules>
|
||||
<module>samples/client/petstore/android-java</module>
|
||||
<module>samples/client/petstore/java</module>
|
||||
<module>samples/server/petstore/jaxrs</module>
|
||||
<module>samples/client/petstore/objc</module>
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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<Tag> 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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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<Tag> 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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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):
|
||||
|
@ -2,13 +2,13 @@
|
||||
<h2>Category</h2>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">id : Long
|
||||
<li class="param-required-">id : Long
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">name : String
|
||||
<li class="param-required-">name : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -2,37 +2,37 @@
|
||||
<h2>Order</h2>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">id : Long
|
||||
<li class="param-required-">id : Long
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">petId : Long
|
||||
<li class="param-required-">petId : Long
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">quantity : Integer
|
||||
<li class="param-required-">quantity : Integer
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">shipDate : Date
|
||||
<li class="param-required-">shipDate : Date
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">status : String
|
||||
<li class="param-required-">status : String
|
||||
<br/>Order Status
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">complete : Boolean
|
||||
<li class="param-required-">complete : Boolean
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -2,13 +2,13 @@
|
||||
<h2>Pet</h2>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">id : Long
|
||||
<li class="param-required-">id : Long
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">category : Category
|
||||
<li class="param-required-">category : Category
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
@ -26,13 +26,13 @@
|
||||
</ul>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">tags : List
|
||||
<li class="param-required-">tags : List
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">status : String
|
||||
<li class="param-required-">status : String
|
||||
<br/>pet status in the store
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -2,13 +2,13 @@
|
||||
<h2>Tag</h2>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">id : Long
|
||||
<li class="param-required-">id : Long
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">name : String
|
||||
<li class="param-required-">name : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -2,49 +2,49 @@
|
||||
<h2>User</h2>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">id : Long
|
||||
<li class="param-required-">id : Long
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">username : String
|
||||
<li class="param-required-">username : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">firstName : String
|
||||
<li class="param-required-">firstName : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">lastName : String
|
||||
<li class="param-required-">lastName : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">email : String
|
||||
<li class="param-required-">email : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">password : String
|
||||
<li class="param-required-">password : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">phone : String
|
||||
<li class="param-required-">phone : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">userStatus : Integer
|
||||
<li class="param-required-">userStatus : Integer
|
||||
<br/>User Status
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -420,7 +420,7 @@
|
||||
|
||||
<h3 class="field-label">Example data</h3>
|
||||
<div class="example-data-content-type">Content-Type: application/xml</div>
|
||||
<pre class="example"><code>not implemented com.wordnik.swagger.models.properties.MapProperty@64e17c9c</code></pre>
|
||||
<pre class="example"><code>not implemented com.wordnik.swagger.models.properties.MapProperty@12e335ef</code></pre>
|
||||
|
||||
</div> <!-- method -->
|
||||
<hr>
|
||||
@ -444,11 +444,11 @@
|
||||
|
||||
<h3 class="field-label">Example data</h3>
|
||||
<div class="example-data-content-type">Content-Type: application/json</div>
|
||||
<pre class="example"><code>{\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}</code></pre>
|
||||
<pre class="example"><code>{\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}</code></pre>
|
||||
|
||||
<h3 class="field-label">Example data</h3>
|
||||
<div class="example-data-content-type">Content-Type: application/xml</div>
|
||||
<pre class="example"><code><Order>\n <id>123456</id>\n <petId>123456</petId>\n <quantity>0</quantity>\n <shipDate>2015-03-29T18:51:23.183Z</shipDate>\n <status>string</status>\n <complete>true</complete>\n</Order></code></pre>
|
||||
<pre class="example"><code><Order>\n <id>123456</id>\n <petId>123456</petId>\n <quantity>0</quantity>\n <shipDate>2015-03-31T16:09:59.242Z</shipDate>\n <status>string</status>\n <complete>true</complete>\n</Order></code></pre>
|
||||
|
||||
</div> <!-- method -->
|
||||
<hr>
|
||||
@ -472,11 +472,11 @@
|
||||
|
||||
<h3 class="field-label">Example data</h3>
|
||||
<div class="example-data-content-type">Content-Type: application/json</div>
|
||||
<pre class="example"><code>{\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}</code></pre>
|
||||
<pre class="example"><code>{\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}</code></pre>
|
||||
|
||||
<h3 class="field-label">Example data</h3>
|
||||
<div class="example-data-content-type">Content-Type: application/xml</div>
|
||||
<pre class="example"><code><Order>\n <id>123456</id>\n <petId>123456</petId>\n <quantity>0</quantity>\n <shipDate>2015-03-29T18:51:23.185Z</shipDate>\n <status>string</status>\n <complete>true</complete>\n</Order></code></pre>
|
||||
<pre class="example"><code><Order>\n <id>123456</id>\n <petId>123456</petId>\n <quantity>0</quantity>\n <shipDate>2015-03-31T16:09:59.243Z</shipDate>\n <status>string</status>\n <complete>true</complete>\n</Order></code></pre>
|
||||
|
||||
</div> <!-- method -->
|
||||
<hr>
|
||||
|
Loading…
x
Reference in New Issue
Block a user