forked from loafle/openapi-generator-original
updated versions
This commit is contained in:
parent
33c2b1b623
commit
3d2f09a693
@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
<artifactId>swagger-codegen-project</artifactId>
|
<artifactId>swagger-codegen-project</artifactId>
|
||||||
<version>2.1.1</version>
|
<version>2.1.2</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
<artifactId>swagger-codegen-project</artifactId>
|
<artifactId>swagger-codegen-project</artifactId>
|
||||||
<version>2.1.1</version>
|
<version>2.1.2</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
<artifactId>swagger-codegen-project</artifactId>
|
<artifactId>swagger-codegen-project</artifactId>
|
||||||
<version>2.1.1</version>
|
<version>2.1.2</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>swagger-generator</artifactId>
|
<artifactId>swagger-generator</artifactId>
|
||||||
|
2
pom.xml
2
pom.xml
@ -10,7 +10,7 @@
|
|||||||
<artifactId>swagger-codegen-project</artifactId>
|
<artifactId>swagger-codegen-project</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>swagger-codegen-project</name>
|
<name>swagger-codegen-project</name>
|
||||||
<version>2.1.1</version>
|
<version>2.1.2</version>
|
||||||
<url>https://github.com/swagger-api/swagger-codegen</url>
|
<url>https://github.com/swagger-api/swagger-codegen</url>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:git@github.com:swagger-api/swagger-codegen.git</connection>
|
<connection>scm:git:git@github.com:swagger-api/swagger-codegen.git</connection>
|
||||||
|
@ -7,7 +7,9 @@ jcenter()
|
|||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:1.2.2'
|
classpath 'com.android.tools.build:gradle:1.2.2'
|
||||||
|
|
||||||
classpath 'com.github.dcendents:android-maven-plugin:1.2'
|
classpath 'com.github.dcendents:android-maven-plugin:1.2'
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,8 +77,7 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<sources>
|
<sources>
|
||||||
<source>
|
<source>src/main/java</source>
|
||||||
src/main/java</source>
|
|
||||||
</sources>
|
</sources>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
@ -90,8 +89,7 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<sources>
|
<sources>
|
||||||
<source>
|
<source>src/test/java</source>
|
||||||
src/test/java</source>
|
|
||||||
</sources>
|
</sources>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
@ -102,8 +100,7 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>2.3.2</version>
|
<version>2.3.2</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>
|
<source>1.6</source>
|
||||||
1.6</source>
|
|
||||||
<target>1.6</target>
|
<target>1.6</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
@ -53,9 +53,7 @@ import com.google.gson.JsonParseException;
|
|||||||
|
|
||||||
public class ApiInvoker {
|
public class ApiInvoker {
|
||||||
private static ApiInvoker INSTANCE = new ApiInvoker();
|
private static ApiInvoker INSTANCE = new ApiInvoker();
|
||||||
private Map
|
private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
||||||
<String, String> defaultHeaderMap = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
private HttpClient client = null;
|
private HttpClient client = null;
|
||||||
|
|
||||||
@ -186,10 +184,7 @@ throw new ApiException(500, e.getMessage());
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String invokeAPI(String host, String path, String method, Map
|
public String invokeAPI(String host, String path, String method, Map<String, String> queryParams, Object body, Map<String, String> headerParams, Map<String, String> formParams, String contentType) throws ApiException {
|
||||||
<String, String> queryParams, Object body, Map
|
|
||||||
<String, String> headerParams, Map
|
|
||||||
<String, String> formParams, String contentType) throws ApiException {
|
|
||||||
HttpClient client = getClient(host);
|
HttpClient client = getClient(host);
|
||||||
|
|
||||||
StringBuilder b = new StringBuilder();
|
StringBuilder b = new StringBuilder();
|
||||||
@ -205,9 +200,7 @@ b.append(escapeString(key)).append("=").append(escapeString(value));
|
|||||||
}
|
}
|
||||||
String url = host + path + b.toString();
|
String url = host + path + b.toString();
|
||||||
|
|
||||||
HashMap
|
HashMap<String, String> headers = new HashMap<String, String>();
|
||||||
<String, String> headers = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
for(String key : headerParams.keySet()) {
|
for(String key : headerParams.keySet()) {
|
||||||
headers.put(key, headerParams.get(key));
|
headers.put(key, headerParams.get(key));
|
||||||
|
@ -24,13 +24,11 @@ public static String serialize(Object obj){
|
|||||||
return getGson().toJson(obj);
|
return getGson().toJson(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static
|
public static <T> T deserializeToList(String jsonString, Class cls){
|
||||||
<T> T deserializeToList(String jsonString, Class cls){
|
|
||||||
return getGson().fromJson(jsonString, getListTypeForDeserialization(cls));
|
return getGson().fromJson(jsonString, getListTypeForDeserialization(cls));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static
|
public static <T> T deserializeToObject(String jsonString, Class cls){
|
||||||
<T> T deserializeToObject(String jsonString, Class cls){
|
|
||||||
return getGson().fromJson(jsonString, getTypeForDeserialization(cls));
|
return getGson().fromJson(jsonString, getTypeForDeserialization(cls));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,38 +36,26 @@ public static
|
|||||||
String className = cls.getSimpleName();
|
String className = cls.getSimpleName();
|
||||||
|
|
||||||
if ("User".equalsIgnoreCase(className)) {
|
if ("User".equalsIgnoreCase(className)) {
|
||||||
return new TypeToken
|
return new TypeToken<List<User>>(){}.getType();
|
||||||
<List
|
|
||||||
<User>>(){}.getType();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("Category".equalsIgnoreCase(className)) {
|
if ("Category".equalsIgnoreCase(className)) {
|
||||||
return new TypeToken
|
return new TypeToken<List<Category>>(){}.getType();
|
||||||
<List
|
|
||||||
<Category>>(){}.getType();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("Pet".equalsIgnoreCase(className)) {
|
if ("Pet".equalsIgnoreCase(className)) {
|
||||||
return new TypeToken
|
return new TypeToken<List<Pet>>(){}.getType();
|
||||||
<List
|
|
||||||
<Pet>>(){}.getType();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("Tag".equalsIgnoreCase(className)) {
|
if ("Tag".equalsIgnoreCase(className)) {
|
||||||
return new TypeToken
|
return new TypeToken<List<Tag>>(){}.getType();
|
||||||
<List
|
|
||||||
<Tag>>(){}.getType();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("Order".equalsIgnoreCase(className)) {
|
if ("Order".equalsIgnoreCase(className)) {
|
||||||
return new TypeToken
|
return new TypeToken<List<Order>>(){}.getType();
|
||||||
<List
|
|
||||||
<Order>>(){}.getType();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new TypeToken
|
return new TypeToken<List<Object>>(){}.getType();
|
||||||
<List
|
|
||||||
<Object>>(){}.getType();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Type getTypeForDeserialization(Class cls) {
|
public static Type getTypeForDeserialization(Class cls) {
|
||||||
@ -95,8 +81,7 @@ public static
|
|||||||
return new TypeToken<Order>(){}.getType();
|
return new TypeToken<Order>(){}.getType();
|
||||||
}
|
}
|
||||||
|
|
||||||
return new TypeToken
|
return new TypeToken<Object>(){}.getType();
|
||||||
<Object>(){}.getType();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -52,17 +52,11 @@ import java.io.File;
|
|||||||
String path = "/pet".replaceAll("\\{format\\}","json");
|
String path = "/pet".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -112,17 +106,11 @@ import java.io.File;
|
|||||||
String path = "/pet".replaceAll("\\{format\\}","json");
|
String path = "/pet".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -172,17 +160,11 @@ import java.io.File;
|
|||||||
String path = "/pet/findByStatus".replaceAll("\\{format\\}","json");
|
String path = "/pet/findByStatus".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
if (status != null)
|
if (status != null)
|
||||||
queryParams.put("status", ApiInvoker.parameterToString(status));
|
queryParams.put("status", ApiInvoker.parameterToString(status));
|
||||||
@ -234,17 +216,11 @@ import java.io.File;
|
|||||||
String path = "/pet/findByTags".replaceAll("\\{format\\}","json");
|
String path = "/pet/findByTags".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
if (tags != null)
|
if (tags != null)
|
||||||
queryParams.put("tags", ApiInvoker.parameterToString(tags));
|
queryParams.put("tags", ApiInvoker.parameterToString(tags));
|
||||||
@ -301,17 +277,11 @@ import java.io.File;
|
|||||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -368,17 +338,11 @@ import java.io.File;
|
|||||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -444,17 +408,11 @@ import java.io.File;
|
|||||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -512,17 +470,11 @@ import java.io.File;
|
|||||||
String path = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
String path = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,17 +51,11 @@ import java.io.File;
|
|||||||
String path = "/store/inventory".replaceAll("\\{format\\}","json");
|
String path = "/store/inventory".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -111,17 +105,11 @@ import java.io.File;
|
|||||||
String path = "/store/order".replaceAll("\\{format\\}","json");
|
String path = "/store/order".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -176,17 +164,11 @@ import java.io.File;
|
|||||||
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
|
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -241,17 +223,11 @@ import java.io.File;
|
|||||||
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
|
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,17 +52,11 @@ import java.io.File;
|
|||||||
String path = "/user".replaceAll("\\{format\\}","json");
|
String path = "/user".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -112,17 +106,11 @@ import java.io.File;
|
|||||||
String path = "/user/createWithArray".replaceAll("\\{format\\}","json");
|
String path = "/user/createWithArray".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -172,17 +160,11 @@ import java.io.File;
|
|||||||
String path = "/user/createWithList".replaceAll("\\{format\\}","json");
|
String path = "/user/createWithList".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -233,17 +215,11 @@ import java.io.File;
|
|||||||
String path = "/user/login".replaceAll("\\{format\\}","json");
|
String path = "/user/login".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
if (username != null)
|
if (username != null)
|
||||||
queryParams.put("username", ApiInvoker.parameterToString(username));
|
queryParams.put("username", ApiInvoker.parameterToString(username));
|
||||||
@ -296,17 +272,11 @@ import java.io.File;
|
|||||||
String path = "/user/logout".replaceAll("\\{format\\}","json");
|
String path = "/user/logout".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -361,17 +331,11 @@ import java.io.File;
|
|||||||
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -427,17 +391,11 @@ import java.io.File;
|
|||||||
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -492,17 +450,11 @@ import java.io.File;
|
|||||||
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// header params
|
// header params
|
||||||
Map
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
// form params
|
// form params
|
||||||
Map
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,4 +48,3 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,4 +109,3 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package io.swagger.client.model;
|
package io.swagger.client.model;
|
||||||
|
|
||||||
import io.swagger.client.model.Category;
|
import io.swagger.client.model.Category;
|
||||||
import io.swagger.client.model.Tag;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import io.swagger.client.model.Tag;
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
@ -111,4 +111,3 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,4 +48,3 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,4 +133,3 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -500,7 +500,7 @@ namespace IO.Swagger.Api {
|
|||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
// authentication setting, if any
|
||||||
String[] authSettings = new String[] { "api_key", "petstore_auth" };
|
String[] authSettings = new String[] { "petstore_auth", "api_key" };
|
||||||
|
|
||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) apiClient.CallApi(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
IRestResponse response = (IRestResponse) apiClient.CallApi(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
||||||
@ -540,7 +540,7 @@ namespace IO.Swagger.Api {
|
|||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
// authentication setting, if any
|
||||||
String[] authSettings = new String[] { "api_key", "petstore_auth" };
|
String[] authSettings = new String[] { "petstore_auth", "api_key" };
|
||||||
|
|
||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await apiClient.CallApiAsync(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
IRestResponse response = (IRestResponse) await apiClient.CallApiAsync(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
||||||
|
@ -77,8 +77,7 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<sources>
|
<sources>
|
||||||
<source>
|
<source>src/main/java</source>
|
||||||
src/main/java</source>
|
|
||||||
</sources>
|
</sources>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
@ -90,8 +89,7 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<sources>
|
<sources>
|
||||||
<source>
|
<source>src/test/java</source>
|
||||||
src/test/java</source>
|
|
||||||
</sources>
|
</sources>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
@ -102,8 +100,7 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>2.3.2</version>
|
<version>2.3.2</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>
|
<source>1.6</source>
|
||||||
1.6</source>
|
|
||||||
<target>1.6</target>
|
<target>1.6</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
@ -40,17 +40,12 @@ import io.swagger.client.auth.ApiKeyAuth;
|
|||||||
import io.swagger.client.auth.OAuth;
|
import io.swagger.client.auth.OAuth;
|
||||||
|
|
||||||
public class ApiClient {
|
public class ApiClient {
|
||||||
private Map
|
private Map<String, Client> hostMap = new HashMap<String, Client>();
|
||||||
<String, Client> hostMap = new HashMap
|
private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
||||||
<String, Client>();
|
|
||||||
private Map
|
|
||||||
<String, String> defaultHeaderMap = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
private boolean debugging = false;
|
private boolean debugging = false;
|
||||||
private String basePath = "http://petstore.swagger.io/v2";
|
private String basePath = "http://petstore.swagger.io/v2";
|
||||||
|
|
||||||
private Map
|
private Map<String, Authentication> authentications;
|
||||||
<String, Authentication> authentications;
|
|
||||||
|
|
||||||
private DateFormat dateFormat;
|
private DateFormat dateFormat;
|
||||||
|
|
||||||
@ -66,8 +61,7 @@ this.dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
|
|||||||
setUserAgent("Java-Swagger");
|
setUserAgent("Java-Swagger");
|
||||||
|
|
||||||
// Setup authentications (key: authentication name, value: authentication).
|
// Setup authentications (key: authentication name, value: authentication).
|
||||||
authentications = new HashMap
|
authentications = new HashMap<String, Authentication>();
|
||||||
<String, Authentication>();
|
|
||||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||||
authentications.put("petstore_auth", new OAuth());
|
authentications.put("petstore_auth", new OAuth());
|
||||||
// Prevent the authentications from being modified.
|
// Prevent the authentications from being modified.
|
||||||
@ -86,8 +80,7 @@ return this;
|
|||||||
/**
|
/**
|
||||||
* Get authentications (key: authentication name, value: authentication).
|
* Get authentications (key: authentication name, value: authentication).
|
||||||
*/
|
*/
|
||||||
public Map
|
public Map<String, Authentication> getAuthentications() {
|
||||||
<String, Authentication> getAuthentications() {
|
|
||||||
return authentications;
|
return authentications;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -347,10 +340,7 @@ throw new ApiException(500, e.getMessage());
|
|||||||
* @param authNames The authentications to apply
|
* @param authNames The authentications to apply
|
||||||
* @return The response body in type of string
|
* @return The response body in type of string
|
||||||
*/
|
*/
|
||||||
public String invokeAPI(String path, String method, Map
|
public String invokeAPI(String path, String method, Map<String, String> queryParams, Object body, Map<String, String> headerParams, Map<String, String> formParams, String accept, String contentType, String[] authNames) throws ApiException {
|
||||||
<String, String> queryParams, Object body, Map
|
|
||||||
<String, String> headerParams, Map
|
|
||||||
<String, String> formParams, String accept, String contentType, String[] authNames) throws ApiException {
|
|
||||||
updateParamsForAuth(authNames, queryParams, headerParams);
|
updateParamsForAuth(authNames, queryParams, headerParams);
|
||||||
|
|
||||||
Client client = getClient();
|
Client client = getClient();
|
||||||
@ -466,9 +456,7 @@ respBody);
|
|||||||
*
|
*
|
||||||
* @param authNames The authentications to apply
|
* @param authNames The authentications to apply
|
||||||
*/
|
*/
|
||||||
private void updateParamsForAuth(String[] authNames, Map
|
private void updateParamsForAuth(String[] authNames, Map<String, String> queryParams, Map<String, String> headerParams) {
|
||||||
<String, String> queryParams, Map
|
|
||||||
<String, String> headerParams) {
|
|
||||||
for (String authName : authNames) {
|
for (String authName : authNames) {
|
||||||
Authentication auth = authentications.get(authName);
|
Authentication auth = authentications.get(authName);
|
||||||
if (auth == null) throw new RuntimeException("Authentication undefined: " + authName);
|
if (auth == null) throw new RuntimeException("Authentication undefined: " + authName);
|
||||||
@ -479,12 +467,10 @@ auth.applyToParams(queryParams, headerParams);
|
|||||||
/**
|
/**
|
||||||
* Encode the given form parameters as request body.
|
* Encode the given form parameters as request body.
|
||||||
*/
|
*/
|
||||||
private String getXWWWFormUrlencodedParams(Map
|
private String getXWWWFormUrlencodedParams(Map<String, String> formParams) {
|
||||||
<String, String> formParams) {
|
|
||||||
StringBuilder formParamBuilder = new StringBuilder();
|
StringBuilder formParamBuilder = new StringBuilder();
|
||||||
|
|
||||||
for (Entry
|
for (Entry<String, String> param : formParams.entrySet()) {
|
||||||
<String, String> param : formParams.entrySet()) {
|
|
||||||
String keyStr = parameterToString(param.getKey());
|
String keyStr = parameterToString(param.getKey());
|
||||||
String valueStr = parameterToString(param.getValue());
|
String valueStr = parameterToString(param.getValue());
|
||||||
|
|
||||||
|
@ -6,9 +6,7 @@ import java.util.List;
|
|||||||
public class ApiException extends Exception {
|
public class ApiException extends Exception {
|
||||||
private int code = 0;
|
private int code = 0;
|
||||||
private String message = null;
|
private String message = null;
|
||||||
private Map
|
private Map<String, List<String>> responseHeaders = null;
|
||||||
<String, List
|
|
||||||
<String>> responseHeaders = null;
|
|
||||||
private String responseBody = null;
|
private String responseBody = null;
|
||||||
|
|
||||||
public ApiException() {}
|
public ApiException() {}
|
||||||
@ -18,10 +16,7 @@ private Map
|
|||||||
this.message = message;
|
this.message = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApiException(int code, String message, Map
|
public ApiException(int code, String message, Map<String, List<String>> responseHeaders, String responseBody) {
|
||||||
<String
|
|
||||||
, List
|
|
||||||
<String>> responseHeaders, String responseBody) {
|
|
||||||
this.code = code;
|
this.code = code;
|
||||||
this.message = message;
|
this.message = message;
|
||||||
this.responseHeaders = responseHeaders;
|
this.responseHeaders = responseHeaders;
|
||||||
@ -39,10 +34,7 @@ private Map
|
|||||||
/**
|
/**
|
||||||
* Get the HTTP response headers.
|
* Get the HTTP response headers.
|
||||||
*/
|
*/
|
||||||
public Map
|
public Map<String, List<String>> getResponseHeaders() {
|
||||||
<String
|
|
||||||
, List
|
|
||||||
<String>> getResponseHeaders() {
|
|
||||||
return responseHeaders;
|
return responseHeaders;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,15 +54,9 @@ import java.util.HashMap;
|
|||||||
String path = "/pet".replaceAll("\\{format\\}","json");
|
String path = "/pet".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -117,15 +111,9 @@ import java.util.HashMap;
|
|||||||
String path = "/pet".replaceAll("\\{format\\}","json");
|
String path = "/pet".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -180,15 +168,9 @@ import java.util.HashMap;
|
|||||||
String path = "/pet/findByStatus".replaceAll("\\{format\\}","json");
|
String path = "/pet/findByStatus".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
if (status != null)
|
if (status != null)
|
||||||
queryParams.put("status", apiClient.parameterToString(status));
|
queryParams.put("status", apiClient.parameterToString(status));
|
||||||
@ -245,15 +227,9 @@ import java.util.HashMap;
|
|||||||
String path = "/pet/findByTags".replaceAll("\\{format\\}","json");
|
String path = "/pet/findByTags".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
if (tags != null)
|
if (tags != null)
|
||||||
queryParams.put("tags", apiClient.parameterToString(tags));
|
queryParams.put("tags", apiClient.parameterToString(tags));
|
||||||
@ -316,15 +292,9 @@ import java.util.HashMap;
|
|||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -352,7 +322,7 @@ import java.util.HashMap;
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String[] authNames = new String[] { "api_key", "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
||||||
String response = apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames);
|
String response = apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames);
|
||||||
if(response != null){
|
if(response != null){
|
||||||
return (Pet) apiClient.deserialize(response, "", Pet.class);
|
return (Pet) apiClient.deserialize(response, "", Pet.class);
|
||||||
@ -387,15 +357,9 @@ import java.util.HashMap;
|
|||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -471,15 +435,9 @@ import java.util.HashMap;
|
|||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -544,15 +502,9 @@ import java.util.HashMap;
|
|||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,15 +53,9 @@ import java.util.HashMap;
|
|||||||
String path = "/store/inventory".replaceAll("\\{format\\}","json");
|
String path = "/store/inventory".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -116,15 +110,9 @@ import java.util.HashMap;
|
|||||||
String path = "/store/order".replaceAll("\\{format\\}","json");
|
String path = "/store/order".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -185,15 +173,9 @@ import java.util.HashMap;
|
|||||||
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
|
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -254,15 +236,9 @@ import java.util.HashMap;
|
|||||||
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
|
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,15 +54,9 @@ import java.util.HashMap;
|
|||||||
String path = "/user".replaceAll("\\{format\\}","json");
|
String path = "/user".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -117,15 +111,9 @@ import java.util.HashMap;
|
|||||||
String path = "/user/createWithArray".replaceAll("\\{format\\}","json");
|
String path = "/user/createWithArray".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -180,15 +168,9 @@ import java.util.HashMap;
|
|||||||
String path = "/user/createWithList".replaceAll("\\{format\\}","json");
|
String path = "/user/createWithList".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -244,15 +226,9 @@ import java.util.HashMap;
|
|||||||
String path = "/user/login".replaceAll("\\{format\\}","json");
|
String path = "/user/login".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
if (username != null)
|
if (username != null)
|
||||||
queryParams.put("username", apiClient.parameterToString(username));
|
queryParams.put("username", apiClient.parameterToString(username));
|
||||||
@ -310,15 +286,9 @@ import java.util.HashMap;
|
|||||||
String path = "/user/logout".replaceAll("\\{format\\}","json");
|
String path = "/user/logout".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -379,15 +349,9 @@ import java.util.HashMap;
|
|||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -449,15 +413,9 @@ import java.util.HashMap;
|
|||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -518,15 +476,9 @@ import java.util.HashMap;
|
|||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
Map
|
Map<String, String> queryParams = new HashMap<String, String>();
|
||||||
<String, String> queryParams = new HashMap
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
Map
|
|
||||||
<String, String> headerParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
Map
|
|
||||||
<String, String> formParams = new HashMap
|
|
||||||
<String, String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,9 +39,7 @@ this.apiKeyPrefix = apiKeyPrefix;
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void applyToParams(Map
|
public void applyToParams(Map<String, String> queryParams, Map<String, String> headerParams) {
|
||||||
<String, String> queryParams, Map
|
|
||||||
<String, String> headerParams) {
|
|
||||||
String value;
|
String value;
|
||||||
if (apiKeyPrefix != null) {
|
if (apiKeyPrefix != null) {
|
||||||
value = apiKeyPrefix + " " + apiKey;
|
value = apiKeyPrefix + " " + apiKey;
|
||||||
|
@ -4,7 +4,5 @@ import java.util.Map;
|
|||||||
|
|
||||||
public interface Authentication {
|
public interface Authentication {
|
||||||
/** Apply authentication settings to header and query params. */
|
/** Apply authentication settings to header and query params. */
|
||||||
void applyToParams(Map
|
void applyToParams(Map<String, String> queryParams, Map<String, String> headerParams);
|
||||||
<String, String> queryParams, Map
|
|
||||||
<String, String> headerParams);
|
|
||||||
}
|
}
|
||||||
|
@ -26,9 +26,7 @@ this.password = password;
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void applyToParams(Map
|
public void applyToParams(Map<String, String> queryParams, Map<String, String> headerParams) {
|
||||||
<String, String> queryParams, Map
|
|
||||||
<String, String> headerParams) {
|
|
||||||
String str = (username == null ? "" : username) + ":" + (password == null ? "" : password);
|
String str = (username == null ? "" : username) + ":" + (password == null ? "" : password);
|
||||||
try {
|
try {
|
||||||
headerParams.put("Authorization", "Basic " + DatatypeConverter.printBase64Binary(str.getBytes("UTF-8")));
|
headerParams.put("Authorization", "Basic " + DatatypeConverter.printBase64Binary(str.getBytes("UTF-8")));
|
||||||
|
@ -4,9 +4,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
public class OAuth implements Authentication {
|
public class OAuth implements Authentication {
|
||||||
@Override
|
@Override
|
||||||
public void applyToParams(Map
|
public void applyToParams(Map<String, String> queryParams, Map<String, String> headerParams) {
|
||||||
<String, String> queryParams, Map
|
|
||||||
<String, String> headerParams) {
|
|
||||||
// TODO: support oauth
|
// TODO: support oauth
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,4 +48,3 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,4 +109,3 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package io.swagger.client.model;
|
package io.swagger.client.model;
|
||||||
|
|
||||||
import io.swagger.client.model.Category;
|
import io.swagger.client.model.Category;
|
||||||
import io.swagger.client.model.Tag;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import io.swagger.client.model.Tag;
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
@ -111,4 +111,3 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,4 +48,3 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,4 +133,3 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
platform :ios, '6.0'
|
platform :ios, '6.0'
|
||||||
xcodeproj 'PetstoreClient/PetstoreClient.xcodeproj'
|
xcodeproj 'swaggerClient/swaggerClient.xcodeproj'
|
||||||
pod 'AFNetworking', '~> 2.1'
|
pod 'AFNetworking', '~> 2.1'
|
||||||
pod 'JSONModel', '~> 1.0'
|
pod 'JSONModel', '~> 1.0'
|
||||||
pod 'ISO8601'
|
pod 'ISO8601'
|
||||||
|
@ -1,21 +1,15 @@
|
|||||||
#import
|
#import <Foundation/Foundation.h>
|
||||||
<Foundation/Foundation.h>
|
|
||||||
#import "SWGObject.h"
|
#import "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@protocol SWGCategory
|
@protocol SWGCategory
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface SWGCategory : SWGObject
|
@interface SWGCategory : SWGObject
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSNumber* _id;
|
@property(nonatomic) NSNumber* _id;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSString* name;
|
@property(nonatomic) NSString* name;
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#import "SWGCategory.h"
|
#import "SWGCategory.h"
|
||||||
|
|
||||||
@implementation SWGCategory
|
@implementation SWGCategory
|
||||||
@ -20,5 +19,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#import
|
#import <Foundation/Foundation.h>
|
||||||
<Foundation/Foundation.h>
|
|
||||||
|
|
||||||
@interface SWGConfiguration : NSObject
|
@interface SWGConfiguration : NSObject
|
||||||
|
|
||||||
|
@ -1,34 +1,24 @@
|
|||||||
#import
|
#import <Foundation/Foundation.h>
|
||||||
<Foundation/Foundation.h>
|
|
||||||
#import "SWGObject.h"
|
#import "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@protocol SWGOrder
|
@protocol SWGOrder
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface SWGOrder : SWGObject
|
@interface SWGOrder : SWGObject
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSNumber* _id;
|
@property(nonatomic) NSNumber* _id;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSNumber* petId;
|
@property(nonatomic) NSNumber* petId;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSNumber* quantity;
|
@property(nonatomic) NSNumber* quantity;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSDate* shipDate;
|
@property(nonatomic) NSDate* shipDate;
|
||||||
|
|
||||||
/* Order Status [optional]
|
/* Order Status [optional]
|
||||||
*/
|
*/
|
||||||
@property(nonatomic) NSString* status;
|
@property(nonatomic) NSString* status;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) BOOL complete;
|
@property(nonatomic) BOOL complete;
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#import "SWGOrder.h"
|
#import "SWGOrder.h"
|
||||||
|
|
||||||
@implementation SWGOrder
|
@implementation SWGOrder
|
||||||
@ -20,5 +19,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
#import
|
#import <Foundation/Foundation.h>
|
||||||
<Foundation/Foundation.h>
|
|
||||||
#import "SWGObject.h"
|
#import "SWGObject.h"
|
||||||
#import "SWGTag.h"
|
|
||||||
#import "SWGCategory.h"
|
#import "SWGCategory.h"
|
||||||
|
#import "SWGTag.h"
|
||||||
|
|
||||||
|
|
||||||
@protocol SWGPet
|
@protocol SWGPet
|
||||||
@ -12,25 +10,17 @@
|
|||||||
@interface SWGPet : SWGObject
|
@interface SWGPet : SWGObject
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSNumber* _id;
|
@property(nonatomic) NSNumber* _id;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) SWGCategory* category;
|
@property(nonatomic) SWGCategory* category;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSString* name;
|
@property(nonatomic) NSString* name;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSArray* photoUrls;
|
@property(nonatomic) NSArray* photoUrls;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSArray<SWGTag>* tags;
|
@property(nonatomic) NSArray<SWGTag>* tags;
|
||||||
|
|
||||||
/* pet status in the store [optional]
|
/* pet status in the store [optional]
|
||||||
*/
|
*/
|
||||||
@property(nonatomic) NSString* status;
|
@property(nonatomic) NSString* status;
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#import "SWGPet.h"
|
#import "SWGPet.h"
|
||||||
|
|
||||||
@implementation SWGPet
|
@implementation SWGPet
|
||||||
@ -20,5 +19,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#import
|
#import <Foundation/Foundation.h>
|
||||||
<Foundation/Foundation.h>
|
|
||||||
#import "SWGPet.h"
|
#import "SWGPet.h"
|
||||||
#import "SWGFile.h"
|
#import "SWGFile.h"
|
||||||
#import "SWGObject.h"
|
#import "SWGObject.h"
|
||||||
@ -16,7 +15,6 @@
|
|||||||
+(SWGPetApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
|
+(SWGPetApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
|
||||||
+(void) setBasePath:(NSString*)basePath;
|
+(void) setBasePath:(NSString*)basePath;
|
||||||
+(NSString*) getBasePath;
|
+(NSString*) getBasePath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Update an existing pet
|
Update an existing pet
|
||||||
@ -33,7 +31,6 @@
|
|||||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Add a new pet to the store
|
Add a new pet to the store
|
||||||
@ -50,7 +47,6 @@
|
|||||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Finds Pets by status
|
Finds Pets by status
|
||||||
@ -67,7 +63,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Finds Pets by tags
|
Finds Pets by tags
|
||||||
@ -84,7 +79,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Find pet by ID
|
Find pet by ID
|
||||||
@ -101,7 +95,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Updates a pet in the store with form data
|
Updates a pet in the store with form data
|
||||||
@ -122,7 +115,6 @@
|
|||||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Deletes a pet
|
Deletes a pet
|
||||||
@ -141,7 +133,6 @@
|
|||||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
uploads an image
|
uploads an image
|
||||||
@ -163,5 +154,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
#import "SWGFile.h"
|
#import "SWGFile.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@interface SWGPetApi ()
|
@interface SWGPetApi ()
|
||||||
@property (readwrite, nonatomic, strong) NSMutableDictionary *defaultHeaders;
|
@property (readwrite, nonatomic, strong) NSMutableDictionary *defaultHeaders;
|
||||||
@end
|
@end
|
||||||
@ -73,7 +72,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Update an existing pet
|
* Update an existing pet
|
||||||
*
|
*
|
||||||
@ -181,7 +179,6 @@ completionBlock(nil);
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Add a new pet to the store
|
* Add a new pet to the store
|
||||||
*
|
*
|
||||||
@ -289,7 +286,6 @@ completionBlock(nil);
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Finds Pets by status
|
* Finds Pets by status
|
||||||
* Multiple status values can be provided with comma seperated strings
|
* Multiple status values can be provided with comma seperated strings
|
||||||
@ -384,6 +380,7 @@ return;
|
|||||||
completionBlock((NSArray<SWGPet>*)objs, nil);
|
completionBlock((NSArray<SWGPet>*)objs, nil);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
|
||||||
@ -393,7 +390,6 @@ return;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Finds Pets by tags
|
* Finds Pets by tags
|
||||||
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||||
@ -488,6 +484,7 @@ return;
|
|||||||
completionBlock((NSArray<SWGPet>*)objs, nil);
|
completionBlock((NSArray<SWGPet>*)objs, nil);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
|
||||||
@ -497,7 +494,6 @@ return;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Find pet by ID
|
* Find pet by ID
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
@ -548,7 +544,7 @@ return;
|
|||||||
NSString *requestContentType = [SWGApiClient selectHeaderContentType:@[]];
|
NSString *requestContentType = [SWGApiClient selectHeaderContentType:@[]];
|
||||||
|
|
||||||
// Authentication setting
|
// Authentication setting
|
||||||
NSArray *authSettings = @[@"api_key", @"petstore_auth"];
|
NSArray *authSettings = @[@"petstore_auth", @"api_key"];
|
||||||
|
|
||||||
id bodyDictionary = nil;
|
id bodyDictionary = nil;
|
||||||
|
|
||||||
@ -570,6 +566,7 @@ return;
|
|||||||
|
|
||||||
|
|
||||||
// complex response
|
// complex response
|
||||||
|
|
||||||
// comples response type
|
// comples response type
|
||||||
return [self.apiClient dictionary: requestUrl
|
return [self.apiClient dictionary: requestUrl
|
||||||
method: @"GET"
|
method: @"GET"
|
||||||
@ -596,8 +593,8 @@ return;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Updates a pet in the store with form data
|
* Updates a pet in the store with form data
|
||||||
@ -707,7 +704,6 @@ completionBlock(nil);
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Deletes a pet
|
* Deletes a pet
|
||||||
*
|
*
|
||||||
@ -800,7 +796,6 @@ completionBlock(nil);
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* uploads an image
|
* uploads an image
|
||||||
*
|
*
|
||||||
@ -918,7 +913,6 @@ completionBlock(nil);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#import
|
#import <Foundation/Foundation.h>
|
||||||
<Foundation/Foundation.h>
|
|
||||||
#import "SWGOrder.h"
|
#import "SWGOrder.h"
|
||||||
#import "SWGObject.h"
|
#import "SWGObject.h"
|
||||||
#import "SWGApiClient.h"
|
#import "SWGApiClient.h"
|
||||||
@ -15,7 +14,6 @@
|
|||||||
+(SWGStoreApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
|
+(SWGStoreApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
|
||||||
+(void) setBasePath:(NSString*)basePath;
|
+(void) setBasePath:(NSString*)basePath;
|
||||||
+(NSString*) getBasePath;
|
+(NSString*) getBasePath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Returns pet inventories by status
|
Returns pet inventories by status
|
||||||
@ -30,7 +28,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
@ -47,7 +44,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Find purchase order by ID
|
Find purchase order by ID
|
||||||
@ -64,7 +60,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Delete purchase order by ID
|
Delete purchase order by ID
|
||||||
@ -82,5 +77,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
#import "SWGOrder.h"
|
#import "SWGOrder.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@interface SWGStoreApi ()
|
@interface SWGStoreApi ()
|
||||||
@property (readwrite, nonatomic, strong) NSMutableDictionary *defaultHeaders;
|
@property (readwrite, nonatomic, strong) NSMutableDictionary *defaultHeaders;
|
||||||
@end
|
@end
|
||||||
@ -72,7 +71,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Returns pet inventories by status
|
* Returns pet inventories by status
|
||||||
* Returns a map of status codes to quantities
|
* Returns a map of status codes to quantities
|
||||||
@ -146,11 +144,13 @@ if (error) {
|
|||||||
completionBlock(nil, error);
|
completionBlock(nil, error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSDictionary *result = nil;
|
NSDictionary *result = nil;
|
||||||
if (data) {
|
if (data) {
|
||||||
result = [[NSDictionary alloc]initWithDictionary: data];
|
result = [[NSDictionary alloc]initWithDictionary: data];
|
||||||
}
|
}
|
||||||
completionBlock(data, nil);
|
completionBlock(data, nil);
|
||||||
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
|
||||||
@ -160,7 +160,6 @@ return;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Place an order for a pet
|
* Place an order for a pet
|
||||||
*
|
*
|
||||||
@ -252,6 +251,7 @@ return;
|
|||||||
|
|
||||||
|
|
||||||
// complex response
|
// complex response
|
||||||
|
|
||||||
// comples response type
|
// comples response type
|
||||||
return [self.apiClient dictionary: requestUrl
|
return [self.apiClient dictionary: requestUrl
|
||||||
method: @"POST"
|
method: @"POST"
|
||||||
@ -278,8 +278,8 @@ return;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Find purchase order by ID
|
* Find purchase order by ID
|
||||||
@ -353,6 +353,7 @@ return;
|
|||||||
|
|
||||||
|
|
||||||
// complex response
|
// complex response
|
||||||
|
|
||||||
// comples response type
|
// comples response type
|
||||||
return [self.apiClient dictionary: requestUrl
|
return [self.apiClient dictionary: requestUrl
|
||||||
method: @"GET"
|
method: @"GET"
|
||||||
@ -379,8 +380,8 @@ return;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Delete purchase order by ID
|
* Delete purchase order by ID
|
||||||
@ -472,7 +473,6 @@ completionBlock(nil);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,21 +1,15 @@
|
|||||||
#import
|
#import <Foundation/Foundation.h>
|
||||||
<Foundation/Foundation.h>
|
|
||||||
#import "SWGObject.h"
|
#import "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@protocol SWGTag
|
@protocol SWGTag
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface SWGTag : SWGObject
|
@interface SWGTag : SWGObject
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSNumber* _id;
|
@property(nonatomic) NSNumber* _id;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSString* name;
|
@property(nonatomic) NSString* name;
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#import "SWGTag.h"
|
#import "SWGTag.h"
|
||||||
|
|
||||||
@implementation SWGTag
|
@implementation SWGTag
|
||||||
@ -20,5 +19,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -1,40 +1,28 @@
|
|||||||
#import
|
#import <Foundation/Foundation.h>
|
||||||
<Foundation/Foundation.h>
|
|
||||||
#import "SWGObject.h"
|
#import "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@protocol SWGUser
|
@protocol SWGUser
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface SWGUser : SWGObject
|
@interface SWGUser : SWGObject
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSNumber* _id;
|
@property(nonatomic) NSNumber* _id;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSString* username;
|
@property(nonatomic) NSString* username;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSString* firstName;
|
@property(nonatomic) NSString* firstName;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSString* lastName;
|
@property(nonatomic) NSString* lastName;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSString* email;
|
@property(nonatomic) NSString* email;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSString* password;
|
@property(nonatomic) NSString* password;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSString* phone;
|
@property(nonatomic) NSString* phone;
|
||||||
|
|
||||||
/* User Status [optional]
|
/* User Status [optional]
|
||||||
*/
|
*/
|
||||||
@property(nonatomic) NSNumber* userStatus;
|
@property(nonatomic) NSNumber* userStatus;
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#import "SWGUser.h"
|
#import "SWGUser.h"
|
||||||
|
|
||||||
@implementation SWGUser
|
@implementation SWGUser
|
||||||
@ -20,5 +19,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#import
|
#import <Foundation/Foundation.h>
|
||||||
<Foundation/Foundation.h>
|
|
||||||
#import "SWGUser.h"
|
#import "SWGUser.h"
|
||||||
#import "SWGObject.h"
|
#import "SWGObject.h"
|
||||||
#import "SWGApiClient.h"
|
#import "SWGApiClient.h"
|
||||||
@ -15,7 +14,6 @@
|
|||||||
+(SWGUserApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
|
+(SWGUserApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
|
||||||
+(void) setBasePath:(NSString*)basePath;
|
+(void) setBasePath:(NSString*)basePath;
|
||||||
+(NSString*) getBasePath;
|
+(NSString*) getBasePath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Create user
|
Create user
|
||||||
@ -32,7 +30,6 @@
|
|||||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
@ -49,7 +46,6 @@
|
|||||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
@ -66,7 +62,6 @@
|
|||||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Logs user into the system
|
Logs user into the system
|
||||||
@ -85,7 +80,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Logs out current logged in user session
|
Logs out current logged in user session
|
||||||
@ -100,7 +94,6 @@
|
|||||||
(void (^)(NSError* error))completionBlock;
|
(void (^)(NSError* error))completionBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Get user by user name
|
Get user by user name
|
||||||
@ -117,7 +110,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Updated user
|
Updated user
|
||||||
@ -136,7 +128,6 @@
|
|||||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Delete user
|
Delete user
|
||||||
@ -154,5 +145,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
#import "SWGUser.h"
|
#import "SWGUser.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@interface SWGUserApi ()
|
@interface SWGUserApi ()
|
||||||
@property (readwrite, nonatomic, strong) NSMutableDictionary *defaultHeaders;
|
@property (readwrite, nonatomic, strong) NSMutableDictionary *defaultHeaders;
|
||||||
@end
|
@end
|
||||||
@ -72,7 +71,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Create user
|
* Create user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -180,7 +178,6 @@ completionBlock(nil);
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
@ -288,7 +285,6 @@ completionBlock(nil);
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
@ -396,7 +392,6 @@ completionBlock(nil);
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Logs user into the system
|
* Logs user into the system
|
||||||
*
|
*
|
||||||
@ -494,13 +489,15 @@ completionBlock(result, nil);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// complex response
|
// complex response
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Logs out current logged in user session
|
* Logs out current logged in user session
|
||||||
@ -584,7 +581,6 @@ completionBlock(nil);
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
*
|
*
|
||||||
@ -657,6 +653,7 @@ completionBlock(nil);
|
|||||||
|
|
||||||
|
|
||||||
// complex response
|
// complex response
|
||||||
|
|
||||||
// comples response type
|
// comples response type
|
||||||
return [self.apiClient dictionary: requestUrl
|
return [self.apiClient dictionary: requestUrl
|
||||||
method: @"GET"
|
method: @"GET"
|
||||||
@ -683,8 +680,8 @@ completionBlock(nil);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Updated user
|
* Updated user
|
||||||
@ -799,7 +796,6 @@ completionBlock(nil);
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Delete user
|
* Delete user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -890,7 +886,6 @@ completionBlock(nil);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ sub new {
|
|||||||
|
|
||||||
|
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = ['api_key', 'petstore_auth'];
|
my $auth_settings = ['petstore_auth', 'api_key'];
|
||||||
|
|
||||||
# make the API Call
|
# make the API Call
|
||||||
my $response = $self->{api_client}->call_api($_resource_path, $_method,
|
my $response = $self->{api_client}->call_api($_resource_path, $_method,
|
||||||
|
@ -327,7 +327,7 @@ class PetApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// authentication setting, if any
|
// authentication setting, if any
|
||||||
$authSettings = array('api_key', 'petstore_auth');
|
$authSettings = array('petstore_auth', 'api_key');
|
||||||
|
|
||||||
// make the API Call
|
// make the API Call
|
||||||
$response = $this->apiClient->callAPI($resourcePath, $method,
|
$response = $this->apiClient->callAPI($resourcePath, $method,
|
||||||
|
@ -9,8 +9,8 @@ from .models.order import Order
|
|||||||
|
|
||||||
# import apis into sdk package
|
# import apis into sdk package
|
||||||
from .apis.user_api import UserApi
|
from .apis.user_api import UserApi
|
||||||
from .apis.pet_api import PetApi
|
|
||||||
from .apis.store_api import StoreApi
|
from .apis.store_api import StoreApi
|
||||||
|
from .apis.pet_api import PetApi
|
||||||
|
|
||||||
# import ApiClient
|
# import ApiClient
|
||||||
from .api_client import ApiClient
|
from .api_client import ApiClient
|
||||||
|
@ -2,6 +2,6 @@ from __future__ import absolute_import
|
|||||||
|
|
||||||
# import apis into api package
|
# import apis into api package
|
||||||
from .user_api import UserApi
|
from .user_api import UserApi
|
||||||
from .pet_api import PetApi
|
|
||||||
from .store_api import StoreApi
|
from .store_api import StoreApi
|
||||||
|
from .pet_api import PetApi
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ class PetApi(object):
|
|||||||
header_params['Content-Type'] = self.api_client.select_header_content_type([])
|
header_params['Content-Type'] = self.api_client.select_header_content_type([])
|
||||||
|
|
||||||
# Authentication setting
|
# Authentication setting
|
||||||
auth_settings = ['api_key', 'petstore_auth']
|
auth_settings = ['petstore_auth', 'api_key']
|
||||||
|
|
||||||
response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params,
|
response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params,
|
||||||
body=body_params, post_params=form_params, files=files,
|
body=body_params, post_params=form_params, files=files,
|
||||||
|
@ -3,14 +3,10 @@
|
|||||||
|
|
||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
|
|
||||||
#include
|
#include <QJsonDocument>
|
||||||
<QJsonDocument>
|
#include <QJsonArray>
|
||||||
#include
|
#include <QObject>
|
||||||
<QJsonArray>
|
#include <QDebug>
|
||||||
#include
|
|
||||||
<QObject>
|
|
||||||
#include
|
|
||||||
<QDebug>
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
@ -85,7 +81,6 @@
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
qint64
|
qint64
|
||||||
SWGCategory::getId() {
|
SWGCategory::getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -95,7 +90,6 @@
|
|||||||
this->id = id;
|
this->id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGCategory::getName() {
|
SWGCategory::getName() {
|
||||||
return name;
|
return name;
|
||||||
@ -107,6 +101,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
#ifndef SWGCategory_H_
|
#ifndef SWGCategory_H_
|
||||||
#define SWGCategory_H_
|
#define SWGCategory_H_
|
||||||
|
|
||||||
#include
|
#include <QJsonObject>
|
||||||
<QJsonObject>
|
|
||||||
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
#include "SWGModelFactory.h"
|
#include "SWGModelFactory.h"
|
||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
#import
|
#import <QDebug>
|
||||||
<QDebug>
|
#import <QJsonArray>
|
||||||
#import
|
#import <QJsonValue>
|
||||||
<QJsonArray>
|
|
||||||
#import
|
|
||||||
<QJsonValue>
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
@ -17,27 +14,19 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(QStringLiteral("bool").compare(type) == 0) {
|
if(QStringLiteral("bool").compare(type) == 0) {
|
||||||
bool * val = static_cast
|
bool * val = static_cast<bool*>(value);
|
||||||
<bool
|
|
||||||
*>(value);
|
|
||||||
*val = obj.toBool();
|
*val = obj.toBool();
|
||||||
}
|
}
|
||||||
else if(QStringLiteral("qint32").compare(type) == 0) {
|
else if(QStringLiteral("qint32").compare(type) == 0) {
|
||||||
qint32 *val = static_cast
|
qint32 *val = static_cast<qint32*>(value);
|
||||||
<qint32
|
|
||||||
*>(value);
|
|
||||||
*val = obj.toInt();
|
*val = obj.toInt();
|
||||||
}
|
}
|
||||||
else if(QStringLiteral("qint64").compare(type) == 0) {
|
else if(QStringLiteral("qint64").compare(type) == 0) {
|
||||||
qint64 *val = static_cast
|
qint64 *val = static_cast<qint64*>(value);
|
||||||
<qint64
|
|
||||||
*>(value);
|
|
||||||
*val = obj.toVariant().toLongLong();
|
*val = obj.toVariant().toLongLong();
|
||||||
}
|
}
|
||||||
else if (QStringLiteral("QString").compare(type) == 0) {
|
else if (QStringLiteral("QString").compare(type) == 0) {
|
||||||
QString **val = static_cast
|
QString **val = static_cast<QString**>(value);
|
||||||
<QString
|
|
||||||
**>(value);
|
|
||||||
|
|
||||||
if(val != NULL) {
|
if(val != NULL) {
|
||||||
if(!obj.isNull()) {
|
if(!obj.isNull()) {
|
||||||
@ -62,20 +51,14 @@
|
|||||||
SWGObject * so = (SWGObject*)Swagger::create(type);
|
SWGObject * so = (SWGObject*)Swagger::create(type);
|
||||||
if(so != NULL) {
|
if(so != NULL) {
|
||||||
so->fromJsonObject(jsonObj);
|
so->fromJsonObject(jsonObj);
|
||||||
SWGObject **val = static_cast
|
SWGObject **val = static_cast<SWGObject**>(value);
|
||||||
<SWGObject
|
|
||||||
**>(value);
|
|
||||||
delete *val;
|
delete *val;
|
||||||
*val = so;
|
*val = so;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(type.startsWith("QList") && QString("").compare(complexType) != 0 && obj.isArray()) {
|
else if(type.startsWith("QList") && QString("").compare(complexType) != 0 && obj.isArray()) {
|
||||||
// list of values
|
// list of values
|
||||||
QList
|
QList<void*>* output = new QList<void*>();
|
||||||
<void
|
|
||||||
*>* output = new QList
|
|
||||||
<void
|
|
||||||
*>();
|
|
||||||
QJsonArray arr = obj.toArray();
|
QJsonArray arr = obj.toArray();
|
||||||
foreach (const QJsonValue & jval, arr) {
|
foreach (const QJsonValue & jval, arr) {
|
||||||
if(complexType.startsWith("SWG")) {
|
if(complexType.startsWith("SWG")) {
|
||||||
@ -105,12 +88,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QList
|
QList<void*> **val = static_cast<QList<void*>**>(value);
|
||||||
<void
|
|
||||||
*> **val = static_cast
|
|
||||||
<QList
|
|
||||||
<void
|
|
||||||
*>**>(value);
|
|
||||||
delete *val;
|
delete *val;
|
||||||
*val = output;
|
*val = output;
|
||||||
}
|
}
|
||||||
@ -122,8 +100,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(type.startsWith("SWG")) {
|
if(type.startsWith("SWG")) {
|
||||||
SWGObject *swgObject = reinterpret_cast
|
SWGObject *swgObject = reinterpret_cast<SWGObject *>(value);
|
||||||
<SWGObject *>(value);
|
|
||||||
if(swgObject != NULL) {
|
if(swgObject != NULL) {
|
||||||
QJsonObject* o = (*swgObject).asJsonObject();
|
QJsonObject* o = (*swgObject).asJsonObject();
|
||||||
if(name != NULL) {
|
if(name != NULL) {
|
||||||
@ -139,35 +116,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(QStringLiteral("QString").compare(type) == 0) {
|
else if(QStringLiteral("QString").compare(type) == 0) {
|
||||||
QString* str = static_cast
|
QString* str = static_cast<QString*>(value);
|
||||||
<QString
|
|
||||||
*>(value);
|
|
||||||
output->insert(name, QJsonValue(*str));
|
output->insert(name, QJsonValue(*str));
|
||||||
}
|
}
|
||||||
else if(QStringLiteral("qint32").compare(type) == 0) {
|
else if(QStringLiteral("qint32").compare(type) == 0) {
|
||||||
qint32* str = static_cast
|
qint32* str = static_cast<qint32*>(value);
|
||||||
<qint32
|
|
||||||
*>(value);
|
|
||||||
output->insert(name, QJsonValue(*str));
|
output->insert(name, QJsonValue(*str));
|
||||||
}
|
}
|
||||||
else if(QStringLiteral("qint64").compare(type) == 0) {
|
else if(QStringLiteral("qint64").compare(type) == 0) {
|
||||||
qint64* str = static_cast
|
qint64* str = static_cast<qint64*>(value);
|
||||||
<qint64
|
|
||||||
*>(value);
|
|
||||||
output->insert(name, QJsonValue(*str));
|
output->insert(name, QJsonValue(*str));
|
||||||
}
|
}
|
||||||
else if(QStringLiteral("bool").compare(type) == 0) {
|
else if(QStringLiteral("bool").compare(type) == 0) {
|
||||||
bool* str = static_cast
|
bool* str = static_cast<bool*>(value);
|
||||||
<bool
|
|
||||||
*>(value);
|
|
||||||
output->insert(name, QJsonValue(*str));
|
output->insert(name, QJsonValue(*str));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
toJsonArray(QList
|
toJsonArray(QList<void*>* value, QJsonArray* output, QString innerName, QString innerType) {
|
||||||
<void
|
|
||||||
*>* value, QJsonArray* output, QString innerName, QString innerType) {
|
|
||||||
foreach(void* obj, *value) {
|
foreach(void* obj, *value) {
|
||||||
QJsonObject element;
|
QJsonObject element;
|
||||||
|
|
||||||
@ -178,9 +145,7 @@
|
|||||||
|
|
||||||
QString
|
QString
|
||||||
stringValue(QString* value) {
|
stringValue(QString* value) {
|
||||||
QString* str = static_cast
|
QString* str = static_cast<QString*>(value);
|
||||||
<QString
|
|
||||||
*>(value);
|
|
||||||
return QString(*str);
|
return QString(*str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
#ifndef SWGHELPERS_H
|
#ifndef SWGHELPERS_H
|
||||||
#define SWGHELPERS_H
|
#define SWGHELPERS_H
|
||||||
|
|
||||||
#include
|
#include <QJsonValue>
|
||||||
<QJsonValue>
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
void setValue(void* value, QJsonValue obj, QString type, QString complexType);
|
void setValue(void* value, QJsonValue obj, QString type, QString complexType);
|
||||||
void toJsonArray(QList
|
void toJsonArray(QList<void*>* value, QJsonArray* output, QString innerName, QString innerType);
|
||||||
<void
|
|
||||||
*>* value, QJsonArray* output, QString innerName, QString innerType);
|
|
||||||
void toJsonValue(QString name, void* value, QJsonObject* output, QString type);
|
void toJsonValue(QString name, void* value, QJsonObject* output, QString type);
|
||||||
bool isCompatibleJsonValue(QString type);
|
bool isCompatibleJsonValue(QString type);
|
||||||
QString stringValue(QString* value);
|
QString stringValue(QString* value);
|
||||||
|
@ -32,8 +32,7 @@ return NULL;
|
|||||||
inline void* create(QString json, QString type) {
|
inline void* create(QString json, QString type) {
|
||||||
void* val = create(type);
|
void* val = create(type);
|
||||||
if(val != NULL) {
|
if(val != NULL) {
|
||||||
SWGObject* obj = static_cast
|
SWGObject* obj = static_cast<SWGObject*>(val);
|
||||||
<SWGObject*>(val);
|
|
||||||
return obj->fromJson(json);
|
return obj->fromJson(json);
|
||||||
}
|
}
|
||||||
if(type.startsWith("QString")) {
|
if(type.startsWith("QString")) {
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
#ifndef _SWG_OBJECT_H_
|
#ifndef _SWG_OBJECT_H_
|
||||||
#define _SWG_OBJECT_H_
|
#define _SWG_OBJECT_H_
|
||||||
|
|
||||||
#include
|
#include <QJsonValue>
|
||||||
<QJsonValue>
|
|
||||||
|
|
||||||
class SWGObject {
|
class SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -3,14 +3,10 @@
|
|||||||
|
|
||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
|
|
||||||
#include
|
#include <QJsonDocument>
|
||||||
<QJsonDocument>
|
#include <QJsonArray>
|
||||||
#include
|
#include <QObject>
|
||||||
<QJsonArray>
|
#include <QDebug>
|
||||||
#include
|
|
||||||
<QObject>
|
|
||||||
#include
|
|
||||||
<QDebug>
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
@ -108,7 +104,6 @@
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
qint64
|
qint64
|
||||||
SWGOrder::getId() {
|
SWGOrder::getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -118,7 +113,6 @@
|
|||||||
this->id = id;
|
this->id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
qint64
|
qint64
|
||||||
SWGOrder::getPetId() {
|
SWGOrder::getPetId() {
|
||||||
return petId;
|
return petId;
|
||||||
@ -128,7 +122,6 @@
|
|||||||
this->petId = petId;
|
this->petId = petId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGOrder::getQuantity() {
|
SWGOrder::getQuantity() {
|
||||||
return quantity;
|
return quantity;
|
||||||
@ -138,7 +131,6 @@
|
|||||||
this->quantity = quantity;
|
this->quantity = quantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QDateTime*
|
QDateTime*
|
||||||
SWGOrder::getShipDate() {
|
SWGOrder::getShipDate() {
|
||||||
return shipDate;
|
return shipDate;
|
||||||
@ -148,7 +140,6 @@
|
|||||||
this->shipDate = shipDate;
|
this->shipDate = shipDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGOrder::getStatus() {
|
SWGOrder::getStatus() {
|
||||||
return status;
|
return status;
|
||||||
@ -158,7 +149,6 @@
|
|||||||
this->status = status;
|
this->status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
SWGOrder::getComplete() {
|
SWGOrder::getComplete() {
|
||||||
return complete;
|
return complete;
|
||||||
@ -170,6 +160,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
#ifndef SWGOrder_H_
|
#ifndef SWGOrder_H_
|
||||||
#define SWGOrder_H_
|
#define SWGOrder_H_
|
||||||
|
|
||||||
#include
|
#include <QJsonObject>
|
||||||
<QJsonObject>
|
|
||||||
|
|
||||||
|
|
||||||
#include "QDateTime.h"
|
#include "QDateTime.h"
|
||||||
|
@ -3,14 +3,10 @@
|
|||||||
|
|
||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
|
|
||||||
#include
|
#include <QJsonDocument>
|
||||||
<QJsonDocument>
|
#include <QJsonArray>
|
||||||
#include
|
#include <QObject>
|
||||||
<QJsonArray>
|
#include <QDebug>
|
||||||
#include
|
|
||||||
<QObject>
|
|
||||||
#include
|
|
||||||
<QDebug>
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
@ -118,8 +114,7 @@
|
|||||||
|
|
||||||
QList<QString*>* photoUrlsList = photoUrls;
|
QList<QString*>* photoUrlsList = photoUrls;
|
||||||
QJsonArray photoUrlsJsonArray;
|
QJsonArray photoUrlsJsonArray;
|
||||||
toJsonArray((QList
|
toJsonArray((QList<void*>*)photoUrls, &photoUrlsJsonArray, "photoUrls", "QString");
|
||||||
<void*>*)photoUrls, &photoUrlsJsonArray, "photoUrls", "QString");
|
|
||||||
|
|
||||||
obj->insert("photoUrls", photoUrlsJsonArray);
|
obj->insert("photoUrls", photoUrlsJsonArray);
|
||||||
|
|
||||||
@ -128,8 +123,7 @@
|
|||||||
|
|
||||||
QList<SWGTag*>* tagsList = tags;
|
QList<SWGTag*>* tagsList = tags;
|
||||||
QJsonArray tagsJsonArray;
|
QJsonArray tagsJsonArray;
|
||||||
toJsonArray((QList
|
toJsonArray((QList<void*>*)tags, &tagsJsonArray, "tags", "SWGTag");
|
||||||
<void*>*)tags, &tagsJsonArray, "tags", "SWGTag");
|
|
||||||
|
|
||||||
obj->insert("tags", tagsJsonArray);
|
obj->insert("tags", tagsJsonArray);
|
||||||
|
|
||||||
@ -145,7 +139,6 @@
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
qint64
|
qint64
|
||||||
SWGPet::getId() {
|
SWGPet::getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -155,7 +148,6 @@
|
|||||||
this->id = id;
|
this->id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SWGCategory*
|
SWGCategory*
|
||||||
SWGPet::getCategory() {
|
SWGPet::getCategory() {
|
||||||
return category;
|
return category;
|
||||||
@ -165,7 +157,6 @@
|
|||||||
this->category = category;
|
this->category = category;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGPet::getName() {
|
SWGPet::getName() {
|
||||||
return name;
|
return name;
|
||||||
@ -175,7 +166,6 @@
|
|||||||
this->name = name;
|
this->name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QList<QString*>*
|
QList<QString*>*
|
||||||
SWGPet::getPhotoUrls() {
|
SWGPet::getPhotoUrls() {
|
||||||
return photoUrls;
|
return photoUrls;
|
||||||
@ -185,7 +175,6 @@
|
|||||||
this->photoUrls = photoUrls;
|
this->photoUrls = photoUrls;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QList<SWGTag*>*
|
QList<SWGTag*>*
|
||||||
SWGPet::getTags() {
|
SWGPet::getTags() {
|
||||||
return tags;
|
return tags;
|
||||||
@ -195,7 +184,6 @@
|
|||||||
this->tags = tags;
|
this->tags = tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGPet::getStatus() {
|
SWGPet::getStatus() {
|
||||||
return status;
|
return status;
|
||||||
@ -207,6 +195,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
|
@ -7,14 +7,13 @@
|
|||||||
#ifndef SWGPet_H_
|
#ifndef SWGPet_H_
|
||||||
#define SWGPet_H_
|
#define SWGPet_H_
|
||||||
|
|
||||||
#include
|
#include <QJsonObject>
|
||||||
<QJsonObject>
|
|
||||||
|
|
||||||
|
|
||||||
#include "SWGTag.h"
|
|
||||||
#include <QList>
|
|
||||||
#include "SWGCategory.h"
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include "SWGCategory.h"
|
||||||
|
#include <QList>
|
||||||
|
#include "SWGTag.h"
|
||||||
|
|
||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
@ -2,10 +2,8 @@
|
|||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
#include "SWGModelFactory.h"
|
#include "SWGModelFactory.h"
|
||||||
|
|
||||||
#include
|
#include <QJsonArray>
|
||||||
<QJsonArray>
|
#include <QJsonDocument>
|
||||||
#include
|
|
||||||
<QJsonDocument>
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
SWGPetApi::SWGPetApi() {}
|
SWGPetApi::SWGPetApi() {}
|
||||||
@ -17,8 +15,6 @@
|
|||||||
this->basePath = basePath;
|
this->basePath = basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGPetApi::updatePet(SWGPet body) {
|
SWGPetApi::updatePet(SWGPet body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -67,7 +63,6 @@
|
|||||||
|
|
||||||
emit updatePetSignal();
|
emit updatePetSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGPetApi::addPet(SWGPet body) {
|
SWGPetApi::addPet(SWGPet body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -116,7 +111,6 @@
|
|||||||
|
|
||||||
emit addPetSignal();
|
emit addPetSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGPetApi::findPetsByStatus(QList<QString*>* status) {
|
SWGPetApi::findPetsByStatus(QList<QString*>* status) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -222,7 +216,6 @@
|
|||||||
emit findPetsByStatusSignal(output);
|
emit findPetsByStatusSignal(output);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGPetApi::findPetsByTags(QList<QString*>* tags) {
|
SWGPetApi::findPetsByTags(QList<QString*>* tags) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -328,7 +321,6 @@
|
|||||||
emit findPetsByTagsSignal(output);
|
emit findPetsByTagsSignal(output);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGPetApi::getPetById(qint64 petId) {
|
SWGPetApi::getPetById(qint64 petId) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -374,8 +366,7 @@
|
|||||||
|
|
||||||
|
|
||||||
QString json(worker->response);
|
QString json(worker->response);
|
||||||
SWGPet* output = static_cast<SWGPet*>(create(json,
|
SWGPet* output = static_cast<SWGPet*>(create(json, QString("SWGPet")));
|
||||||
QString("SWGPet")));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -385,11 +376,8 @@
|
|||||||
emit getPetByIdSignal(output);
|
emit getPetByIdSignal(output);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGPetApi::updatePetWithForm(QString* petId
|
SWGPetApi::updatePetWithForm(QString* petId, QString* name, QString* status) {
|
||||||
, QString* name
|
|
||||||
, QString* status) {
|
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}");
|
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}");
|
||||||
|
|
||||||
@ -442,10 +430,8 @@
|
|||||||
|
|
||||||
emit updatePetWithFormSignal();
|
emit updatePetWithFormSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGPetApi::deletePet(QString* apiKey
|
SWGPetApi::deletePet(QString* apiKey, qint64 petId) {
|
||||||
, qint64 petId) {
|
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}");
|
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}");
|
||||||
|
|
||||||
@ -492,11 +478,8 @@
|
|||||||
|
|
||||||
emit deletePetSignal();
|
emit deletePetSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGPetApi::uploadFile(qint64 petId
|
SWGPetApi::uploadFile(qint64 petId, QString* additionalMetadata, SWGHttpRequestInputFileElement* file) {
|
||||||
, QString* additionalMetadata
|
|
||||||
, SWGHttpRequestInputFileElement* file) {
|
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}/uploadImage");
|
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}/uploadImage");
|
||||||
|
|
||||||
@ -545,6 +528,4 @@
|
|||||||
|
|
||||||
emit uploadFileSignal();
|
emit uploadFileSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include "SWGHttpRequest.h"
|
#include "SWGHttpRequest.h"
|
||||||
|
|
||||||
#include
|
#include <QObject>
|
||||||
<QObject>
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
@ -28,14 +27,9 @@
|
|||||||
void findPetsByStatus(QList<QString*>* status);
|
void findPetsByStatus(QList<QString*>* status);
|
||||||
void findPetsByTags(QList<QString*>* tags);
|
void findPetsByTags(QList<QString*>* tags);
|
||||||
void getPetById(qint64 petId);
|
void getPetById(qint64 petId);
|
||||||
void updatePetWithForm(QString* petId
|
void updatePetWithForm(QString* petId, QString* name, QString* status);
|
||||||
, QString* name
|
void deletePet(QString* apiKey, qint64 petId);
|
||||||
, QString* status);
|
void uploadFile(qint64 petId, QString* additionalMetadata, SWGHttpRequestInputFileElement* file);
|
||||||
void deletePet(QString* apiKey
|
|
||||||
, qint64 petId);
|
|
||||||
void uploadFile(qint64 petId
|
|
||||||
, QString* additionalMetadata
|
|
||||||
, SWGHttpRequestInputFileElement* file);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updatePetCallback (HttpRequestWorker * worker);
|
void updatePetCallback (HttpRequestWorker * worker);
|
||||||
|
@ -2,10 +2,8 @@
|
|||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
#include "SWGModelFactory.h"
|
#include "SWGModelFactory.h"
|
||||||
|
|
||||||
#include
|
#include <QJsonArray>
|
||||||
<QJsonArray>
|
#include <QJsonDocument>
|
||||||
#include
|
|
||||||
<QJsonDocument>
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
SWGStoreApi::SWGStoreApi() {}
|
SWGStoreApi::SWGStoreApi() {}
|
||||||
@ -17,8 +15,6 @@
|
|||||||
this->basePath = basePath;
|
this->basePath = basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGStoreApi::getInventory() {
|
SWGStoreApi::getInventory() {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -82,7 +78,6 @@
|
|||||||
emit getInventorySignal(output);
|
emit getInventorySignal(output);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGStoreApi::placeOrder(SWGOrder body) {
|
SWGStoreApi::placeOrder(SWGOrder body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -130,8 +125,7 @@
|
|||||||
|
|
||||||
|
|
||||||
QString json(worker->response);
|
QString json(worker->response);
|
||||||
SWGOrder* output = static_cast<SWGOrder*>(create(json,
|
SWGOrder* output = static_cast<SWGOrder*>(create(json, QString("SWGOrder")));
|
||||||
QString("SWGOrder")));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -141,7 +135,6 @@
|
|||||||
emit placeOrderSignal(output);
|
emit placeOrderSignal(output);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGStoreApi::getOrderById(QString* orderId) {
|
SWGStoreApi::getOrderById(QString* orderId) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -187,8 +180,7 @@
|
|||||||
|
|
||||||
|
|
||||||
QString json(worker->response);
|
QString json(worker->response);
|
||||||
SWGOrder* output = static_cast<SWGOrder*>(create(json,
|
SWGOrder* output = static_cast<SWGOrder*>(create(json, QString("SWGOrder")));
|
||||||
QString("SWGOrder")));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -198,7 +190,6 @@
|
|||||||
emit getOrderByIdSignal(output);
|
emit getOrderByIdSignal(output);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGStoreApi::deleteOrder(QString* orderId) {
|
SWGStoreApi::deleteOrder(QString* orderId) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -245,6 +236,4 @@
|
|||||||
|
|
||||||
emit deleteOrderSignal();
|
emit deleteOrderSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
#include "SWGOrder.h"
|
#include "SWGOrder.h"
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#include
|
#include <QObject>
|
||||||
<QObject>
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
|
@ -3,14 +3,10 @@
|
|||||||
|
|
||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
|
|
||||||
#include
|
#include <QJsonDocument>
|
||||||
<QJsonDocument>
|
#include <QJsonArray>
|
||||||
#include
|
#include <QObject>
|
||||||
<QJsonArray>
|
#include <QDebug>
|
||||||
#include
|
|
||||||
<QObject>
|
|
||||||
#include
|
|
||||||
<QDebug>
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
@ -85,7 +81,6 @@
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
qint64
|
qint64
|
||||||
SWGTag::getId() {
|
SWGTag::getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -95,7 +90,6 @@
|
|||||||
this->id = id;
|
this->id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGTag::getName() {
|
SWGTag::getName() {
|
||||||
return name;
|
return name;
|
||||||
@ -107,6 +101,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
#ifndef SWGTag_H_
|
#ifndef SWGTag_H_
|
||||||
#define SWGTag_H_
|
#define SWGTag_H_
|
||||||
|
|
||||||
#include
|
#include <QJsonObject>
|
||||||
<QJsonObject>
|
|
||||||
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
@ -3,14 +3,10 @@
|
|||||||
|
|
||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
|
|
||||||
#include
|
#include <QJsonDocument>
|
||||||
<QJsonDocument>
|
#include <QJsonArray>
|
||||||
#include
|
#include <QObject>
|
||||||
<QJsonArray>
|
#include <QDebug>
|
||||||
#include
|
|
||||||
<QObject>
|
|
||||||
#include
|
|
||||||
<QDebug>
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
@ -144,7 +140,6 @@
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
qint64
|
qint64
|
||||||
SWGUser::getId() {
|
SWGUser::getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -154,7 +149,6 @@
|
|||||||
this->id = id;
|
this->id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGUser::getUsername() {
|
SWGUser::getUsername() {
|
||||||
return username;
|
return username;
|
||||||
@ -164,7 +158,6 @@
|
|||||||
this->username = username;
|
this->username = username;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGUser::getFirstName() {
|
SWGUser::getFirstName() {
|
||||||
return firstName;
|
return firstName;
|
||||||
@ -174,7 +167,6 @@
|
|||||||
this->firstName = firstName;
|
this->firstName = firstName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGUser::getLastName() {
|
SWGUser::getLastName() {
|
||||||
return lastName;
|
return lastName;
|
||||||
@ -184,7 +176,6 @@
|
|||||||
this->lastName = lastName;
|
this->lastName = lastName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGUser::getEmail() {
|
SWGUser::getEmail() {
|
||||||
return email;
|
return email;
|
||||||
@ -194,7 +185,6 @@
|
|||||||
this->email = email;
|
this->email = email;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGUser::getPassword() {
|
SWGUser::getPassword() {
|
||||||
return password;
|
return password;
|
||||||
@ -204,7 +194,6 @@
|
|||||||
this->password = password;
|
this->password = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGUser::getPhone() {
|
SWGUser::getPhone() {
|
||||||
return phone;
|
return phone;
|
||||||
@ -214,7 +203,6 @@
|
|||||||
this->phone = phone;
|
this->phone = phone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGUser::getUserStatus() {
|
SWGUser::getUserStatus() {
|
||||||
return userStatus;
|
return userStatus;
|
||||||
@ -226,6 +214,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
#ifndef SWGUser_H_
|
#ifndef SWGUser_H_
|
||||||
#define SWGUser_H_
|
#define SWGUser_H_
|
||||||
|
|
||||||
#include
|
#include <QJsonObject>
|
||||||
<QJsonObject>
|
|
||||||
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
@ -2,10 +2,8 @@
|
|||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
#include "SWGModelFactory.h"
|
#include "SWGModelFactory.h"
|
||||||
|
|
||||||
#include
|
#include <QJsonArray>
|
||||||
<QJsonArray>
|
#include <QJsonDocument>
|
||||||
#include
|
|
||||||
<QJsonDocument>
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
SWGUserApi::SWGUserApi() {}
|
SWGUserApi::SWGUserApi() {}
|
||||||
@ -17,8 +15,6 @@
|
|||||||
this->basePath = basePath;
|
this->basePath = basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGUserApi::createUser(SWGUser body) {
|
SWGUserApi::createUser(SWGUser body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -67,7 +63,6 @@
|
|||||||
|
|
||||||
emit createUserSignal();
|
emit createUserSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGUserApi::createUsersWithArrayInput(QList<SWGUser*>* body) {
|
SWGUserApi::createUsersWithArrayInput(QList<SWGUser*>* body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -85,9 +80,7 @@
|
|||||||
|
|
||||||
|
|
||||||
QJsonArray* bodyArray = new QJsonArray();
|
QJsonArray* bodyArray = new QJsonArray();
|
||||||
toJsonArray((QList
|
toJsonArray((QList<void*>*)body, bodyArray, QString("body"), QString("SWGUser*"));
|
||||||
<void
|
|
||||||
*>*)body, bodyArray, QString("body"), QString("SWGUser*"));
|
|
||||||
|
|
||||||
QJsonDocument doc(*bodyArray);
|
QJsonDocument doc(*bodyArray);
|
||||||
QByteArray bytes = doc.toJson();
|
QByteArray bytes = doc.toJson();
|
||||||
@ -123,7 +116,6 @@
|
|||||||
|
|
||||||
emit createUsersWithArrayInputSignal();
|
emit createUsersWithArrayInputSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGUserApi::createUsersWithListInput(QList<SWGUser*>* body) {
|
SWGUserApi::createUsersWithListInput(QList<SWGUser*>* body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -141,9 +133,7 @@
|
|||||||
|
|
||||||
|
|
||||||
QJsonArray* bodyArray = new QJsonArray();
|
QJsonArray* bodyArray = new QJsonArray();
|
||||||
toJsonArray((QList
|
toJsonArray((QList<void*>*)body, bodyArray, QString("body"), QString("SWGUser*"));
|
||||||
<void
|
|
||||||
*>*)body, bodyArray, QString("body"), QString("SWGUser*"));
|
|
||||||
|
|
||||||
QJsonDocument doc(*bodyArray);
|
QJsonDocument doc(*bodyArray);
|
||||||
QByteArray bytes = doc.toJson();
|
QByteArray bytes = doc.toJson();
|
||||||
@ -179,10 +169,8 @@
|
|||||||
|
|
||||||
emit createUsersWithListInputSignal();
|
emit createUsersWithListInputSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGUserApi::loginUser(QString* username
|
SWGUserApi::loginUser(QString* username, QString* password) {
|
||||||
, QString* password) {
|
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/user/login");
|
fullPath.append(this->host).append(this->basePath).append("/user/login");
|
||||||
|
|
||||||
@ -247,8 +235,7 @@
|
|||||||
|
|
||||||
|
|
||||||
QString json(worker->response);
|
QString json(worker->response);
|
||||||
QString* output = static_cast<QString*>(create(json,
|
QString* output = static_cast<QString*>(create(json, QString("QString")));
|
||||||
QString("QString")));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -258,7 +245,6 @@
|
|||||||
emit loginUserSignal(output);
|
emit loginUserSignal(output);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGUserApi::logoutUser() {
|
SWGUserApi::logoutUser() {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -302,7 +288,6 @@
|
|||||||
|
|
||||||
emit logoutUserSignal();
|
emit logoutUserSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGUserApi::getUserByName(QString* username) {
|
SWGUserApi::getUserByName(QString* username) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -348,8 +333,7 @@
|
|||||||
|
|
||||||
|
|
||||||
QString json(worker->response);
|
QString json(worker->response);
|
||||||
SWGUser* output = static_cast<SWGUser*>(create(json,
|
SWGUser* output = static_cast<SWGUser*>(create(json, QString("SWGUser")));
|
||||||
QString("SWGUser")));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -359,10 +343,8 @@
|
|||||||
emit getUserByNameSignal(output);
|
emit getUserByNameSignal(output);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGUserApi::updateUser(QString* username
|
SWGUserApi::updateUser(QString* username, SWGUser body) {
|
||||||
, SWGUser body) {
|
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/user/{username}");
|
fullPath.append(this->host).append(this->basePath).append("/user/{username}");
|
||||||
|
|
||||||
@ -412,7 +394,6 @@
|
|||||||
|
|
||||||
emit updateUserSignal();
|
emit updateUserSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGUserApi::deleteUser(QString* username) {
|
SWGUserApi::deleteUser(QString* username) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -459,6 +440,4 @@
|
|||||||
|
|
||||||
emit deleteUserSignal();
|
emit deleteUserSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#include
|
#include <QObject>
|
||||||
<QObject>
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
@ -26,12 +25,10 @@
|
|||||||
void createUser(SWGUser body);
|
void createUser(SWGUser body);
|
||||||
void createUsersWithArrayInput(QList<SWGUser*>* body);
|
void createUsersWithArrayInput(QList<SWGUser*>* body);
|
||||||
void createUsersWithListInput(QList<SWGUser*>* body);
|
void createUsersWithListInput(QList<SWGUser*>* body);
|
||||||
void loginUser(QString* username
|
void loginUser(QString* username, QString* password);
|
||||||
, QString* password);
|
|
||||||
void logoutUser();
|
void logoutUser();
|
||||||
void getUserByName(QString* username);
|
void getUserByName(QString* username);
|
||||||
void updateUser(QString* username
|
void updateUser(QString* username, SWGUser body);
|
||||||
, SWGUser body);
|
|
||||||
void deleteUser(QString* username);
|
void deleteUser(QString* username);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -77,8 +77,7 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<sources>
|
<sources>
|
||||||
<source>
|
<source>src/main/java</source>
|
||||||
src/main/java</source>
|
|
||||||
</sources>
|
</sources>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
@ -90,8 +89,7 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<sources>
|
<sources>
|
||||||
<source>
|
<source>src/test/java</source>
|
||||||
src/test/java</source>
|
|
||||||
</sources>
|
</sources>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
@ -102,8 +100,7 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>2.3.2</version>
|
<version>2.3.2</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>
|
<source>1.6</source>
|
||||||
1.6</source>
|
|
||||||
<target>1.6</target>
|
<target>1.6</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
@ -47,4 +47,3 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,4 +108,3 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package io.swagger.client.model;
|
package io.swagger.client.model;
|
||||||
|
|
||||||
import io.swagger.client.model.Category;
|
import io.swagger.client.model.Category;
|
||||||
import io.swagger.client.model.Tag;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import io.swagger.client.model.Tag;
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
@ -110,4 +110,3 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,4 +47,3 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,4 +132,3 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,8 @@ require 'swagger_client/models/order'
|
|||||||
|
|
||||||
# APIs
|
# APIs
|
||||||
require 'swagger_client/api/user_api'
|
require 'swagger_client/api/user_api'
|
||||||
require 'swagger_client/api/pet_api'
|
|
||||||
require 'swagger_client/api/store_api'
|
require 'swagger_client/api/store_api'
|
||||||
|
require 'swagger_client/api/pet_api'
|
||||||
|
|
||||||
module SwaggerClient
|
module SwaggerClient
|
||||||
# Initialize the default configuration
|
# Initialize the default configuration
|
||||||
|
@ -190,7 +190,7 @@ module SwaggerClient
|
|||||||
post_body = nil
|
post_body = nil
|
||||||
|
|
||||||
|
|
||||||
auth_names = ['api_key', 'petstore_auth']
|
auth_names = ['petstore_auth', 'api_key']
|
||||||
response = Swagger::Request.new(:GET, path, {:params => query_params, :headers => header_params, :form_params => form_params, :body => post_body, :auth_names => auth_names}).make.body
|
response = Swagger::Request.new(:GET, path, {:params => query_params, :headers => header_params, :form_params => form_params, :body => post_body, :auth_names => auth_names}).make.body
|
||||||
obj = Pet.new() and obj.build_from_hash(response)
|
obj = Pet.new() and obj.build_from_hash(response)
|
||||||
end
|
end
|
||||||
|
@ -81,8 +81,7 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<sources>
|
<sources>
|
||||||
<source>
|
<source>src/main/java</source>
|
||||||
src/main/java</source>
|
|
||||||
</sources>
|
</sources>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
@ -94,8 +93,7 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<sources>
|
<sources>
|
||||||
<source>
|
<source>src/test/java</source>
|
||||||
src/test/java</source>
|
|
||||||
</sources>
|
</sources>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
@ -106,8 +104,7 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>2.3.2</version>
|
<version>2.3.2</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>
|
<source>1.6</source>
|
||||||
1.6</source>
|
|
||||||
<target>1.6</target>
|
<target>1.6</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
@ -3,9 +3,7 @@ package io.swagger.client.model
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case class Category (
|
case class Category (
|
||||||
id: Long,
|
id: Long,
|
||||||
name: String)
|
name: String)
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case class Order (
|
case class Order (
|
||||||
id: Long,
|
id: Long,
|
||||||
petId: Long,
|
petId: Long,
|
||||||
@ -14,4 +13,3 @@ import org.joda.time.DateTime
|
|||||||
status: String,
|
status: String,
|
||||||
complete: Boolean)
|
complete: Boolean)
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ import io.swagger.client.model.Tag
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case class Pet (
|
case class Pet (
|
||||||
id: Long,
|
id: Long,
|
||||||
category: Category,
|
category: Category,
|
||||||
@ -15,4 +14,3 @@ import io.swagger.client.model.Tag
|
|||||||
/* pet status in the store */
|
/* pet status in the store */
|
||||||
status: String)
|
status: String)
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,9 +3,7 @@ package io.swagger.client.model
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case class Tag (
|
case class Tag (
|
||||||
id: Long,
|
id: Long,
|
||||||
name: String)
|
name: String)
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ package io.swagger.client.model
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case class User (
|
case class User (
|
||||||
id: Long,
|
id: Long,
|
||||||
username: String,
|
username: String,
|
||||||
@ -15,4 +14,3 @@ package io.swagger.client.model
|
|||||||
/* User Status */
|
/* User Status */
|
||||||
userStatus: Integer)
|
userStatus: Integer)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include
|
#include <FNet.h>
|
||||||
<FNet.h>
|
|
||||||
|
|
||||||
#include "SamiHelpers.h"
|
#include "SamiHelpers.h"
|
||||||
#include "SamiError.h"
|
#include "SamiError.h"
|
||||||
@ -20,8 +19,7 @@
|
|||||||
virtual ~SamiApiClient();
|
virtual ~SamiApiClient();
|
||||||
|
|
||||||
result
|
result
|
||||||
execute(String host, String path, String method, IMap* queryParams, String* body, IMap* headerParams, IMap*
|
execute(String host, String path, String method, IMap* queryParams, String* body, IMap* headerParams, IMap* formParams, String contentType);
|
||||||
formParams, String contentType);
|
|
||||||
|
|
||||||
void success(void (*res) (HttpResponse*, void (*cb)(void*, SamiError*)), void (*cb)(void*, SamiError*));
|
void success(void (*res) (HttpResponse*, void (*cb)(void*, SamiError*)), void (*cb)(void*, SamiError*));
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
#include "SamiCategory.h"
|
#include "SamiCategory.h"
|
||||||
#include
|
#include <FLocales.h>
|
||||||
<FLocales.h>
|
|
||||||
|
|
||||||
using namespace Tizen::Base;
|
using namespace Tizen::Base;
|
||||||
using namespace Tizen::System;
|
using namespace Tizen::System;
|
||||||
@ -159,7 +158,6 @@
|
|||||||
return pJsonObject;
|
return pJsonObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Long*
|
Long*
|
||||||
SamiCategory::getPId() {
|
SamiCategory::getPId() {
|
||||||
return pId;
|
return pId;
|
||||||
@ -169,7 +167,6 @@
|
|||||||
this->pId = pId;
|
this->pId = pId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String*
|
String*
|
||||||
SamiCategory::getPName() {
|
SamiCategory::getPName() {
|
||||||
return pName;
|
return pName;
|
||||||
@ -181,6 +178,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
|
@ -7,14 +7,10 @@
|
|||||||
#ifndef SamiCategory_H_
|
#ifndef SamiCategory_H_
|
||||||
#define SamiCategory_H_
|
#define SamiCategory_H_
|
||||||
|
|
||||||
#include
|
#include <FApp.h>
|
||||||
<FApp.h>
|
#include <FBase.h>
|
||||||
#include
|
#include <FSystem.h>
|
||||||
<FBase.h>
|
#include <FWebJson.h>
|
||||||
#include
|
|
||||||
<FSystem.h>
|
|
||||||
#include
|
|
||||||
<FWebJson.h>
|
|
||||||
#include "SamiHelpers.h"
|
#include "SamiHelpers.h"
|
||||||
#include "SamiObject.h"
|
#include "SamiObject.h"
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
#ifndef SamiError_H_
|
#ifndef SamiError_H_
|
||||||
#define SamiError_H_
|
#define SamiError_H_
|
||||||
|
|
||||||
#include
|
#include <FBase.h>
|
||||||
<FBase.h>
|
|
||||||
|
|
||||||
using namespace Tizen::Base;
|
using namespace Tizen::Base;
|
||||||
|
|
||||||
|
@ -1,16 +1,11 @@
|
|||||||
#ifndef HELPERS_H_
|
#ifndef HELPERS_H_
|
||||||
#define HELPERS_H_
|
#define HELPERS_H_
|
||||||
|
|
||||||
#include
|
#include <FApp.h>
|
||||||
<FApp.h>
|
#include <FBase.h>
|
||||||
#include
|
#include <FSystem.h>
|
||||||
<FBase.h>
|
#include <FWebJson.h>
|
||||||
#include
|
#include <FLocales.h>
|
||||||
<FSystem.h>
|
|
||||||
#include
|
|
||||||
<FWebJson.h>
|
|
||||||
#include
|
|
||||||
<FLocales.h>
|
|
||||||
#include "SamiHelpers.h"
|
#include "SamiHelpers.h"
|
||||||
#include "SamiObject.h"
|
#include "SamiObject.h"
|
||||||
|
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
#ifndef _Sami_OBJECT_H_
|
#ifndef _Sami_OBJECT_H_
|
||||||
#define _Sami_OBJECT_H_
|
#define _Sami_OBJECT_H_
|
||||||
|
|
||||||
#include
|
#include <FNet.h>
|
||||||
<FNet.h>
|
#include <FWebJson.h>
|
||||||
#include
|
#include <FBase.h>
|
||||||
<FWebJson.h>
|
|
||||||
#include
|
|
||||||
<FBase.h>
|
|
||||||
|
|
||||||
using Tizen::Base::String;
|
using Tizen::Base::String;
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
#include "SamiOrder.h"
|
#include "SamiOrder.h"
|
||||||
#include
|
#include <FLocales.h>
|
||||||
<FLocales.h>
|
|
||||||
|
|
||||||
using namespace Tizen::Base;
|
using namespace Tizen::Base;
|
||||||
using namespace Tizen::System;
|
using namespace Tizen::System;
|
||||||
@ -235,7 +234,6 @@
|
|||||||
return pJsonObject;
|
return pJsonObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Long*
|
Long*
|
||||||
SamiOrder::getPId() {
|
SamiOrder::getPId() {
|
||||||
return pId;
|
return pId;
|
||||||
@ -245,7 +243,6 @@
|
|||||||
this->pId = pId;
|
this->pId = pId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Long*
|
Long*
|
||||||
SamiOrder::getPPetId() {
|
SamiOrder::getPPetId() {
|
||||||
return pPetId;
|
return pPetId;
|
||||||
@ -255,7 +252,6 @@
|
|||||||
this->pPetId = pPetId;
|
this->pPetId = pPetId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Integer*
|
Integer*
|
||||||
SamiOrder::getPQuantity() {
|
SamiOrder::getPQuantity() {
|
||||||
return pQuantity;
|
return pQuantity;
|
||||||
@ -265,7 +261,6 @@
|
|||||||
this->pQuantity = pQuantity;
|
this->pQuantity = pQuantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DateTime*
|
DateTime*
|
||||||
SamiOrder::getPShipDate() {
|
SamiOrder::getPShipDate() {
|
||||||
return pShipDate;
|
return pShipDate;
|
||||||
@ -275,7 +270,6 @@
|
|||||||
this->pShipDate = pShipDate;
|
this->pShipDate = pShipDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String*
|
String*
|
||||||
SamiOrder::getPStatus() {
|
SamiOrder::getPStatus() {
|
||||||
return pStatus;
|
return pStatus;
|
||||||
@ -285,7 +279,6 @@
|
|||||||
this->pStatus = pStatus;
|
this->pStatus = pStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Boolean*
|
Boolean*
|
||||||
SamiOrder::getPComplete() {
|
SamiOrder::getPComplete() {
|
||||||
return pComplete;
|
return pComplete;
|
||||||
@ -297,6 +290,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
|
@ -7,25 +7,21 @@
|
|||||||
#ifndef SamiOrder_H_
|
#ifndef SamiOrder_H_
|
||||||
#define SamiOrder_H_
|
#define SamiOrder_H_
|
||||||
|
|
||||||
#include
|
#include <FApp.h>
|
||||||
<FApp.h>
|
#include <FBase.h>
|
||||||
#include
|
#include <FSystem.h>
|
||||||
<FBase.h>
|
#include <FWebJson.h>
|
||||||
#include
|
|
||||||
<FSystem.h>
|
|
||||||
#include
|
|
||||||
<FWebJson.h>
|
|
||||||
#include "SamiHelpers.h"
|
#include "SamiHelpers.h"
|
||||||
#include "SamiObject.h"
|
#include "SamiObject.h"
|
||||||
|
|
||||||
using namespace Tizen::Web::Json;
|
using namespace Tizen::Web::Json;
|
||||||
|
|
||||||
|
|
||||||
|
using Tizen::Base::Integer;
|
||||||
using Tizen::Base::Long;
|
using Tizen::Base::Long;
|
||||||
using Tizen::Base::DateTime;
|
|
||||||
using Tizen::Base::String;
|
using Tizen::Base::String;
|
||||||
using Tizen::Base::Boolean;
|
using Tizen::Base::Boolean;
|
||||||
using Tizen::Base::Integer;
|
using Tizen::Base::DateTime;
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
#include "SamiPet.h"
|
#include "SamiPet.h"
|
||||||
#include
|
#include <FLocales.h>
|
||||||
<FLocales.h>
|
|
||||||
|
|
||||||
using namespace Tizen::Base;
|
using namespace Tizen::Base;
|
||||||
using namespace Tizen::System;
|
using namespace Tizen::System;
|
||||||
@ -235,7 +234,6 @@
|
|||||||
return pJsonObject;
|
return pJsonObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Long*
|
Long*
|
||||||
SamiPet::getPId() {
|
SamiPet::getPId() {
|
||||||
return pId;
|
return pId;
|
||||||
@ -245,7 +243,6 @@
|
|||||||
this->pId = pId;
|
this->pId = pId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SamiCategory*
|
SamiCategory*
|
||||||
SamiPet::getPCategory() {
|
SamiPet::getPCategory() {
|
||||||
return pCategory;
|
return pCategory;
|
||||||
@ -255,7 +252,6 @@
|
|||||||
this->pCategory = pCategory;
|
this->pCategory = pCategory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String*
|
String*
|
||||||
SamiPet::getPName() {
|
SamiPet::getPName() {
|
||||||
return pName;
|
return pName;
|
||||||
@ -265,7 +261,6 @@
|
|||||||
this->pName = pName;
|
this->pName = pName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IList*
|
IList*
|
||||||
SamiPet::getPPhotoUrls() {
|
SamiPet::getPPhotoUrls() {
|
||||||
return pPhotoUrls;
|
return pPhotoUrls;
|
||||||
@ -275,7 +270,6 @@
|
|||||||
this->pPhotoUrls = pPhotoUrls;
|
this->pPhotoUrls = pPhotoUrls;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IList*
|
IList*
|
||||||
SamiPet::getPTags() {
|
SamiPet::getPTags() {
|
||||||
return pTags;
|
return pTags;
|
||||||
@ -285,7 +279,6 @@
|
|||||||
this->pTags = pTags;
|
this->pTags = pTags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String*
|
String*
|
||||||
SamiPet::getPStatus() {
|
SamiPet::getPStatus() {
|
||||||
return pStatus;
|
return pStatus;
|
||||||
@ -297,6 +290,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
|
@ -7,23 +7,19 @@
|
|||||||
#ifndef SamiPet_H_
|
#ifndef SamiPet_H_
|
||||||
#define SamiPet_H_
|
#define SamiPet_H_
|
||||||
|
|
||||||
#include
|
#include <FApp.h>
|
||||||
<FApp.h>
|
#include <FBase.h>
|
||||||
#include
|
#include <FSystem.h>
|
||||||
<FBase.h>
|
#include <FWebJson.h>
|
||||||
#include
|
|
||||||
<FSystem.h>
|
|
||||||
#include
|
|
||||||
<FWebJson.h>
|
|
||||||
#include "SamiHelpers.h"
|
#include "SamiHelpers.h"
|
||||||
#include "SamiObject.h"
|
#include "SamiObject.h"
|
||||||
|
|
||||||
using namespace Tizen::Web::Json;
|
using namespace Tizen::Web::Json;
|
||||||
|
|
||||||
|
|
||||||
#include "SamiCategory.h"
|
|
||||||
using Tizen::Base::Long;
|
using Tizen::Base::Long;
|
||||||
using Tizen::Base::String;
|
using Tizen::Base::String;
|
||||||
|
#include "SamiCategory.h"
|
||||||
#include "SamiTag.h"
|
#include "SamiTag.h"
|
||||||
using Tizen::Base::Collection::IList;
|
using Tizen::Base::Collection::IList;
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ namespace Swagger {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
updatePetProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
updatePetProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -66,7 +65,6 @@ namespace Swagger {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
addPetProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
addPetProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -116,7 +114,6 @@ namespace Swagger {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
findPetsByStatusProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
findPetsByStatusProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -186,7 +183,6 @@ namespace Swagger {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
findPetsByTagsProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
findPetsByTagsProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -256,7 +252,6 @@ namespace Swagger {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
getPetByIdProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
getPetByIdProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -324,7 +319,6 @@ namespace Swagger {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
updatePetWithFormProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
updatePetWithFormProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -371,7 +365,6 @@ namespace Swagger {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
deletePetProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
deletePetProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -421,7 +414,6 @@ namespace Swagger {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
uploadFileProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
uploadFileProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -469,5 +461,4 @@ namespace Swagger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user