forked from loafle/openapi-generator-original
merge from upstream
This commit is contained in:
@@ -26,6 +26,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l CsharpDotNet2 -o samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient"
|
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l CsharpDotNet2 -o samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
@@ -26,6 +26,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l csharp -o samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient"
|
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l csharp -o samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ fi
|
|||||||
# if you've executed sbt assembly previously it will use that instead.
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
# complex module name used for testing
|
# complex module name used for testing
|
||||||
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l perl -o samples/client/petstore/perl"
|
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l perl -o samples/client/petstore/perl"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="$@ generate -t modules/swagger-codegen/src/main/resources/php -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l php -o samples/client/petstore/php"
|
ags="$@ generate -t modules/swagger-codegen/src/main/resources/php -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l php -o samples/client/petstore/php"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
@@ -26,6 +26,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="$@ generate -t modules/swagger-codegen/src/main/resources/python -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l python -o samples/client/petstore/python"
|
ags="$@ generate -t modules/swagger-codegen/src/main/resources/python -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l python -o samples/client/petstore/python"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
@@ -26,6 +26,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="$@ generate -t modules/swagger-codegen/src/main/resources/ruby -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l ruby -c bin/ruby-petstore.json -o samples/client/petstore/ruby"
|
ags="$@ generate -t modules/swagger-codegen/src/main/resources/ruby -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l ruby -c bin/ruby-petstore.json -o samples/client/petstore/ruby"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
|||||||
"Int64",
|
"Int64",
|
||||||
"Float",
|
"Float",
|
||||||
"Guid",
|
"Guid",
|
||||||
"Stream", // not really a primitive, we include it to avoid model import
|
"System.IO.Stream", // not really a primitive, we include it to avoid model import
|
||||||
"Object")
|
"Object")
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
|||||||
typeMapping.put("number", "double?");
|
typeMapping.put("number", "double?");
|
||||||
typeMapping.put("datetime", "DateTime?");
|
typeMapping.put("datetime", "DateTime?");
|
||||||
typeMapping.put("date", "DateTime?");
|
typeMapping.put("date", "DateTime?");
|
||||||
typeMapping.put("file", "Stream");
|
typeMapping.put("file", "System.IO.Stream");
|
||||||
typeMapping.put("array", "List");
|
typeMapping.put("array", "List");
|
||||||
typeMapping.put("list", "List");
|
typeMapping.put("list", "List");
|
||||||
typeMapping.put("map", "Dictionary");
|
typeMapping.put("map", "Dictionary");
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public class CsharpDotNet2ClientCodegen extends DefaultCodegen implements Codege
|
|||||||
"Integer",
|
"Integer",
|
||||||
"Long",
|
"Long",
|
||||||
"Float",
|
"Float",
|
||||||
"Stream", // not really a primitive, we include it to avoid model import
|
"System.IO.Stream", // not really a primitive, we include it to avoid model import
|
||||||
"Object")
|
"Object")
|
||||||
);
|
);
|
||||||
instantiationTypes.put("array", "List");
|
instantiationTypes.put("array", "List");
|
||||||
@@ -76,7 +76,7 @@ public class CsharpDotNet2ClientCodegen extends DefaultCodegen implements Codege
|
|||||||
typeMapping.put("number", "double?");
|
typeMapping.put("number", "double?");
|
||||||
typeMapping.put("datetime", "DateTime?");
|
typeMapping.put("datetime", "DateTime?");
|
||||||
typeMapping.put("date", "DateTime?");
|
typeMapping.put("date", "DateTime?");
|
||||||
typeMapping.put("file", "Stream");
|
typeMapping.put("file", "System.IO.Stream");
|
||||||
typeMapping.put("array", "List");
|
typeMapping.put("array", "List");
|
||||||
typeMapping.put("list", "List");
|
typeMapping.put("list", "List");
|
||||||
typeMapping.put("map", "Dictionary");
|
typeMapping.put("map", "Dictionary");
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import io.swagger.codegen.*;
|
|||||||
import io.swagger.models.properties.ArrayProperty;
|
import io.swagger.models.properties.ArrayProperty;
|
||||||
import io.swagger.models.properties.MapProperty;
|
import io.swagger.models.properties.MapProperty;
|
||||||
import io.swagger.models.properties.Property;
|
import io.swagger.models.properties.Property;
|
||||||
|
import io.swagger.models.parameters.Parameter;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -132,7 +133,7 @@ public class GoClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
||||||
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
|
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
|
||||||
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
|
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
|
||||||
supportingFiles.add(new SupportingFile("configuration.mustache", packageName, "Configuration.go"));
|
supportingFiles.add(new SupportingFile("configuration.mustache", packageName, "configuration.go"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -196,6 +197,13 @@ public class GoClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toModelName(String name) {
|
public String toModelName(String name) {
|
||||||
|
// camelize the model name
|
||||||
|
// phone_number => PhoneNumber
|
||||||
|
return camelize(toModelFilename(name));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toModelFilename(String name) {
|
||||||
if (!StringUtils.isEmpty(modelNamePrefix)) {
|
if (!StringUtils.isEmpty(modelNamePrefix)) {
|
||||||
name = modelNamePrefix + "_" + name;
|
name = modelNamePrefix + "_" + name;
|
||||||
}
|
}
|
||||||
@@ -212,17 +220,48 @@ public class GoClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
name = "model_" + name; // e.g. return => ModelReturn (after camelize)
|
name = "model_" + name; // e.g. return => ModelReturn (after camelize)
|
||||||
}
|
}
|
||||||
|
|
||||||
// camelize the model name
|
return underscore(name);
|
||||||
// phone_number => PhoneNumber
|
|
||||||
return camelize(name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toModelFilename(String name) {
|
public String toApiFilename(String name) {
|
||||||
// should be the same as the model name
|
// replace - with _ e.g. created-at => created_at
|
||||||
return toModelName(name);
|
name = name.replaceAll("-", "_"); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'.
|
||||||
|
|
||||||
|
// e.g. PetApi.go => pet_api.go
|
||||||
|
return underscore(name) + "_api";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overrides postProcessParameter to add a vendor extension "x-exportParamName".
|
||||||
|
* This is useful when paramName starts with a lowercase letter, but we need that
|
||||||
|
* param to be exportable (starts with an Uppercase letter).
|
||||||
|
*
|
||||||
|
* @param parameter CodegenParameter object to be processed.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void postProcessParameter(CodegenParameter parameter){
|
||||||
|
|
||||||
|
// Give the base class a chance to process
|
||||||
|
super.postProcessParameter(parameter);
|
||||||
|
|
||||||
|
char firstChar = parameter.paramName.charAt(0);
|
||||||
|
|
||||||
|
if (Character.isUpperCase(firstChar)) {
|
||||||
|
// First char is already uppercase, just use paramName.
|
||||||
|
parameter.vendorExtensions.put("x-exportParamName", parameter.paramName);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// It's a lowercase first char, let's convert it to uppercase
|
||||||
|
StringBuilder sb = new StringBuilder(parameter.paramName);
|
||||||
|
sb.setCharAt(0, Character.toUpperCase(firstChar));
|
||||||
|
parameter.vendorExtensions.put("x-exportParamName", sb.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTypeDeclaration(Property p) {
|
public String getTypeDeclaration(Property p) {
|
||||||
if(p instanceof ArrayProperty) {
|
if(p instanceof ArrayProperty) {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using RestSharp;
|
using RestSharp;
|
||||||
using {{packageName}}.Client;
|
using {{packageName}}.Client;
|
||||||
|
|||||||
@@ -190,9 +190,9 @@ export class {{classname}} {
|
|||||||
let formParams: any = {};
|
let formParams: any = {};
|
||||||
|
|
||||||
{{#allParams}}{{#required}}
|
{{#allParams}}{{#required}}
|
||||||
// verify required parameter '{{paramName}}' is set
|
// verify required parameter '{{paramName}}' is not null or undefined
|
||||||
if (!{{paramName}}) {
|
if ({{paramName}} === null || {{paramName}} === undefined) {
|
||||||
throw new Error('Missing required parameter {{paramName}} when calling {{nickname}}');
|
throw new Error('Required parameter {{paramName}} was null or undefined when calling {{nickname}}.');
|
||||||
}
|
}
|
||||||
{{/required}}{{/allParams}}
|
{{/required}}{{/allParams}}
|
||||||
{{#queryParams}}
|
{{#queryParams}}
|
||||||
|
|||||||
@@ -121,7 +121,10 @@ public class {{classname}} {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ ext {
|
|||||||
dependencies {
|
dependencies {
|
||||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||||
compile "com.google.code.gson:gson:$gson_version"
|
compile "com.google.code.gson:gson:$gson_version"
|
||||||
compile "org.apache.httpcomponents:httpcore:$httpclient_version"
|
compile "org.apache.httpcomponents:httpcore:$httpcore_version"
|
||||||
compile "org.apache.httpcomponents:httpmime:$httpclient_version"
|
compile "org.apache.httpcomponents:httpmime:$httpclient_version"
|
||||||
compile "com.mcxiaoke.volley:library:${volley_version}@aar"
|
compile "com.mcxiaoke.volley:library:${volley_version}@aar"
|
||||||
testCompile "junit:junit:$junit_version"
|
testCompile "junit:junit:$junit_version"
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|||||||
@@ -61,7 +61,8 @@ namespace {{packageName}}.Test
|
|||||||
public void {{operationId}}Test()
|
public void {{operationId}}Test()
|
||||||
{
|
{
|
||||||
// TODO: add unit test for the method '{{operationId}}'
|
// TODO: add unit test for the method '{{operationId}}'
|
||||||
{{#allParams}}{{{dataType}}} {{paramName}} = null; // TODO: replace null with proper value
|
{{#allParams}}
|
||||||
|
{{{dataType}}} {{paramName}} = null; // TODO: replace null with proper value
|
||||||
{{/allParams}}
|
{{/allParams}}
|
||||||
{{#returnType}}var response = {{/returnType}}instance.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
{{#returnType}}var response = {{/returnType}}instance.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||||
{{#returnType}}Assert.IsInstanceOf<{{{returnType}}}> (response, "response is {{{returnType}}}");{{/returnType}}
|
{{#returnType}}Assert.IsInstanceOf<{{{returnType}}}> (response, "response is {{{returnType}}}");{{/returnType}}
|
||||||
|
|||||||
@@ -81,10 +81,10 @@ func (a {{classname}}) {{nickname}} ({{#allParams}}{{paramName}} {{{dataType}}}{
|
|||||||
}
|
}
|
||||||
|
|
||||||
{{#hasQueryParams}} type QueryParams struct {
|
{{#hasQueryParams}} type QueryParams struct {
|
||||||
{{#queryParams}}{{paramName}} {{dataType}} `url:"{{baseName}},omitempty"`
|
{{#queryParams}}{{vendorExtensions.x-exportParamName}} {{dataType}} `url:"{{baseName}},omitempty"`
|
||||||
{{/queryParams}}
|
{{/queryParams}}
|
||||||
}
|
}
|
||||||
_sling = _sling.QueryStruct(&QueryParams{ {{#queryParams}}{{paramName}}: {{paramName}}{{#hasMore}},{{/hasMore}}{{/queryParams}} })
|
_sling = _sling.QueryStruct(&QueryParams{ {{#queryParams}}{{vendorExtensions.x-exportParamName}}: {{paramName}}{{#hasMore}},{{/hasMore}}{{/queryParams}} })
|
||||||
{{/hasQueryParams}}
|
{{/hasQueryParams}}
|
||||||
// accept header
|
// accept header
|
||||||
accepts := []string { {{#produces}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }
|
accepts := []string { {{#produces}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }
|
||||||
@@ -96,10 +96,10 @@ func (a {{classname}}) {{nickname}} ({{#allParams}}{{paramName}} {{{dataType}}}{
|
|||||||
_sling = _sling.Set("{{baseName}}", {{paramName}})
|
_sling = _sling.Set("{{baseName}}", {{paramName}})
|
||||||
{{/headerParams}}{{/hasHeaderParams}}
|
{{/headerParams}}{{/hasHeaderParams}}
|
||||||
{{#hasFormParams}} type FormParams struct {
|
{{#hasFormParams}} type FormParams struct {
|
||||||
{{#formParams}} {{paramName}} {{dataType}} `url:"{{baseName}},omitempty"`
|
{{#formParams}} {{vendorExtensions.x-exportParamName}} {{dataType}} `url:"{{baseName}},omitempty"`
|
||||||
{{/formParams}}
|
{{/formParams}}
|
||||||
}
|
}
|
||||||
_sling = _sling.BodyForm(&FormParams{ {{#formParams}}{{paramName}}: {{paramName}}{{#hasMore}},{{/hasMore}}{{/formParams}} })
|
_sling = _sling.BodyForm(&FormParams{ {{#formParams}}{{vendorExtensions.x-exportParamName}}: {{paramName}}{{#hasMore}},{{/hasMore}}{{/formParams}} })
|
||||||
{{/hasFormParams}}
|
{{/hasFormParams}}
|
||||||
{{#hasBodyParam}}{{#bodyParams}}// body params
|
{{#hasBodyParam}}{{#bodyParams}}// body params
|
||||||
_sling = _sling.BodyJSON({{paramName}})
|
_sling = _sling.BodyJSON({{paramName}})
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ type Configuration struct {
|
|||||||
Scheme string `json:"scheme,omitempty"`
|
Scheme string `json:"scheme,omitempty"`
|
||||||
AccessToken string `json:"accessToken,omitempty"`
|
AccessToken string `json:"accessToken,omitempty"`
|
||||||
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
|
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
|
||||||
|
UserAgent string `json:"userAgent,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewConfiguration() *Configuration {
|
func NewConfiguration() *Configuration {
|
||||||
@@ -27,7 +28,8 @@ func NewConfiguration() *Configuration {
|
|||||||
Debug: false,
|
Debug: false,
|
||||||
DefaultHeader: make(map[string]string),
|
DefaultHeader: make(map[string]string),
|
||||||
ApiKey: make(map[string]string),
|
ApiKey: make(map[string]string),
|
||||||
ApiKeyPrefix: make(map[string]string) ,
|
ApiKeyPrefix: make(map[string]string),
|
||||||
|
UserAgent: "{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}Swagger-Codegen/{{{packageVersion}}}/go{{/httpUserAgent}}",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -130,11 +130,11 @@ class Decoders {
|
|||||||
fatalError("formatter failed to parse \(source)")
|
fatalError("formatter failed to parse \(source)")
|
||||||
} {{#models}}{{#model}}
|
} {{#models}}{{#model}}
|
||||||
|
|
||||||
// Decoder for [{{{classname}}}]
|
// Decoder for [{{{classname}}}]
|
||||||
Decoders.addDecoder(clazz: [{{{classname}}}].self) { (source: AnyObject) -> [{{{classname}}}] in
|
Decoders.addDecoder(clazz: [{{{classname}}}].self) { (source: AnyObject) -> [{{{classname}}}] in
|
||||||
return Decoders.decode(clazz: [{{{classname}}}].self, source: source)
|
return Decoders.decode(clazz: [{{{classname}}}].self, source: source)
|
||||||
}
|
}
|
||||||
// Decoder for {{{classname}}}
|
// Decoder for {{{classname}}}
|
||||||
Decoders.addDecoder(clazz: {{{classname}}}.self) { (source: AnyObject) -> {{{classname}}} in
|
Decoders.addDecoder(clazz: {{{classname}}}.self) { (source: AnyObject) -> {{{classname}}} in
|
||||||
let sourceDictionary = source as! [NSObject:AnyObject]
|
let sourceDictionary = source as! [NSObject:AnyObject]
|
||||||
let instance = {{classname}}(){{#vars}}{{#isEnum}}
|
let instance = {{classname}}(){{#vars}}{{#isEnum}}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class {{classname}}: APIBase {
|
|||||||
- parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}
|
- parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}
|
||||||
- parameter completion: completion handler to receive the data and the error objects
|
- parameter completion: completion handler to receive the data and the error objects
|
||||||
*/
|
*/
|
||||||
public class func {{operationId}}({{#allParams}}{{^secondaryParam}}{{paramName}} {{/secondaryParam}}{{paramName}}: {{{dataType}}}{{^required}}?{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#hasParams}}, {{/hasParams}}completion: (({{#returnType}}data: {{{returnType}}}?, {{/returnType}}error: ErrorType?) -> Void)) {
|
public class func {{operationId}}({{#allParams}}{{^secondaryParam}}{{paramName}} {{/secondaryParam}}{{paramName}}: {{{dataType}}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#hasParams}}, {{/hasParams}}completion: (({{#returnType}}data: {{{returnType}}}?, {{/returnType}}error: ErrorType?) -> Void)) {
|
||||||
{{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}).execute { (response, error) -> Void in
|
{{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}).execute { (response, error) -> Void in
|
||||||
completion({{#returnType}}data: response?.body, {{/returnType}}error: error);
|
completion({{#returnType}}data: response?.body, {{/returnType}}error: error);
|
||||||
}
|
}
|
||||||
@@ -37,7 +37,7 @@ public class {{classname}}: APIBase {
|
|||||||
- parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}
|
- parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}
|
||||||
- returns: Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>
|
- returns: Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>
|
||||||
*/
|
*/
|
||||||
public class func {{operationId}}({{#allParams}}{{^secondaryParam}}{{paramName}} {{/secondaryParam}}{{paramName}}: {{{dataType}}}{{^required}}?{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {
|
public class func {{operationId}}({{#allParams}}{{^secondaryParam}}{{paramName}} {{/secondaryParam}}{{paramName}}: {{{dataType}}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {
|
||||||
let deferred = Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>.pendingPromise()
|
let deferred = Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>.pendingPromise()
|
||||||
{{operationId}}({{#allParams}}{{paramName}}: {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { {{#returnType}}data, {{/returnType}}error in
|
{{operationId}}({{#allParams}}{{paramName}}: {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { {{#returnType}}data, {{/returnType}}error in
|
||||||
if let error = error {
|
if let error = error {
|
||||||
@@ -69,7 +69,7 @@ public class {{classname}}: APIBase {
|
|||||||
|
|
||||||
- returns: RequestBuilder<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{description}}
|
- returns: RequestBuilder<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{description}}
|
||||||
*/
|
*/
|
||||||
public class func {{operationId}}WithRequestBuilder({{#allParams}}{{^secondaryParam}}{{paramName}} {{/secondaryParam}}{{paramName}}: {{{dataType}}}{{^required}}?{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> RequestBuilder<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {
|
public class func {{operationId}}WithRequestBuilder({{#allParams}}{{^secondaryParam}}{{paramName}} {{/secondaryParam}}{{paramName}}: {{{dataType}}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> RequestBuilder<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {
|
||||||
{{^pathParams}}let{{/pathParams}}{{#pathParams}}{{^secondaryParam}}var{{/secondaryParam}}{{/pathParams}} path = "{{path}}"{{#pathParams}}
|
{{^pathParams}}let{{/pathParams}}{{#pathParams}}{{^secondaryParam}}var{{/secondaryParam}}{{/pathParams}} path = "{{path}}"{{#pathParams}}
|
||||||
path = path.stringByReplacingOccurrencesOfString("{{=<% %>=}}{<%paramName%>}<%={{ }}=%>", withString: "\({{paramName}})", options: .LiteralSearch, range: nil){{/pathParams}}
|
path = path.stringByReplacingOccurrencesOfString("{{=<% %>=}}{<%paramName%>}<%={{ }}=%>", withString: "\({{paramName}})", options: .LiteralSearch, range: nil){{/pathParams}}
|
||||||
let URLString = {{projectName}}API.basePath + path
|
let URLString = {{projectName}}API.basePath + path
|
||||||
|
|||||||
@@ -38,8 +38,7 @@ public class GoModelTest {
|
|||||||
Assert.assertEquals(cm.classname, "Sample");
|
Assert.assertEquals(cm.classname, "Sample");
|
||||||
Assert.assertEquals(cm.description, "a sample model");
|
Assert.assertEquals(cm.description, "a sample model");
|
||||||
Assert.assertEquals(cm.vars.size(), 3);
|
Assert.assertEquals(cm.vars.size(), 3);
|
||||||
// {{imports}} is not used in template
|
Assert.assertEquals(cm.imports.size(), 1);
|
||||||
//Assert.assertEquals(cm.imports.size(), 1);
|
|
||||||
|
|
||||||
final CodegenProperty property1 = cm.vars.get(0);
|
final CodegenProperty property1 = cm.vars.get(0);
|
||||||
Assert.assertEquals(property1.baseName, "id");
|
Assert.assertEquals(property1.baseName, "id");
|
||||||
@@ -199,8 +198,7 @@ public class GoModelTest {
|
|||||||
Assert.assertEquals(cm.classname, "Sample");
|
Assert.assertEquals(cm.classname, "Sample");
|
||||||
Assert.assertEquals(cm.description, "a sample model");
|
Assert.assertEquals(cm.description, "a sample model");
|
||||||
Assert.assertEquals(cm.vars.size(), 1);
|
Assert.assertEquals(cm.vars.size(), 1);
|
||||||
// {{imports}} is not used in template
|
Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Children")).size(), 1);
|
||||||
//Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Children")).size(), 1);
|
|
||||||
|
|
||||||
final CodegenProperty property1 = cm.vars.get(0);
|
final CodegenProperty property1 = cm.vars.get(0);
|
||||||
Assert.assertEquals(property1.baseName, "children");
|
Assert.assertEquals(property1.baseName, "children");
|
||||||
@@ -226,7 +224,7 @@ public class GoModelTest {
|
|||||||
Assert.assertEquals(cm.classname, "Sample");
|
Assert.assertEquals(cm.classname, "Sample");
|
||||||
Assert.assertEquals(cm.description, "an array model");
|
Assert.assertEquals(cm.description, "an array model");
|
||||||
Assert.assertEquals(cm.vars.size(), 0);
|
Assert.assertEquals(cm.vars.size(), 0);
|
||||||
// skip import test as import is not used by Go codegen
|
Assert.assertEquals(cm.imports.size(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(description = "convert an map model")
|
@Test(description = "convert an map model")
|
||||||
@@ -241,9 +239,8 @@ public class GoModelTest {
|
|||||||
Assert.assertEquals(cm.classname, "Sample");
|
Assert.assertEquals(cm.classname, "Sample");
|
||||||
Assert.assertEquals(cm.description, "a map model");
|
Assert.assertEquals(cm.description, "a map model");
|
||||||
Assert.assertEquals(cm.vars.size(), 0);
|
Assert.assertEquals(cm.vars.size(), 0);
|
||||||
// {{imports}} is not used in template
|
Assert.assertEquals(cm.imports.size(), 1);
|
||||||
//Assert.assertEquals(cm.imports.size(), 2);
|
Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Children")).size(), 1);
|
||||||
//Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Children")).size(), 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@DataProvider(name = "modelNames")
|
@DataProvider(name = "modelNames")
|
||||||
|
|||||||
@@ -0,0 +1,792 @@
|
|||||||
|
swagger: '2.0'
|
||||||
|
info:
|
||||||
|
description: 'This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose.'
|
||||||
|
version: 1.0.0
|
||||||
|
title: Swagger Petstore
|
||||||
|
termsOfService: 'http://swagger.io/terms/'
|
||||||
|
contact:
|
||||||
|
email: apiteam@swagger.io
|
||||||
|
license:
|
||||||
|
name: Apache 2.0
|
||||||
|
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
|
||||||
|
host: petstore.swagger.io
|
||||||
|
basePath: /v2
|
||||||
|
tags:
|
||||||
|
- name: pet
|
||||||
|
description: Everything about your Pets
|
||||||
|
externalDocs:
|
||||||
|
description: Find out more
|
||||||
|
url: 'http://swagger.io'
|
||||||
|
- name: store
|
||||||
|
description: Access to Petstore orders
|
||||||
|
- name: user
|
||||||
|
description: Operations about user
|
||||||
|
externalDocs:
|
||||||
|
description: Find out more about our store
|
||||||
|
url: 'http://swagger.io'
|
||||||
|
schemes:
|
||||||
|
- http
|
||||||
|
paths:
|
||||||
|
/pet:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- pet
|
||||||
|
summary: Add a new pet to the store
|
||||||
|
description: ''
|
||||||
|
operationId: addPet
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
- application/xml
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: Pet object that needs to be added to the store
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/Pet'
|
||||||
|
responses:
|
||||||
|
'405':
|
||||||
|
description: Invalid input
|
||||||
|
security:
|
||||||
|
- petstore_auth:
|
||||||
|
- 'write:pets'
|
||||||
|
- 'read:pets'
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- pet
|
||||||
|
summary: Update an existing pet
|
||||||
|
description: ''
|
||||||
|
operationId: updatePet
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
- application/xml
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: Pet object that needs to be added to the store
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/Pet'
|
||||||
|
responses:
|
||||||
|
'400':
|
||||||
|
description: Invalid ID supplied
|
||||||
|
'404':
|
||||||
|
description: Pet not found
|
||||||
|
'405':
|
||||||
|
description: Validation exception
|
||||||
|
security:
|
||||||
|
- petstore_auth:
|
||||||
|
- 'write:pets'
|
||||||
|
- 'read:pets'
|
||||||
|
/pet/findByStatus:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- pet
|
||||||
|
summary: Finds Pets by status
|
||||||
|
description: Multiple status values can be provided with comma separated strings
|
||||||
|
operationId: findPetsByStatus
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: status
|
||||||
|
in: query
|
||||||
|
description: Status values that need to be considered for filter
|
||||||
|
required: true
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- available
|
||||||
|
- pending
|
||||||
|
- sold
|
||||||
|
default: available
|
||||||
|
collectionFormat: csv
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: successful operation
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/Pet'
|
||||||
|
'400':
|
||||||
|
description: Invalid status value
|
||||||
|
security:
|
||||||
|
- petstore_auth:
|
||||||
|
- 'write:pets'
|
||||||
|
- 'read:pets'
|
||||||
|
/pet/findByTags:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- pet
|
||||||
|
summary: Finds Pets by tags
|
||||||
|
description: 'Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.'
|
||||||
|
operationId: findPetsByTags
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: tags
|
||||||
|
in: query
|
||||||
|
description: Tags to filter by
|
||||||
|
required: true
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
collectionFormat: csv
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: successful operation
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/Pet'
|
||||||
|
'400':
|
||||||
|
description: Invalid tag value
|
||||||
|
security:
|
||||||
|
- petstore_auth:
|
||||||
|
- 'write:pets'
|
||||||
|
- 'read:pets'
|
||||||
|
'/pet/{petId}':
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- pet
|
||||||
|
summary: Find pet by ID
|
||||||
|
description: Returns a single pet
|
||||||
|
operationId: getPetById
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: petId
|
||||||
|
in: path
|
||||||
|
description: ID of pet to return
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: successful operation
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/Pet'
|
||||||
|
'400':
|
||||||
|
description: Invalid ID supplied
|
||||||
|
'404':
|
||||||
|
description: Pet not found
|
||||||
|
security:
|
||||||
|
- api_key: []
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- pet
|
||||||
|
summary: Updates a pet in the store with form data
|
||||||
|
description: ''
|
||||||
|
operationId: updatePetWithForm
|
||||||
|
consumes:
|
||||||
|
- application/x-www-form-urlencoded
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: petId
|
||||||
|
in: path
|
||||||
|
description: ID of pet that needs to be updated
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
- name: name
|
||||||
|
in: formData
|
||||||
|
description: Updated name of the pet
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
- name: status
|
||||||
|
in: formData
|
||||||
|
description: Updated status of the pet
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
'405':
|
||||||
|
description: Invalid input
|
||||||
|
security:
|
||||||
|
- petstore_auth:
|
||||||
|
- 'write:pets'
|
||||||
|
- 'read:pets'
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- pet
|
||||||
|
summary: Deletes a pet
|
||||||
|
description: ''
|
||||||
|
operationId: deletePet
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: api_key
|
||||||
|
in: header
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
- name: petId
|
||||||
|
in: path
|
||||||
|
description: Pet id to delete
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
responses:
|
||||||
|
'400':
|
||||||
|
description: Invalid pet value
|
||||||
|
security:
|
||||||
|
- petstore_auth:
|
||||||
|
- 'write:pets'
|
||||||
|
- 'read:pets'
|
||||||
|
'/pet/{petId}/uploadImage':
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- pet
|
||||||
|
summary: uploads an image
|
||||||
|
description: ''
|
||||||
|
operationId: uploadFile
|
||||||
|
consumes:
|
||||||
|
- multipart/form-data
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: petId
|
||||||
|
in: path
|
||||||
|
description: ID of pet to update
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
- name: additionalMetadata
|
||||||
|
in: formData
|
||||||
|
description: Additional data to pass to server
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
- name: file
|
||||||
|
in: formData
|
||||||
|
description: file to upload
|
||||||
|
required: false
|
||||||
|
type: file
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: successful operation
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ApiResponse'
|
||||||
|
security:
|
||||||
|
- petstore_auth:
|
||||||
|
- 'write:pets'
|
||||||
|
- 'read:pets'
|
||||||
|
/store/inventory:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- store
|
||||||
|
summary: Returns pet inventories by status
|
||||||
|
description: Returns a map of status codes to quantities
|
||||||
|
operationId: getInventory
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
parameters: []
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: successful operation
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
additionalProperties:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
security:
|
||||||
|
- api_key: []
|
||||||
|
/store/order:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- store
|
||||||
|
summary: Place an order for a pet
|
||||||
|
description: ''
|
||||||
|
operationId: placeOrder
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: order placed for purchasing the pet
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/Order'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: successful operation
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/Order'
|
||||||
|
'400':
|
||||||
|
description: Invalid Order
|
||||||
|
'/store/order/{orderId}':
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- store
|
||||||
|
summary: Find purchase order by ID
|
||||||
|
description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions'
|
||||||
|
operationId: getOrderById
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: orderId
|
||||||
|
in: path
|
||||||
|
description: ID of pet that needs to be fetched
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
maximum: 5
|
||||||
|
minimum: 1
|
||||||
|
format: int64
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: successful operation
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/Order'
|
||||||
|
'400':
|
||||||
|
description: Invalid ID supplied
|
||||||
|
'404':
|
||||||
|
description: Order not found
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- store
|
||||||
|
summary: Delete purchase order by ID
|
||||||
|
description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
operationId: deleteOrder
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: orderId
|
||||||
|
in: path
|
||||||
|
description: ID of the order that needs to be deleted
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
minimum: 1
|
||||||
|
responses:
|
||||||
|
'400':
|
||||||
|
description: Invalid ID supplied
|
||||||
|
'404':
|
||||||
|
description: Order not found
|
||||||
|
/user:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- user
|
||||||
|
summary: Create user
|
||||||
|
description: This can only be done by the logged in user.
|
||||||
|
operationId: createUser
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: Created user object
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/User'
|
||||||
|
responses:
|
||||||
|
default:
|
||||||
|
description: successful operation
|
||||||
|
/user/createWithArray:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- user
|
||||||
|
summary: Creates list of users with given input array
|
||||||
|
description: ''
|
||||||
|
operationId: createUsersWithArrayInput
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: List of user object
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/User'
|
||||||
|
responses:
|
||||||
|
default:
|
||||||
|
description: successful operation
|
||||||
|
/user/createWithList:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- user
|
||||||
|
summary: Creates list of users with given input array
|
||||||
|
description: ''
|
||||||
|
operationId: createUsersWithListInput
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: List of user object
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/User'
|
||||||
|
responses:
|
||||||
|
default:
|
||||||
|
description: successful operation
|
||||||
|
/user/login:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- user
|
||||||
|
summary: Logs user into the system
|
||||||
|
description: ''
|
||||||
|
operationId: loginUser
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: username
|
||||||
|
in: query
|
||||||
|
description: The user name for login
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- name: password
|
||||||
|
in: query
|
||||||
|
description: The password for login in clear text
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: successful operation
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
headers:
|
||||||
|
X-Rate-Limit:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
description: calls per hour allowed by the user
|
||||||
|
X-Expires-After:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
description: date in UTC when toekn expires
|
||||||
|
'400':
|
||||||
|
description: Invalid username/password supplied
|
||||||
|
/user/logout:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- user
|
||||||
|
summary: Logs out current logged in user session
|
||||||
|
description: ''
|
||||||
|
operationId: logoutUser
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters: []
|
||||||
|
responses:
|
||||||
|
default:
|
||||||
|
description: successful operation
|
||||||
|
'/user/{username}':
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- user
|
||||||
|
summary: Get user by user name
|
||||||
|
description: ''
|
||||||
|
operationId: getUserByName
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: username
|
||||||
|
in: path
|
||||||
|
description: 'The name that needs to be fetched. Use user1 for testing. '
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: successful operation
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/User'
|
||||||
|
'400':
|
||||||
|
description: Invalid username supplied
|
||||||
|
'404':
|
||||||
|
description: User not found
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- user
|
||||||
|
summary: Updated user
|
||||||
|
description: This can only be done by the logged in user.
|
||||||
|
operationId: updateUser
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: username
|
||||||
|
in: path
|
||||||
|
description: name that need to be deleted
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: Updated user object
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/User'
|
||||||
|
responses:
|
||||||
|
'400':
|
||||||
|
description: Invalid user supplied
|
||||||
|
'404':
|
||||||
|
description: User not found
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- user
|
||||||
|
summary: Delete user
|
||||||
|
description: This can only be done by the logged in user.
|
||||||
|
operationId: deleteUser
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: username
|
||||||
|
in: path
|
||||||
|
description: The name that needs to be deleted
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
'400':
|
||||||
|
description: Invalid username supplied
|
||||||
|
'404':
|
||||||
|
description: User not found
|
||||||
|
securityDefinitions:
|
||||||
|
petstore_auth:
|
||||||
|
type: oauth2
|
||||||
|
authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'
|
||||||
|
flow: implicit
|
||||||
|
scopes:
|
||||||
|
'write:pets': modify pets in your account
|
||||||
|
'read:pets': read your pets
|
||||||
|
api_key:
|
||||||
|
type: apiKey
|
||||||
|
name: api_key
|
||||||
|
in: header
|
||||||
|
definitions:
|
||||||
|
Order:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
petId:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
quantity:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
shipDate:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
description: Order Status
|
||||||
|
enum:
|
||||||
|
- placed
|
||||||
|
- approved
|
||||||
|
- delivered
|
||||||
|
complete:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
xml:
|
||||||
|
name: Order
|
||||||
|
Category:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
xml:
|
||||||
|
name: Category
|
||||||
|
User:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
username:
|
||||||
|
type: string
|
||||||
|
firstName:
|
||||||
|
type: string
|
||||||
|
lastName:
|
||||||
|
type: string
|
||||||
|
email:
|
||||||
|
type: string
|
||||||
|
password:
|
||||||
|
type: string
|
||||||
|
phone:
|
||||||
|
type: string
|
||||||
|
userStatus:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
description: User Status
|
||||||
|
xml:
|
||||||
|
name: User
|
||||||
|
Tag:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
xml:
|
||||||
|
name: Tag
|
||||||
|
Pet:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- name
|
||||||
|
- photoUrls
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
category:
|
||||||
|
$ref: '#/definitions/Category'
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
example: doggie
|
||||||
|
photoUrls:
|
||||||
|
type: array
|
||||||
|
xml:
|
||||||
|
name: photoUrl
|
||||||
|
wrapped: true
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
type: array
|
||||||
|
xml:
|
||||||
|
name: tag
|
||||||
|
wrapped: true
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/Tag'
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
description: pet status in the store
|
||||||
|
enum:
|
||||||
|
- available
|
||||||
|
- pending
|
||||||
|
- sold
|
||||||
|
xml:
|
||||||
|
name: Pet
|
||||||
|
ApiResponse:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
code:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
'$special[model.name]':
|
||||||
|
properties:
|
||||||
|
'$special[property.name]':
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
xml:
|
||||||
|
name: '$special[model.name]'
|
||||||
|
Return:
|
||||||
|
description: Model for testing reserved words
|
||||||
|
properties:
|
||||||
|
return:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
xml:
|
||||||
|
name: Return
|
||||||
|
Name:
|
||||||
|
description: Model for testing model name same as property name
|
||||||
|
required:
|
||||||
|
- name
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
snake_case:
|
||||||
|
readOnly: true
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
xml:
|
||||||
|
name: Name
|
||||||
|
200_response:
|
||||||
|
description: Model for testing model name starting with number
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
xml:
|
||||||
|
name: Name
|
||||||
|
Dog:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/Animal'
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
breed:
|
||||||
|
type: string
|
||||||
|
Cat:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/Animal'
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
declawed:
|
||||||
|
type: boolean
|
||||||
|
Animal:
|
||||||
|
type: object
|
||||||
|
discriminator: className
|
||||||
|
required:
|
||||||
|
- className
|
||||||
|
properties:
|
||||||
|
className:
|
||||||
|
type: string
|
||||||
|
format_test:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- number
|
||||||
|
properties:
|
||||||
|
integer:
|
||||||
|
type: integer
|
||||||
|
int32:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
int64:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
number:
|
||||||
|
type: number
|
||||||
|
float:
|
||||||
|
type: number
|
||||||
|
format: float
|
||||||
|
double:
|
||||||
|
type: number
|
||||||
|
format: double
|
||||||
|
string:
|
||||||
|
type: string
|
||||||
|
byte:
|
||||||
|
type: string
|
||||||
|
format: byte
|
||||||
|
binary:
|
||||||
|
type: string
|
||||||
|
format: binary
|
||||||
|
date:
|
||||||
|
type: string
|
||||||
|
format: date
|
||||||
|
dateTime:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
password:
|
||||||
|
type: string
|
||||||
|
format: password
|
||||||
|
externalDocs:
|
||||||
|
description: Find out more about Swagger
|
||||||
|
url: 'http://swagger.io'
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
<artifactId>swagger-annotations</artifactId>
|
<artifactId>swagger-annotations</artifactId>
|
||||||
<version>${swagger-annotations-version}</version>
|
<version>${swagger-core-version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.gson</groupId>
|
<groupId>com.google.code.gson</groupId>
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<properties>
|
<properties>
|
||||||
<swagger-annotations-version>1.5.4</swagger-annotations-version>
|
<swagger-core-version>1.5.8</swagger-core-version>
|
||||||
<gson-version>2.3.1</gson-version>
|
<gson-version>2.3.1</gson-version>
|
||||||
<junit-version>4.8.1</junit-version>
|
<junit-version>4.8.1</junit-version>
|
||||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||||
|
|||||||
@@ -35,10 +35,22 @@ public class JsonUtil {
|
|||||||
public static Type getListTypeForDeserialization(Class cls) {
|
public static Type getListTypeForDeserialization(Class cls) {
|
||||||
String className = cls.getSimpleName();
|
String className = cls.getSimpleName();
|
||||||
|
|
||||||
|
if ("Animal".equalsIgnoreCase(className)) {
|
||||||
|
return new TypeToken<List<Animal>>(){}.getType();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("Cat".equalsIgnoreCase(className)) {
|
||||||
|
return new TypeToken<List<Cat>>(){}.getType();
|
||||||
|
}
|
||||||
|
|
||||||
if ("Category".equalsIgnoreCase(className)) {
|
if ("Category".equalsIgnoreCase(className)) {
|
||||||
return new TypeToken<List<Category>>(){}.getType();
|
return new TypeToken<List<Category>>(){}.getType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ("Dog".equalsIgnoreCase(className)) {
|
||||||
|
return new TypeToken<List<Dog>>(){}.getType();
|
||||||
|
}
|
||||||
|
|
||||||
if ("InlineResponse200".equalsIgnoreCase(className)) {
|
if ("InlineResponse200".equalsIgnoreCase(className)) {
|
||||||
return new TypeToken<List<InlineResponse200>>(){}.getType();
|
return new TypeToken<List<InlineResponse200>>(){}.getType();
|
||||||
}
|
}
|
||||||
@@ -81,10 +93,22 @@ public class JsonUtil {
|
|||||||
public static Type getTypeForDeserialization(Class cls) {
|
public static Type getTypeForDeserialization(Class cls) {
|
||||||
String className = cls.getSimpleName();
|
String className = cls.getSimpleName();
|
||||||
|
|
||||||
|
if ("Animal".equalsIgnoreCase(className)) {
|
||||||
|
return new TypeToken<Animal>(){}.getType();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("Cat".equalsIgnoreCase(className)) {
|
||||||
|
return new TypeToken<Cat>(){}.getType();
|
||||||
|
}
|
||||||
|
|
||||||
if ("Category".equalsIgnoreCase(className)) {
|
if ("Category".equalsIgnoreCase(className)) {
|
||||||
return new TypeToken<Category>(){}.getType();
|
return new TypeToken<Category>(){}.getType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ("Dog".equalsIgnoreCase(className)) {
|
||||||
|
return new TypeToken<Dog>(){}.getType();
|
||||||
|
}
|
||||||
|
|
||||||
if ("InlineResponse200".equalsIgnoreCase(className)) {
|
if ("InlineResponse200".equalsIgnoreCase(className)) {
|
||||||
return new TypeToken<InlineResponse200>(){}.getType();
|
return new TypeToken<InlineResponse200>(){}.getType();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ public class UserApi {
|
|||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
*
|
*
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
* @return User
|
* @return User
|
||||||
*/
|
*/
|
||||||
public User getUserByName (String username) throws ApiException {
|
public User getUserByName (String username) throws ApiException {
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModel(description = "")
|
||||||
|
public class Animal {
|
||||||
|
|
||||||
|
@SerializedName("className")
|
||||||
|
private String className = null;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(required = true, value = "")
|
||||||
|
public String getClassName() {
|
||||||
|
return className;
|
||||||
|
}
|
||||||
|
public void setClassName(String className) {
|
||||||
|
this.className = className;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Animal {\n");
|
||||||
|
|
||||||
|
sb.append(" className: ").append(className).append("\n");
|
||||||
|
sb.append("}\n");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import io.swagger.client.model.Animal;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModel(description = "")
|
||||||
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
@SerializedName("className")
|
||||||
|
private String className = null;
|
||||||
|
@SerializedName("declawed")
|
||||||
|
private Boolean declawed = null;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(required = true, value = "")
|
||||||
|
public String getClassName() {
|
||||||
|
return className;
|
||||||
|
}
|
||||||
|
public void setClassName(String className) {
|
||||||
|
this.className = className;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Boolean getDeclawed() {
|
||||||
|
return declawed;
|
||||||
|
}
|
||||||
|
public void setDeclawed(Boolean declawed) {
|
||||||
|
this.declawed = declawed;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Cat {\n");
|
||||||
|
sb.append(" " + super.toString()).append("\n");
|
||||||
|
sb.append(" className: ").append(className).append("\n");
|
||||||
|
sb.append(" declawed: ").append(declawed).append("\n");
|
||||||
|
sb.append("}\n");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import io.swagger.client.model.Animal;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModel(description = "")
|
||||||
|
public class Dog extends Animal {
|
||||||
|
|
||||||
|
@SerializedName("className")
|
||||||
|
private String className = null;
|
||||||
|
@SerializedName("breed")
|
||||||
|
private String breed = null;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(required = true, value = "")
|
||||||
|
public String getClassName() {
|
||||||
|
return className;
|
||||||
|
}
|
||||||
|
public void setClassName(String className) {
|
||||||
|
this.className = className;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public String getBreed() {
|
||||||
|
return breed;
|
||||||
|
}
|
||||||
|
public void setBreed(String breed) {
|
||||||
|
this.breed = breed;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Dog {\n");
|
||||||
|
sb.append(" " + super.toString()).append("\n");
|
||||||
|
sb.append(" className: ").append(className).append("\n");
|
||||||
|
sb.append(" breed: ").append(breed).append("\n");
|
||||||
|
sb.append("}\n");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,31 +10,42 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
@ApiModel(description = "")
|
@ApiModel(description = "")
|
||||||
public class InlineResponse200 {
|
public class InlineResponse200 {
|
||||||
|
|
||||||
@SerializedName("tags")
|
@SerializedName("photoUrls")
|
||||||
private List<Tag> tags = null;
|
private List<String> photoUrls = null;
|
||||||
|
@SerializedName("name")
|
||||||
|
private String name = null;
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@SerializedName("category")
|
@SerializedName("category")
|
||||||
private Object category = null;
|
private Object category = null;
|
||||||
|
@SerializedName("tags")
|
||||||
|
private List<Tag> tags = null;
|
||||||
public enum StatusEnum {
|
public enum StatusEnum {
|
||||||
available, pending, sold,
|
available, pending, sold,
|
||||||
};
|
};
|
||||||
@SerializedName("status")
|
@SerializedName("status")
|
||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
@SerializedName("name")
|
|
||||||
private String name = null;
|
|
||||||
@SerializedName("photoUrls")
|
|
||||||
private List<String> photoUrls = null;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
public List<Tag> getTags() {
|
public List<String> getPhotoUrls() {
|
||||||
return tags;
|
return photoUrls;
|
||||||
}
|
}
|
||||||
public void setTags(List<Tag> tags) {
|
public void setPhotoUrls(List<String> photoUrls) {
|
||||||
this.tags = tags;
|
this.photoUrls = photoUrls;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -60,6 +71,17 @@ public class InlineResponse200 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public List<Tag> getTags() {
|
||||||
|
return tags;
|
||||||
|
}
|
||||||
|
public void setTags(List<Tag> tags) {
|
||||||
|
this.tags = tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pet status in the store
|
* pet status in the store
|
||||||
**/
|
**/
|
||||||
@@ -72,40 +94,18 @@ public class InlineResponse200 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
**/
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
**/
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
public List<String> getPhotoUrls() {
|
|
||||||
return photoUrls;
|
|
||||||
}
|
|
||||||
public void setPhotoUrls(List<String> photoUrls) {
|
|
||||||
this.photoUrls = photoUrls;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("class InlineResponse200 {\n");
|
sb.append("class InlineResponse200 {\n");
|
||||||
|
|
||||||
sb.append(" tags: ").append(tags).append("\n");
|
sb.append(" photoUrls: ").append(photoUrls).append("\n");
|
||||||
|
sb.append(" name: ").append(name).append("\n");
|
||||||
sb.append(" id: ").append(id).append("\n");
|
sb.append(" id: ").append(id).append("\n");
|
||||||
sb.append(" category: ").append(category).append("\n");
|
sb.append(" category: ").append(category).append("\n");
|
||||||
|
sb.append(" tags: ").append(tags).append("\n");
|
||||||
sb.append(" status: ").append(status).append("\n");
|
sb.append(" status: ").append(status).append("\n");
|
||||||
sb.append(" name: ").append(name).append("\n");
|
|
||||||
sb.append(" photoUrls: ").append(photoUrls).append("\n");
|
|
||||||
sb.append("}\n");
|
sb.append("}\n");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,10 @@ import io.swagger.annotations.*;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
/**
|
||||||
|
* Model for testing model name starting with number
|
||||||
|
**/
|
||||||
|
@ApiModel(description = "Model for testing model name starting with number")
|
||||||
public class Model200Response {
|
public class Model200Response {
|
||||||
|
|
||||||
@SerializedName("name")
|
@SerializedName("name")
|
||||||
|
|||||||
@@ -5,7 +5,10 @@ import io.swagger.annotations.*;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
/**
|
||||||
|
* Model for testing reserved words
|
||||||
|
**/
|
||||||
|
@ApiModel(description = "Model for testing reserved words")
|
||||||
public class ModelReturn {
|
public class ModelReturn {
|
||||||
|
|
||||||
@SerializedName("return")
|
@SerializedName("return")
|
||||||
|
|||||||
@@ -5,7 +5,10 @@ import io.swagger.annotations.*;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
/**
|
||||||
|
* Model for testing model name same as property name
|
||||||
|
**/
|
||||||
|
@ApiModel(description = "Model for testing model name same as property name")
|
||||||
public class Name {
|
public class Name {
|
||||||
|
|
||||||
@SerializedName("name")
|
@SerializedName("name")
|
||||||
|
|||||||
@@ -6,10 +6,8 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:1.5.0'
|
classpath 'com.android.tools.build:gradle:1.5.+'
|
||||||
|
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,9 +53,10 @@ android {
|
|||||||
ext {
|
ext {
|
||||||
swagger_annotations_version = "1.5.0"
|
swagger_annotations_version = "1.5.0"
|
||||||
gson_version = "2.3.1"
|
gson_version = "2.3.1"
|
||||||
httpclient_version = "4.3.3"
|
httpclient_version = "4.5.2"
|
||||||
|
httpcore_version = "4.4.4"
|
||||||
volley_version = "1.0.19"
|
volley_version = "1.0.19"
|
||||||
junit_version = "4.8.1"
|
junit_version = "4.12"
|
||||||
robolectric_version = "3.0"
|
robolectric_version = "3.0"
|
||||||
concurrent_unit_version = "0.4.2"
|
concurrent_unit_version = "0.4.2"
|
||||||
}
|
}
|
||||||
@@ -65,7 +64,7 @@ ext {
|
|||||||
dependencies {
|
dependencies {
|
||||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||||
compile "com.google.code.gson:gson:$gson_version"
|
compile "com.google.code.gson:gson:$gson_version"
|
||||||
compile "org.apache.httpcomponents:httpcore:$httpclient_version"
|
compile "org.apache.httpcomponents:httpcore:$httpcore_version"
|
||||||
compile "org.apache.httpcomponents:httpmime:$httpclient_version"
|
compile "org.apache.httpcomponents:httpmime:$httpclient_version"
|
||||||
compile "com.mcxiaoke.volley:library:${volley_version}@aar"
|
compile "com.mcxiaoke.volley:library:${volley_version}@aar"
|
||||||
testCompile "junit:junit:$junit_version"
|
testCompile "junit:junit:$junit_version"
|
||||||
|
|||||||
@@ -189,50 +189,14 @@ public class ApiInvoker {
|
|||||||
|
|
||||||
// Setup authentications (key: authentication name, value: authentication).
|
// Setup authentications (key: authentication name, value: authentication).
|
||||||
INSTANCE.authentications = new HashMap<String, Authentication>();
|
INSTANCE.authentications = new HashMap<String, Authentication>();
|
||||||
|
|
||||||
|
|
||||||
INSTANCE.authentications.put("test_api_key_header", new ApiKeyAuth("header", "test_api_key_header"));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INSTANCE.authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INSTANCE.authentications.put("test_http_basic", new HttpBasicAuth());
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INSTANCE.authentications.put("test_api_client_secret", new ApiKeyAuth("header", "x-test_api_client_secret"));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INSTANCE.authentications.put("test_api_client_id", new ApiKeyAuth("header", "x-test_api_client_id"));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INSTANCE.authentications.put("test_api_key_query", new ApiKeyAuth("query", "test_api_key_query"));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO: comment out below as OAuth does not exist
|
// TODO: comment out below as OAuth does not exist
|
||||||
//INSTANCE.authentications.put("petstore_auth", new OAuth());
|
//INSTANCE.authentications.put("petstore_auth", new OAuth());
|
||||||
|
INSTANCE.authentications.put("test_api_client_id", new ApiKeyAuth("header", "x-test_api_client_id"));
|
||||||
|
INSTANCE.authentications.put("test_api_client_secret", new ApiKeyAuth("header", "x-test_api_client_secret"));
|
||||||
|
INSTANCE.authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||||
|
INSTANCE.authentications.put("test_http_basic", new HttpBasicAuth());
|
||||||
|
INSTANCE.authentications.put("test_api_key_query", new ApiKeyAuth("query", "test_api_key_query"));
|
||||||
|
INSTANCE.authentications.put("test_api_key_header", new ApiKeyAuth("header", "test_api_key_header"));
|
||||||
// Prevent the authentications from being modified.
|
// Prevent the authentications from being modified.
|
||||||
INSTANCE.authentications = Collections.unmodifiableMap(INSTANCE.authentications);
|
INSTANCE.authentications = Collections.unmodifiableMap(INSTANCE.authentications);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,10 +35,26 @@ public class JsonUtil {
|
|||||||
public static Type getListTypeForDeserialization(Class cls) {
|
public static Type getListTypeForDeserialization(Class cls) {
|
||||||
String className = cls.getSimpleName();
|
String className = cls.getSimpleName();
|
||||||
|
|
||||||
|
if ("Animal".equalsIgnoreCase(className)) {
|
||||||
|
return new TypeToken<List<Animal>>(){}.getType();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("Cat".equalsIgnoreCase(className)) {
|
||||||
|
return new TypeToken<List<Cat>>(){}.getType();
|
||||||
|
}
|
||||||
|
|
||||||
if ("Category".equalsIgnoreCase(className)) {
|
if ("Category".equalsIgnoreCase(className)) {
|
||||||
return new TypeToken<List<Category>>(){}.getType();
|
return new TypeToken<List<Category>>(){}.getType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ("Dog".equalsIgnoreCase(className)) {
|
||||||
|
return new TypeToken<List<Dog>>(){}.getType();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("FormatTest".equalsIgnoreCase(className)) {
|
||||||
|
return new TypeToken<List<FormatTest>>(){}.getType();
|
||||||
|
}
|
||||||
|
|
||||||
if ("InlineResponse200".equalsIgnoreCase(className)) {
|
if ("InlineResponse200".equalsIgnoreCase(className)) {
|
||||||
return new TypeToken<List<InlineResponse200>>(){}.getType();
|
return new TypeToken<List<InlineResponse200>>(){}.getType();
|
||||||
}
|
}
|
||||||
@@ -81,10 +97,26 @@ public class JsonUtil {
|
|||||||
public static Type getTypeForDeserialization(Class cls) {
|
public static Type getTypeForDeserialization(Class cls) {
|
||||||
String className = cls.getSimpleName();
|
String className = cls.getSimpleName();
|
||||||
|
|
||||||
|
if ("Animal".equalsIgnoreCase(className)) {
|
||||||
|
return new TypeToken<Animal>(){}.getType();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("Cat".equalsIgnoreCase(className)) {
|
||||||
|
return new TypeToken<Cat>(){}.getType();
|
||||||
|
}
|
||||||
|
|
||||||
if ("Category".equalsIgnoreCase(className)) {
|
if ("Category".equalsIgnoreCase(className)) {
|
||||||
return new TypeToken<Category>(){}.getType();
|
return new TypeToken<Category>(){}.getType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ("Dog".equalsIgnoreCase(className)) {
|
||||||
|
return new TypeToken<Dog>(){}.getType();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("FormatTest".equalsIgnoreCase(className)) {
|
||||||
|
return new TypeToken<FormatTest>(){}.getType();
|
||||||
|
}
|
||||||
|
|
||||||
if ("InlineResponse200".equalsIgnoreCase(className)) {
|
if ("InlineResponse200".equalsIgnoreCase(className)) {
|
||||||
return new TypeToken<InlineResponse200>(){}.getType();
|
return new TypeToken<InlineResponse200>(){}.getType();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ public class PetApi {
|
|||||||
return basePath;
|
return basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a new pet to the store
|
* Add a new pet to the store
|
||||||
*
|
*
|
||||||
@@ -66,9 +65,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"application/json","application/xml"
|
"application/json","application/xml"
|
||||||
@@ -84,8 +81,7 @@ public class PetApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
@@ -102,7 +98,10 @@ public class PetApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -130,9 +129,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"application/json","application/xml"
|
"application/json","application/xml"
|
||||||
@@ -148,8 +145,7 @@ public class PetApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
@@ -158,11 +154,7 @@ public class PetApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
|
|
||||||
responseListener.onResponse(localVarResponse);
|
responseListener.onResponse(localVarResponse);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -174,7 +166,6 @@ public class PetApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||||
*
|
*
|
||||||
@@ -186,7 +177,7 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json");
|
String path = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
@@ -195,9 +186,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"application/json","application/xml"
|
"application/json","application/xml"
|
||||||
@@ -213,8 +202,7 @@ public class PetApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
@@ -231,7 +219,10 @@ public class PetApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -250,7 +241,7 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json");
|
String path = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
@@ -259,9 +250,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"application/json","application/xml"
|
"application/json","application/xml"
|
||||||
@@ -277,8 +266,7 @@ public class PetApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
@@ -287,11 +275,7 @@ public class PetApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
|
|
||||||
responseListener.onResponse(localVarResponse);
|
responseListener.onResponse(localVarResponse);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -303,7 +287,6 @@ public class PetApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes a pet
|
* Deletes a pet
|
||||||
*
|
*
|
||||||
@@ -331,11 +314,8 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headerParams.put("api_key", ApiInvoker.parameterToString(apiKey));
|
headerParams.put("api_key", ApiInvoker.parameterToString(apiKey));
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -351,8 +331,7 @@ public class PetApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
@@ -369,7 +348,10 @@ public class PetApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -403,11 +385,8 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headerParams.put("api_key", ApiInvoker.parameterToString(apiKey));
|
headerParams.put("api_key", ApiInvoker.parameterToString(apiKey));
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -423,8 +402,7 @@ public class PetApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
@@ -433,11 +411,7 @@ public class PetApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
|
|
||||||
responseListener.onResponse(localVarResponse);
|
responseListener.onResponse(localVarResponse);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -449,7 +423,6 @@ public class PetApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds Pets by status
|
* Finds Pets by status
|
||||||
* Multiple status values can be provided with comma separated strings
|
* Multiple status values can be provided with comma separated strings
|
||||||
@@ -470,11 +443,8 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
queryParams.addAll(ApiInvoker.parameterToPairs("multi", "status", status));
|
queryParams.addAll(ApiInvoker.parameterToPairs("multi", "status", status));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -490,8 +460,7 @@ public class PetApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
@@ -508,7 +477,10 @@ public class PetApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -536,11 +508,8 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
queryParams.addAll(ApiInvoker.parameterToPairs("multi", "status", status));
|
queryParams.addAll(ApiInvoker.parameterToPairs("multi", "status", status));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -556,8 +525,7 @@ public class PetApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
@@ -566,16 +534,11 @@ public class PetApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
responseListener.onResponse((List<Pet>) ApiInvoker.deserialize(localVarResponse, "array", Pet.class));
|
responseListener.onResponse((List<Pet>) ApiInvoker.deserialize(localVarResponse, "array", Pet.class));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (ApiException exception) {
|
} catch (ApiException exception) {
|
||||||
errorListener.onErrorResponse(new VolleyError(exception));
|
errorListener.onErrorResponse(new VolleyError(exception));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -587,7 +550,6 @@ public class PetApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
@@ -608,11 +570,8 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
queryParams.addAll(ApiInvoker.parameterToPairs("multi", "tags", tags));
|
queryParams.addAll(ApiInvoker.parameterToPairs("multi", "tags", tags));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -628,8 +587,7 @@ public class PetApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
@@ -646,7 +604,10 @@ public class PetApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -674,11 +635,8 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
queryParams.addAll(ApiInvoker.parameterToPairs("multi", "tags", tags));
|
queryParams.addAll(ApiInvoker.parameterToPairs("multi", "tags", tags));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -694,8 +652,7 @@ public class PetApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
@@ -704,16 +661,11 @@ public class PetApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
responseListener.onResponse((List<Pet>) ApiInvoker.deserialize(localVarResponse, "array", Pet.class));
|
responseListener.onResponse((List<Pet>) ApiInvoker.deserialize(localVarResponse, "array", Pet.class));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (ApiException exception) {
|
} catch (ApiException exception) {
|
||||||
errorListener.onErrorResponse(new VolleyError(exception));
|
errorListener.onErrorResponse(new VolleyError(exception));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -725,7 +677,6 @@ public class PetApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
|
||||||
@@ -752,9 +703,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -770,10 +719,9 @@ public class PetApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "api_key", "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
|
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
|
||||||
@@ -788,7 +736,10 @@ public class PetApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -822,9 +773,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -840,26 +789,20 @@ public class PetApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "api_key", "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
responseListener.onResponse((Pet) ApiInvoker.deserialize(localVarResponse, "", Pet.class));
|
responseListener.onResponse((Pet) ApiInvoker.deserialize(localVarResponse, "", Pet.class));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (ApiException exception) {
|
} catch (ApiException exception) {
|
||||||
errorListener.onErrorResponse(new VolleyError(exception));
|
errorListener.onErrorResponse(new VolleyError(exception));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -871,7 +814,6 @@ public class PetApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
@@ -889,7 +831,7 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}?response=inline_arbitrary_object".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
String path = "/pet/{petId}?response=inline_arbitrary_object".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
@@ -898,9 +840,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -916,10 +856,9 @@ public class PetApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "api_key", "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
|
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
|
||||||
@@ -934,7 +873,10 @@ public class PetApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -959,7 +901,7 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}?response=inline_arbitrary_object".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
String path = "/pet/{petId}?response=inline_arbitrary_object".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
@@ -968,9 +910,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -986,26 +926,20 @@ public class PetApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "api_key", "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
responseListener.onResponse((InlineResponse200) ApiInvoker.deserialize(localVarResponse, "", InlineResponse200.class));
|
responseListener.onResponse((InlineResponse200) ApiInvoker.deserialize(localVarResponse, "", InlineResponse200.class));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (ApiException exception) {
|
} catch (ApiException exception) {
|
||||||
errorListener.onErrorResponse(new VolleyError(exception));
|
errorListener.onErrorResponse(new VolleyError(exception));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -1017,7 +951,6 @@ public class PetApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fake endpoint to test byte array return by 'Find pet by ID'
|
* Fake endpoint to test byte array return by 'Find pet by ID'
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
@@ -1035,7 +968,7 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
String path = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
@@ -1044,9 +977,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -1062,10 +993,9 @@ public class PetApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "api_key", "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
|
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
|
||||||
@@ -1080,7 +1010,10 @@ public class PetApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -1105,7 +1038,7 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
String path = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
@@ -1114,9 +1047,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -1132,26 +1063,20 @@ public class PetApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "api_key", "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
responseListener.onResponse((byte[]) ApiInvoker.deserialize(localVarResponse, "", byte[].class));
|
responseListener.onResponse((byte[]) ApiInvoker.deserialize(localVarResponse, "", byte[].class));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (ApiException exception) {
|
} catch (ApiException exception) {
|
||||||
errorListener.onErrorResponse(new VolleyError(exception));
|
errorListener.onErrorResponse(new VolleyError(exception));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -1163,7 +1088,6 @@ public class PetApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update an existing pet
|
* Update an existing pet
|
||||||
*
|
*
|
||||||
@@ -1184,9 +1108,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"application/json","application/xml"
|
"application/json","application/xml"
|
||||||
@@ -1202,8 +1124,7 @@ public class PetApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
@@ -1220,7 +1141,10 @@ public class PetApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -1248,9 +1172,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"application/json","application/xml"
|
"application/json","application/xml"
|
||||||
@@ -1266,8 +1188,7 @@ public class PetApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
@@ -1276,11 +1197,7 @@ public class PetApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
|
|
||||||
responseListener.onResponse(localVarResponse);
|
responseListener.onResponse(localVarResponse);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -1292,7 +1209,6 @@ public class PetApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates a pet in the store with form data
|
* Updates a pet in the store with form data
|
||||||
*
|
*
|
||||||
@@ -1321,9 +1237,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
@@ -1348,8 +1262,7 @@ public class PetApi {
|
|||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
formParams.put("name", ApiInvoker.parameterToString(name));
|
formParams.put("name", ApiInvoker.parameterToString(name));
|
||||||
formParams.put("status", ApiInvoker.parameterToString(status));
|
formParams.put("status", ApiInvoker.parameterToString(status));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
@@ -1367,7 +1280,10 @@ public class PetApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -1401,9 +1317,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
@@ -1428,8 +1342,7 @@ public class PetApi {
|
|||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
formParams.put("name", ApiInvoker.parameterToString(name));
|
formParams.put("name", ApiInvoker.parameterToString(name));
|
||||||
formParams.put("status", ApiInvoker.parameterToString(status));
|
formParams.put("status", ApiInvoker.parameterToString(status));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
@@ -1439,11 +1352,7 @@ public class PetApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
|
|
||||||
responseListener.onResponse(localVarResponse);
|
responseListener.onResponse(localVarResponse);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -1455,7 +1364,6 @@ public class PetApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* uploads an image
|
* uploads an image
|
||||||
*
|
*
|
||||||
@@ -1484,9 +1392,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"multipart/form-data"
|
"multipart/form-data"
|
||||||
@@ -1511,8 +1417,7 @@ public class PetApi {
|
|||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
formParams.put("additionalMetadata", ApiInvoker.parameterToString(additionalMetadata));
|
formParams.put("additionalMetadata", ApiInvoker.parameterToString(additionalMetadata));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
@@ -1530,7 +1435,10 @@ public class PetApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -1564,9 +1472,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"multipart/form-data"
|
"multipart/form-data"
|
||||||
@@ -1591,8 +1497,7 @@ public class PetApi {
|
|||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
formParams.put("additionalMetadata", ApiInvoker.parameterToString(additionalMetadata));
|
formParams.put("additionalMetadata", ApiInvoker.parameterToString(additionalMetadata));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
@@ -1602,11 +1507,7 @@ public class PetApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
|
|
||||||
responseListener.onResponse(localVarResponse);
|
responseListener.onResponse(localVarResponse);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -1618,5 +1519,4 @@ public class PetApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ public class StoreApi {
|
|||||||
return basePath;
|
return basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete purchase order by ID
|
* Delete purchase order by ID
|
||||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
@@ -71,9 +70,7 @@ public class StoreApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -89,8 +86,7 @@ public class StoreApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
@@ -107,7 +103,10 @@ public class StoreApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -141,9 +140,7 @@ public class StoreApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -159,8 +156,7 @@ public class StoreApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
@@ -169,11 +165,7 @@ public class StoreApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
|
|
||||||
responseListener.onResponse(localVarResponse);
|
responseListener.onResponse(localVarResponse);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -185,7 +177,6 @@ public class StoreApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds orders by status
|
* Finds orders by status
|
||||||
* A single status value can be provided as a string
|
* A single status value can be provided as a string
|
||||||
@@ -206,11 +197,8 @@ public class StoreApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
queryParams.addAll(ApiInvoker.parameterToPairs("", "status", status));
|
queryParams.addAll(ApiInvoker.parameterToPairs("", "status", status));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -226,8 +214,7 @@ public class StoreApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
String[] authNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
||||||
|
|
||||||
@@ -244,7 +231,10 @@ public class StoreApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -272,11 +262,8 @@ public class StoreApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
queryParams.addAll(ApiInvoker.parameterToPairs("", "status", status));
|
queryParams.addAll(ApiInvoker.parameterToPairs("", "status", status));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -292,8 +279,7 @@ public class StoreApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
String[] authNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
||||||
|
|
||||||
@@ -302,16 +288,11 @@ public class StoreApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
responseListener.onResponse((List<Order>) ApiInvoker.deserialize(localVarResponse, "array", Order.class));
|
responseListener.onResponse((List<Order>) ApiInvoker.deserialize(localVarResponse, "array", Order.class));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (ApiException exception) {
|
} catch (ApiException exception) {
|
||||||
errorListener.onErrorResponse(new VolleyError(exception));
|
errorListener.onErrorResponse(new VolleyError(exception));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -323,7 +304,6 @@ public class StoreApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
|
||||||
@@ -343,9 +323,7 @@ public class StoreApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -361,8 +339,7 @@ public class StoreApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "api_key" };
|
String[] authNames = new String[] { "api_key" };
|
||||||
|
|
||||||
@@ -379,7 +356,10 @@ public class StoreApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -407,9 +387,7 @@ public class StoreApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -425,8 +403,7 @@ public class StoreApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "api_key" };
|
String[] authNames = new String[] { "api_key" };
|
||||||
|
|
||||||
@@ -435,16 +412,11 @@ public class StoreApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
responseListener.onResponse((Map<String, Integer>) ApiInvoker.deserialize(localVarResponse, "map", Map.class));
|
responseListener.onResponse((Map<String, Integer>) ApiInvoker.deserialize(localVarResponse, "map", Map.class));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (ApiException exception) {
|
} catch (ApiException exception) {
|
||||||
errorListener.onErrorResponse(new VolleyError(exception));
|
errorListener.onErrorResponse(new VolleyError(exception));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -456,7 +428,6 @@ public class StoreApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fake endpoint to test arbitrary object return by 'Get inventory'
|
* Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||||
* Returns an arbitrary object which is actually a map of status codes to quantities
|
* Returns an arbitrary object which is actually a map of status codes to quantities
|
||||||
@@ -467,7 +438,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/store/inventory?response=arbitrary_object".replaceAll("\\{format\\}","json");
|
String path = "/store/inventory?response=arbitrary_object".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
@@ -476,9 +447,7 @@ public class StoreApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -494,8 +463,7 @@ public class StoreApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "api_key" };
|
String[] authNames = new String[] { "api_key" };
|
||||||
|
|
||||||
@@ -512,7 +480,10 @@ public class StoreApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -531,7 +502,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/store/inventory?response=arbitrary_object".replaceAll("\\{format\\}","json");
|
String path = "/store/inventory?response=arbitrary_object".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
@@ -540,9 +511,7 @@ public class StoreApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -558,8 +527,7 @@ public class StoreApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "api_key" };
|
String[] authNames = new String[] { "api_key" };
|
||||||
|
|
||||||
@@ -568,16 +536,11 @@ public class StoreApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
responseListener.onResponse((Object) ApiInvoker.deserialize(localVarResponse, "", Object.class));
|
responseListener.onResponse((Object) ApiInvoker.deserialize(localVarResponse, "", Object.class));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (ApiException exception) {
|
} catch (ApiException exception) {
|
||||||
errorListener.onErrorResponse(new VolleyError(exception));
|
errorListener.onErrorResponse(new VolleyError(exception));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -589,10 +552,9 @@ public class StoreApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find purchase order by ID
|
* Find purchase order by ID
|
||||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
* @param orderId ID of pet that needs to be fetched
|
* @param orderId ID of pet that needs to be fetched
|
||||||
* @return Order
|
* @return Order
|
||||||
*/
|
*/
|
||||||
@@ -616,9 +578,7 @@ public class StoreApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -634,10 +594,9 @@ public class StoreApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "test_api_key_header", "test_api_key_query" };
|
String[] authNames = new String[] { "test_api_key_query", "test_api_key_header" };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
|
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
|
||||||
@@ -652,7 +611,10 @@ public class StoreApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -662,7 +624,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Find purchase order by ID
|
* Find purchase order by ID
|
||||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
* @param orderId ID of pet that needs to be fetched
|
* @param orderId ID of pet that needs to be fetched
|
||||||
*/
|
*/
|
||||||
public void getOrderById (String orderId, final Response.Listener<Order> responseListener, final Response.ErrorListener errorListener) {
|
public void getOrderById (String orderId, final Response.Listener<Order> responseListener, final Response.ErrorListener errorListener) {
|
||||||
@@ -686,9 +648,7 @@ public class StoreApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -704,26 +664,20 @@ public class StoreApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "test_api_key_header", "test_api_key_query" };
|
String[] authNames = new String[] { "test_api_key_query", "test_api_key_header" };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
responseListener.onResponse((Order) ApiInvoker.deserialize(localVarResponse, "", Order.class));
|
responseListener.onResponse((Order) ApiInvoker.deserialize(localVarResponse, "", Order.class));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (ApiException exception) {
|
} catch (ApiException exception) {
|
||||||
errorListener.onErrorResponse(new VolleyError(exception));
|
errorListener.onErrorResponse(new VolleyError(exception));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -735,7 +689,6 @@ public class StoreApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Place an order for a pet
|
* Place an order for a pet
|
||||||
*
|
*
|
||||||
@@ -756,9 +709,7 @@ public class StoreApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -774,8 +725,7 @@ public class StoreApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
String[] authNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
||||||
|
|
||||||
@@ -792,7 +742,10 @@ public class StoreApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -820,9 +773,7 @@ public class StoreApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -838,8 +789,7 @@ public class StoreApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
String[] authNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
||||||
|
|
||||||
@@ -848,16 +798,11 @@ public class StoreApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
responseListener.onResponse((Order) ApiInvoker.deserialize(localVarResponse, "", Order.class));
|
responseListener.onResponse((Order) ApiInvoker.deserialize(localVarResponse, "", Order.class));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (ApiException exception) {
|
} catch (ApiException exception) {
|
||||||
errorListener.onErrorResponse(new VolleyError(exception));
|
errorListener.onErrorResponse(new VolleyError(exception));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -869,5 +814,4 @@ public class StoreApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ public class UserApi {
|
|||||||
return basePath;
|
return basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create user
|
* Create user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@@ -65,9 +64,7 @@ public class UserApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -83,8 +80,7 @@ public class UserApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
@@ -101,7 +97,10 @@ public class UserApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -129,9 +128,7 @@ public class UserApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -147,8 +144,7 @@ public class UserApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
@@ -157,11 +153,7 @@ public class UserApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
|
|
||||||
responseListener.onResponse(localVarResponse);
|
responseListener.onResponse(localVarResponse);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -173,7 +165,6 @@ public class UserApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
@@ -194,9 +185,7 @@ public class UserApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -212,8 +201,7 @@ public class UserApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
@@ -230,7 +218,10 @@ public class UserApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -258,9 +249,7 @@ public class UserApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -276,8 +265,7 @@ public class UserApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
@@ -286,11 +274,7 @@ public class UserApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
|
|
||||||
responseListener.onResponse(localVarResponse);
|
responseListener.onResponse(localVarResponse);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -302,7 +286,6 @@ public class UserApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
@@ -323,9 +306,7 @@ public class UserApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -341,8 +322,7 @@ public class UserApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
@@ -359,7 +339,10 @@ public class UserApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -387,9 +370,7 @@ public class UserApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -405,8 +386,7 @@ public class UserApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
@@ -415,11 +395,7 @@ public class UserApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
|
|
||||||
responseListener.onResponse(localVarResponse);
|
responseListener.onResponse(localVarResponse);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -431,7 +407,6 @@ public class UserApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete user
|
* Delete user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@@ -458,9 +433,7 @@ public class UserApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -476,8 +449,7 @@ public class UserApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "test_http_basic" };
|
String[] authNames = new String[] { "test_http_basic" };
|
||||||
|
|
||||||
@@ -494,7 +466,10 @@ public class UserApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -528,9 +503,7 @@ public class UserApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -546,8 +519,7 @@ public class UserApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { "test_http_basic" };
|
String[] authNames = new String[] { "test_http_basic" };
|
||||||
|
|
||||||
@@ -556,11 +528,7 @@ public class UserApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
|
|
||||||
responseListener.onResponse(localVarResponse);
|
responseListener.onResponse(localVarResponse);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -572,11 +540,10 @@ public class UserApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
*
|
*
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
* @return User
|
* @return User
|
||||||
*/
|
*/
|
||||||
public User getUserByName (String username) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
public User getUserByName (String username) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
@@ -599,9 +566,7 @@ public class UserApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -617,8 +582,7 @@ public class UserApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
@@ -635,7 +599,10 @@ public class UserApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -646,7 +613,7 @@ public class UserApi {
|
|||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
*
|
*
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
*/
|
*/
|
||||||
public void getUserByName (String username, final Response.Listener<User> responseListener, final Response.ErrorListener errorListener) {
|
public void getUserByName (String username, final Response.Listener<User> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
@@ -669,9 +636,7 @@ public class UserApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -687,8 +652,7 @@ public class UserApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
@@ -697,16 +661,11 @@ public class UserApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
responseListener.onResponse((User) ApiInvoker.deserialize(localVarResponse, "", User.class));
|
responseListener.onResponse((User) ApiInvoker.deserialize(localVarResponse, "", User.class));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (ApiException exception) {
|
} catch (ApiException exception) {
|
||||||
errorListener.onErrorResponse(new VolleyError(exception));
|
errorListener.onErrorResponse(new VolleyError(exception));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -718,7 +677,6 @@ public class UserApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs user into the system
|
* Logs user into the system
|
||||||
*
|
*
|
||||||
@@ -740,13 +698,9 @@ public class UserApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
queryParams.addAll(ApiInvoker.parameterToPairs("", "username", username));
|
queryParams.addAll(ApiInvoker.parameterToPairs("", "username", username));
|
||||||
|
|
||||||
queryParams.addAll(ApiInvoker.parameterToPairs("", "password", password));
|
queryParams.addAll(ApiInvoker.parameterToPairs("", "password", password));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -762,8 +716,7 @@ public class UserApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
@@ -780,7 +733,10 @@ public class UserApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -808,13 +764,9 @@ public class UserApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
queryParams.addAll(ApiInvoker.parameterToPairs("", "username", username));
|
queryParams.addAll(ApiInvoker.parameterToPairs("", "username", username));
|
||||||
|
|
||||||
queryParams.addAll(ApiInvoker.parameterToPairs("", "password", password));
|
queryParams.addAll(ApiInvoker.parameterToPairs("", "password", password));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -830,8 +782,7 @@ public class UserApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
@@ -840,16 +791,11 @@ public class UserApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
responseListener.onResponse((String) ApiInvoker.deserialize(localVarResponse, "", String.class));
|
responseListener.onResponse((String) ApiInvoker.deserialize(localVarResponse, "", String.class));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (ApiException exception) {
|
} catch (ApiException exception) {
|
||||||
errorListener.onErrorResponse(new VolleyError(exception));
|
errorListener.onErrorResponse(new VolleyError(exception));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -861,7 +807,6 @@ public class UserApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs out current logged in user session
|
* Logs out current logged in user session
|
||||||
*
|
*
|
||||||
@@ -881,9 +826,7 @@ public class UserApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -899,8 +842,7 @@ public class UserApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
@@ -917,7 +859,10 @@ public class UserApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -945,9 +890,7 @@ public class UserApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -963,8 +906,7 @@ public class UserApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
@@ -973,11 +915,7 @@ public class UserApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
|
|
||||||
responseListener.onResponse(localVarResponse);
|
responseListener.onResponse(localVarResponse);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -989,7 +927,6 @@ public class UserApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updated user
|
* Updated user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@@ -1017,9 +954,7 @@ public class UserApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -1035,8 +970,7 @@ public class UserApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
@@ -1053,7 +987,10 @@ public class UserApi {
|
|||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if(ex.getCause() instanceof VolleyError) {
|
if(ex.getCause() instanceof VolleyError) {
|
||||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
|
if (volleyError.networkResponse != null) {
|
||||||
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
@@ -1087,9 +1024,7 @@ public class UserApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
|
||||||
@@ -1105,8 +1040,7 @@ public class UserApi {
|
|||||||
postBody = httpEntity;
|
postBody = httpEntity;
|
||||||
} else {
|
} else {
|
||||||
// normal form params
|
// normal form params
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
@@ -1115,11 +1049,7 @@ public class UserApi {
|
|||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
public void onResponse(String localVarResponse) {
|
||||||
|
|
||||||
|
|
||||||
responseListener.onResponse(localVarResponse);
|
responseListener.onResponse(localVarResponse);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}, new Response.ErrorListener() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -1131,5 +1061,4 @@ public class UserApi {
|
|||||||
errorListener.onErrorResponse(new VolleyError(ex));
|
errorListener.onErrorResponse(new VolleyError(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModel(description = "")
|
||||||
|
public class Animal {
|
||||||
|
|
||||||
|
@SerializedName("className")
|
||||||
|
private String className = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(required = true, value = "")
|
||||||
|
public String getClassName() {
|
||||||
|
return className;
|
||||||
|
}
|
||||||
|
public void setClassName(String className) {
|
||||||
|
this.className = className;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Animal {\n");
|
||||||
|
|
||||||
|
sb.append(" className: ").append(className).append("\n");
|
||||||
|
sb.append("}\n");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import io.swagger.client.model.Animal;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModel(description = "")
|
||||||
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
@SerializedName("className")
|
||||||
|
private String className = null;
|
||||||
|
@SerializedName("declawed")
|
||||||
|
private Boolean declawed = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(required = true, value = "")
|
||||||
|
public String getClassName() {
|
||||||
|
return className;
|
||||||
|
}
|
||||||
|
public void setClassName(String className) {
|
||||||
|
this.className = className;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Boolean getDeclawed() {
|
||||||
|
return declawed;
|
||||||
|
}
|
||||||
|
public void setDeclawed(Boolean declawed) {
|
||||||
|
this.declawed = declawed;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Cat {\n");
|
||||||
|
sb.append(" " + super.toString()).append("\n");
|
||||||
|
sb.append(" className: ").append(className).append("\n");
|
||||||
|
sb.append(" declawed: ").append(declawed).append("\n");
|
||||||
|
sb.append("}\n");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,7 +13,6 @@ public class Category {
|
|||||||
@SerializedName("name")
|
@SerializedName("name")
|
||||||
private String name = null;
|
private String name = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -24,7 +23,6 @@ public class Category {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -35,7 +33,6 @@ public class Category {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import io.swagger.client.model.Animal;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModel(description = "")
|
||||||
|
public class Dog extends Animal {
|
||||||
|
|
||||||
|
@SerializedName("className")
|
||||||
|
private String className = null;
|
||||||
|
@SerializedName("breed")
|
||||||
|
private String breed = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(required = true, value = "")
|
||||||
|
public String getClassName() {
|
||||||
|
return className;
|
||||||
|
}
|
||||||
|
public void setClassName(String className) {
|
||||||
|
this.className = className;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public String getBreed() {
|
||||||
|
return breed;
|
||||||
|
}
|
||||||
|
public void setBreed(String breed) {
|
||||||
|
this.breed = breed;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Dog {\n");
|
||||||
|
sb.append(" " + super.toString()).append("\n");
|
||||||
|
sb.append(" className: ").append(className).append("\n");
|
||||||
|
sb.append(" breed: ").append(breed).append("\n");
|
||||||
|
sb.append("}\n");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,179 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModel(description = "")
|
||||||
|
public class FormatTest {
|
||||||
|
|
||||||
|
@SerializedName("integer")
|
||||||
|
private Integer integer = null;
|
||||||
|
@SerializedName("int32")
|
||||||
|
private Integer int32 = null;
|
||||||
|
@SerializedName("int64")
|
||||||
|
private Long int64 = null;
|
||||||
|
@SerializedName("number")
|
||||||
|
private BigDecimal number = null;
|
||||||
|
@SerializedName("float")
|
||||||
|
private Float _float = null;
|
||||||
|
@SerializedName("double")
|
||||||
|
private Double _double = null;
|
||||||
|
@SerializedName("string")
|
||||||
|
private String string = null;
|
||||||
|
@SerializedName("byte")
|
||||||
|
private byte[] _byte = null;
|
||||||
|
@SerializedName("binary")
|
||||||
|
private byte[] binary = null;
|
||||||
|
@SerializedName("date")
|
||||||
|
private Date date = null;
|
||||||
|
@SerializedName("dateTime")
|
||||||
|
private Date dateTime = null;
|
||||||
|
@SerializedName("password")
|
||||||
|
private String password = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Integer getInteger() {
|
||||||
|
return integer;
|
||||||
|
}
|
||||||
|
public void setInteger(Integer integer) {
|
||||||
|
this.integer = integer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Integer getInt32() {
|
||||||
|
return int32;
|
||||||
|
}
|
||||||
|
public void setInt32(Integer int32) {
|
||||||
|
this.int32 = int32;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Long getInt64() {
|
||||||
|
return int64;
|
||||||
|
}
|
||||||
|
public void setInt64(Long int64) {
|
||||||
|
this.int64 = int64;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(required = true, value = "")
|
||||||
|
public BigDecimal getNumber() {
|
||||||
|
return number;
|
||||||
|
}
|
||||||
|
public void setNumber(BigDecimal number) {
|
||||||
|
this.number = number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Float getFloat() {
|
||||||
|
return _float;
|
||||||
|
}
|
||||||
|
public void setFloat(Float _float) {
|
||||||
|
this._float = _float;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Double getDouble() {
|
||||||
|
return _double;
|
||||||
|
}
|
||||||
|
public void setDouble(Double _double) {
|
||||||
|
this._double = _double;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public String getString() {
|
||||||
|
return string;
|
||||||
|
}
|
||||||
|
public void setString(String string) {
|
||||||
|
this.string = string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public byte[] getByte() {
|
||||||
|
return _byte;
|
||||||
|
}
|
||||||
|
public void setByte(byte[] _byte) {
|
||||||
|
this._byte = _byte;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public byte[] getBinary() {
|
||||||
|
return binary;
|
||||||
|
}
|
||||||
|
public void setBinary(byte[] binary) {
|
||||||
|
this.binary = binary;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Date getDate() {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
public void setDate(Date date) {
|
||||||
|
this.date = date;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Date getDateTime() {
|
||||||
|
return dateTime;
|
||||||
|
}
|
||||||
|
public void setDateTime(Date dateTime) {
|
||||||
|
this.dateTime = dateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class FormatTest {\n");
|
||||||
|
|
||||||
|
sb.append(" integer: ").append(integer).append("\n");
|
||||||
|
sb.append(" int32: ").append(int32).append("\n");
|
||||||
|
sb.append(" int64: ").append(int64).append("\n");
|
||||||
|
sb.append(" number: ").append(number).append("\n");
|
||||||
|
sb.append(" _float: ").append(_float).append("\n");
|
||||||
|
sb.append(" _double: ").append(_double).append("\n");
|
||||||
|
sb.append(" string: ").append(string).append("\n");
|
||||||
|
sb.append(" _byte: ").append(_byte).append("\n");
|
||||||
|
sb.append(" binary: ").append(binary).append("\n");
|
||||||
|
sb.append(" date: ").append(date).append("\n");
|
||||||
|
sb.append(" dateTime: ").append(dateTime).append("\n");
|
||||||
|
sb.append(" password: ").append(password).append("\n");
|
||||||
|
sb.append("}\n");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,34 +10,42 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
@ApiModel(description = "")
|
@ApiModel(description = "")
|
||||||
public class InlineResponse200 {
|
public class InlineResponse200 {
|
||||||
|
|
||||||
@SerializedName("tags")
|
@SerializedName("photoUrls")
|
||||||
private List<Tag> tags = null;
|
private List<String> photoUrls = null;
|
||||||
|
@SerializedName("name")
|
||||||
|
private String name = null;
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@SerializedName("category")
|
@SerializedName("category")
|
||||||
private Object category = null;
|
private Object category = null;
|
||||||
|
@SerializedName("tags")
|
||||||
|
private List<Tag> tags = null;
|
||||||
public enum StatusEnum {
|
public enum StatusEnum {
|
||||||
available, pending, sold,
|
available, pending, sold,
|
||||||
};
|
};
|
||||||
@SerializedName("status")
|
@SerializedName("status")
|
||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
@SerializedName("name")
|
|
||||||
private String name = null;
|
|
||||||
@SerializedName("photoUrls")
|
|
||||||
private List<String> photoUrls = null;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
public List<Tag> getTags() {
|
public List<String> getPhotoUrls() {
|
||||||
return tags;
|
return photoUrls;
|
||||||
}
|
}
|
||||||
public void setTags(List<Tag> tags) {
|
public void setPhotoUrls(List<String> photoUrls) {
|
||||||
this.tags = tags;
|
this.photoUrls = photoUrls;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@@ -48,7 +56,6 @@ public class InlineResponse200 {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -59,7 +66,16 @@ public class InlineResponse200 {
|
|||||||
this.category = category;
|
this.category = category;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public List<Tag> getTags() {
|
||||||
|
return tags;
|
||||||
|
}
|
||||||
|
public void setTags(List<Tag> tags) {
|
||||||
|
this.tags = tags;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pet status in the store
|
* pet status in the store
|
||||||
**/
|
**/
|
||||||
@@ -71,41 +87,18 @@ public class InlineResponse200 {
|
|||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
**/
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
**/
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
public List<String> getPhotoUrls() {
|
|
||||||
return photoUrls;
|
|
||||||
}
|
|
||||||
public void setPhotoUrls(List<String> photoUrls) {
|
|
||||||
this.photoUrls = photoUrls;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("class InlineResponse200 {\n");
|
sb.append("class InlineResponse200 {\n");
|
||||||
|
|
||||||
sb.append(" tags: ").append(tags).append("\n");
|
sb.append(" photoUrls: ").append(photoUrls).append("\n");
|
||||||
|
sb.append(" name: ").append(name).append("\n");
|
||||||
sb.append(" id: ").append(id).append("\n");
|
sb.append(" id: ").append(id).append("\n");
|
||||||
sb.append(" category: ").append(category).append("\n");
|
sb.append(" category: ").append(category).append("\n");
|
||||||
|
sb.append(" tags: ").append(tags).append("\n");
|
||||||
sb.append(" status: ").append(status).append("\n");
|
sb.append(" status: ").append(status).append("\n");
|
||||||
sb.append(" name: ").append(name).append("\n");
|
|
||||||
sb.append(" photoUrls: ").append(photoUrls).append("\n");
|
|
||||||
sb.append("}\n");
|
sb.append("}\n");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,13 +5,15 @@ import io.swagger.annotations.*;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
/**
|
||||||
|
* Model for testing model name starting with number
|
||||||
|
**/
|
||||||
|
@ApiModel(description = "Model for testing model name starting with number")
|
||||||
public class Model200Response {
|
public class Model200Response {
|
||||||
|
|
||||||
@SerializedName("name")
|
@SerializedName("name")
|
||||||
private Integer name = null;
|
private Integer name = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -22,7 +24,6 @@ public class Model200Response {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
@@ -5,13 +5,15 @@ import io.swagger.annotations.*;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
/**
|
||||||
|
* Model for testing reserved words
|
||||||
|
**/
|
||||||
|
@ApiModel(description = "Model for testing reserved words")
|
||||||
public class ModelReturn {
|
public class ModelReturn {
|
||||||
|
|
||||||
@SerializedName("return")
|
@SerializedName("return")
|
||||||
private Integer _return = null;
|
private Integer _return = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -22,7 +24,6 @@ public class ModelReturn {
|
|||||||
this._return = _return;
|
this._return = _return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
@@ -5,7 +5,10 @@ import io.swagger.annotations.*;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
/**
|
||||||
|
* Model for testing model name same as property name
|
||||||
|
**/
|
||||||
|
@ApiModel(description = "Model for testing model name same as property name")
|
||||||
public class Name {
|
public class Name {
|
||||||
|
|
||||||
@SerializedName("name")
|
@SerializedName("name")
|
||||||
@@ -13,10 +16,9 @@ public class Name {
|
|||||||
@SerializedName("snake_case")
|
@SerializedName("snake_case")
|
||||||
private Integer snakeCase = null;
|
private Integer snakeCase = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
public Integer getName() {
|
public Integer getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
@@ -24,7 +26,6 @@ public class Name {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -35,7 +36,6 @@ public class Name {
|
|||||||
this.snakeCase = snakeCase;
|
this.snakeCase = snakeCase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ public class Order {
|
|||||||
@SerializedName("complete")
|
@SerializedName("complete")
|
||||||
private Boolean complete = null;
|
private Boolean complete = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -36,7 +35,6 @@ public class Order {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -47,7 +45,6 @@ public class Order {
|
|||||||
this.petId = petId;
|
this.petId = petId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -58,7 +55,6 @@ public class Order {
|
|||||||
this.quantity = quantity;
|
this.quantity = quantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -69,7 +65,6 @@ public class Order {
|
|||||||
this.shipDate = shipDate;
|
this.shipDate = shipDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order Status
|
* Order Status
|
||||||
**/
|
**/
|
||||||
@@ -81,7 +76,6 @@ public class Order {
|
|||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -92,7 +86,6 @@ public class Order {
|
|||||||
this.complete = complete;
|
this.complete = complete;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ public class Pet {
|
|||||||
@SerializedName("status")
|
@SerializedName("status")
|
||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -38,7 +37,6 @@ public class Pet {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -49,7 +47,6 @@ public class Pet {
|
|||||||
this.category = category;
|
this.category = category;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@@ -60,7 +57,6 @@ public class Pet {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@@ -71,7 +67,6 @@ public class Pet {
|
|||||||
this.photoUrls = photoUrls;
|
this.photoUrls = photoUrls;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -82,7 +77,6 @@ public class Pet {
|
|||||||
this.tags = tags;
|
this.tags = tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pet status in the store
|
* pet status in the store
|
||||||
**/
|
**/
|
||||||
@@ -94,7 +88,6 @@ public class Pet {
|
|||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ public class SpecialModelName {
|
|||||||
@SerializedName("$special[property.name]")
|
@SerializedName("$special[property.name]")
|
||||||
private Long specialPropertyName = null;
|
private Long specialPropertyName = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -22,7 +21,6 @@ public class SpecialModelName {
|
|||||||
this.specialPropertyName = specialPropertyName;
|
this.specialPropertyName = specialPropertyName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ public class Tag {
|
|||||||
@SerializedName("name")
|
@SerializedName("name")
|
||||||
private String name = null;
|
private String name = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -24,7 +23,6 @@ public class Tag {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -35,7 +33,6 @@ public class Tag {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ public class User {
|
|||||||
@SerializedName("userStatus")
|
@SerializedName("userStatus")
|
||||||
private Integer userStatus = null;
|
private Integer userStatus = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -36,7 +35,6 @@ public class User {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -47,7 +45,6 @@ public class User {
|
|||||||
this.username = username;
|
this.username = username;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -58,7 +55,6 @@ public class User {
|
|||||||
this.firstName = firstName;
|
this.firstName = firstName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -69,7 +65,6 @@ public class User {
|
|||||||
this.lastName = lastName;
|
this.lastName = lastName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -80,7 +75,6 @@ public class User {
|
|||||||
this.email = email;
|
this.email = email;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -91,7 +85,6 @@ public class User {
|
|||||||
this.password = password;
|
this.password = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@@ -102,7 +95,6 @@ public class User {
|
|||||||
this.phone = phone;
|
this.phone = phone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User Status
|
* User Status
|
||||||
**/
|
**/
|
||||||
@@ -114,7 +106,6 @@ public class User {
|
|||||||
this.userStatus = userStatus;
|
this.userStatus = userStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using RestSharp;
|
using RestSharp;
|
||||||
using IO.Swagger.Client;
|
using IO.Swagger.Client;
|
||||||
@@ -7,57 +6,17 @@ using IO.Swagger.Model;
|
|||||||
|
|
||||||
namespace IO.Swagger.Api
|
namespace IO.Swagger.Api
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a collection of functions to interact with the API endpoints
|
/// Represents a collection of functions to interact with the API endpoints
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IPetApi
|
public interface IPetApi
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Update an existing pet
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
void UpdatePet (Pet body);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add a new pet to the store
|
/// Add a new pet to the store
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void AddPet (Pet body);
|
void AddPet (Pet body);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Finds Pets by status Multiple status values can be provided with comma seperated strings
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="status">Status values that need to be considered for filter</param>
|
|
||||||
/// <returns>List<Pet></returns>
|
|
||||||
List<Pet> FindPetsByStatus (List<string> status);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="tags">Tags to filter by</param>
|
|
||||||
/// <returns>List<Pet></returns>
|
|
||||||
List<Pet> FindPetsByTags (List<string> tags);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="petId">ID of pet that needs to be fetched</param>
|
|
||||||
/// <returns>Pet</returns>
|
|
||||||
Pet GetPetById (long? petId);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Updates a pet in the store with form data
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="petId">ID of pet that needs to be updated</param>
|
|
||||||
/// <param name="name">Updated name of the pet</param>
|
|
||||||
/// <param name="status">Updated status of the pet</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
void UpdatePetWithForm (string petId, string name, string status);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deletes a pet
|
/// Deletes a pet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -65,16 +24,46 @@ namespace IO.Swagger.Api
|
|||||||
/// <param name="apiKey"></param>
|
/// <param name="apiKey"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void DeletePet (long? petId, string apiKey);
|
void DeletePet (long? petId, string apiKey);
|
||||||
|
/// <summary>
|
||||||
|
/// Finds Pets by status Multiple status values can be provided with comma separated strings
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="status">Status values that need to be considered for filter</param>
|
||||||
|
/// <returns>List<Pet></returns>
|
||||||
|
List<Pet> FindPetsByStatus (List<string> status);
|
||||||
|
/// <summary>
|
||||||
|
/// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="tags">Tags to filter by</param>
|
||||||
|
/// <returns>List<Pet></returns>
|
||||||
|
List<Pet> FindPetsByTags (List<string> tags);
|
||||||
|
/// <summary>
|
||||||
|
/// Find pet by ID Returns a single pet
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="petId">ID of pet to return</param>
|
||||||
|
/// <returns>Pet</returns>
|
||||||
|
Pet GetPetById (long? petId);
|
||||||
|
/// <summary>
|
||||||
|
/// Update an existing pet
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
void UpdatePet (Pet body);
|
||||||
|
/// <summary>
|
||||||
|
/// Updates a pet in the store with form data
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="petId">ID of pet that needs to be updated</param>
|
||||||
|
/// <param name="name">Updated name of the pet</param>
|
||||||
|
/// <param name="status">Updated status of the pet</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
void UpdatePetWithForm (long? petId, string name, string status);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// uploads an image
|
/// uploads an image
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="petId">ID of pet to update</param>
|
/// <param name="petId">ID of pet to update</param>
|
||||||
/// <param name="additionalMetadata">Additional data to pass to server</param>
|
/// <param name="additionalMetadata">Additional data to pass to server</param>
|
||||||
/// <param name="file">file to upload</param>
|
/// <param name="file">file to upload</param>
|
||||||
/// <returns></returns>
|
/// <returns>ApiResponse</returns>
|
||||||
void UploadFile (long? petId, string additionalMetadata, Stream file);
|
ApiResponse UploadFile (long? petId, string additionalMetadata, System.IO.Stream file);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -130,47 +119,6 @@ namespace IO.Swagger.Api
|
|||||||
/// <value>An instance of the ApiClient</value>
|
/// <value>An instance of the ApiClient</value>
|
||||||
public ApiClient ApiClient {get; set;}
|
public ApiClient ApiClient {get; set;}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Update an existing pet
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public void UpdatePet (Pet body)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
var path = "/pet";
|
|
||||||
path = path.Replace("{format}", "json");
|
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
|
||||||
var headerParams = new Dictionary<String, String>();
|
|
||||||
var formParams = new Dictionary<String, String>();
|
|
||||||
var fileParams = new Dictionary<String, FileParameter>();
|
|
||||||
String postBody = null;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
postBody = ApiClient.Serialize(body); // http body (model) parameter
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
|
||||||
String[] authSettings = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
// make the HTTP request
|
|
||||||
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
|
||||||
|
|
||||||
if (((int)response.StatusCode) >= 400)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling UpdatePet: " + response.Content, response.Content);
|
|
||||||
else if (((int)response.StatusCode) == 0)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling UpdatePet: " + response.ErrorMessage, response.ErrorMessage);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add a new pet to the store
|
/// Add a new pet to the store
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -179,22 +127,20 @@ namespace IO.Swagger.Api
|
|||||||
public void AddPet (Pet body)
|
public void AddPet (Pet body)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// verify the required parameter 'body' is set
|
||||||
|
if (body == null) throw new ApiException(400, "Missing required parameter 'body' when calling AddPet");
|
||||||
|
|
||||||
|
|
||||||
var path = "/pet";
|
var path = "/pet";
|
||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary<String, String>();
|
||||||
var headerParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var formParams = new Dictionary<String, String>();
|
||||||
var fileParams = new Dictionary<String, FileParameter>();
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
postBody = ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
|
||||||
|
|
||||||
postBody = ApiClient.Serialize(body); // http body (model) parameter
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
// authentication setting, if any
|
||||||
String[] authSettings = new String[] { "petstore_auth" };
|
String[] authSettings = new String[] { "petstore_auth" };
|
||||||
@@ -210,177 +156,6 @@ namespace IO.Swagger.Api
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Finds Pets by status Multiple status values can be provided with comma seperated strings
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="status">Status values that need to be considered for filter</param>
|
|
||||||
/// <returns>List<Pet></returns>
|
|
||||||
public List<Pet> FindPetsByStatus (List<string> status)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
var path = "/pet/findByStatus";
|
|
||||||
path = path.Replace("{format}", "json");
|
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
|
||||||
var headerParams = new Dictionary<String, String>();
|
|
||||||
var formParams = new Dictionary<String, String>();
|
|
||||||
var fileParams = new Dictionary<String, FileParameter>();
|
|
||||||
String postBody = null;
|
|
||||||
|
|
||||||
if (status != null) queryParams.Add("status", ApiClient.ParameterToString(status)); // query parameter
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
|
||||||
String[] authSettings = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
// make the HTTP request
|
|
||||||
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
|
||||||
|
|
||||||
if (((int)response.StatusCode) >= 400)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling FindPetsByStatus: " + response.Content, response.Content);
|
|
||||||
else if (((int)response.StatusCode) == 0)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling FindPetsByStatus: " + response.ErrorMessage, response.ErrorMessage);
|
|
||||||
|
|
||||||
return (List<Pet>) ApiClient.Deserialize(response.Content, typeof(List<Pet>), response.Headers);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="tags">Tags to filter by</param>
|
|
||||||
/// <returns>List<Pet></returns>
|
|
||||||
public List<Pet> FindPetsByTags (List<string> tags)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
var path = "/pet/findByTags";
|
|
||||||
path = path.Replace("{format}", "json");
|
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
|
||||||
var headerParams = new Dictionary<String, String>();
|
|
||||||
var formParams = new Dictionary<String, String>();
|
|
||||||
var fileParams = new Dictionary<String, FileParameter>();
|
|
||||||
String postBody = null;
|
|
||||||
|
|
||||||
if (tags != null) queryParams.Add("tags", ApiClient.ParameterToString(tags)); // query parameter
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
|
||||||
String[] authSettings = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
// make the HTTP request
|
|
||||||
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
|
||||||
|
|
||||||
if (((int)response.StatusCode) >= 400)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling FindPetsByTags: " + response.Content, response.Content);
|
|
||||||
else if (((int)response.StatusCode) == 0)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling FindPetsByTags: " + response.ErrorMessage, response.ErrorMessage);
|
|
||||||
|
|
||||||
return (List<Pet>) ApiClient.Deserialize(response.Content, typeof(List<Pet>), response.Headers);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="petId">ID of pet that needs to be fetched</param>
|
|
||||||
/// <returns>Pet</returns>
|
|
||||||
public Pet GetPetById (long? petId)
|
|
||||||
{
|
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling GetPetById");
|
|
||||||
|
|
||||||
|
|
||||||
var path = "/pet/{petId}";
|
|
||||||
path = path.Replace("{format}", "json");
|
|
||||||
path = path.Replace("{" + "petId" + "}", ApiClient.ParameterToString(petId));
|
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
|
||||||
var headerParams = new Dictionary<String, String>();
|
|
||||||
var formParams = new Dictionary<String, String>();
|
|
||||||
var fileParams = new Dictionary<String, FileParameter>();
|
|
||||||
String postBody = null;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
|
||||||
String[] authSettings = new String[] { "api_key" };
|
|
||||||
|
|
||||||
// make the HTTP request
|
|
||||||
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
|
||||||
|
|
||||||
if (((int)response.StatusCode) >= 400)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling GetPetById: " + response.Content, response.Content);
|
|
||||||
else if (((int)response.StatusCode) == 0)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling GetPetById: " + response.ErrorMessage, response.ErrorMessage);
|
|
||||||
|
|
||||||
return (Pet) ApiClient.Deserialize(response.Content, typeof(Pet), response.Headers);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Updates a pet in the store with form data
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="petId">ID of pet that needs to be updated</param>
|
|
||||||
/// <param name="name">Updated name of the pet</param>
|
|
||||||
/// <param name="status">Updated status of the pet</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public void UpdatePetWithForm (string petId, string name, string status)
|
|
||||||
{
|
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling UpdatePetWithForm");
|
|
||||||
|
|
||||||
|
|
||||||
var path = "/pet/{petId}";
|
|
||||||
path = path.Replace("{format}", "json");
|
|
||||||
path = path.Replace("{" + "petId" + "}", ApiClient.ParameterToString(petId));
|
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
|
||||||
var headerParams = new Dictionary<String, String>();
|
|
||||||
var formParams = new Dictionary<String, String>();
|
|
||||||
var fileParams = new Dictionary<String, FileParameter>();
|
|
||||||
String postBody = null;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (name != null) formParams.Add("name", ApiClient.ParameterToString(name)); // form parameter
|
|
||||||
if (status != null) formParams.Add("status", ApiClient.ParameterToString(status)); // form parameter
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
|
||||||
String[] authSettings = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
// make the HTTP request
|
|
||||||
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
|
||||||
|
|
||||||
if (((int)response.StatusCode) >= 400)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling UpdatePetWithForm: " + response.Content, response.Content);
|
|
||||||
else if (((int)response.StatusCode) == 0)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling UpdatePetWithForm: " + response.ErrorMessage, response.ErrorMessage);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deletes a pet
|
/// Deletes a pet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -397,7 +172,6 @@ namespace IO.Swagger.Api
|
|||||||
var path = "/pet/{petId}";
|
var path = "/pet/{petId}";
|
||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
path = path.Replace("{" + "petId" + "}", ApiClient.ParameterToString(petId));
|
path = path.Replace("{" + "petId" + "}", ApiClient.ParameterToString(petId));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary<String, String>();
|
||||||
var headerParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary<String, String>();
|
||||||
@@ -405,12 +179,8 @@ namespace IO.Swagger.Api
|
|||||||
var fileParams = new Dictionary<String, FileParameter>();
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
if (apiKey != null) headerParams.Add("api_key", ApiClient.ParameterToString(apiKey)); // header parameter
|
||||||
if (apiKey != null) headerParams.Add("api_key", ApiClient.ParameterToString(apiKey)); // header parameter
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
// authentication setting, if any
|
||||||
String[] authSettings = new String[] { "petstore_auth" };
|
String[] authSettings = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
@@ -425,15 +195,203 @@ namespace IO.Swagger.Api
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Finds Pets by status Multiple status values can be provided with comma separated strings
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="status">Status values that need to be considered for filter</param>
|
||||||
|
/// <returns>List<Pet></returns>
|
||||||
|
public List<Pet> FindPetsByStatus (List<string> status)
|
||||||
|
{
|
||||||
|
|
||||||
|
// verify the required parameter 'status' is set
|
||||||
|
if (status == null) throw new ApiException(400, "Missing required parameter 'status' when calling FindPetsByStatus");
|
||||||
|
|
||||||
|
|
||||||
|
var path = "/pet/findByStatus";
|
||||||
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
var queryParams = new Dictionary<String, String>();
|
||||||
|
var headerParams = new Dictionary<String, String>();
|
||||||
|
var formParams = new Dictionary<String, String>();
|
||||||
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
|
String postBody = null;
|
||||||
|
|
||||||
|
if (status != null) queryParams.Add("status", ApiClient.ParameterToString(status)); // query parameter
|
||||||
|
|
||||||
|
// authentication setting, if any
|
||||||
|
String[] authSettings = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
||||||
|
|
||||||
|
if (((int)response.StatusCode) >= 400)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling FindPetsByStatus: " + response.Content, response.Content);
|
||||||
|
else if (((int)response.StatusCode) == 0)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling FindPetsByStatus: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
return (List<Pet>) ApiClient.Deserialize(response.Content, typeof(List<Pet>), response.Headers);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="tags">Tags to filter by</param>
|
||||||
|
/// <returns>List<Pet></returns>
|
||||||
|
public List<Pet> FindPetsByTags (List<string> tags)
|
||||||
|
{
|
||||||
|
|
||||||
|
// verify the required parameter 'tags' is set
|
||||||
|
if (tags == null) throw new ApiException(400, "Missing required parameter 'tags' when calling FindPetsByTags");
|
||||||
|
|
||||||
|
|
||||||
|
var path = "/pet/findByTags";
|
||||||
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
var queryParams = new Dictionary<String, String>();
|
||||||
|
var headerParams = new Dictionary<String, String>();
|
||||||
|
var formParams = new Dictionary<String, String>();
|
||||||
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
|
String postBody = null;
|
||||||
|
|
||||||
|
if (tags != null) queryParams.Add("tags", ApiClient.ParameterToString(tags)); // query parameter
|
||||||
|
|
||||||
|
// authentication setting, if any
|
||||||
|
String[] authSettings = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
||||||
|
|
||||||
|
if (((int)response.StatusCode) >= 400)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling FindPetsByTags: " + response.Content, response.Content);
|
||||||
|
else if (((int)response.StatusCode) == 0)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling FindPetsByTags: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
return (List<Pet>) ApiClient.Deserialize(response.Content, typeof(List<Pet>), response.Headers);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Find pet by ID Returns a single pet
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="petId">ID of pet to return</param>
|
||||||
|
/// <returns>Pet</returns>
|
||||||
|
public Pet GetPetById (long? petId)
|
||||||
|
{
|
||||||
|
|
||||||
|
// verify the required parameter 'petId' is set
|
||||||
|
if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling GetPetById");
|
||||||
|
|
||||||
|
|
||||||
|
var path = "/pet/{petId}";
|
||||||
|
path = path.Replace("{format}", "json");
|
||||||
|
path = path.Replace("{" + "petId" + "}", ApiClient.ParameterToString(petId));
|
||||||
|
|
||||||
|
var queryParams = new Dictionary<String, String>();
|
||||||
|
var headerParams = new Dictionary<String, String>();
|
||||||
|
var formParams = new Dictionary<String, String>();
|
||||||
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
|
// authentication setting, if any
|
||||||
|
String[] authSettings = new String[] { "api_key" };
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
||||||
|
|
||||||
|
if (((int)response.StatusCode) >= 400)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling GetPetById: " + response.Content, response.Content);
|
||||||
|
else if (((int)response.StatusCode) == 0)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling GetPetById: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
return (Pet) ApiClient.Deserialize(response.Content, typeof(Pet), response.Headers);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update an existing pet
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public void UpdatePet (Pet body)
|
||||||
|
{
|
||||||
|
|
||||||
|
// verify the required parameter 'body' is set
|
||||||
|
if (body == null) throw new ApiException(400, "Missing required parameter 'body' when calling UpdatePet");
|
||||||
|
|
||||||
|
|
||||||
|
var path = "/pet";
|
||||||
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
var queryParams = new Dictionary<String, String>();
|
||||||
|
var headerParams = new Dictionary<String, String>();
|
||||||
|
var formParams = new Dictionary<String, String>();
|
||||||
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
|
String postBody = null;
|
||||||
|
|
||||||
|
postBody = ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
|
||||||
|
// authentication setting, if any
|
||||||
|
String[] authSettings = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
||||||
|
|
||||||
|
if (((int)response.StatusCode) >= 400)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling UpdatePet: " + response.Content, response.Content);
|
||||||
|
else if (((int)response.StatusCode) == 0)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling UpdatePet: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updates a pet in the store with form data
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="petId">ID of pet that needs to be updated</param>
|
||||||
|
/// <param name="name">Updated name of the pet</param>
|
||||||
|
/// <param name="status">Updated status of the pet</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public void UpdatePetWithForm (long? petId, string name, string status)
|
||||||
|
{
|
||||||
|
|
||||||
|
// verify the required parameter 'petId' is set
|
||||||
|
if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling UpdatePetWithForm");
|
||||||
|
|
||||||
|
|
||||||
|
var path = "/pet/{petId}";
|
||||||
|
path = path.Replace("{format}", "json");
|
||||||
|
path = path.Replace("{" + "petId" + "}", ApiClient.ParameterToString(petId));
|
||||||
|
|
||||||
|
var queryParams = new Dictionary<String, String>();
|
||||||
|
var headerParams = new Dictionary<String, String>();
|
||||||
|
var formParams = new Dictionary<String, String>();
|
||||||
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
|
String postBody = null;
|
||||||
|
|
||||||
|
if (name != null) formParams.Add("name", ApiClient.ParameterToString(name)); // form parameter
|
||||||
|
if (status != null) formParams.Add("status", ApiClient.ParameterToString(status)); // form parameter
|
||||||
|
|
||||||
|
// authentication setting, if any
|
||||||
|
String[] authSettings = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
||||||
|
|
||||||
|
if (((int)response.StatusCode) >= 400)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling UpdatePetWithForm: " + response.Content, response.Content);
|
||||||
|
else if (((int)response.StatusCode) == 0)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling UpdatePetWithForm: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// uploads an image
|
/// uploads an image
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="petId">ID of pet to update</param>
|
/// <param name="petId">ID of pet to update</param>
|
||||||
/// <param name="additionalMetadata">Additional data to pass to server</param>
|
/// <param name="additionalMetadata">Additional data to pass to server</param>
|
||||||
/// <param name="file">file to upload</param>
|
/// <param name="file">file to upload</param>
|
||||||
/// <returns></returns>
|
/// <returns>ApiResponse</returns>
|
||||||
public void UploadFile (long? petId, string additionalMetadata, Stream file)
|
public ApiResponse UploadFile (long? petId, string additionalMetadata, System.IO.Stream file)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
@@ -443,7 +401,6 @@ namespace IO.Swagger.Api
|
|||||||
var path = "/pet/{petId}/uploadImage";
|
var path = "/pet/{petId}/uploadImage";
|
||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
path = path.Replace("{" + "petId" + "}", ApiClient.ParameterToString(petId));
|
path = path.Replace("{" + "petId" + "}", ApiClient.ParameterToString(petId));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary<String, String>();
|
||||||
var headerParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary<String, String>();
|
||||||
@@ -451,13 +408,9 @@ namespace IO.Swagger.Api
|
|||||||
var fileParams = new Dictionary<String, FileParameter>();
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
if (additionalMetadata != null) formParams.Add("additionalMetadata", ApiClient.ParameterToString(additionalMetadata)); // form parameter
|
||||||
|
if (file != null) fileParams.Add("file", ApiClient.ParameterToFile("file", file));
|
||||||
if (additionalMetadata != null) formParams.Add("additionalMetadata", ApiClient.ParameterToString(additionalMetadata)); // form parameter
|
|
||||||
if (file != null) fileParams.Add("file", ApiClient.ParameterToFile("file", file));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
// authentication setting, if any
|
||||||
String[] authSettings = new String[] { "petstore_auth" };
|
String[] authSettings = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
@@ -469,10 +422,8 @@ namespace IO.Swagger.Api
|
|||||||
else if (((int)response.StatusCode) == 0)
|
else if (((int)response.StatusCode) == 0)
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling UploadFile: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException ((int)response.StatusCode, "Error calling UploadFile: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return;
|
return (ApiResponse) ApiClient.Deserialize(response.Content, typeof(ApiResponse), response.Headers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using RestSharp;
|
using RestSharp;
|
||||||
using IO.Swagger.Client;
|
using IO.Swagger.Client;
|
||||||
@@ -7,40 +6,34 @@ using IO.Swagger.Model;
|
|||||||
|
|
||||||
namespace IO.Swagger.Api
|
namespace IO.Swagger.Api
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a collection of functions to interact with the API endpoints
|
/// Represents a collection of functions to interact with the API endpoints
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IStoreApi
|
public interface IStoreApi
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>Dictionary<String, int?></returns>
|
|
||||||
Dictionary<String, int?> GetInventory ();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Place an order for a pet
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="body">order placed for purchasing the pet</param>
|
|
||||||
/// <returns>Order</returns>
|
|
||||||
Order PlaceOrder (Order body);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
|
||||||
/// <returns>Order</returns>
|
|
||||||
Order GetOrderById (string orderId);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void DeleteOrder (string orderId);
|
void DeleteOrder (string orderId);
|
||||||
|
/// <summary>
|
||||||
|
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Dictionary<String, int?></returns>
|
||||||
|
Dictionary<String, int?> GetInventory ();
|
||||||
|
/// <summary>
|
||||||
|
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||||
|
/// <returns>Order</returns>
|
||||||
|
Order GetOrderById (long? orderId);
|
||||||
|
/// <summary>
|
||||||
|
/// Place an order for a pet
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="body">order placed for purchasing the pet</param>
|
||||||
|
/// <returns>Order</returns>
|
||||||
|
Order PlaceOrder (Order body);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -96,128 +89,6 @@ namespace IO.Swagger.Api
|
|||||||
/// <value>An instance of the ApiClient</value>
|
/// <value>An instance of the ApiClient</value>
|
||||||
public ApiClient ApiClient {get; set;}
|
public ApiClient ApiClient {get; set;}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>Dictionary<String, int?></returns>
|
|
||||||
public Dictionary<String, int?> GetInventory ()
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
var path = "/store/inventory";
|
|
||||||
path = path.Replace("{format}", "json");
|
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
|
||||||
var headerParams = new Dictionary<String, String>();
|
|
||||||
var formParams = new Dictionary<String, String>();
|
|
||||||
var fileParams = new Dictionary<String, FileParameter>();
|
|
||||||
String postBody = null;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
|
||||||
String[] authSettings = new String[] { "api_key" };
|
|
||||||
|
|
||||||
// make the HTTP request
|
|
||||||
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
|
||||||
|
|
||||||
if (((int)response.StatusCode) >= 400)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling GetInventory: " + response.Content, response.Content);
|
|
||||||
else if (((int)response.StatusCode) == 0)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling GetInventory: " + response.ErrorMessage, response.ErrorMessage);
|
|
||||||
|
|
||||||
return (Dictionary<String, int?>) ApiClient.Deserialize(response.Content, typeof(Dictionary<String, int?>), response.Headers);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Place an order for a pet
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="body">order placed for purchasing the pet</param>
|
|
||||||
/// <returns>Order</returns>
|
|
||||||
public Order PlaceOrder (Order body)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
var path = "/store/order";
|
|
||||||
path = path.Replace("{format}", "json");
|
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
|
||||||
var headerParams = new Dictionary<String, String>();
|
|
||||||
var formParams = new Dictionary<String, String>();
|
|
||||||
var fileParams = new Dictionary<String, FileParameter>();
|
|
||||||
String postBody = null;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
postBody = ApiClient.Serialize(body); // http body (model) parameter
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
|
||||||
String[] authSettings = new String[] { };
|
|
||||||
|
|
||||||
// make the HTTP request
|
|
||||||
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
|
||||||
|
|
||||||
if (((int)response.StatusCode) >= 400)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling PlaceOrder: " + response.Content, response.Content);
|
|
||||||
else if (((int)response.StatusCode) == 0)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling PlaceOrder: " + response.ErrorMessage, response.ErrorMessage);
|
|
||||||
|
|
||||||
return (Order) ApiClient.Deserialize(response.Content, typeof(Order), response.Headers);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
|
||||||
/// <returns>Order</returns>
|
|
||||||
public Order GetOrderById (string orderId)
|
|
||||||
{
|
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
|
||||||
if (orderId == null) throw new ApiException(400, "Missing required parameter 'orderId' when calling GetOrderById");
|
|
||||||
|
|
||||||
|
|
||||||
var path = "/store/order/{orderId}";
|
|
||||||
path = path.Replace("{format}", "json");
|
|
||||||
path = path.Replace("{" + "orderId" + "}", ApiClient.ParameterToString(orderId));
|
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
|
||||||
var headerParams = new Dictionary<String, String>();
|
|
||||||
var formParams = new Dictionary<String, String>();
|
|
||||||
var fileParams = new Dictionary<String, FileParameter>();
|
|
||||||
String postBody = null;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
|
||||||
String[] authSettings = new String[] { };
|
|
||||||
|
|
||||||
// make the HTTP request
|
|
||||||
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
|
||||||
|
|
||||||
if (((int)response.StatusCode) >= 400)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling GetOrderById: " + response.Content, response.Content);
|
|
||||||
else if (((int)response.StatusCode) == 0)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling GetOrderById: " + response.ErrorMessage, response.ErrorMessage);
|
|
||||||
|
|
||||||
return (Order) ApiClient.Deserialize(response.Content, typeof(Order), response.Headers);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -233,7 +104,6 @@ namespace IO.Swagger.Api
|
|||||||
var path = "/store/order/{orderId}";
|
var path = "/store/order/{orderId}";
|
||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
path = path.Replace("{" + "orderId" + "}", ApiClient.ParameterToString(orderId));
|
path = path.Replace("{" + "orderId" + "}", ApiClient.ParameterToString(orderId));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary<String, String>();
|
||||||
var headerParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary<String, String>();
|
||||||
@@ -241,11 +111,7 @@ namespace IO.Swagger.Api
|
|||||||
var fileParams = new Dictionary<String, FileParameter>();
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
// authentication setting, if any
|
||||||
String[] authSettings = new String[] { };
|
String[] authSettings = new String[] { };
|
||||||
|
|
||||||
@@ -260,7 +126,111 @@ namespace IO.Swagger.Api
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
}
|
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Dictionary<String, int?></returns>
|
||||||
|
public Dictionary<String, int?> GetInventory ()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
var path = "/store/inventory";
|
||||||
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
var queryParams = new Dictionary<String, String>();
|
||||||
|
var headerParams = new Dictionary<String, String>();
|
||||||
|
var formParams = new Dictionary<String, String>();
|
||||||
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
|
// authentication setting, if any
|
||||||
|
String[] authSettings = new String[] { "api_key" };
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
||||||
|
|
||||||
|
if (((int)response.StatusCode) >= 400)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling GetInventory: " + response.Content, response.Content);
|
||||||
|
else if (((int)response.StatusCode) == 0)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling GetInventory: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
return (Dictionary<String, int?>) ApiClient.Deserialize(response.Content, typeof(Dictionary<String, int?>), response.Headers);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||||
|
/// <returns>Order</returns>
|
||||||
|
public Order GetOrderById (long? orderId)
|
||||||
|
{
|
||||||
|
|
||||||
|
// verify the required parameter 'orderId' is set
|
||||||
|
if (orderId == null) throw new ApiException(400, "Missing required parameter 'orderId' when calling GetOrderById");
|
||||||
|
|
||||||
|
|
||||||
|
var path = "/store/order/{orderId}";
|
||||||
|
path = path.Replace("{format}", "json");
|
||||||
|
path = path.Replace("{" + "orderId" + "}", ApiClient.ParameterToString(orderId));
|
||||||
|
|
||||||
|
var queryParams = new Dictionary<String, String>();
|
||||||
|
var headerParams = new Dictionary<String, String>();
|
||||||
|
var formParams = new Dictionary<String, String>();
|
||||||
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
|
// authentication setting, if any
|
||||||
|
String[] authSettings = new String[] { };
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
||||||
|
|
||||||
|
if (((int)response.StatusCode) >= 400)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling GetOrderById: " + response.Content, response.Content);
|
||||||
|
else if (((int)response.StatusCode) == 0)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling GetOrderById: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
return (Order) ApiClient.Deserialize(response.Content, typeof(Order), response.Headers);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Place an order for a pet
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="body">order placed for purchasing the pet</param>
|
||||||
|
/// <returns>Order</returns>
|
||||||
|
public Order PlaceOrder (Order body)
|
||||||
|
{
|
||||||
|
|
||||||
|
// verify the required parameter 'body' is set
|
||||||
|
if (body == null) throw new ApiException(400, "Missing required parameter 'body' when calling PlaceOrder");
|
||||||
|
|
||||||
|
|
||||||
|
var path = "/store/order";
|
||||||
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
var queryParams = new Dictionary<String, String>();
|
||||||
|
var headerParams = new Dictionary<String, String>();
|
||||||
|
var formParams = new Dictionary<String, String>();
|
||||||
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
|
String postBody = null;
|
||||||
|
|
||||||
|
postBody = ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
|
||||||
|
// authentication setting, if any
|
||||||
|
String[] authSettings = new String[] { };
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
||||||
|
|
||||||
|
if (((int)response.StatusCode) >= 400)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling PlaceOrder: " + response.Content, response.Content);
|
||||||
|
else if (((int)response.StatusCode) == 0)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling PlaceOrder: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
return (Order) ApiClient.Deserialize(response.Content, typeof(Order), response.Headers);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using RestSharp;
|
using RestSharp;
|
||||||
using IO.Swagger.Client;
|
using IO.Swagger.Client;
|
||||||
@@ -7,34 +6,41 @@ using IO.Swagger.Model;
|
|||||||
|
|
||||||
namespace IO.Swagger.Api
|
namespace IO.Swagger.Api
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a collection of functions to interact with the API endpoints
|
/// Represents a collection of functions to interact with the API endpoints
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IUserApi
|
public interface IUserApi
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create user This can only be done by the logged in user.
|
/// Create user This can only be done by the logged in user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="body">Created user object</param>
|
/// <param name="body">Created user object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void CreateUser (User body);
|
void CreateUser (User body);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="body">List of user object</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void CreateUsersWithArrayInput (List<User> body);
|
void CreateUsersWithArrayInput (List<User> body);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="body">List of user object</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void CreateUsersWithListInput (List<User> body);
|
void CreateUsersWithListInput (List<User> body);
|
||||||
|
/// <summary>
|
||||||
|
/// Delete user This can only be done by the logged in user.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="username">The name that needs to be deleted</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
void DeleteUser (string username);
|
||||||
|
/// <summary>
|
||||||
|
/// Get user by user name
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="username">The name that needs to be fetched. Use user1 for testing. </param>
|
||||||
|
/// <returns>User</returns>
|
||||||
|
User GetUserByName (string username);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Logs user into the system
|
/// Logs user into the system
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -42,20 +48,11 @@ namespace IO.Swagger.Api
|
|||||||
/// <param name="password">The password for login in clear text</param>
|
/// <param name="password">The password for login in clear text</param>
|
||||||
/// <returns>string</returns>
|
/// <returns>string</returns>
|
||||||
string LoginUser (string username, string password);
|
string LoginUser (string username, string password);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Logs out current logged in user session
|
/// Logs out current logged in user session
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void LogoutUser ();
|
void LogoutUser ();
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Get user by user name
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
|
||||||
/// <returns>User</returns>
|
|
||||||
User GetUserByName (string username);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updated user This can only be done by the logged in user.
|
/// Updated user This can only be done by the logged in user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -63,14 +60,6 @@ namespace IO.Swagger.Api
|
|||||||
/// <param name="body">Updated user object</param>
|
/// <param name="body">Updated user object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void UpdateUser (string username, User body);
|
void UpdateUser (string username, User body);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Delete user This can only be done by the logged in user.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="username">The name that needs to be deleted</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
void DeleteUser (string username);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -126,7 +115,6 @@ namespace IO.Swagger.Api
|
|||||||
/// <value>An instance of the ApiClient</value>
|
/// <value>An instance of the ApiClient</value>
|
||||||
public ApiClient ApiClient {get; set;}
|
public ApiClient ApiClient {get; set;}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create user This can only be done by the logged in user.
|
/// Create user This can only be done by the logged in user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -135,22 +123,20 @@ namespace IO.Swagger.Api
|
|||||||
public void CreateUser (User body)
|
public void CreateUser (User body)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// verify the required parameter 'body' is set
|
||||||
|
if (body == null) throw new ApiException(400, "Missing required parameter 'body' when calling CreateUser");
|
||||||
|
|
||||||
|
|
||||||
var path = "/user";
|
var path = "/user";
|
||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary<String, String>();
|
||||||
var headerParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var formParams = new Dictionary<String, String>();
|
||||||
var fileParams = new Dictionary<String, FileParameter>();
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
postBody = ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
|
||||||
|
|
||||||
postBody = ApiClient.Serialize(body); // http body (model) parameter
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
// authentication setting, if any
|
||||||
String[] authSettings = new String[] { };
|
String[] authSettings = new String[] { };
|
||||||
@@ -166,7 +152,6 @@ namespace IO.Swagger.Api
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -175,22 +160,20 @@ namespace IO.Swagger.Api
|
|||||||
public void CreateUsersWithArrayInput (List<User> body)
|
public void CreateUsersWithArrayInput (List<User> body)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// verify the required parameter 'body' is set
|
||||||
|
if (body == null) throw new ApiException(400, "Missing required parameter 'body' when calling CreateUsersWithArrayInput");
|
||||||
|
|
||||||
|
|
||||||
var path = "/user/createWithArray";
|
var path = "/user/createWithArray";
|
||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary<String, String>();
|
||||||
var headerParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var formParams = new Dictionary<String, String>();
|
||||||
var fileParams = new Dictionary<String, FileParameter>();
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
postBody = ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
|
||||||
|
|
||||||
postBody = ApiClient.Serialize(body); // http body (model) parameter
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
// authentication setting, if any
|
||||||
String[] authSettings = new String[] { };
|
String[] authSettings = new String[] { };
|
||||||
@@ -206,7 +189,6 @@ namespace IO.Swagger.Api
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -215,22 +197,20 @@ namespace IO.Swagger.Api
|
|||||||
public void CreateUsersWithListInput (List<User> body)
|
public void CreateUsersWithListInput (List<User> body)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// verify the required parameter 'body' is set
|
||||||
|
if (body == null) throw new ApiException(400, "Missing required parameter 'body' when calling CreateUsersWithListInput");
|
||||||
|
|
||||||
|
|
||||||
var path = "/user/createWithList";
|
var path = "/user/createWithList";
|
||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary<String, String>();
|
||||||
var headerParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var formParams = new Dictionary<String, String>();
|
||||||
var fileParams = new Dictionary<String, FileParameter>();
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
postBody = ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
|
||||||
|
|
||||||
postBody = ApiClient.Serialize(body); // http body (model) parameter
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
// authentication setting, if any
|
||||||
String[] authSettings = new String[] { };
|
String[] authSettings = new String[] { };
|
||||||
@@ -246,175 +226,6 @@ namespace IO.Swagger.Api
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Logs user into the system
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="username">The user name for login</param>
|
|
||||||
/// <param name="password">The password for login in clear text</param>
|
|
||||||
/// <returns>string</returns>
|
|
||||||
public string LoginUser (string username, string password)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
var path = "/user/login";
|
|
||||||
path = path.Replace("{format}", "json");
|
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
|
||||||
var headerParams = new Dictionary<String, String>();
|
|
||||||
var formParams = new Dictionary<String, String>();
|
|
||||||
var fileParams = new Dictionary<String, FileParameter>();
|
|
||||||
String postBody = null;
|
|
||||||
|
|
||||||
if (username != null) queryParams.Add("username", ApiClient.ParameterToString(username)); // query parameter
|
|
||||||
if (password != null) queryParams.Add("password", ApiClient.ParameterToString(password)); // query parameter
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
|
||||||
String[] authSettings = new String[] { };
|
|
||||||
|
|
||||||
// make the HTTP request
|
|
||||||
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
|
||||||
|
|
||||||
if (((int)response.StatusCode) >= 400)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling LoginUser: " + response.Content, response.Content);
|
|
||||||
else if (((int)response.StatusCode) == 0)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling LoginUser: " + response.ErrorMessage, response.ErrorMessage);
|
|
||||||
|
|
||||||
return (string) ApiClient.Deserialize(response.Content, typeof(string), response.Headers);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Logs out current logged in user session
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
public void LogoutUser ()
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
var path = "/user/logout";
|
|
||||||
path = path.Replace("{format}", "json");
|
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
|
||||||
var headerParams = new Dictionary<String, String>();
|
|
||||||
var formParams = new Dictionary<String, String>();
|
|
||||||
var fileParams = new Dictionary<String, FileParameter>();
|
|
||||||
String postBody = null;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
|
||||||
String[] authSettings = new String[] { };
|
|
||||||
|
|
||||||
// make the HTTP request
|
|
||||||
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
|
||||||
|
|
||||||
if (((int)response.StatusCode) >= 400)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling LogoutUser: " + response.Content, response.Content);
|
|
||||||
else if (((int)response.StatusCode) == 0)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling LogoutUser: " + response.ErrorMessage, response.ErrorMessage);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Get user by user name
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
|
||||||
/// <returns>User</returns>
|
|
||||||
public User GetUserByName (string username)
|
|
||||||
{
|
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
|
||||||
if (username == null) throw new ApiException(400, "Missing required parameter 'username' when calling GetUserByName");
|
|
||||||
|
|
||||||
|
|
||||||
var path = "/user/{username}";
|
|
||||||
path = path.Replace("{format}", "json");
|
|
||||||
path = path.Replace("{" + "username" + "}", ApiClient.ParameterToString(username));
|
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
|
||||||
var headerParams = new Dictionary<String, String>();
|
|
||||||
var formParams = new Dictionary<String, String>();
|
|
||||||
var fileParams = new Dictionary<String, FileParameter>();
|
|
||||||
String postBody = null;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
|
||||||
String[] authSettings = new String[] { };
|
|
||||||
|
|
||||||
// make the HTTP request
|
|
||||||
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
|
||||||
|
|
||||||
if (((int)response.StatusCode) >= 400)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling GetUserByName: " + response.Content, response.Content);
|
|
||||||
else if (((int)response.StatusCode) == 0)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling GetUserByName: " + response.ErrorMessage, response.ErrorMessage);
|
|
||||||
|
|
||||||
return (User) ApiClient.Deserialize(response.Content, typeof(User), response.Headers);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Updated user This can only be done by the logged in user.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="username">name that need to be deleted</param>
|
|
||||||
/// <param name="body">Updated user object</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public void UpdateUser (string username, User body)
|
|
||||||
{
|
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
|
||||||
if (username == null) throw new ApiException(400, "Missing required parameter 'username' when calling UpdateUser");
|
|
||||||
|
|
||||||
|
|
||||||
var path = "/user/{username}";
|
|
||||||
path = path.Replace("{format}", "json");
|
|
||||||
path = path.Replace("{" + "username" + "}", ApiClient.ParameterToString(username));
|
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
|
||||||
var headerParams = new Dictionary<String, String>();
|
|
||||||
var formParams = new Dictionary<String, String>();
|
|
||||||
var fileParams = new Dictionary<String, FileParameter>();
|
|
||||||
String postBody = null;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
postBody = ApiClient.Serialize(body); // http body (model) parameter
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
|
||||||
String[] authSettings = new String[] { };
|
|
||||||
|
|
||||||
// make the HTTP request
|
|
||||||
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
|
||||||
|
|
||||||
if (((int)response.StatusCode) >= 400)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling UpdateUser: " + response.Content, response.Content);
|
|
||||||
else if (((int)response.StatusCode) == 0)
|
|
||||||
throw new ApiException ((int)response.StatusCode, "Error calling UpdateUser: " + response.ErrorMessage, response.ErrorMessage);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete user This can only be done by the logged in user.
|
/// Delete user This can only be done by the logged in user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -430,7 +241,6 @@ namespace IO.Swagger.Api
|
|||||||
var path = "/user/{username}";
|
var path = "/user/{username}";
|
||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
path = path.Replace("{" + "username" + "}", ApiClient.ParameterToString(username));
|
path = path.Replace("{" + "username" + "}", ApiClient.ParameterToString(username));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary<String, String>();
|
||||||
var headerParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary<String, String>();
|
||||||
@@ -438,11 +248,7 @@ namespace IO.Swagger.Api
|
|||||||
var fileParams = new Dictionary<String, FileParameter>();
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// authentication setting, if any
|
// authentication setting, if any
|
||||||
String[] authSettings = new String[] { };
|
String[] authSettings = new String[] { };
|
||||||
|
|
||||||
@@ -457,7 +263,158 @@ namespace IO.Swagger.Api
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
}
|
/// Get user by user name
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="username">The name that needs to be fetched. Use user1 for testing. </param>
|
||||||
|
/// <returns>User</returns>
|
||||||
|
public User GetUserByName (string username)
|
||||||
|
{
|
||||||
|
|
||||||
|
// verify the required parameter 'username' is set
|
||||||
|
if (username == null) throw new ApiException(400, "Missing required parameter 'username' when calling GetUserByName");
|
||||||
|
|
||||||
|
|
||||||
|
var path = "/user/{username}";
|
||||||
|
path = path.Replace("{format}", "json");
|
||||||
|
path = path.Replace("{" + "username" + "}", ApiClient.ParameterToString(username));
|
||||||
|
|
||||||
|
var queryParams = new Dictionary<String, String>();
|
||||||
|
var headerParams = new Dictionary<String, String>();
|
||||||
|
var formParams = new Dictionary<String, String>();
|
||||||
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
|
// authentication setting, if any
|
||||||
|
String[] authSettings = new String[] { };
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
||||||
|
|
||||||
|
if (((int)response.StatusCode) >= 400)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling GetUserByName: " + response.Content, response.Content);
|
||||||
|
else if (((int)response.StatusCode) == 0)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling GetUserByName: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
return (User) ApiClient.Deserialize(response.Content, typeof(User), response.Headers);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Logs user into the system
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="username">The user name for login</param>
|
||||||
|
/// <param name="password">The password for login in clear text</param>
|
||||||
|
/// <returns>string</returns>
|
||||||
|
public string LoginUser (string username, string password)
|
||||||
|
{
|
||||||
|
|
||||||
|
// verify the required parameter 'username' is set
|
||||||
|
if (username == null) throw new ApiException(400, "Missing required parameter 'username' when calling LoginUser");
|
||||||
|
|
||||||
|
// verify the required parameter 'password' is set
|
||||||
|
if (password == null) throw new ApiException(400, "Missing required parameter 'password' when calling LoginUser");
|
||||||
|
|
||||||
|
|
||||||
|
var path = "/user/login";
|
||||||
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
var queryParams = new Dictionary<String, String>();
|
||||||
|
var headerParams = new Dictionary<String, String>();
|
||||||
|
var formParams = new Dictionary<String, String>();
|
||||||
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
|
String postBody = null;
|
||||||
|
|
||||||
|
if (username != null) queryParams.Add("username", ApiClient.ParameterToString(username)); // query parameter
|
||||||
|
if (password != null) queryParams.Add("password", ApiClient.ParameterToString(password)); // query parameter
|
||||||
|
|
||||||
|
// authentication setting, if any
|
||||||
|
String[] authSettings = new String[] { };
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
||||||
|
|
||||||
|
if (((int)response.StatusCode) >= 400)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling LoginUser: " + response.Content, response.Content);
|
||||||
|
else if (((int)response.StatusCode) == 0)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling LoginUser: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
return (string) ApiClient.Deserialize(response.Content, typeof(string), response.Headers);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Logs out current logged in user session
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public void LogoutUser ()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
var path = "/user/logout";
|
||||||
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
var queryParams = new Dictionary<String, String>();
|
||||||
|
var headerParams = new Dictionary<String, String>();
|
||||||
|
var formParams = new Dictionary<String, String>();
|
||||||
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
|
// authentication setting, if any
|
||||||
|
String[] authSettings = new String[] { };
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
||||||
|
|
||||||
|
if (((int)response.StatusCode) >= 400)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling LogoutUser: " + response.Content, response.Content);
|
||||||
|
else if (((int)response.StatusCode) == 0)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling LogoutUser: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated user This can only be done by the logged in user.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="username">name that need to be deleted</param>
|
||||||
|
/// <param name="body">Updated user object</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public void UpdateUser (string username, User body)
|
||||||
|
{
|
||||||
|
|
||||||
|
// verify the required parameter 'username' is set
|
||||||
|
if (username == null) throw new ApiException(400, "Missing required parameter 'username' when calling UpdateUser");
|
||||||
|
|
||||||
|
// verify the required parameter 'body' is set
|
||||||
|
if (body == null) throw new ApiException(400, "Missing required parameter 'body' when calling UpdateUser");
|
||||||
|
|
||||||
|
|
||||||
|
var path = "/user/{username}";
|
||||||
|
path = path.Replace("{format}", "json");
|
||||||
|
path = path.Replace("{" + "username" + "}", ApiClient.ParameterToString(username));
|
||||||
|
|
||||||
|
var queryParams = new Dictionary<String, String>();
|
||||||
|
var headerParams = new Dictionary<String, String>();
|
||||||
|
var formParams = new Dictionary<String, String>();
|
||||||
|
var fileParams = new Dictionary<String, FileParameter>();
|
||||||
|
String postBody = null;
|
||||||
|
|
||||||
|
postBody = ApiClient.Serialize(body); // http body (model) parameter
|
||||||
|
|
||||||
|
// authentication setting, if any
|
||||||
|
String[] authSettings = new String[] { };
|
||||||
|
|
||||||
|
// make the HTTP request
|
||||||
|
IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
|
||||||
|
|
||||||
|
if (((int)response.StatusCode) >= 400)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling UpdateUser: " + response.Content, response.Content);
|
||||||
|
else if (((int)response.StatusCode) == 0)
|
||||||
|
throw new ApiException ((int)response.StatusCode, "Error calling UpdateUser: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -257,17 +257,14 @@ namespace IO.Swagger.Client
|
|||||||
// determine which one to use
|
// determine which one to use
|
||||||
switch(auth)
|
switch(auth)
|
||||||
{
|
{
|
||||||
|
|
||||||
case "api_key":
|
|
||||||
headerParams["api_key"] = GetApiKeyWithPrefix("api_key");
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "petstore_auth":
|
case "petstore_auth":
|
||||||
|
|
||||||
//TODO support oauth
|
//TODO support oauth
|
||||||
break;
|
break;
|
||||||
|
case "api_key":
|
||||||
|
headerParams["api_key"] = GetApiKeyWithPrefix("api_key");
|
||||||
|
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
//TODO show warning about security definition not found
|
//TODO show warning about security definition not found
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
using System;
|
||||||
|
using System.Text;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Model {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
public class ApiResponse {
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Code
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="code", EmitDefaultValue=false)]
|
||||||
|
[JsonProperty(PropertyName = "code")]
|
||||||
|
public int? Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Type
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="type", EmitDefaultValue=false)]
|
||||||
|
[JsonProperty(PropertyName = "type")]
|
||||||
|
public string Type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Message
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="message", EmitDefaultValue=false)]
|
||||||
|
[JsonProperty(PropertyName = "message")]
|
||||||
|
public string Message { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>String presentation of the object</returns>
|
||||||
|
public override string ToString() {
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.Append("class ApiResponse {\n");
|
||||||
|
sb.Append(" Code: ").Append(Code).Append("\n");
|
||||||
|
sb.Append(" Type: ").Append(Type).Append("\n");
|
||||||
|
sb.Append(" Message: ").Append(Message).Append("\n");
|
||||||
|
sb.Append("}\n");
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the JSON string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>JSON string presentation of the object</returns>
|
||||||
|
public string ToJson() {
|
||||||
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,7 +12,6 @@ namespace IO.Swagger.Model {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataContract]
|
[DataContract]
|
||||||
public class Category {
|
public class Category {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Id
|
/// Gets or Sets Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -20,7 +19,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "id")]
|
[JsonProperty(PropertyName = "id")]
|
||||||
public long? Id { get; set; }
|
public long? Id { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Name
|
/// Gets or Sets Name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -28,7 +26,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "name")]
|
[JsonProperty(PropertyName = "name")]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the string presentation of the object
|
/// Get the string presentation of the object
|
||||||
@@ -37,11 +34,8 @@ namespace IO.Swagger.Model {
|
|||||||
public override string ToString() {
|
public override string ToString() {
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
sb.Append("class Category {\n");
|
sb.Append("class Category {\n");
|
||||||
|
|
||||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||||
|
|
||||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||||
|
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ namespace IO.Swagger.Model {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataContract]
|
[DataContract]
|
||||||
public class Order {
|
public class Order {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Id
|
/// Gets or Sets Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -20,7 +19,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "id")]
|
[JsonProperty(PropertyName = "id")]
|
||||||
public long? Id { get; set; }
|
public long? Id { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets PetId
|
/// Gets or Sets PetId
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -28,7 +26,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "petId")]
|
[JsonProperty(PropertyName = "petId")]
|
||||||
public long? PetId { get; set; }
|
public long? PetId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Quantity
|
/// Gets or Sets Quantity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -36,7 +33,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "quantity")]
|
[JsonProperty(PropertyName = "quantity")]
|
||||||
public int? Quantity { get; set; }
|
public int? Quantity { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets ShipDate
|
/// Gets or Sets ShipDate
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -44,7 +40,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "shipDate")]
|
[JsonProperty(PropertyName = "shipDate")]
|
||||||
public DateTime? ShipDate { get; set; }
|
public DateTime? ShipDate { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Order Status
|
/// Order Status
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -53,7 +48,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "status")]
|
[JsonProperty(PropertyName = "status")]
|
||||||
public string Status { get; set; }
|
public string Status { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Complete
|
/// Gets or Sets Complete
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -61,7 +55,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "complete")]
|
[JsonProperty(PropertyName = "complete")]
|
||||||
public bool? Complete { get; set; }
|
public bool? Complete { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the string presentation of the object
|
/// Get the string presentation of the object
|
||||||
@@ -70,19 +63,12 @@ namespace IO.Swagger.Model {
|
|||||||
public override string ToString() {
|
public override string ToString() {
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
sb.Append("class Order {\n");
|
sb.Append("class Order {\n");
|
||||||
|
|
||||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||||
|
|
||||||
sb.Append(" PetId: ").Append(PetId).Append("\n");
|
sb.Append(" PetId: ").Append(PetId).Append("\n");
|
||||||
|
|
||||||
sb.Append(" Quantity: ").Append(Quantity).Append("\n");
|
sb.Append(" Quantity: ").Append(Quantity).Append("\n");
|
||||||
|
|
||||||
sb.Append(" ShipDate: ").Append(ShipDate).Append("\n");
|
sb.Append(" ShipDate: ").Append(ShipDate).Append("\n");
|
||||||
|
|
||||||
sb.Append(" Status: ").Append(Status).Append("\n");
|
sb.Append(" Status: ").Append(Status).Append("\n");
|
||||||
|
|
||||||
sb.Append(" Complete: ").Append(Complete).Append("\n");
|
sb.Append(" Complete: ").Append(Complete).Append("\n");
|
||||||
|
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ namespace IO.Swagger.Model {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataContract]
|
[DataContract]
|
||||||
public class Pet {
|
public class Pet {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Id
|
/// Gets or Sets Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -20,7 +19,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "id")]
|
[JsonProperty(PropertyName = "id")]
|
||||||
public long? Id { get; set; }
|
public long? Id { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Category
|
/// Gets or Sets Category
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -28,7 +26,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "category")]
|
[JsonProperty(PropertyName = "category")]
|
||||||
public Category Category { get; set; }
|
public Category Category { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Name
|
/// Gets or Sets Name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -36,7 +33,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "name")]
|
[JsonProperty(PropertyName = "name")]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets PhotoUrls
|
/// Gets or Sets PhotoUrls
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -44,7 +40,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "photoUrls")]
|
[JsonProperty(PropertyName = "photoUrls")]
|
||||||
public List<string> PhotoUrls { get; set; }
|
public List<string> PhotoUrls { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Tags
|
/// Gets or Sets Tags
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -52,7 +47,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "tags")]
|
[JsonProperty(PropertyName = "tags")]
|
||||||
public List<Tag> Tags { get; set; }
|
public List<Tag> Tags { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// pet status in the store
|
/// pet status in the store
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -61,7 +55,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "status")]
|
[JsonProperty(PropertyName = "status")]
|
||||||
public string Status { get; set; }
|
public string Status { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the string presentation of the object
|
/// Get the string presentation of the object
|
||||||
@@ -70,19 +63,12 @@ namespace IO.Swagger.Model {
|
|||||||
public override string ToString() {
|
public override string ToString() {
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
sb.Append("class Pet {\n");
|
sb.Append("class Pet {\n");
|
||||||
|
|
||||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||||
|
|
||||||
sb.Append(" Category: ").Append(Category).Append("\n");
|
sb.Append(" Category: ").Append(Category).Append("\n");
|
||||||
|
|
||||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||||
|
|
||||||
sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n");
|
sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n");
|
||||||
|
|
||||||
sb.Append(" Tags: ").Append(Tags).Append("\n");
|
sb.Append(" Tags: ").Append(Tags).Append("\n");
|
||||||
|
|
||||||
sb.Append(" Status: ").Append(Status).Append("\n");
|
sb.Append(" Status: ").Append(Status).Append("\n");
|
||||||
|
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ namespace IO.Swagger.Model {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataContract]
|
[DataContract]
|
||||||
public class Tag {
|
public class Tag {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Id
|
/// Gets or Sets Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -20,7 +19,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "id")]
|
[JsonProperty(PropertyName = "id")]
|
||||||
public long? Id { get; set; }
|
public long? Id { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Name
|
/// Gets or Sets Name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -28,7 +26,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "name")]
|
[JsonProperty(PropertyName = "name")]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the string presentation of the object
|
/// Get the string presentation of the object
|
||||||
@@ -37,11 +34,8 @@ namespace IO.Swagger.Model {
|
|||||||
public override string ToString() {
|
public override string ToString() {
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
sb.Append("class Tag {\n");
|
sb.Append("class Tag {\n");
|
||||||
|
|
||||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||||
|
|
||||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||||
|
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ namespace IO.Swagger.Model {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataContract]
|
[DataContract]
|
||||||
public class User {
|
public class User {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Id
|
/// Gets or Sets Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -20,7 +19,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "id")]
|
[JsonProperty(PropertyName = "id")]
|
||||||
public long? Id { get; set; }
|
public long? Id { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Username
|
/// Gets or Sets Username
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -28,7 +26,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "username")]
|
[JsonProperty(PropertyName = "username")]
|
||||||
public string Username { get; set; }
|
public string Username { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets FirstName
|
/// Gets or Sets FirstName
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -36,7 +33,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "firstName")]
|
[JsonProperty(PropertyName = "firstName")]
|
||||||
public string FirstName { get; set; }
|
public string FirstName { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets LastName
|
/// Gets or Sets LastName
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -44,7 +40,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "lastName")]
|
[JsonProperty(PropertyName = "lastName")]
|
||||||
public string LastName { get; set; }
|
public string LastName { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Email
|
/// Gets or Sets Email
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -52,7 +47,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "email")]
|
[JsonProperty(PropertyName = "email")]
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Password
|
/// Gets or Sets Password
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -60,7 +54,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "password")]
|
[JsonProperty(PropertyName = "password")]
|
||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Phone
|
/// Gets or Sets Phone
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -68,7 +61,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "phone")]
|
[JsonProperty(PropertyName = "phone")]
|
||||||
public string Phone { get; set; }
|
public string Phone { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// User Status
|
/// User Status
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -77,7 +69,6 @@ namespace IO.Swagger.Model {
|
|||||||
[JsonProperty(PropertyName = "userStatus")]
|
[JsonProperty(PropertyName = "userStatus")]
|
||||||
public int? UserStatus { get; set; }
|
public int? UserStatus { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the string presentation of the object
|
/// Get the string presentation of the object
|
||||||
@@ -86,23 +77,14 @@ namespace IO.Swagger.Model {
|
|||||||
public override string ToString() {
|
public override string ToString() {
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
sb.Append("class User {\n");
|
sb.Append("class User {\n");
|
||||||
|
|
||||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||||
|
|
||||||
sb.Append(" Username: ").Append(Username).Append("\n");
|
sb.Append(" Username: ").Append(Username).Append("\n");
|
||||||
|
|
||||||
sb.Append(" FirstName: ").Append(FirstName).Append("\n");
|
sb.Append(" FirstName: ").Append(FirstName).Append("\n");
|
||||||
|
|
||||||
sb.Append(" LastName: ").Append(LastName).Append("\n");
|
sb.Append(" LastName: ").Append(LastName).Append("\n");
|
||||||
|
|
||||||
sb.Append(" Email: ").Append(Email).Append("\n");
|
sb.Append(" Email: ").Append(Email).Append("\n");
|
||||||
|
|
||||||
sb.Append(" Password: ").Append(Password).Append("\n");
|
sb.Append(" Password: ").Append(Password).Append("\n");
|
||||||
|
|
||||||
sb.Append(" Phone: ").Append(Phone).Append("\n");
|
sb.Append(" Phone: ").Append(Phone).Append("\n");
|
||||||
|
|
||||||
sb.Append(" UserStatus: ").Append(UserStatus).Append("\n");
|
sb.Append(" UserStatus: ").Append(UserStatus).Append("\n");
|
||||||
|
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Test
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class for testing ApiResponse
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This file is automatically generated by Swagger Codegen.
|
||||||
|
/// Please update the test case below to test the model.
|
||||||
|
/// </remarks>
|
||||||
|
[TestFixture]
|
||||||
|
public class ApiResponseTests
|
||||||
|
{
|
||||||
|
private ApiResponse instance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setup before each test
|
||||||
|
/// </summary>
|
||||||
|
[SetUp]
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
instance = new ApiResponse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up after each test
|
||||||
|
/// </summary>
|
||||||
|
[TearDown]
|
||||||
|
public void Cleanup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test an instance of ApiResponse
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void ApiResponseInstanceTest()
|
||||||
|
{
|
||||||
|
Assert.IsInstanceOf<ApiResponse> (instance, "instance is a ApiResponse");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test the property 'Code'
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void CodeTest()
|
||||||
|
{
|
||||||
|
// TODO: unit test for the property 'Code'
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Test the property 'Type'
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void TypeTest()
|
||||||
|
{
|
||||||
|
// TODO: unit test for the property 'Type'
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Test the property 'Message'
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void MessageTest()
|
||||||
|
{
|
||||||
|
// TODO: unit test for the property 'Message'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -65,18 +65,6 @@ namespace IO.Swagger.Test
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Test AddPetUsingByteArray
|
|
||||||
/// </summary>
|
|
||||||
[Test]
|
|
||||||
public void AddPetUsingByteArrayTest()
|
|
||||||
{
|
|
||||||
// TODO: add unit test for the method 'AddPetUsingByteArray'
|
|
||||||
byte[] body = null; // TODO: replace null with proper value
|
|
||||||
instance.AddPetUsingByteArray(body);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test DeletePet
|
/// Test DeletePet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -126,30 +114,6 @@ string apiKey = null; // TODO: replace null with proper value
|
|||||||
Assert.IsInstanceOf<Pet> (response, "response is Pet");
|
Assert.IsInstanceOf<Pet> (response, "response is Pet");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Test GetPetByIdInObject
|
|
||||||
/// </summary>
|
|
||||||
[Test]
|
|
||||||
public void GetPetByIdInObjectTest()
|
|
||||||
{
|
|
||||||
// TODO: add unit test for the method 'GetPetByIdInObject'
|
|
||||||
long? petId = null; // TODO: replace null with proper value
|
|
||||||
var response = instance.GetPetByIdInObject(petId);
|
|
||||||
Assert.IsInstanceOf<InlineResponse200> (response, "response is InlineResponse200");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Test PetPetIdtestingByteArraytrueGet
|
|
||||||
/// </summary>
|
|
||||||
[Test]
|
|
||||||
public void PetPetIdtestingByteArraytrueGetTest()
|
|
||||||
{
|
|
||||||
// TODO: add unit test for the method 'PetPetIdtestingByteArraytrueGet'
|
|
||||||
long? petId = null; // TODO: replace null with proper value
|
|
||||||
var response = instance.PetPetIdtestingByteArraytrueGet(petId);
|
|
||||||
Assert.IsInstanceOf<byte[]> (response, "response is byte[]");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test UpdatePet
|
/// Test UpdatePet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -169,7 +133,7 @@ string apiKey = null; // TODO: replace null with proper value
|
|||||||
public void UpdatePetWithFormTest()
|
public void UpdatePetWithFormTest()
|
||||||
{
|
{
|
||||||
// TODO: add unit test for the method 'UpdatePetWithForm'
|
// TODO: add unit test for the method 'UpdatePetWithForm'
|
||||||
string petId = null; // TODO: replace null with proper value
|
long? petId = null; // TODO: replace null with proper value
|
||||||
string name = null; // TODO: replace null with proper value
|
string name = null; // TODO: replace null with proper value
|
||||||
string status = null; // TODO: replace null with proper value
|
string status = null; // TODO: replace null with proper value
|
||||||
instance.UpdatePetWithForm(petId, name, status);
|
instance.UpdatePetWithForm(petId, name, status);
|
||||||
@@ -186,8 +150,8 @@ string status = null; // TODO: replace null with proper value
|
|||||||
long? petId = null; // TODO: replace null with proper value
|
long? petId = null; // TODO: replace null with proper value
|
||||||
string additionalMetadata = null; // TODO: replace null with proper value
|
string additionalMetadata = null; // TODO: replace null with proper value
|
||||||
Stream file = null; // TODO: replace null with proper value
|
Stream file = null; // TODO: replace null with proper value
|
||||||
instance.UploadFile(petId, additionalMetadata, file);
|
var response = instance.UploadFile(petId, additionalMetadata, file);
|
||||||
|
Assert.IsInstanceOf<ApiResponse> (response, "response is ApiResponse");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,18 +65,6 @@ namespace IO.Swagger.Test
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Test FindOrdersByStatus
|
|
||||||
/// </summary>
|
|
||||||
[Test]
|
|
||||||
public void FindOrdersByStatusTest()
|
|
||||||
{
|
|
||||||
// TODO: add unit test for the method 'FindOrdersByStatus'
|
|
||||||
string status = null; // TODO: replace null with proper value
|
|
||||||
var response = instance.FindOrdersByStatus(status);
|
|
||||||
Assert.IsInstanceOf<List<Order>> (response, "response is List<Order>");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test GetInventory
|
/// Test GetInventory
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -88,17 +76,6 @@ namespace IO.Swagger.Test
|
|||||||
Assert.IsInstanceOf<Dictionary<string, int?>> (response, "response is Dictionary<string, int?>");
|
Assert.IsInstanceOf<Dictionary<string, int?>> (response, "response is Dictionary<string, int?>");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Test GetInventoryInObject
|
|
||||||
/// </summary>
|
|
||||||
[Test]
|
|
||||||
public void GetInventoryInObjectTest()
|
|
||||||
{
|
|
||||||
// TODO: add unit test for the method 'GetInventoryInObject'
|
|
||||||
var response = instance.GetInventoryInObject();
|
|
||||||
Assert.IsInstanceOf<Object> (response, "response is Object");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test GetOrderById
|
/// Test GetOrderById
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -106,7 +83,7 @@ namespace IO.Swagger.Test
|
|||||||
public void GetOrderByIdTest()
|
public void GetOrderByIdTest()
|
||||||
{
|
{
|
||||||
// TODO: add unit test for the method 'GetOrderById'
|
// TODO: add unit test for the method 'GetOrderById'
|
||||||
string orderId = null; // TODO: replace null with proper value
|
long? orderId = null; // TODO: replace null with proper value
|
||||||
var response = instance.GetOrderById(orderId);
|
var response = instance.GetOrderById(orderId);
|
||||||
Assert.IsInstanceOf<Order> (response, "response is Order");
|
Assert.IsInstanceOf<Order> (response, "response is Order");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
- the C# library for the Swagger Petstore
|
- the C# library for the Swagger Petstore
|
||||||
|
|
||||||
This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose.
|
||||||
|
|
||||||
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
||||||
|
|
||||||
- API version: 1.0.0
|
- API version: 1.0.0
|
||||||
- Package version:
|
- Package version:
|
||||||
- Build date: 2016-04-14T08:16:33.913-04:00
|
- Build date: 2016-04-14T08:34:43.608-04:00
|
||||||
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
|
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
|
||||||
|
|
||||||
## Frameworks supported
|
## Frameworks supported
|
||||||
@@ -69,20 +69,15 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
|||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
*::PetApi* | [**AddPet**](docs/PetApi.md#AddPet) | **POST** /pet | Add a new pet to the store
|
*::PetApi* | [**AddPet**](docs/PetApi.md#AddPet) | **POST** /pet | Add a new pet to the store
|
||||||
*::PetApi* | [**AddPetUsingByteArray**](docs/PetApi.md#AddPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
|
||||||
*::PetApi* | [**DeletePet**](docs/PetApi.md#DeletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
*::PetApi* | [**DeletePet**](docs/PetApi.md#DeletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||||
*::PetApi* | [**FindPetsByStatus**](docs/PetApi.md#FindPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
*::PetApi* | [**FindPetsByStatus**](docs/PetApi.md#FindPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||||
*::PetApi* | [**FindPetsByTags**](docs/PetApi.md#FindPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
*::PetApi* | [**FindPetsByTags**](docs/PetApi.md#FindPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||||
*::PetApi* | [**GetPetById**](docs/PetApi.md#GetPetById) | **GET** /pet/{petId} | Find pet by ID
|
*::PetApi* | [**GetPetById**](docs/PetApi.md#GetPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||||
*::PetApi* | [**GetPetByIdInObject**](docs/PetApi.md#GetPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
|
||||||
*::PetApi* | [**PetPetIdtestingByteArraytrueGet**](docs/PetApi.md#PetPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
|
||||||
*::PetApi* | [**UpdatePet**](docs/PetApi.md#UpdatePet) | **PUT** /pet | Update an existing pet
|
*::PetApi* | [**UpdatePet**](docs/PetApi.md#UpdatePet) | **PUT** /pet | Update an existing pet
|
||||||
*::PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#UpdatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
*::PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#UpdatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||||
*::PetApi* | [**UploadFile**](docs/PetApi.md#UploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
*::PetApi* | [**UploadFile**](docs/PetApi.md#UploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||||
*::StoreApi* | [**DeleteOrder**](docs/StoreApi.md#DeleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
*::StoreApi* | [**DeleteOrder**](docs/StoreApi.md#DeleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||||
*::StoreApi* | [**FindOrdersByStatus**](docs/StoreApi.md#FindOrdersByStatus) | **GET** /store/findByStatus | Finds orders by status
|
|
||||||
*::StoreApi* | [**GetInventory**](docs/StoreApi.md#GetInventory) | **GET** /store/inventory | Returns pet inventories by status
|
*::StoreApi* | [**GetInventory**](docs/StoreApi.md#GetInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||||
*::StoreApi* | [**GetInventoryInObject**](docs/StoreApi.md#GetInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
|
||||||
*::StoreApi* | [**GetOrderById**](docs/StoreApi.md#GetOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
*::StoreApi* | [**GetOrderById**](docs/StoreApi.md#GetOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||||
*::StoreApi* | [**PlaceOrder**](docs/StoreApi.md#PlaceOrder) | **POST** /store/order | Place an order for a pet
|
*::StoreApi* | [**PlaceOrder**](docs/StoreApi.md#PlaceOrder) | **POST** /store/order | Place an order for a pet
|
||||||
*::UserApi* | [**CreateUser**](docs/UserApi.md#CreateUser) | **POST** /user | Create user
|
*::UserApi* | [**CreateUser**](docs/UserApi.md#CreateUser) | **POST** /user | Create user
|
||||||
@@ -98,11 +93,11 @@ Class | Method | HTTP request | Description
|
|||||||
## Documentation for Models
|
## Documentation for Models
|
||||||
|
|
||||||
- [::Animal](docs/Animal.md)
|
- [::Animal](docs/Animal.md)
|
||||||
|
- [::ApiResponse](docs/ApiResponse.md)
|
||||||
- [::Cat](docs/Cat.md)
|
- [::Cat](docs/Cat.md)
|
||||||
- [::Category](docs/Category.md)
|
- [::Category](docs/Category.md)
|
||||||
- [::Dog](docs/Dog.md)
|
- [::Dog](docs/Dog.md)
|
||||||
- [::FormatTest](docs/FormatTest.md)
|
- [::FormatTest](docs/FormatTest.md)
|
||||||
- [::InlineResponse200](docs/InlineResponse200.md)
|
|
||||||
- [::Model200Response](docs/Model200Response.md)
|
- [::Model200Response](docs/Model200Response.md)
|
||||||
- [::ModelReturn](docs/ModelReturn.md)
|
- [::ModelReturn](docs/ModelReturn.md)
|
||||||
- [::Name](docs/Name.md)
|
- [::Name](docs/Name.md)
|
||||||
@@ -120,43 +115,15 @@ Class | Method | HTTP request | Description
|
|||||||
|
|
||||||
- **Type**: OAuth
|
- **Type**: OAuth
|
||||||
- **Flow**: implicit
|
- **Flow**: implicit
|
||||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
- **Authorizatoin URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||||
- **Scopes**:
|
- **Scopes**:
|
||||||
- write:pets: modify pets in your account
|
- write:pets: modify pets in your account
|
||||||
- read:pets: read your pets
|
- read:pets: read your pets
|
||||||
|
|
||||||
### test_api_client_id
|
|
||||||
|
|
||||||
- **Type**: API key
|
|
||||||
- **API key parameter name**: x-test_api_client_id
|
|
||||||
- **Location**: HTTP header
|
|
||||||
|
|
||||||
### test_api_client_secret
|
|
||||||
|
|
||||||
- **Type**: API key
|
|
||||||
- **API key parameter name**: x-test_api_client_secret
|
|
||||||
- **Location**: HTTP header
|
|
||||||
|
|
||||||
### api_key
|
### api_key
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key
|
- **API key parameter name**: api_key
|
||||||
- **Location**: HTTP header
|
- **Location**: HTTP header
|
||||||
|
|
||||||
### test_http_basic
|
|
||||||
|
|
||||||
- **Type**: HTTP basic authentication
|
|
||||||
|
|
||||||
### test_api_key_query
|
|
||||||
|
|
||||||
- **Type**: API key
|
|
||||||
- **API key parameter name**: test_api_key_query
|
|
||||||
- **Location**: URL query string
|
|
||||||
|
|
||||||
### test_api_key_header
|
|
||||||
|
|
||||||
- **Type**: API key
|
|
||||||
- **API key parameter name**: test_api_key_header
|
|
||||||
- **Location**: HTTP header
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# ApiResponse
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Code** | **int?** | | [optional]
|
||||||
|
**Type** | **string** | | [optional]
|
||||||
|
**Message** | **string** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
@@ -9,6 +9,6 @@ Name | Type | Description | Notes
|
|||||||
**Quantity** | **int?** | | [optional]
|
**Quantity** | **int?** | | [optional]
|
||||||
**ShipDate** | **DateTime?** | | [optional]
|
**ShipDate** | **DateTime?** | | [optional]
|
||||||
**Status** | **string** | Order Status | [optional]
|
**Status** | **string** | Order Status | [optional]
|
||||||
**Complete** | **bool?** | | [optional]
|
**Complete** | **bool?** | | [optional] [default to false]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,13 +5,10 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
|||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**AddPet**](PetApi.md#AddPet) | **POST** /pet | Add a new pet to the store
|
[**AddPet**](PetApi.md#AddPet) | **POST** /pet | Add a new pet to the store
|
||||||
[**AddPetUsingByteArray**](PetApi.md#AddPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
|
||||||
[**DeletePet**](PetApi.md#DeletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
[**DeletePet**](PetApi.md#DeletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||||
[**FindPetsByStatus**](PetApi.md#FindPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
[**FindPetsByStatus**](PetApi.md#FindPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||||
[**FindPetsByTags**](PetApi.md#FindPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
[**FindPetsByTags**](PetApi.md#FindPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||||
[**GetPetById**](PetApi.md#GetPetById) | **GET** /pet/{petId} | Find pet by ID
|
[**GetPetById**](PetApi.md#GetPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||||
[**GetPetByIdInObject**](PetApi.md#GetPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
|
||||||
[**PetPetIdtestingByteArraytrueGet**](PetApi.md#PetPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
|
||||||
[**UpdatePet**](PetApi.md#UpdatePet) | **PUT** /pet | Update an existing pet
|
[**UpdatePet**](PetApi.md#UpdatePet) | **PUT** /pet | Update an existing pet
|
||||||
[**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
[**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||||
[**UploadFile**](PetApi.md#UploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
[**UploadFile**](PetApi.md#UploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||||
@@ -58,7 +55,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -71,63 +68,7 @@ void (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json, application/xml
|
- **Content-Type**: application/json, application/xml
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
# **AddPetUsingByteArray**
|
|
||||||
> AddPetUsingByteArray(body)
|
|
||||||
|
|
||||||
Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
|
||||||
```csharp
|
|
||||||
using System;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using IO.Swagger.Api;
|
|
||||||
using IO.Swagger.Client;
|
|
||||||
using IO.Swagger.Module;
|
|
||||||
|
|
||||||
namespace Example
|
|
||||||
{
|
|
||||||
public class AddPetUsingByteArrayExample
|
|
||||||
{
|
|
||||||
public void main(){
|
|
||||||
|
|
||||||
// Configure OAuth2 access token for authorization: petstore_auth
|
|
||||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
|
||||||
|
|
||||||
var apiInstance = new PetApi();
|
|
||||||
var body = BINARY_DATA_HERE; // byte[] | Pet object in the form of byte array
|
|
||||||
|
|
||||||
try {
|
|
||||||
apiInstance.AddPetUsingByteArray(body);
|
|
||||||
} catch (Exception e) {
|
|
||||||
Debug.Print("Exception when calling PetApi.AddPetUsingByteArray: " + e.Message );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | **byte[]**| Pet object in the form of byte array | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
void (empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[petstore_auth](../README.md#petstore_auth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json, application/xml
|
|
||||||
- **Accept**: application/json, application/xml
|
|
||||||
|
|
||||||
# **DeletePet**
|
# **DeletePet**
|
||||||
> DeletePet(petId, apiKey)
|
> DeletePet(petId, apiKey)
|
||||||
@@ -185,7 +126,7 @@ void (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
# **FindPetsByStatus**
|
# **FindPetsByStatus**
|
||||||
> List<Pet> FindPetsByStatus(status)
|
> List<Pet> FindPetsByStatus(status)
|
||||||
@@ -212,7 +153,7 @@ namespace Example
|
|||||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
var apiInstance = new PetApi();
|
var apiInstance = new PetApi();
|
||||||
var status = new List<string>(); // List<string> | Status values that need to be considered for query
|
var status = new List<string>(); // List<string> | Status values that need to be considered for filter
|
||||||
|
|
||||||
try {
|
try {
|
||||||
List<Pet> result = apiInstance.FindPetsByStatus(status);
|
List<Pet> result = apiInstance.FindPetsByStatus(status);
|
||||||
@@ -229,7 +170,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**status** | [**List<string>**](string.md)| Status values that need to be considered for query | [optional] [default to available]
|
**status** | [**List<string>**](string.md)| Status values that need to be considered for filter |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -242,14 +183,14 @@ Name | Type | Description | Notes
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
# **FindPetsByTags**
|
# **FindPetsByTags**
|
||||||
> List<Pet> FindPetsByTags(tags)
|
> List<Pet> FindPetsByTags(tags)
|
||||||
|
|
||||||
Finds Pets by tags
|
Finds Pets by tags
|
||||||
|
|
||||||
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```csharp
|
```csharp
|
||||||
@@ -286,7 +227,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**tags** | [**List<string>**](string.md)| Tags to filter by | [optional]
|
**tags** | [**List<string>**](string.md)| Tags to filter by |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -299,14 +240,14 @@ Name | Type | Description | Notes
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
# **GetPetById**
|
# **GetPetById**
|
||||||
> Pet GetPetById(petId)
|
> Pet GetPetById(petId)
|
||||||
|
|
||||||
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 single pet
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```csharp
|
```csharp
|
||||||
@@ -322,15 +263,13 @@ namespace Example
|
|||||||
{
|
{
|
||||||
public void main(){
|
public void main(){
|
||||||
|
|
||||||
// Configure OAuth2 access token for authorization: petstore_auth
|
|
||||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
|
||||||
// Configure API key authorization: api_key
|
// Configure API key authorization: api_key
|
||||||
Configuration.Default.ApiKey.Add('api_key', 'YOUR_API_KEY');
|
Configuration.Default.ApiKey.Add('api_key', 'YOUR_API_KEY');
|
||||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||||
// Configuration.Default.ApiKeyPrefix.Add('api_key', 'BEARER');
|
// Configuration.Default.ApiKeyPrefix.Add('api_key', 'BEARER');
|
||||||
|
|
||||||
var apiInstance = new PetApi();
|
var apiInstance = new PetApi();
|
||||||
var petId = 789; // long? | ID of pet that needs to be fetched
|
var petId = 789; // long? | ID of pet to return
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Pet result = apiInstance.GetPetById(petId);
|
Pet result = apiInstance.GetPetById(petId);
|
||||||
@@ -347,7 +286,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**petId** | **long?**| ID of pet that needs to be fetched |
|
**petId** | **long?**| ID of pet to return |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -355,134 +294,12 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
|
[api_key](../README.md#api_key)
|
||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
# **GetPetByIdInObject**
|
|
||||||
> InlineResponse200 GetPetByIdInObject(petId)
|
|
||||||
|
|
||||||
Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
|
||||||
|
|
||||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
|
||||||
|
|
||||||
### Example
|
|
||||||
```csharp
|
|
||||||
using System;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using IO.Swagger.Api;
|
|
||||||
using IO.Swagger.Client;
|
|
||||||
using IO.Swagger.Module;
|
|
||||||
|
|
||||||
namespace Example
|
|
||||||
{
|
|
||||||
public class GetPetByIdInObjectExample
|
|
||||||
{
|
|
||||||
public void main(){
|
|
||||||
|
|
||||||
// Configure OAuth2 access token for authorization: petstore_auth
|
|
||||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
|
||||||
// Configure API key authorization: api_key
|
|
||||||
Configuration.Default.ApiKey.Add('api_key', 'YOUR_API_KEY');
|
|
||||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
|
||||||
// Configuration.Default.ApiKeyPrefix.Add('api_key', 'BEARER');
|
|
||||||
|
|
||||||
var apiInstance = new PetApi();
|
|
||||||
var petId = 789; // long? | ID of pet that needs to be fetched
|
|
||||||
|
|
||||||
try {
|
|
||||||
InlineResponse200 result = apiInstance.GetPetByIdInObject(petId);
|
|
||||||
Debug.WriteLine(result);
|
|
||||||
} catch (Exception e) {
|
|
||||||
Debug.Print("Exception when calling PetApi.GetPetByIdInObject: " + e.Message );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**petId** | **long?**| ID of pet that needs to be fetched |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**InlineResponse200**](InlineResponse200.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/json, application/xml
|
|
||||||
|
|
||||||
# **PetPetIdtestingByteArraytrueGet**
|
|
||||||
> byte[] PetPetIdtestingByteArraytrueGet(petId)
|
|
||||||
|
|
||||||
Fake endpoint to test byte array return by 'Find pet by ID'
|
|
||||||
|
|
||||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
|
||||||
|
|
||||||
### Example
|
|
||||||
```csharp
|
|
||||||
using System;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using IO.Swagger.Api;
|
|
||||||
using IO.Swagger.Client;
|
|
||||||
using IO.Swagger.Module;
|
|
||||||
|
|
||||||
namespace Example
|
|
||||||
{
|
|
||||||
public class PetPetIdtestingByteArraytrueGetExample
|
|
||||||
{
|
|
||||||
public void main(){
|
|
||||||
|
|
||||||
// Configure OAuth2 access token for authorization: petstore_auth
|
|
||||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
|
||||||
// Configure API key authorization: api_key
|
|
||||||
Configuration.Default.ApiKey.Add('api_key', 'YOUR_API_KEY');
|
|
||||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
|
||||||
// Configuration.Default.ApiKeyPrefix.Add('api_key', 'BEARER');
|
|
||||||
|
|
||||||
var apiInstance = new PetApi();
|
|
||||||
var petId = 789; // long? | ID of pet that needs to be fetched
|
|
||||||
|
|
||||||
try {
|
|
||||||
byte[] result = apiInstance.PetPetIdtestingByteArraytrueGet(petId);
|
|
||||||
Debug.WriteLine(result);
|
|
||||||
} catch (Exception e) {
|
|
||||||
Debug.Print("Exception when calling PetApi.PetPetIdtestingByteArraytrueGet: " + e.Message );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**petId** | **long?**| ID of pet that needs to be fetched |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
**byte[]**
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/json, application/xml
|
|
||||||
|
|
||||||
# **UpdatePet**
|
# **UpdatePet**
|
||||||
> UpdatePet(body)
|
> UpdatePet(body)
|
||||||
@@ -525,7 +342,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -538,7 +355,7 @@ void (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json, application/xml
|
- **Content-Type**: application/json, application/xml
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
# **UpdatePetWithForm**
|
# **UpdatePetWithForm**
|
||||||
> UpdatePetWithForm(petId, name, status)
|
> UpdatePetWithForm(petId, name, status)
|
||||||
@@ -565,7 +382,7 @@ namespace Example
|
|||||||
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
var apiInstance = new PetApi();
|
var apiInstance = new PetApi();
|
||||||
var petId = petId_example; // string | ID of pet that needs to be updated
|
var petId = 789; // long? | ID of pet that needs to be updated
|
||||||
var name = name_example; // string | Updated name of the pet
|
var name = name_example; // string | Updated name of the pet
|
||||||
var status = status_example; // string | Updated status of the pet
|
var status = status_example; // string | Updated status of the pet
|
||||||
|
|
||||||
@@ -583,7 +400,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**petId** | **string**| ID of pet that needs to be updated |
|
**petId** | **long?**| ID of pet that needs to be updated |
|
||||||
**name** | **string**| Updated name of the pet | [optional]
|
**name** | **string**| Updated name of the pet | [optional]
|
||||||
**status** | **string**| Updated status of the pet | [optional]
|
**status** | **string**| Updated status of the pet | [optional]
|
||||||
|
|
||||||
@@ -598,10 +415,10 @@ void (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/x-www-form-urlencoded
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
# **UploadFile**
|
# **UploadFile**
|
||||||
> UploadFile(petId, additionalMetadata, file)
|
> ApiResponse UploadFile(petId, additionalMetadata, file)
|
||||||
|
|
||||||
uploads an image
|
uploads an image
|
||||||
|
|
||||||
@@ -630,7 +447,8 @@ namespace Example
|
|||||||
var file = new Stream(); // Stream | file to upload
|
var file = new Stream(); // Stream | file to upload
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInstance.UploadFile(petId, additionalMetadata, file);
|
ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file);
|
||||||
|
Debug.WriteLine(result);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message );
|
Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message );
|
||||||
}
|
}
|
||||||
@@ -649,7 +467,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
void (empty response body)
|
[**ApiResponse**](ApiResponse.md)
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
@@ -658,5 +476,5 @@ void (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: multipart/form-data
|
- **Content-Type**: multipart/form-data
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,7 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
|||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**DeleteOrder**](StoreApi.md#DeleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
[**DeleteOrder**](StoreApi.md#DeleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||||
[**FindOrdersByStatus**](StoreApi.md#FindOrdersByStatus) | **GET** /store/findByStatus | Finds orders by status
|
|
||||||
[**GetInventory**](StoreApi.md#GetInventory) | **GET** /store/inventory | Returns pet inventories by status
|
[**GetInventory**](StoreApi.md#GetInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||||
[**GetInventoryInObject**](StoreApi.md#GetInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
|
||||||
[**GetOrderById**](StoreApi.md#GetOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
[**GetOrderById**](StoreApi.md#GetOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||||
[**PlaceOrder**](StoreApi.md#PlaceOrder) | **POST** /store/order | Place an order for a pet
|
[**PlaceOrder**](StoreApi.md#PlaceOrder) | **POST** /store/order | Place an order for a pet
|
||||||
|
|
||||||
@@ -63,70 +61,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
# **FindOrdersByStatus**
|
|
||||||
> List<Order> FindOrdersByStatus(status)
|
|
||||||
|
|
||||||
Finds orders by status
|
|
||||||
|
|
||||||
A single status value can be provided as a string
|
|
||||||
|
|
||||||
### Example
|
|
||||||
```csharp
|
|
||||||
using System;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using IO.Swagger.Api;
|
|
||||||
using IO.Swagger.Client;
|
|
||||||
using IO.Swagger.Module;
|
|
||||||
|
|
||||||
namespace Example
|
|
||||||
{
|
|
||||||
public class FindOrdersByStatusExample
|
|
||||||
{
|
|
||||||
public void main(){
|
|
||||||
|
|
||||||
// Configure API key authorization: test_api_client_id
|
|
||||||
Configuration.Default.ApiKey.Add('x-test_api_client_id', 'YOUR_API_KEY');
|
|
||||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
|
||||||
// Configuration.Default.ApiKeyPrefix.Add('x-test_api_client_id', 'BEARER');
|
|
||||||
// Configure API key authorization: test_api_client_secret
|
|
||||||
Configuration.Default.ApiKey.Add('x-test_api_client_secret', 'YOUR_API_KEY');
|
|
||||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
|
||||||
// Configuration.Default.ApiKeyPrefix.Add('x-test_api_client_secret', 'BEARER');
|
|
||||||
|
|
||||||
var apiInstance = new StoreApi();
|
|
||||||
var status = status_example; // string | Status value that needs to be considered for query
|
|
||||||
|
|
||||||
try {
|
|
||||||
List<Order> result = apiInstance.FindOrdersByStatus(status);
|
|
||||||
Debug.WriteLine(result);
|
|
||||||
} catch (Exception e) {
|
|
||||||
Debug.Print("Exception when calling StoreApi.FindOrdersByStatus: " + e.Message );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**status** | **string**| Status value that needs to be considered for query | [optional] [default to placed]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**List<Order>**](Order.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/json, application/xml
|
|
||||||
|
|
||||||
# **GetInventory**
|
# **GetInventory**
|
||||||
> Dictionary<string, int?> GetInventory()
|
> Dictionary<string, int?> GetInventory()
|
||||||
@@ -181,62 +116,7 @@ This endpoint does not need any parameter.
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/json
|
||||||
|
|
||||||
# **GetInventoryInObject**
|
|
||||||
> Object GetInventoryInObject()
|
|
||||||
|
|
||||||
Fake endpoint to test arbitrary object return by 'Get inventory'
|
|
||||||
|
|
||||||
Returns an arbitrary object which is actually a map of status codes to quantities
|
|
||||||
|
|
||||||
### Example
|
|
||||||
```csharp
|
|
||||||
using System;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using IO.Swagger.Api;
|
|
||||||
using IO.Swagger.Client;
|
|
||||||
using IO.Swagger.Module;
|
|
||||||
|
|
||||||
namespace Example
|
|
||||||
{
|
|
||||||
public class GetInventoryInObjectExample
|
|
||||||
{
|
|
||||||
public void main(){
|
|
||||||
|
|
||||||
// Configure API key authorization: api_key
|
|
||||||
Configuration.Default.ApiKey.Add('api_key', 'YOUR_API_KEY');
|
|
||||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
|
||||||
// Configuration.Default.ApiKeyPrefix.Add('api_key', 'BEARER');
|
|
||||||
|
|
||||||
var apiInstance = new StoreApi();
|
|
||||||
|
|
||||||
try {
|
|
||||||
Object result = apiInstance.GetInventoryInObject();
|
|
||||||
Debug.WriteLine(result);
|
|
||||||
} catch (Exception e) {
|
|
||||||
Debug.Print("Exception when calling StoreApi.GetInventoryInObject: " + e.Message );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
This endpoint does not need any parameter.
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
**Object**
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[api_key](../README.md#api_key)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/json, application/xml
|
|
||||||
|
|
||||||
# **GetOrderById**
|
# **GetOrderById**
|
||||||
> Order GetOrderById(orderId)
|
> Order GetOrderById(orderId)
|
||||||
@@ -259,17 +139,8 @@ namespace Example
|
|||||||
{
|
{
|
||||||
public void main(){
|
public void main(){
|
||||||
|
|
||||||
// Configure API key authorization: test_api_key_query
|
|
||||||
Configuration.Default.ApiKey.Add('test_api_key_query', 'YOUR_API_KEY');
|
|
||||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
|
||||||
// Configuration.Default.ApiKeyPrefix.Add('test_api_key_query', 'BEARER');
|
|
||||||
// Configure API key authorization: test_api_key_header
|
|
||||||
Configuration.Default.ApiKey.Add('test_api_key_header', 'YOUR_API_KEY');
|
|
||||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
|
||||||
// Configuration.Default.ApiKeyPrefix.Add('test_api_key_header', 'BEARER');
|
|
||||||
|
|
||||||
var apiInstance = new StoreApi();
|
var apiInstance = new StoreApi();
|
||||||
var orderId = orderId_example; // string | ID of pet that needs to be fetched
|
var orderId = 789; // long? | ID of pet that needs to be fetched
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Order result = apiInstance.GetOrderById(orderId);
|
Order result = apiInstance.GetOrderById(orderId);
|
||||||
@@ -286,7 +157,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**orderId** | **string**| ID of pet that needs to be fetched |
|
**orderId** | **long?**| ID of pet that needs to be fetched |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -294,12 +165,12 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
[test_api_key_query](../README.md#test_api_key_query), [test_api_key_header](../README.md#test_api_key_header)
|
No authorization required
|
||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
# **PlaceOrder**
|
# **PlaceOrder**
|
||||||
> Order PlaceOrder(body)
|
> Order PlaceOrder(body)
|
||||||
@@ -322,15 +193,6 @@ namespace Example
|
|||||||
{
|
{
|
||||||
public void main(){
|
public void main(){
|
||||||
|
|
||||||
// Configure API key authorization: test_api_client_id
|
|
||||||
Configuration.Default.ApiKey.Add('x-test_api_client_id', 'YOUR_API_KEY');
|
|
||||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
|
||||||
// Configuration.Default.ApiKeyPrefix.Add('x-test_api_client_id', 'BEARER');
|
|
||||||
// Configure API key authorization: test_api_client_secret
|
|
||||||
Configuration.Default.ApiKey.Add('x-test_api_client_secret', 'YOUR_API_KEY');
|
|
||||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
|
||||||
// Configuration.Default.ApiKeyPrefix.Add('x-test_api_client_secret', 'BEARER');
|
|
||||||
|
|
||||||
var apiInstance = new StoreApi();
|
var apiInstance = new StoreApi();
|
||||||
var body = new Order(); // Order | order placed for purchasing the pet
|
var body = new Order(); // Order | order placed for purchasing the pet
|
||||||
|
|
||||||
@@ -349,7 +211,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet | [optional]
|
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -357,10 +219,10 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
No authorization required
|
||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**User**](User.md)| Created user object | [optional]
|
**body** | [**User**](User.md)| Created user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
# **CreateUsersWithArrayInput**
|
# **CreateUsersWithArrayInput**
|
||||||
> CreateUsersWithArrayInput(body)
|
> CreateUsersWithArrayInput(body)
|
||||||
@@ -105,7 +105,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**List<User>**](User.md)| List of user object | [optional]
|
**body** | [**List<User>**](User.md)| List of user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
# **CreateUsersWithListInput**
|
# **CreateUsersWithListInput**
|
||||||
> CreateUsersWithListInput(body)
|
> CreateUsersWithListInput(body)
|
||||||
@@ -158,7 +158,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**List<User>**](User.md)| List of user object | [optional]
|
**body** | [**List<User>**](User.md)| List of user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
# **DeleteUser**
|
# **DeleteUser**
|
||||||
> DeleteUser(username)
|
> DeleteUser(username)
|
||||||
@@ -194,10 +194,6 @@ namespace Example
|
|||||||
{
|
{
|
||||||
public void main(){
|
public void main(){
|
||||||
|
|
||||||
// Configure HTTP basic authorization: test_http_basic
|
|
||||||
Configuration.Default.Username = 'YOUR_USERNAME';
|
|
||||||
Configuration.Default.Password = 'YOUR_PASSWORD';
|
|
||||||
|
|
||||||
var apiInstance = new UserApi();
|
var apiInstance = new UserApi();
|
||||||
var username = username_example; // string | The name that needs to be deleted
|
var username = username_example; // string | The name that needs to be deleted
|
||||||
|
|
||||||
@@ -223,12 +219,12 @@ void (empty response body)
|
|||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
[test_http_basic](../README.md#test_http_basic)
|
No authorization required
|
||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
# **GetUserByName**
|
# **GetUserByName**
|
||||||
> User GetUserByName(username)
|
> User GetUserByName(username)
|
||||||
@@ -282,7 +278,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
# **LoginUser**
|
# **LoginUser**
|
||||||
> string LoginUser(username, password)
|
> string LoginUser(username, password)
|
||||||
@@ -324,8 +320,8 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**username** | **string**| The user name for login | [optional]
|
**username** | **string**| The user name for login |
|
||||||
**password** | **string**| The password for login in clear text | [optional]
|
**password** | **string**| The password for login in clear text |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -338,7 +334,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
# **LogoutUser**
|
# **LogoutUser**
|
||||||
> LogoutUser()
|
> LogoutUser()
|
||||||
@@ -387,7 +383,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
# **UpdateUser**
|
# **UpdateUser**
|
||||||
> UpdateUser(username, body)
|
> UpdateUser(username, body)
|
||||||
@@ -429,7 +425,7 @@ namespace Example
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**username** | **string**| name that need to be deleted |
|
**username** | **string**| name that need to be deleted |
|
||||||
**body** | [**User**](User.md)| Updated user object | [optional]
|
**body** | [**User**](User.md)| Updated user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -442,5 +438,5 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -37,27 +37,6 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns>ApiResponse of Object(void)</returns>
|
/// <returns>ApiResponse of Object(void)</returns>
|
||||||
ApiResponse<Object> DeleteOrderWithHttpInfo (string orderId);
|
ApiResponse<Object> DeleteOrderWithHttpInfo (string orderId);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Finds orders by status
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// A single status value can be provided as a string
|
|
||||||
/// </remarks>
|
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
|
||||||
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
|
|
||||||
/// <returns>List<Order></returns>
|
|
||||||
List<Order> FindOrdersByStatus (string status = null);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Finds orders by status
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// A single status value can be provided as a string
|
|
||||||
/// </remarks>
|
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
|
||||||
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
|
|
||||||
/// <returns>ApiResponse of List<Order></returns>
|
|
||||||
ApiResponse<List<Order>> FindOrdersByStatusWithHttpInfo (string status = null);
|
|
||||||
/// <summary>
|
|
||||||
/// Returns pet inventories by status
|
/// Returns pet inventories by status
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
@@ -77,25 +56,6 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns>ApiResponse of Dictionary<string, int?></returns>
|
/// <returns>ApiResponse of Dictionary<string, int?></returns>
|
||||||
ApiResponse<Dictionary<string, int?>> GetInventoryWithHttpInfo ();
|
ApiResponse<Dictionary<string, int?>> GetInventoryWithHttpInfo ();
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fake endpoint to test arbitrary object return by 'Get inventory'
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Returns an arbitrary object which is actually a map of status codes to quantities
|
|
||||||
/// </remarks>
|
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
|
||||||
/// <returns>Object</returns>
|
|
||||||
Object GetInventoryInObject ();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Fake endpoint to test arbitrary object return by 'Get inventory'
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Returns an arbitrary object which is actually a map of status codes to quantities
|
|
||||||
/// </remarks>
|
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
|
||||||
/// <returns>ApiResponse of Object</returns>
|
|
||||||
ApiResponse<Object> GetInventoryInObjectWithHttpInfo ();
|
|
||||||
/// <summary>
|
|
||||||
/// Find purchase order by ID
|
/// Find purchase order by ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
@@ -104,7 +64,7 @@ namespace IO.Swagger.Api
|
|||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||||
/// <returns>Order</returns>
|
/// <returns>Order</returns>
|
||||||
Order GetOrderById (string orderId);
|
Order GetOrderById (long? orderId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Find purchase order by ID
|
/// Find purchase order by ID
|
||||||
@@ -115,7 +75,7 @@ namespace IO.Swagger.Api
|
|||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||||
/// <returns>ApiResponse of Order</returns>
|
/// <returns>ApiResponse of Order</returns>
|
||||||
ApiResponse<Order> GetOrderByIdWithHttpInfo (string orderId);
|
ApiResponse<Order> GetOrderByIdWithHttpInfo (long? orderId);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Place an order for a pet
|
/// Place an order for a pet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -123,9 +83,9 @@ namespace IO.Swagger.Api
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">order placed for purchasing the pet (optional)</param>
|
/// <param name="body">order placed for purchasing the pet</param>
|
||||||
/// <returns>Order</returns>
|
/// <returns>Order</returns>
|
||||||
Order PlaceOrder (Order body = null);
|
Order PlaceOrder (Order body);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Place an order for a pet
|
/// Place an order for a pet
|
||||||
@@ -134,9 +94,9 @@ namespace IO.Swagger.Api
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">order placed for purchasing the pet (optional)</param>
|
/// <param name="body">order placed for purchasing the pet</param>
|
||||||
/// <returns>ApiResponse of Order</returns>
|
/// <returns>ApiResponse of Order</returns>
|
||||||
ApiResponse<Order> PlaceOrderWithHttpInfo (Order body = null);
|
ApiResponse<Order> PlaceOrderWithHttpInfo (Order body);
|
||||||
#endregion Synchronous Operations
|
#endregion Synchronous Operations
|
||||||
#region Asynchronous Operations
|
#region Asynchronous Operations
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -161,27 +121,6 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns>Task of ApiResponse</returns>
|
/// <returns>Task of ApiResponse</returns>
|
||||||
System.Threading.Tasks.Task<ApiResponse<Object>> DeleteOrderAsyncWithHttpInfo (string orderId);
|
System.Threading.Tasks.Task<ApiResponse<Object>> DeleteOrderAsyncWithHttpInfo (string orderId);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Finds orders by status
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// A single status value can be provided as a string
|
|
||||||
/// </remarks>
|
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
|
||||||
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
|
|
||||||
/// <returns>Task of List<Order></returns>
|
|
||||||
System.Threading.Tasks.Task<List<Order>> FindOrdersByStatusAsync (string status = null);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Finds orders by status
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// A single status value can be provided as a string
|
|
||||||
/// </remarks>
|
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
|
||||||
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
|
|
||||||
/// <returns>Task of ApiResponse (List<Order>)</returns>
|
|
||||||
System.Threading.Tasks.Task<ApiResponse<List<Order>>> FindOrdersByStatusAsyncWithHttpInfo (string status = null);
|
|
||||||
/// <summary>
|
|
||||||
/// Returns pet inventories by status
|
/// Returns pet inventories by status
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
@@ -201,25 +140,6 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns>Task of ApiResponse (Dictionary<string, int?>)</returns>
|
/// <returns>Task of ApiResponse (Dictionary<string, int?>)</returns>
|
||||||
System.Threading.Tasks.Task<ApiResponse<Dictionary<string, int?>>> GetInventoryAsyncWithHttpInfo ();
|
System.Threading.Tasks.Task<ApiResponse<Dictionary<string, int?>>> GetInventoryAsyncWithHttpInfo ();
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fake endpoint to test arbitrary object return by 'Get inventory'
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Returns an arbitrary object which is actually a map of status codes to quantities
|
|
||||||
/// </remarks>
|
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
|
||||||
/// <returns>Task of Object</returns>
|
|
||||||
System.Threading.Tasks.Task<Object> GetInventoryInObjectAsync ();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Fake endpoint to test arbitrary object return by 'Get inventory'
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Returns an arbitrary object which is actually a map of status codes to quantities
|
|
||||||
/// </remarks>
|
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
|
||||||
/// <returns>Task of ApiResponse (Object)</returns>
|
|
||||||
System.Threading.Tasks.Task<ApiResponse<Object>> GetInventoryInObjectAsyncWithHttpInfo ();
|
|
||||||
/// <summary>
|
|
||||||
/// Find purchase order by ID
|
/// Find purchase order by ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
@@ -228,7 +148,7 @@ namespace IO.Swagger.Api
|
|||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||||
/// <returns>Task of Order</returns>
|
/// <returns>Task of Order</returns>
|
||||||
System.Threading.Tasks.Task<Order> GetOrderByIdAsync (string orderId);
|
System.Threading.Tasks.Task<Order> GetOrderByIdAsync (long? orderId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Find purchase order by ID
|
/// Find purchase order by ID
|
||||||
@@ -239,7 +159,7 @@ namespace IO.Swagger.Api
|
|||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||||
/// <returns>Task of ApiResponse (Order)</returns>
|
/// <returns>Task of ApiResponse (Order)</returns>
|
||||||
System.Threading.Tasks.Task<ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (string orderId);
|
System.Threading.Tasks.Task<ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (long? orderId);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Place an order for a pet
|
/// Place an order for a pet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -247,9 +167,9 @@ namespace IO.Swagger.Api
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">order placed for purchasing the pet (optional)</param>
|
/// <param name="body">order placed for purchasing the pet</param>
|
||||||
/// <returns>Task of Order</returns>
|
/// <returns>Task of Order</returns>
|
||||||
System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body = null);
|
System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Place an order for a pet
|
/// Place an order for a pet
|
||||||
@@ -258,9 +178,9 @@ namespace IO.Swagger.Api
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">order placed for purchasing the pet (optional)</param>
|
/// <param name="body">order placed for purchasing the pet</param>
|
||||||
/// <returns>Task of ApiResponse (Order)</returns>
|
/// <returns>Task of ApiResponse (Order)</returns>
|
||||||
System.Threading.Tasks.Task<ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body = null);
|
System.Threading.Tasks.Task<ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body);
|
||||||
#endregion Asynchronous Operations
|
#endregion Asynchronous Operations
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -389,8 +309,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -459,8 +379,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -490,163 +410,6 @@ namespace IO.Swagger.Api
|
|||||||
null);
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Finds orders by status A single status value can be provided as a string
|
|
||||||
/// </summary>
|
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
|
||||||
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
|
|
||||||
/// <returns>List<Order></returns>
|
|
||||||
public List<Order> FindOrdersByStatus (string status = null)
|
|
||||||
{
|
|
||||||
ApiResponse<List<Order>> localVarResponse = FindOrdersByStatusWithHttpInfo(status);
|
|
||||||
return localVarResponse.Data;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Finds orders by status A single status value can be provided as a string
|
|
||||||
/// </summary>
|
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
|
||||||
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
|
|
||||||
/// <returns>ApiResponse of List<Order></returns>
|
|
||||||
public ApiResponse< List<Order> > FindOrdersByStatusWithHttpInfo (string status = null)
|
|
||||||
{
|
|
||||||
|
|
||||||
var localVarPath = "/store/findByStatus";
|
|
||||||
var localVarPathParams = new Dictionary<String, String>();
|
|
||||||
var localVarQueryParams = new Dictionary<String, String>();
|
|
||||||
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
|
||||||
var localVarFormParams = new Dictionary<String, String>();
|
|
||||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
|
||||||
Object localVarPostBody = null;
|
|
||||||
|
|
||||||
// to determine the Content-Type header
|
|
||||||
String[] localVarHttpContentTypes = new String[] {
|
|
||||||
};
|
|
||||||
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
|
||||||
|
|
||||||
// to determine the Accept header
|
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
|
||||||
"application/json",
|
|
||||||
"application/xml"
|
|
||||||
};
|
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
|
||||||
if (localVarHttpHeaderAccept != null)
|
|
||||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
|
||||||
|
|
||||||
// set "format" to json by default
|
|
||||||
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
|
|
||||||
localVarPathParams.Add("format", "json");
|
|
||||||
if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter
|
|
||||||
|
|
||||||
// authentication (test_api_client_id) required
|
|
||||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_id")))
|
|
||||||
{
|
|
||||||
localVarHeaderParams["x-test_api_client_id"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_id");
|
|
||||||
}
|
|
||||||
|
|
||||||
// authentication (test_api_client_secret) required
|
|
||||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_secret")))
|
|
||||||
{
|
|
||||||
localVarHeaderParams["x-test_api_client_secret"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_secret");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// make the HTTP request
|
|
||||||
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
|
||||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
|
||||||
localVarPathParams, localVarHttpContentType);
|
|
||||||
|
|
||||||
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
|
||||||
|
|
||||||
if (localVarStatusCode >= 400)
|
|
||||||
throw new ApiException (localVarStatusCode, "Error calling FindOrdersByStatus: " + localVarResponse.Content, localVarResponse.Content);
|
|
||||||
else if (localVarStatusCode == 0)
|
|
||||||
throw new ApiException (localVarStatusCode, "Error calling FindOrdersByStatus: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage);
|
|
||||||
|
|
||||||
return new ApiResponse<List<Order>>(localVarStatusCode,
|
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
|
||||||
(List<Order>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Order>)));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Finds orders by status A single status value can be provided as a string
|
|
||||||
/// </summary>
|
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
|
||||||
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
|
|
||||||
/// <returns>Task of List<Order></returns>
|
|
||||||
public async System.Threading.Tasks.Task<List<Order>> FindOrdersByStatusAsync (string status = null)
|
|
||||||
{
|
|
||||||
ApiResponse<List<Order>> localVarResponse = await FindOrdersByStatusAsyncWithHttpInfo(status);
|
|
||||||
return localVarResponse.Data;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Finds orders by status A single status value can be provided as a string
|
|
||||||
/// </summary>
|
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
|
||||||
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
|
|
||||||
/// <returns>Task of ApiResponse (List<Order>)</returns>
|
|
||||||
public async System.Threading.Tasks.Task<ApiResponse<List<Order>>> FindOrdersByStatusAsyncWithHttpInfo (string status = null)
|
|
||||||
{
|
|
||||||
|
|
||||||
var localVarPath = "/store/findByStatus";
|
|
||||||
var localVarPathParams = new Dictionary<String, String>();
|
|
||||||
var localVarQueryParams = new Dictionary<String, String>();
|
|
||||||
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
|
||||||
var localVarFormParams = new Dictionary<String, String>();
|
|
||||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
|
||||||
Object localVarPostBody = null;
|
|
||||||
|
|
||||||
// to determine the Content-Type header
|
|
||||||
String[] localVarHttpContentTypes = new String[] {
|
|
||||||
};
|
|
||||||
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
|
||||||
|
|
||||||
// to determine the Accept header
|
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
|
||||||
"application/json",
|
|
||||||
"application/xml"
|
|
||||||
};
|
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
|
||||||
if (localVarHttpHeaderAccept != null)
|
|
||||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
|
||||||
|
|
||||||
// set "format" to json by default
|
|
||||||
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
|
|
||||||
localVarPathParams.Add("format", "json");
|
|
||||||
if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter
|
|
||||||
|
|
||||||
// authentication (test_api_client_id) required
|
|
||||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_id")))
|
|
||||||
{
|
|
||||||
localVarHeaderParams["x-test_api_client_id"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_id");
|
|
||||||
}
|
|
||||||
// authentication (test_api_client_secret) required
|
|
||||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_secret")))
|
|
||||||
{
|
|
||||||
localVarHeaderParams["x-test_api_client_secret"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_secret");
|
|
||||||
}
|
|
||||||
|
|
||||||
// make the HTTP request
|
|
||||||
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
|
||||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
|
||||||
localVarPathParams, localVarHttpContentType);
|
|
||||||
|
|
||||||
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
|
||||||
|
|
||||||
if (localVarStatusCode >= 400)
|
|
||||||
throw new ApiException (localVarStatusCode, "Error calling FindOrdersByStatus: " + localVarResponse.Content, localVarResponse.Content);
|
|
||||||
else if (localVarStatusCode == 0)
|
|
||||||
throw new ApiException (localVarStatusCode, "Error calling FindOrdersByStatus: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage);
|
|
||||||
|
|
||||||
return new ApiResponse<List<Order>>(localVarStatusCode,
|
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
|
||||||
(List<Order>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Order>)));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -681,8 +444,7 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/json"
|
||||||
"application/xml"
|
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -752,8 +514,7 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/json"
|
||||||
"application/xml"
|
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -787,153 +548,13 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Fake endpoint to test arbitrary object return by 'Get inventory' Returns an arbitrary object which is actually a map of status codes to quantities
|
|
||||||
/// </summary>
|
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
|
||||||
/// <returns>Object</returns>
|
|
||||||
public Object GetInventoryInObject ()
|
|
||||||
{
|
|
||||||
ApiResponse<Object> localVarResponse = GetInventoryInObjectWithHttpInfo();
|
|
||||||
return localVarResponse.Data;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Fake endpoint to test arbitrary object return by 'Get inventory' Returns an arbitrary object which is actually a map of status codes to quantities
|
|
||||||
/// </summary>
|
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
|
||||||
/// <returns>ApiResponse of Object</returns>
|
|
||||||
public ApiResponse< Object > GetInventoryInObjectWithHttpInfo ()
|
|
||||||
{
|
|
||||||
|
|
||||||
var localVarPath = "/store/inventory?response=arbitrary_object";
|
|
||||||
var localVarPathParams = new Dictionary<String, String>();
|
|
||||||
var localVarQueryParams = new Dictionary<String, String>();
|
|
||||||
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
|
||||||
var localVarFormParams = new Dictionary<String, String>();
|
|
||||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
|
||||||
Object localVarPostBody = null;
|
|
||||||
|
|
||||||
// to determine the Content-Type header
|
|
||||||
String[] localVarHttpContentTypes = new String[] {
|
|
||||||
};
|
|
||||||
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
|
||||||
|
|
||||||
// to determine the Accept header
|
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
|
||||||
"application/json",
|
|
||||||
"application/xml"
|
|
||||||
};
|
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
|
||||||
if (localVarHttpHeaderAccept != null)
|
|
||||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
|
||||||
|
|
||||||
// set "format" to json by default
|
|
||||||
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
|
|
||||||
localVarPathParams.Add("format", "json");
|
|
||||||
|
|
||||||
// authentication (api_key) required
|
|
||||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
|
||||||
{
|
|
||||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// make the HTTP request
|
|
||||||
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
|
||||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
|
||||||
localVarPathParams, localVarHttpContentType);
|
|
||||||
|
|
||||||
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
|
||||||
|
|
||||||
if (localVarStatusCode >= 400)
|
|
||||||
throw new ApiException (localVarStatusCode, "Error calling GetInventoryInObject: " + localVarResponse.Content, localVarResponse.Content);
|
|
||||||
else if (localVarStatusCode == 0)
|
|
||||||
throw new ApiException (localVarStatusCode, "Error calling GetInventoryInObject: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage);
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
|
||||||
(Object) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object)));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Fake endpoint to test arbitrary object return by 'Get inventory' Returns an arbitrary object which is actually a map of status codes to quantities
|
|
||||||
/// </summary>
|
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
|
||||||
/// <returns>Task of Object</returns>
|
|
||||||
public async System.Threading.Tasks.Task<Object> GetInventoryInObjectAsync ()
|
|
||||||
{
|
|
||||||
ApiResponse<Object> localVarResponse = await GetInventoryInObjectAsyncWithHttpInfo();
|
|
||||||
return localVarResponse.Data;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Fake endpoint to test arbitrary object return by 'Get inventory' Returns an arbitrary object which is actually a map of status codes to quantities
|
|
||||||
/// </summary>
|
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
|
||||||
/// <returns>Task of ApiResponse (Object)</returns>
|
|
||||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> GetInventoryInObjectAsyncWithHttpInfo ()
|
|
||||||
{
|
|
||||||
|
|
||||||
var localVarPath = "/store/inventory?response=arbitrary_object";
|
|
||||||
var localVarPathParams = new Dictionary<String, String>();
|
|
||||||
var localVarQueryParams = new Dictionary<String, String>();
|
|
||||||
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
|
||||||
var localVarFormParams = new Dictionary<String, String>();
|
|
||||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
|
||||||
Object localVarPostBody = null;
|
|
||||||
|
|
||||||
// to determine the Content-Type header
|
|
||||||
String[] localVarHttpContentTypes = new String[] {
|
|
||||||
};
|
|
||||||
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
|
||||||
|
|
||||||
// to determine the Accept header
|
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
|
||||||
"application/json",
|
|
||||||
"application/xml"
|
|
||||||
};
|
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
|
||||||
if (localVarHttpHeaderAccept != null)
|
|
||||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
|
||||||
|
|
||||||
// set "format" to json by default
|
|
||||||
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
|
|
||||||
localVarPathParams.Add("format", "json");
|
|
||||||
|
|
||||||
// authentication (api_key) required
|
|
||||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
|
||||||
{
|
|
||||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
|
||||||
}
|
|
||||||
|
|
||||||
// make the HTTP request
|
|
||||||
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
|
||||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
|
||||||
localVarPathParams, localVarHttpContentType);
|
|
||||||
|
|
||||||
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
|
||||||
|
|
||||||
if (localVarStatusCode >= 400)
|
|
||||||
throw new ApiException (localVarStatusCode, "Error calling GetInventoryInObject: " + localVarResponse.Content, localVarResponse.Content);
|
|
||||||
else if (localVarStatusCode == 0)
|
|
||||||
throw new ApiException (localVarStatusCode, "Error calling GetInventoryInObject: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage);
|
|
||||||
|
|
||||||
return new ApiResponse<Object>(localVarStatusCode,
|
|
||||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
|
||||||
(Object) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object)));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||||
/// <returns>Order</returns>
|
/// <returns>Order</returns>
|
||||||
public Order GetOrderById (string orderId)
|
public Order GetOrderById (long? orderId)
|
||||||
{
|
{
|
||||||
ApiResponse<Order> localVarResponse = GetOrderByIdWithHttpInfo(orderId);
|
ApiResponse<Order> localVarResponse = GetOrderByIdWithHttpInfo(orderId);
|
||||||
return localVarResponse.Data;
|
return localVarResponse.Data;
|
||||||
@@ -945,7 +566,7 @@ namespace IO.Swagger.Api
|
|||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||||
/// <returns>ApiResponse of Order</returns>
|
/// <returns>ApiResponse of Order</returns>
|
||||||
public ApiResponse< Order > GetOrderByIdWithHttpInfo (string orderId)
|
public ApiResponse< Order > GetOrderByIdWithHttpInfo (long? orderId)
|
||||||
{
|
{
|
||||||
// verify the required parameter 'orderId' is set
|
// verify the required parameter 'orderId' is set
|
||||||
if (orderId == null)
|
if (orderId == null)
|
||||||
@@ -966,8 +587,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -978,18 +599,6 @@ namespace IO.Swagger.Api
|
|||||||
localVarPathParams.Add("format", "json");
|
localVarPathParams.Add("format", "json");
|
||||||
if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter
|
if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter
|
||||||
|
|
||||||
// authentication (test_api_key_query) required
|
|
||||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_query")))
|
|
||||||
{
|
|
||||||
localVarQueryParams["test_api_key_query"] = Configuration.GetApiKeyWithPrefix("test_api_key_query");
|
|
||||||
}
|
|
||||||
|
|
||||||
// authentication (test_api_key_header) required
|
|
||||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_header")))
|
|
||||||
{
|
|
||||||
localVarHeaderParams["test_api_key_header"] = Configuration.GetApiKeyWithPrefix("test_api_key_header");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||||
@@ -1015,7 +624,7 @@ namespace IO.Swagger.Api
|
|||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||||
/// <returns>Task of Order</returns>
|
/// <returns>Task of Order</returns>
|
||||||
public async System.Threading.Tasks.Task<Order> GetOrderByIdAsync (string orderId)
|
public async System.Threading.Tasks.Task<Order> GetOrderByIdAsync (long? orderId)
|
||||||
{
|
{
|
||||||
ApiResponse<Order> localVarResponse = await GetOrderByIdAsyncWithHttpInfo(orderId);
|
ApiResponse<Order> localVarResponse = await GetOrderByIdAsyncWithHttpInfo(orderId);
|
||||||
return localVarResponse.Data;
|
return localVarResponse.Data;
|
||||||
@@ -1028,7 +637,7 @@ namespace IO.Swagger.Api
|
|||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||||
/// <returns>Task of ApiResponse (Order)</returns>
|
/// <returns>Task of ApiResponse (Order)</returns>
|
||||||
public async System.Threading.Tasks.Task<ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (string orderId)
|
public async System.Threading.Tasks.Task<ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (long? orderId)
|
||||||
{
|
{
|
||||||
// verify the required parameter 'orderId' is set
|
// verify the required parameter 'orderId' is set
|
||||||
if (orderId == null)
|
if (orderId == null)
|
||||||
@@ -1049,8 +658,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -1061,16 +670,6 @@ namespace IO.Swagger.Api
|
|||||||
localVarPathParams.Add("format", "json");
|
localVarPathParams.Add("format", "json");
|
||||||
if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter
|
if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter
|
||||||
|
|
||||||
// authentication (test_api_key_query) required
|
|
||||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_query")))
|
|
||||||
{
|
|
||||||
localVarQueryParams["test_api_key_query"] = Configuration.GetApiKeyWithPrefix("test_api_key_query");
|
|
||||||
}
|
|
||||||
// authentication (test_api_key_header) required
|
|
||||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_header")))
|
|
||||||
{
|
|
||||||
localVarHeaderParams["test_api_key_header"] = Configuration.GetApiKeyWithPrefix("test_api_key_header");
|
|
||||||
}
|
|
||||||
|
|
||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||||
@@ -1094,9 +693,9 @@ namespace IO.Swagger.Api
|
|||||||
/// Place an order for a pet
|
/// Place an order for a pet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">order placed for purchasing the pet (optional)</param>
|
/// <param name="body">order placed for purchasing the pet</param>
|
||||||
/// <returns>Order</returns>
|
/// <returns>Order</returns>
|
||||||
public Order PlaceOrder (Order body = null)
|
public Order PlaceOrder (Order body)
|
||||||
{
|
{
|
||||||
ApiResponse<Order> localVarResponse = PlaceOrderWithHttpInfo(body);
|
ApiResponse<Order> localVarResponse = PlaceOrderWithHttpInfo(body);
|
||||||
return localVarResponse.Data;
|
return localVarResponse.Data;
|
||||||
@@ -1106,10 +705,13 @@ namespace IO.Swagger.Api
|
|||||||
/// Place an order for a pet
|
/// Place an order for a pet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">order placed for purchasing the pet (optional)</param>
|
/// <param name="body">order placed for purchasing the pet</param>
|
||||||
/// <returns>ApiResponse of Order</returns>
|
/// <returns>ApiResponse of Order</returns>
|
||||||
public ApiResponse< Order > PlaceOrderWithHttpInfo (Order body = null)
|
public ApiResponse< Order > PlaceOrderWithHttpInfo (Order body)
|
||||||
{
|
{
|
||||||
|
// verify the required parameter 'body' is set
|
||||||
|
if (body == null)
|
||||||
|
throw new ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder");
|
||||||
|
|
||||||
var localVarPath = "/store/order";
|
var localVarPath = "/store/order";
|
||||||
var localVarPathParams = new Dictionary<String, String>();
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
@@ -1126,8 +728,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -1145,18 +747,6 @@ namespace IO.Swagger.Api
|
|||||||
localVarPostBody = body; // byte array
|
localVarPostBody = body; // byte array
|
||||||
}
|
}
|
||||||
|
|
||||||
// authentication (test_api_client_id) required
|
|
||||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_id")))
|
|
||||||
{
|
|
||||||
localVarHeaderParams["x-test_api_client_id"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_id");
|
|
||||||
}
|
|
||||||
|
|
||||||
// authentication (test_api_client_secret) required
|
|
||||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_secret")))
|
|
||||||
{
|
|
||||||
localVarHeaderParams["x-test_api_client_secret"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_secret");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||||
@@ -1180,9 +770,9 @@ namespace IO.Swagger.Api
|
|||||||
/// Place an order for a pet
|
/// Place an order for a pet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">order placed for purchasing the pet (optional)</param>
|
/// <param name="body">order placed for purchasing the pet</param>
|
||||||
/// <returns>Task of Order</returns>
|
/// <returns>Task of Order</returns>
|
||||||
public async System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body = null)
|
public async System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body)
|
||||||
{
|
{
|
||||||
ApiResponse<Order> localVarResponse = await PlaceOrderAsyncWithHttpInfo(body);
|
ApiResponse<Order> localVarResponse = await PlaceOrderAsyncWithHttpInfo(body);
|
||||||
return localVarResponse.Data;
|
return localVarResponse.Data;
|
||||||
@@ -1193,10 +783,13 @@ namespace IO.Swagger.Api
|
|||||||
/// Place an order for a pet
|
/// Place an order for a pet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">order placed for purchasing the pet (optional)</param>
|
/// <param name="body">order placed for purchasing the pet</param>
|
||||||
/// <returns>Task of ApiResponse (Order)</returns>
|
/// <returns>Task of ApiResponse (Order)</returns>
|
||||||
public async System.Threading.Tasks.Task<ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body = null)
|
public async System.Threading.Tasks.Task<ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body)
|
||||||
{
|
{
|
||||||
|
// verify the required parameter 'body' is set
|
||||||
|
if (body == null)
|
||||||
|
throw new ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder");
|
||||||
|
|
||||||
var localVarPath = "/store/order";
|
var localVarPath = "/store/order";
|
||||||
var localVarPathParams = new Dictionary<String, String>();
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
@@ -1213,8 +806,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -1232,16 +825,6 @@ namespace IO.Swagger.Api
|
|||||||
localVarPostBody = body; // byte array
|
localVarPostBody = body; // byte array
|
||||||
}
|
}
|
||||||
|
|
||||||
// authentication (test_api_client_id) required
|
|
||||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_id")))
|
|
||||||
{
|
|
||||||
localVarHeaderParams["x-test_api_client_id"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_id");
|
|
||||||
}
|
|
||||||
// authentication (test_api_client_secret) required
|
|
||||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_secret")))
|
|
||||||
{
|
|
||||||
localVarHeaderParams["x-test_api_client_secret"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_secret");
|
|
||||||
}
|
|
||||||
|
|
||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ namespace IO.Swagger.Api
|
|||||||
/// This can only be done by the logged in user.
|
/// This can only be done by the logged in user.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">Created user object (optional)</param>
|
/// <param name="body">Created user object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void CreateUser (User body = null);
|
void CreateUser (User body);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create user
|
/// Create user
|
||||||
@@ -33,9 +33,9 @@ namespace IO.Swagger.Api
|
|||||||
/// This can only be done by the logged in user.
|
/// This can only be done by the logged in user.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">Created user object (optional)</param>
|
/// <param name="body">Created user object</param>
|
||||||
/// <returns>ApiResponse of Object(void)</returns>
|
/// <returns>ApiResponse of Object(void)</returns>
|
||||||
ApiResponse<Object> CreateUserWithHttpInfo (User body = null);
|
ApiResponse<Object> CreateUserWithHttpInfo (User body);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -43,9 +43,9 @@ namespace IO.Swagger.Api
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">List of user object (optional)</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void CreateUsersWithArrayInput (List<User> body = null);
|
void CreateUsersWithArrayInput (List<User> body);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
@@ -54,9 +54,9 @@ namespace IO.Swagger.Api
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">List of user object (optional)</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns>ApiResponse of Object(void)</returns>
|
/// <returns>ApiResponse of Object(void)</returns>
|
||||||
ApiResponse<Object> CreateUsersWithArrayInputWithHttpInfo (List<User> body = null);
|
ApiResponse<Object> CreateUsersWithArrayInputWithHttpInfo (List<User> body);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -64,9 +64,9 @@ namespace IO.Swagger.Api
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">List of user object (optional)</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void CreateUsersWithListInput (List<User> body = null);
|
void CreateUsersWithListInput (List<User> body);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
@@ -75,9 +75,9 @@ namespace IO.Swagger.Api
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">List of user object (optional)</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns>ApiResponse of Object(void)</returns>
|
/// <returns>ApiResponse of Object(void)</returns>
|
||||||
ApiResponse<Object> CreateUsersWithListInputWithHttpInfo (List<User> body = null);
|
ApiResponse<Object> CreateUsersWithListInputWithHttpInfo (List<User> body);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete user
|
/// Delete user
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -127,10 +127,10 @@ namespace IO.Swagger.Api
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="username">The user name for login (optional)</param>
|
/// <param name="username">The user name for login</param>
|
||||||
/// <param name="password">The password for login in clear text (optional)</param>
|
/// <param name="password">The password for login in clear text</param>
|
||||||
/// <returns>string</returns>
|
/// <returns>string</returns>
|
||||||
string LoginUser (string username = null, string password = null);
|
string LoginUser (string username, string password);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Logs user into the system
|
/// Logs user into the system
|
||||||
@@ -139,10 +139,10 @@ namespace IO.Swagger.Api
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="username">The user name for login (optional)</param>
|
/// <param name="username">The user name for login</param>
|
||||||
/// <param name="password">The password for login in clear text (optional)</param>
|
/// <param name="password">The password for login in clear text</param>
|
||||||
/// <returns>ApiResponse of string</returns>
|
/// <returns>ApiResponse of string</returns>
|
||||||
ApiResponse<string> LoginUserWithHttpInfo (string username = null, string password = null);
|
ApiResponse<string> LoginUserWithHttpInfo (string username, string password);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Logs out current logged in user session
|
/// Logs out current logged in user session
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -170,9 +170,9 @@ namespace IO.Swagger.Api
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="username">name that need to be deleted</param>
|
/// <param name="username">name that need to be deleted</param>
|
||||||
/// <param name="body">Updated user object (optional)</param>
|
/// <param name="body">Updated user object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void UpdateUser (string username, User body = null);
|
void UpdateUser (string username, User body);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updated user
|
/// Updated user
|
||||||
@@ -182,9 +182,9 @@ namespace IO.Swagger.Api
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="username">name that need to be deleted</param>
|
/// <param name="username">name that need to be deleted</param>
|
||||||
/// <param name="body">Updated user object (optional)</param>
|
/// <param name="body">Updated user object</param>
|
||||||
/// <returns>ApiResponse of Object(void)</returns>
|
/// <returns>ApiResponse of Object(void)</returns>
|
||||||
ApiResponse<Object> UpdateUserWithHttpInfo (string username, User body = null);
|
ApiResponse<Object> UpdateUserWithHttpInfo (string username, User body);
|
||||||
#endregion Synchronous Operations
|
#endregion Synchronous Operations
|
||||||
#region Asynchronous Operations
|
#region Asynchronous Operations
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -194,9 +194,9 @@ namespace IO.Swagger.Api
|
|||||||
/// This can only be done by the logged in user.
|
/// This can only be done by the logged in user.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">Created user object (optional)</param>
|
/// <param name="body">Created user object</param>
|
||||||
/// <returns>Task of void</returns>
|
/// <returns>Task of void</returns>
|
||||||
System.Threading.Tasks.Task CreateUserAsync (User body = null);
|
System.Threading.Tasks.Task CreateUserAsync (User body);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create user
|
/// Create user
|
||||||
@@ -205,9 +205,9 @@ namespace IO.Swagger.Api
|
|||||||
/// This can only be done by the logged in user.
|
/// This can only be done by the logged in user.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">Created user object (optional)</param>
|
/// <param name="body">Created user object</param>
|
||||||
/// <returns>Task of ApiResponse</returns>
|
/// <returns>Task of ApiResponse</returns>
|
||||||
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUserAsyncWithHttpInfo (User body = null);
|
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUserAsyncWithHttpInfo (User body);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -215,9 +215,9 @@ namespace IO.Swagger.Api
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">List of user object (optional)</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns>Task of void</returns>
|
/// <returns>Task of void</returns>
|
||||||
System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body = null);
|
System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
@@ -226,9 +226,9 @@ namespace IO.Swagger.Api
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">List of user object (optional)</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns>Task of ApiResponse</returns>
|
/// <returns>Task of ApiResponse</returns>
|
||||||
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithArrayInputAsyncWithHttpInfo (List<User> body = null);
|
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithArrayInputAsyncWithHttpInfo (List<User> body);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -236,9 +236,9 @@ namespace IO.Swagger.Api
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">List of user object (optional)</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns>Task of void</returns>
|
/// <returns>Task of void</returns>
|
||||||
System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body = null);
|
System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
@@ -247,9 +247,9 @@ namespace IO.Swagger.Api
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">List of user object (optional)</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns>Task of ApiResponse</returns>
|
/// <returns>Task of ApiResponse</returns>
|
||||||
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithListInputAsyncWithHttpInfo (List<User> body = null);
|
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithListInputAsyncWithHttpInfo (List<User> body);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete user
|
/// Delete user
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -299,10 +299,10 @@ namespace IO.Swagger.Api
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="username">The user name for login (optional)</param>
|
/// <param name="username">The user name for login</param>
|
||||||
/// <param name="password">The password for login in clear text (optional)</param>
|
/// <param name="password">The password for login in clear text</param>
|
||||||
/// <returns>Task of string</returns>
|
/// <returns>Task of string</returns>
|
||||||
System.Threading.Tasks.Task<string> LoginUserAsync (string username = null, string password = null);
|
System.Threading.Tasks.Task<string> LoginUserAsync (string username, string password);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Logs user into the system
|
/// Logs user into the system
|
||||||
@@ -311,10 +311,10 @@ namespace IO.Swagger.Api
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="username">The user name for login (optional)</param>
|
/// <param name="username">The user name for login</param>
|
||||||
/// <param name="password">The password for login in clear text (optional)</param>
|
/// <param name="password">The password for login in clear text</param>
|
||||||
/// <returns>Task of ApiResponse (string)</returns>
|
/// <returns>Task of ApiResponse (string)</returns>
|
||||||
System.Threading.Tasks.Task<ApiResponse<string>> LoginUserAsyncWithHttpInfo (string username = null, string password = null);
|
System.Threading.Tasks.Task<ApiResponse<string>> LoginUserAsyncWithHttpInfo (string username, string password);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Logs out current logged in user session
|
/// Logs out current logged in user session
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -342,9 +342,9 @@ namespace IO.Swagger.Api
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="username">name that need to be deleted</param>
|
/// <param name="username">name that need to be deleted</param>
|
||||||
/// <param name="body">Updated user object (optional)</param>
|
/// <param name="body">Updated user object</param>
|
||||||
/// <returns>Task of void</returns>
|
/// <returns>Task of void</returns>
|
||||||
System.Threading.Tasks.Task UpdateUserAsync (string username, User body = null);
|
System.Threading.Tasks.Task UpdateUserAsync (string username, User body);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updated user
|
/// Updated user
|
||||||
@@ -354,9 +354,9 @@ namespace IO.Swagger.Api
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="username">name that need to be deleted</param>
|
/// <param name="username">name that need to be deleted</param>
|
||||||
/// <param name="body">Updated user object (optional)</param>
|
/// <param name="body">Updated user object</param>
|
||||||
/// <returns>Task of ApiResponse</returns>
|
/// <returns>Task of ApiResponse</returns>
|
||||||
System.Threading.Tasks.Task<ApiResponse<Object>> UpdateUserAsyncWithHttpInfo (string username, User body = null);
|
System.Threading.Tasks.Task<ApiResponse<Object>> UpdateUserAsyncWithHttpInfo (string username, User body);
|
||||||
#endregion Asynchronous Operations
|
#endregion Asynchronous Operations
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -451,9 +451,9 @@ namespace IO.Swagger.Api
|
|||||||
/// Create user This can only be done by the logged in user.
|
/// Create user This can only be done by the logged in user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">Created user object (optional)</param>
|
/// <param name="body">Created user object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void CreateUser (User body = null)
|
public void CreateUser (User body)
|
||||||
{
|
{
|
||||||
CreateUserWithHttpInfo(body);
|
CreateUserWithHttpInfo(body);
|
||||||
}
|
}
|
||||||
@@ -462,10 +462,13 @@ namespace IO.Swagger.Api
|
|||||||
/// Create user This can only be done by the logged in user.
|
/// Create user This can only be done by the logged in user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">Created user object (optional)</param>
|
/// <param name="body">Created user object</param>
|
||||||
/// <returns>ApiResponse of Object(void)</returns>
|
/// <returns>ApiResponse of Object(void)</returns>
|
||||||
public ApiResponse<Object> CreateUserWithHttpInfo (User body = null)
|
public ApiResponse<Object> CreateUserWithHttpInfo (User body)
|
||||||
{
|
{
|
||||||
|
// verify the required parameter 'body' is set
|
||||||
|
if (body == null)
|
||||||
|
throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser");
|
||||||
|
|
||||||
var localVarPath = "/user";
|
var localVarPath = "/user";
|
||||||
var localVarPathParams = new Dictionary<String, String>();
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
@@ -482,8 +485,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -524,9 +527,9 @@ namespace IO.Swagger.Api
|
|||||||
/// Create user This can only be done by the logged in user.
|
/// Create user This can only be done by the logged in user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">Created user object (optional)</param>
|
/// <param name="body">Created user object</param>
|
||||||
/// <returns>Task of void</returns>
|
/// <returns>Task of void</returns>
|
||||||
public async System.Threading.Tasks.Task CreateUserAsync (User body = null)
|
public async System.Threading.Tasks.Task CreateUserAsync (User body)
|
||||||
{
|
{
|
||||||
await CreateUserAsyncWithHttpInfo(body);
|
await CreateUserAsyncWithHttpInfo(body);
|
||||||
|
|
||||||
@@ -536,10 +539,13 @@ namespace IO.Swagger.Api
|
|||||||
/// Create user This can only be done by the logged in user.
|
/// Create user This can only be done by the logged in user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">Created user object (optional)</param>
|
/// <param name="body">Created user object</param>
|
||||||
/// <returns>Task of ApiResponse</returns>
|
/// <returns>Task of ApiResponse</returns>
|
||||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> CreateUserAsyncWithHttpInfo (User body = null)
|
public async System.Threading.Tasks.Task<ApiResponse<Object>> CreateUserAsyncWithHttpInfo (User body)
|
||||||
{
|
{
|
||||||
|
// verify the required parameter 'body' is set
|
||||||
|
if (body == null)
|
||||||
|
throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser");
|
||||||
|
|
||||||
var localVarPath = "/user";
|
var localVarPath = "/user";
|
||||||
var localVarPathParams = new Dictionary<String, String>();
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
@@ -556,8 +562,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -598,9 +604,9 @@ namespace IO.Swagger.Api
|
|||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">List of user object (optional)</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void CreateUsersWithArrayInput (List<User> body = null)
|
public void CreateUsersWithArrayInput (List<User> body)
|
||||||
{
|
{
|
||||||
CreateUsersWithArrayInputWithHttpInfo(body);
|
CreateUsersWithArrayInputWithHttpInfo(body);
|
||||||
}
|
}
|
||||||
@@ -609,10 +615,13 @@ namespace IO.Swagger.Api
|
|||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">List of user object (optional)</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns>ApiResponse of Object(void)</returns>
|
/// <returns>ApiResponse of Object(void)</returns>
|
||||||
public ApiResponse<Object> CreateUsersWithArrayInputWithHttpInfo (List<User> body = null)
|
public ApiResponse<Object> CreateUsersWithArrayInputWithHttpInfo (List<User> body)
|
||||||
{
|
{
|
||||||
|
// verify the required parameter 'body' is set
|
||||||
|
if (body == null)
|
||||||
|
throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput");
|
||||||
|
|
||||||
var localVarPath = "/user/createWithArray";
|
var localVarPath = "/user/createWithArray";
|
||||||
var localVarPathParams = new Dictionary<String, String>();
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
@@ -629,8 +638,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -671,9 +680,9 @@ namespace IO.Swagger.Api
|
|||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">List of user object (optional)</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns>Task of void</returns>
|
/// <returns>Task of void</returns>
|
||||||
public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body = null)
|
public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body)
|
||||||
{
|
{
|
||||||
await CreateUsersWithArrayInputAsyncWithHttpInfo(body);
|
await CreateUsersWithArrayInputAsyncWithHttpInfo(body);
|
||||||
|
|
||||||
@@ -683,10 +692,13 @@ namespace IO.Swagger.Api
|
|||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">List of user object (optional)</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns>Task of ApiResponse</returns>
|
/// <returns>Task of ApiResponse</returns>
|
||||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithArrayInputAsyncWithHttpInfo (List<User> body = null)
|
public async System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithArrayInputAsyncWithHttpInfo (List<User> body)
|
||||||
{
|
{
|
||||||
|
// verify the required parameter 'body' is set
|
||||||
|
if (body == null)
|
||||||
|
throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput");
|
||||||
|
|
||||||
var localVarPath = "/user/createWithArray";
|
var localVarPath = "/user/createWithArray";
|
||||||
var localVarPathParams = new Dictionary<String, String>();
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
@@ -703,8 +715,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -745,9 +757,9 @@ namespace IO.Swagger.Api
|
|||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">List of user object (optional)</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void CreateUsersWithListInput (List<User> body = null)
|
public void CreateUsersWithListInput (List<User> body)
|
||||||
{
|
{
|
||||||
CreateUsersWithListInputWithHttpInfo(body);
|
CreateUsersWithListInputWithHttpInfo(body);
|
||||||
}
|
}
|
||||||
@@ -756,10 +768,13 @@ namespace IO.Swagger.Api
|
|||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">List of user object (optional)</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns>ApiResponse of Object(void)</returns>
|
/// <returns>ApiResponse of Object(void)</returns>
|
||||||
public ApiResponse<Object> CreateUsersWithListInputWithHttpInfo (List<User> body = null)
|
public ApiResponse<Object> CreateUsersWithListInputWithHttpInfo (List<User> body)
|
||||||
{
|
{
|
||||||
|
// verify the required parameter 'body' is set
|
||||||
|
if (body == null)
|
||||||
|
throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput");
|
||||||
|
|
||||||
var localVarPath = "/user/createWithList";
|
var localVarPath = "/user/createWithList";
|
||||||
var localVarPathParams = new Dictionary<String, String>();
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
@@ -776,8 +791,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -818,9 +833,9 @@ namespace IO.Swagger.Api
|
|||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">List of user object (optional)</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns>Task of void</returns>
|
/// <returns>Task of void</returns>
|
||||||
public async System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body = null)
|
public async System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body)
|
||||||
{
|
{
|
||||||
await CreateUsersWithListInputAsyncWithHttpInfo(body);
|
await CreateUsersWithListInputAsyncWithHttpInfo(body);
|
||||||
|
|
||||||
@@ -830,10 +845,13 @@ namespace IO.Swagger.Api
|
|||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="body">List of user object (optional)</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns>Task of ApiResponse</returns>
|
/// <returns>Task of ApiResponse</returns>
|
||||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithListInputAsyncWithHttpInfo (List<User> body = null)
|
public async System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithListInputAsyncWithHttpInfo (List<User> body)
|
||||||
{
|
{
|
||||||
|
// verify the required parameter 'body' is set
|
||||||
|
if (body == null)
|
||||||
|
throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput");
|
||||||
|
|
||||||
var localVarPath = "/user/createWithList";
|
var localVarPath = "/user/createWithList";
|
||||||
var localVarPathParams = new Dictionary<String, String>();
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
@@ -850,8 +868,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -926,8 +944,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -938,13 +956,6 @@ namespace IO.Swagger.Api
|
|||||||
localVarPathParams.Add("format", "json");
|
localVarPathParams.Add("format", "json");
|
||||||
if (username != null) localVarPathParams.Add("username", Configuration.ApiClient.ParameterToString(username)); // path parameter
|
if (username != null) localVarPathParams.Add("username", Configuration.ApiClient.ParameterToString(username)); // path parameter
|
||||||
|
|
||||||
// authentication (test_http_basic) required
|
|
||||||
// http basic authentication required
|
|
||||||
if (!String.IsNullOrEmpty(Configuration.Username) || !String.IsNullOrEmpty(Configuration.Password))
|
|
||||||
{
|
|
||||||
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(Configuration.Username + ":" + Configuration.Password);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||||
@@ -1003,8 +1014,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -1015,12 +1026,6 @@ namespace IO.Swagger.Api
|
|||||||
localVarPathParams.Add("format", "json");
|
localVarPathParams.Add("format", "json");
|
||||||
if (username != null) localVarPathParams.Add("username", Configuration.ApiClient.ParameterToString(username)); // path parameter
|
if (username != null) localVarPathParams.Add("username", Configuration.ApiClient.ParameterToString(username)); // path parameter
|
||||||
|
|
||||||
// authentication (test_http_basic) required
|
|
||||||
// http basic authentication required
|
|
||||||
if (!String.IsNullOrEmpty(Configuration.Username) || !String.IsNullOrEmpty(Configuration.Password))
|
|
||||||
{
|
|
||||||
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(Configuration.Username + ":" + Configuration.Password);
|
|
||||||
}
|
|
||||||
|
|
||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||||
@@ -1079,8 +1084,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -1150,8 +1155,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -1185,10 +1190,10 @@ namespace IO.Swagger.Api
|
|||||||
/// Logs user into the system
|
/// Logs user into the system
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="username">The user name for login (optional)</param>
|
/// <param name="username">The user name for login</param>
|
||||||
/// <param name="password">The password for login in clear text (optional)</param>
|
/// <param name="password">The password for login in clear text</param>
|
||||||
/// <returns>string</returns>
|
/// <returns>string</returns>
|
||||||
public string LoginUser (string username = null, string password = null)
|
public string LoginUser (string username, string password)
|
||||||
{
|
{
|
||||||
ApiResponse<string> localVarResponse = LoginUserWithHttpInfo(username, password);
|
ApiResponse<string> localVarResponse = LoginUserWithHttpInfo(username, password);
|
||||||
return localVarResponse.Data;
|
return localVarResponse.Data;
|
||||||
@@ -1198,11 +1203,17 @@ namespace IO.Swagger.Api
|
|||||||
/// Logs user into the system
|
/// Logs user into the system
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="username">The user name for login (optional)</param>
|
/// <param name="username">The user name for login</param>
|
||||||
/// <param name="password">The password for login in clear text (optional)</param>
|
/// <param name="password">The password for login in clear text</param>
|
||||||
/// <returns>ApiResponse of string</returns>
|
/// <returns>ApiResponse of string</returns>
|
||||||
public ApiResponse< string > LoginUserWithHttpInfo (string username = null, string password = null)
|
public ApiResponse< string > LoginUserWithHttpInfo (string username, string password)
|
||||||
{
|
{
|
||||||
|
// verify the required parameter 'username' is set
|
||||||
|
if (username == null)
|
||||||
|
throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser");
|
||||||
|
// verify the required parameter 'password' is set
|
||||||
|
if (password == null)
|
||||||
|
throw new ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser");
|
||||||
|
|
||||||
var localVarPath = "/user/login";
|
var localVarPath = "/user/login";
|
||||||
var localVarPathParams = new Dictionary<String, String>();
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
@@ -1219,8 +1230,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -1255,10 +1266,10 @@ namespace IO.Swagger.Api
|
|||||||
/// Logs user into the system
|
/// Logs user into the system
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="username">The user name for login (optional)</param>
|
/// <param name="username">The user name for login</param>
|
||||||
/// <param name="password">The password for login in clear text (optional)</param>
|
/// <param name="password">The password for login in clear text</param>
|
||||||
/// <returns>Task of string</returns>
|
/// <returns>Task of string</returns>
|
||||||
public async System.Threading.Tasks.Task<string> LoginUserAsync (string username = null, string password = null)
|
public async System.Threading.Tasks.Task<string> LoginUserAsync (string username, string password)
|
||||||
{
|
{
|
||||||
ApiResponse<string> localVarResponse = await LoginUserAsyncWithHttpInfo(username, password);
|
ApiResponse<string> localVarResponse = await LoginUserAsyncWithHttpInfo(username, password);
|
||||||
return localVarResponse.Data;
|
return localVarResponse.Data;
|
||||||
@@ -1269,11 +1280,17 @@ namespace IO.Swagger.Api
|
|||||||
/// Logs user into the system
|
/// Logs user into the system
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="username">The user name for login (optional)</param>
|
/// <param name="username">The user name for login</param>
|
||||||
/// <param name="password">The password for login in clear text (optional)</param>
|
/// <param name="password">The password for login in clear text</param>
|
||||||
/// <returns>Task of ApiResponse (string)</returns>
|
/// <returns>Task of ApiResponse (string)</returns>
|
||||||
public async System.Threading.Tasks.Task<ApiResponse<string>> LoginUserAsyncWithHttpInfo (string username = null, string password = null)
|
public async System.Threading.Tasks.Task<ApiResponse<string>> LoginUserAsyncWithHttpInfo (string username, string password)
|
||||||
{
|
{
|
||||||
|
// verify the required parameter 'username' is set
|
||||||
|
if (username == null)
|
||||||
|
throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser");
|
||||||
|
// verify the required parameter 'password' is set
|
||||||
|
if (password == null)
|
||||||
|
throw new ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser");
|
||||||
|
|
||||||
var localVarPath = "/user/login";
|
var localVarPath = "/user/login";
|
||||||
var localVarPathParams = new Dictionary<String, String>();
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
@@ -1290,8 +1307,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -1355,8 +1372,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -1419,8 +1436,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -1454,9 +1471,9 @@ namespace IO.Swagger.Api
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="username">name that need to be deleted</param>
|
/// <param name="username">name that need to be deleted</param>
|
||||||
/// <param name="body">Updated user object (optional)</param>
|
/// <param name="body">Updated user object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void UpdateUser (string username, User body = null)
|
public void UpdateUser (string username, User body)
|
||||||
{
|
{
|
||||||
UpdateUserWithHttpInfo(username, body);
|
UpdateUserWithHttpInfo(username, body);
|
||||||
}
|
}
|
||||||
@@ -1466,13 +1483,16 @@ namespace IO.Swagger.Api
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="username">name that need to be deleted</param>
|
/// <param name="username">name that need to be deleted</param>
|
||||||
/// <param name="body">Updated user object (optional)</param>
|
/// <param name="body">Updated user object</param>
|
||||||
/// <returns>ApiResponse of Object(void)</returns>
|
/// <returns>ApiResponse of Object(void)</returns>
|
||||||
public ApiResponse<Object> UpdateUserWithHttpInfo (string username, User body = null)
|
public ApiResponse<Object> UpdateUserWithHttpInfo (string username, User body)
|
||||||
{
|
{
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null)
|
if (username == null)
|
||||||
throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser");
|
throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser");
|
||||||
|
// verify the required parameter 'body' is set
|
||||||
|
if (body == null)
|
||||||
|
throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser");
|
||||||
|
|
||||||
var localVarPath = "/user/{username}";
|
var localVarPath = "/user/{username}";
|
||||||
var localVarPathParams = new Dictionary<String, String>();
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
@@ -1489,8 +1509,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
@@ -1533,9 +1553,9 @@ namespace IO.Swagger.Api
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="username">name that need to be deleted</param>
|
/// <param name="username">name that need to be deleted</param>
|
||||||
/// <param name="body">Updated user object (optional)</param>
|
/// <param name="body">Updated user object</param>
|
||||||
/// <returns>Task of void</returns>
|
/// <returns>Task of void</returns>
|
||||||
public async System.Threading.Tasks.Task UpdateUserAsync (string username, User body = null)
|
public async System.Threading.Tasks.Task UpdateUserAsync (string username, User body)
|
||||||
{
|
{
|
||||||
await UpdateUserAsyncWithHttpInfo(username, body);
|
await UpdateUserAsyncWithHttpInfo(username, body);
|
||||||
|
|
||||||
@@ -1546,13 +1566,16 @@ namespace IO.Swagger.Api
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||||||
/// <param name="username">name that need to be deleted</param>
|
/// <param name="username">name that need to be deleted</param>
|
||||||
/// <param name="body">Updated user object (optional)</param>
|
/// <param name="body">Updated user object</param>
|
||||||
/// <returns>Task of ApiResponse</returns>
|
/// <returns>Task of ApiResponse</returns>
|
||||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> UpdateUserAsyncWithHttpInfo (string username, User body = null)
|
public async System.Threading.Tasks.Task<ApiResponse<Object>> UpdateUserAsyncWithHttpInfo (string username, User body)
|
||||||
{
|
{
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null)
|
if (username == null)
|
||||||
throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser");
|
throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser");
|
||||||
|
// verify the required parameter 'body' is set
|
||||||
|
if (body == null)
|
||||||
|
throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser");
|
||||||
|
|
||||||
var localVarPath = "/user/{username}";
|
var localVarPath = "/user/{username}";
|
||||||
var localVarPathParams = new Dictionary<String, String>();
|
var localVarPathParams = new Dictionary<String, String>();
|
||||||
@@ -1569,8 +1592,8 @@ namespace IO.Swagger.Api
|
|||||||
|
|
||||||
// to determine the Accept header
|
// to determine the Accept header
|
||||||
String[] localVarHttpHeaderAccepts = new String[] {
|
String[] localVarHttpHeaderAccepts = new String[] {
|
||||||
"application/json",
|
"application/xml",
|
||||||
"application/xml"
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||||
if (localVarHttpHeaderAccept != null)
|
if (localVarHttpHeaderAccept != null)
|
||||||
|
|||||||
@@ -0,0 +1,142 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
|
||||||
|
namespace IO.Swagger.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
public partial class ApiResponse : IEquatable<ApiResponse>
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="ApiResponse" /> class.
|
||||||
|
/// Initializes a new instance of the <see cref="ApiResponse" />class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Code">Code.</param>
|
||||||
|
/// <param name="Type">Type.</param>
|
||||||
|
/// <param name="Message">Message.</param>
|
||||||
|
|
||||||
|
public ApiResponse(int? Code = null, string Type = null, string Message = null)
|
||||||
|
{
|
||||||
|
this.Code = Code;
|
||||||
|
this.Type = Type;
|
||||||
|
this.Message = Message;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Code
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="code", EmitDefaultValue=false)]
|
||||||
|
public int? Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Type
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="type", EmitDefaultValue=false)]
|
||||||
|
public string Type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Message
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="message", EmitDefaultValue=false)]
|
||||||
|
public string Message { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>String presentation of the object</returns>
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.Append("class ApiResponse {\n");
|
||||||
|
sb.Append(" Code: ").Append(Code).Append("\n");
|
||||||
|
sb.Append(" Type: ").Append(Type).Append("\n");
|
||||||
|
sb.Append(" Message: ").Append(Message).Append("\n");
|
||||||
|
sb.Append("}\n");
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the JSON string presentation of the object
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>JSON string presentation of the object</returns>
|
||||||
|
public string ToJson()
|
||||||
|
{
|
||||||
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
return this.Equals(obj as ApiResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if ApiResponse instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="other">Instance of ApiResponse to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(ApiResponse other)
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/10454552/677735
|
||||||
|
if (other == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return
|
||||||
|
(
|
||||||
|
this.Code == other.Code ||
|
||||||
|
this.Code != null &&
|
||||||
|
this.Code.Equals(other.Code)
|
||||||
|
) &&
|
||||||
|
(
|
||||||
|
this.Type == other.Type ||
|
||||||
|
this.Type != null &&
|
||||||
|
this.Type.Equals(other.Type)
|
||||||
|
) &&
|
||||||
|
(
|
||||||
|
this.Message == other.Message ||
|
||||||
|
this.Message != null &&
|
||||||
|
this.Message.Equals(other.Message)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hash code
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Hash code</returns>
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
// credit: http://stackoverflow.com/a/263416/677735
|
||||||
|
unchecked // Overflow is fine, just wrap
|
||||||
|
{
|
||||||
|
int hash = 41;
|
||||||
|
// Suitable nullity checks etc, of course :)
|
||||||
|
if (this.Code != null)
|
||||||
|
hash = hash * 59 + this.Code.GetHashCode();
|
||||||
|
if (this.Type != null)
|
||||||
|
hash = hash * 59 + this.Type.GetHashCode();
|
||||||
|
if (this.Message != null)
|
||||||
|
hash = hash * 59 + this.Message.GetHashCode();
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -47,19 +47,29 @@ namespace IO.Swagger.Model
|
|||||||
/// Initializes a new instance of the <see cref="Order" /> class.
|
/// Initializes a new instance of the <see cref="Order" /> class.
|
||||||
/// Initializes a new instance of the <see cref="Order" />class.
|
/// Initializes a new instance of the <see cref="Order" />class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="Id">Id.</param>
|
||||||
/// <param name="PetId">PetId.</param>
|
/// <param name="PetId">PetId.</param>
|
||||||
/// <param name="Quantity">Quantity.</param>
|
/// <param name="Quantity">Quantity.</param>
|
||||||
/// <param name="ShipDate">ShipDate.</param>
|
/// <param name="ShipDate">ShipDate.</param>
|
||||||
/// <param name="Status">Order Status.</param>
|
/// <param name="Status">Order Status.</param>
|
||||||
/// <param name="Complete">Complete.</param>
|
/// <param name="Complete">Complete (default to false).</param>
|
||||||
|
|
||||||
public Order(long? PetId = null, int? Quantity = null, DateTime? ShipDate = null, StatusEnum? Status = null, bool? Complete = null)
|
public Order(long? Id = null, long? PetId = null, int? Quantity = null, DateTime? ShipDate = null, StatusEnum? Status = null, bool? Complete = null)
|
||||||
{
|
{
|
||||||
|
this.Id = Id;
|
||||||
this.PetId = PetId;
|
this.PetId = PetId;
|
||||||
this.Quantity = Quantity;
|
this.Quantity = Quantity;
|
||||||
this.ShipDate = ShipDate;
|
this.ShipDate = ShipDate;
|
||||||
this.Status = Status;
|
this.Status = Status;
|
||||||
this.Complete = Complete;
|
// use default value if no "Complete" provided
|
||||||
|
if (Complete == null)
|
||||||
|
{
|
||||||
|
this.Complete = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.Complete = Complete;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,7 +78,7 @@ namespace IO.Swagger.Model
|
|||||||
/// Gets or Sets Id
|
/// Gets or Sets Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember(Name="id", EmitDefaultValue=false)]
|
[DataMember(Name="id", EmitDefaultValue=false)]
|
||||||
public long? Id { get; private set; }
|
public long? Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets PetId
|
/// Gets or Sets PetId
|
||||||
|
|||||||
@@ -70,6 +70,7 @@
|
|||||||
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Cat.cs" />
|
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Cat.cs" />
|
||||||
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Dog.cs" />
|
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Dog.cs" />
|
||||||
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\FormatTest.cs" />
|
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\FormatTest.cs" />
|
||||||
|
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\ApiResponse.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -2,9 +2,27 @@
|
|||||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
|
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
|
||||||
<MonoDevelop.Ide.Workbench ActiveDocument="TestPet.cs">
|
<MonoDevelop.Ide.Workbench ActiveDocument="TestPet.cs">
|
||||||
<Files>
|
<Files>
|
||||||
<File FileName="TestPet.cs" Line="216" Column="25" />
|
<File FileName="TestPet.cs" Line="29" Column="39" />
|
||||||
<File FileName="TestOrder.cs" Line="1" Column="1" />
|
<File FileName="TestOrder.cs" Line="99" Column="6" />
|
||||||
|
<File FileName="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs" Line="711" Column="1" />
|
||||||
</Files>
|
</Files>
|
||||||
|
<Pads>
|
||||||
|
<Pad Id="MonoDevelop.NUnit.TestPad">
|
||||||
|
<State name="__root__">
|
||||||
|
<Node name="SwaggerClientTest" expanded="True">
|
||||||
|
<Node name="SwaggerClientTest" expanded="True">
|
||||||
|
<Node name="SwaggerClientTest" expanded="True">
|
||||||
|
<Node name="TestPet" expanded="True">
|
||||||
|
<Node name="TestPet" expanded="True">
|
||||||
|
<Node name="TestGetPetByIdAsyncWithHttpInfo" selected="True" />
|
||||||
|
</Node>
|
||||||
|
</Node>
|
||||||
|
</Node>
|
||||||
|
</Node>
|
||||||
|
</Node>
|
||||||
|
</State>
|
||||||
|
</Pad>
|
||||||
|
</Pads>
|
||||||
</MonoDevelop.Ide.Workbench>
|
</MonoDevelop.Ide.Workbench>
|
||||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||||
<BreakpointStore />
|
<BreakpointStore />
|
||||||
|
|||||||
@@ -73,6 +73,9 @@ namespace SwaggerClientTest.TestOrder
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* comment out the test case as the method is not defined in original petstore spec
|
||||||
|
* we will re-enable this after updating the petstore server
|
||||||
|
*
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test GetInvetoryInObject
|
/// Test GetInvetoryInObject
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -93,7 +96,7 @@ namespace SwaggerClientTest.TestOrder
|
|||||||
Assert.IsInstanceOf (typeof(int?), Int32.Parse(entry.Value));
|
Assert.IsInstanceOf (typeof(int?), Int32.Parse(entry.Value));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,6 +158,9 @@ namespace SwaggerClientTest.TestPet
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* comment out the test case as the method is not defined in original petstore spec
|
||||||
|
* we will re-enable this after updating the petstore server
|
||||||
|
*
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test GetPetByIdInObject
|
/// Test GetPetByIdInObject
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -187,8 +190,11 @@ namespace SwaggerClientTest.TestPet
|
|||||||
Assert.AreEqual (56, (int)category ["id"]);
|
Assert.AreEqual (56, (int)category ["id"]);
|
||||||
Assert.AreEqual ("sample category name2", (string) category["name"]);
|
Assert.AreEqual ("sample category name2", (string) category["name"]);
|
||||||
|
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
/* comment out the test case as the method is not defined in original petstore spec
|
||||||
|
* we will re-enable this after updating the petstore server
|
||||||
|
*
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test GetPetByIdWithByteArray
|
/// Test GetPetByIdWithByteArray
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -201,8 +207,11 @@ namespace SwaggerClientTest.TestPet
|
|||||||
PetApi petApi = new PetApi (c1);
|
PetApi petApi = new PetApi (c1);
|
||||||
byte[] response = petApi.PetPetIdtestingByteArraytrueGet (petId);
|
byte[] response = petApi.PetPetIdtestingByteArraytrueGet (petId);
|
||||||
Assert.IsInstanceOf<byte[]> (response, "Response is byte array");
|
Assert.IsInstanceOf<byte[]> (response, "Response is byte array");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
/* comment out the test case as the method is not defined in original petstore spec
|
||||||
|
* we will re-enable this after updating the petstore server
|
||||||
|
*
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test AddPetUsingByteArray
|
/// Test AddPetUsingByteArray
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -216,7 +225,7 @@ namespace SwaggerClientTest.TestPet
|
|||||||
Pet p = createPet ();
|
Pet p = createPet ();
|
||||||
byte[] petByteArray = GetBytes ((string)petApi.Configuration.ApiClient.Serialize (p));
|
byte[] petByteArray = GetBytes ((string)petApi.Configuration.ApiClient.Serialize (p));
|
||||||
petApi.AddPetUsingByteArray (petByteArray);
|
petApi.AddPetUsingByteArray (petByteArray);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test UpdatePetWithForm
|
/// Test UpdatePetWithForm
|
||||||
@@ -225,7 +234,7 @@ namespace SwaggerClientTest.TestPet
|
|||||||
public void TestUpdatePetWithForm ()
|
public void TestUpdatePetWithForm ()
|
||||||
{
|
{
|
||||||
PetApi petApi = new PetApi ();
|
PetApi petApi = new PetApi ();
|
||||||
petApi.UpdatePetWithForm (petId.ToString(), "new form name", "pending");
|
petApi.UpdatePetWithForm (petId, "new form name", "pending");
|
||||||
|
|
||||||
Pet response = petApi.GetPetById (petId);
|
Pet response = petApi.GetPetById (petId);
|
||||||
Assert.IsInstanceOf<Pet> (response, "Response is a Pet");
|
Assert.IsInstanceOf<Pet> (response, "Response is a Pet");
|
||||||
@@ -239,7 +248,7 @@ namespace SwaggerClientTest.TestPet
|
|||||||
Assert.AreEqual (56, response.Category.Id);
|
Assert.AreEqual (56, response.Category.Id);
|
||||||
|
|
||||||
// test optional parameter
|
// test optional parameter
|
||||||
petApi.UpdatePetWithForm (petId.ToString(), "new form name2");
|
petApi.UpdatePetWithForm (petId, "new form name2");
|
||||||
Pet response2 = petApi.GetPetById (petId);
|
Pet response2 = petApi.GetPetById (petId);
|
||||||
Assert.AreEqual ("new form name2", response2.Name);
|
Assert.AreEqual ("new form name2", response2.Name);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttribute.cs
|
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttribute.cs
|
||||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.swagger-logo.png
|
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.swagger-logo.png
|
||||||
|
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/Newtonsoft.Json.dll
|
||||||
|
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll
|
||||||
|
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/RestSharp.dll
|
||||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll.mdb
|
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll.mdb
|
||||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll
|
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll
|
||||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll
|
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll
|
||||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll.mdb
|
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll.mdb
|
||||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/Newtonsoft.Json.dll
|
|
||||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll
|
|
||||||
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/RestSharp.dll
|
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
package swagger
|
|
||||||
|
|
||||||
import (
|
|
||||||
)
|
|
||||||
|
|
||||||
type ModelReturn struct {
|
|
||||||
Return_ int32 `json:"return,omitempty"`
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
package swagger
|
|
||||||
|
|
||||||
import (
|
|
||||||
)
|
|
||||||
|
|
||||||
type Name struct {
|
|
||||||
Name int32 `json:"name,omitempty"`
|
|
||||||
SnakeCase int32 `json:"snake_case,omitempty"`
|
|
||||||
}
|
|
||||||
@@ -18,6 +18,7 @@ type Configuration struct {
|
|||||||
Scheme string `json:"scheme,omitempty"`
|
Scheme string `json:"scheme,omitempty"`
|
||||||
AccessToken string `json:"accessToken,omitempty"`
|
AccessToken string `json:"accessToken,omitempty"`
|
||||||
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
|
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
|
||||||
|
UserAgent string `json:"userAgent,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewConfiguration() *Configuration {
|
func NewConfiguration() *Configuration {
|
||||||
@@ -27,7 +28,8 @@ func NewConfiguration() *Configuration {
|
|||||||
Debug: false,
|
Debug: false,
|
||||||
DefaultHeader: make(map[string]string),
|
DefaultHeader: make(map[string]string),
|
||||||
ApiKey: make(map[string]string),
|
ApiKey: make(map[string]string),
|
||||||
ApiKeyPrefix: make(map[string]string) ,
|
ApiKeyPrefix: make(map[string]string),
|
||||||
|
UserAgent: "Swagger-Codegen/1.0.0/go",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,9 +201,9 @@ func (a PetApi) FindPetsByStatus (status []string) ([]Pet, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type QueryParams struct {
|
type QueryParams struct {
|
||||||
status []string `url:"status,omitempty"`
|
Status []string `url:"status,omitempty"`
|
||||||
}
|
}
|
||||||
_sling = _sling.QueryStruct(&QueryParams{ status: status })
|
_sling = _sling.QueryStruct(&QueryParams{ Status: status })
|
||||||
// accept header
|
// accept header
|
||||||
accepts := []string { "application/xml", "application/json" }
|
accepts := []string { "application/xml", "application/json" }
|
||||||
for key := range accepts {
|
for key := range accepts {
|
||||||
@@ -274,9 +274,9 @@ func (a PetApi) FindPetsByTags (tags []string) ([]Pet, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type QueryParams struct {
|
type QueryParams struct {
|
||||||
tags []string `url:"tags,omitempty"`
|
Tags []string `url:"tags,omitempty"`
|
||||||
}
|
}
|
||||||
_sling = _sling.QueryStruct(&QueryParams{ tags: tags })
|
_sling = _sling.QueryStruct(&QueryParams{ Tags: tags })
|
||||||
// accept header
|
// accept header
|
||||||
accepts := []string { "application/xml", "application/json" }
|
accepts := []string { "application/xml", "application/json" }
|
||||||
for key := range accepts {
|
for key := range accepts {
|
||||||
@@ -497,10 +497,10 @@ func (a PetApi) UpdatePetWithForm (petId int64, name string, status string) (err
|
|||||||
}
|
}
|
||||||
|
|
||||||
type FormParams struct {
|
type FormParams struct {
|
||||||
name string `url:"name,omitempty"`
|
Name string `url:"name,omitempty"`
|
||||||
status string `url:"status,omitempty"`
|
Status string `url:"status,omitempty"`
|
||||||
}
|
}
|
||||||
_sling = _sling.BodyForm(&FormParams{ name: name,status: status })
|
_sling = _sling.BodyForm(&FormParams{ Name: name,Status: status })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -574,10 +574,10 @@ func (a PetApi) UploadFile (petId int64, additionalMetadata string, file *os.Fil
|
|||||||
}
|
}
|
||||||
|
|
||||||
type FormParams struct {
|
type FormParams struct {
|
||||||
additionalMetadata string `url:"additionalMetadata,omitempty"`
|
AdditionalMetadata string `url:"additionalMetadata,omitempty"`
|
||||||
file *os.File `url:"file,omitempty"`
|
File *os.File `url:"file,omitempty"`
|
||||||
}
|
}
|
||||||
_sling = _sling.BodyForm(&FormParams{ additionalMetadata: additionalMetadata,file: file })
|
_sling = _sling.BodyForm(&FormParams{ AdditionalMetadata: additionalMetadata,File: file })
|
||||||
|
|
||||||
var successPayload = new(ApiResponse)
|
var successPayload = new(ApiResponse)
|
||||||
|
|
||||||
@@ -374,10 +374,10 @@ func (a UserApi) LoginUser (username string, password string) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type QueryParams struct {
|
type QueryParams struct {
|
||||||
username string `url:"username,omitempty"`
|
Username string `url:"username,omitempty"`
|
||||||
password string `url:"password,omitempty"`
|
Password string `url:"password,omitempty"`
|
||||||
}
|
}
|
||||||
_sling = _sling.QueryStruct(&QueryParams{ username: username,password: password })
|
_sling = _sling.QueryStruct(&QueryParams{ Username: username,Password: password })
|
||||||
// accept header
|
// accept header
|
||||||
accepts := []string { "application/xml", "application/json" }
|
accepts := []string { "application/xml", "application/json" }
|
||||||
for key := range accepts {
|
for key := range accepts {
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
WWW::SwaggerClient::Role - a Moose role for the Swagger Petstore
|
WWW::SwaggerClient::Role - a Moose role for the Swagger Petstore
|
||||||
|
|
||||||
This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose.
|
||||||
|
|
||||||
# VERSION
|
# VERSION
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/
|
|||||||
|
|
||||||
- API version: 1.0.0
|
- API version: 1.0.0
|
||||||
- Package version: 1.0.0
|
- Package version: 1.0.0
|
||||||
- Build date: 2016-04-12T12:54:53.924+08:00
|
- Build date: 2016-04-13T22:41:41.133+08:00
|
||||||
- Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
- Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
||||||
|
|
||||||
## A note on Moose
|
## A note on Moose
|
||||||
@@ -232,11 +232,11 @@ use WWW::SwaggerClient::UserApi;
|
|||||||
To load the models:
|
To load the models:
|
||||||
```perl
|
```perl
|
||||||
use WWW::SwaggerClient::Object::Animal;
|
use WWW::SwaggerClient::Object::Animal;
|
||||||
|
use WWW::SwaggerClient::Object::ApiResponse;
|
||||||
use WWW::SwaggerClient::Object::Cat;
|
use WWW::SwaggerClient::Object::Cat;
|
||||||
use WWW::SwaggerClient::Object::Category;
|
use WWW::SwaggerClient::Object::Category;
|
||||||
use WWW::SwaggerClient::Object::Dog;
|
use WWW::SwaggerClient::Object::Dog;
|
||||||
use WWW::SwaggerClient::Object::FormatTest;
|
use WWW::SwaggerClient::Object::FormatTest;
|
||||||
use WWW::SwaggerClient::Object::InlineResponse200;
|
|
||||||
use WWW::SwaggerClient::Object::Model200Response;
|
use WWW::SwaggerClient::Object::Model200Response;
|
||||||
use WWW::SwaggerClient::Object::ModelReturn;
|
use WWW::SwaggerClient::Object::ModelReturn;
|
||||||
use WWW::SwaggerClient::Object::Name;
|
use WWW::SwaggerClient::Object::Name;
|
||||||
@@ -262,11 +262,11 @@ use WWW::SwaggerClient::UserApi;
|
|||||||
|
|
||||||
# load the models
|
# load the models
|
||||||
use WWW::SwaggerClient::Object::Animal;
|
use WWW::SwaggerClient::Object::Animal;
|
||||||
|
use WWW::SwaggerClient::Object::ApiResponse;
|
||||||
use WWW::SwaggerClient::Object::Cat;
|
use WWW::SwaggerClient::Object::Cat;
|
||||||
use WWW::SwaggerClient::Object::Category;
|
use WWW::SwaggerClient::Object::Category;
|
||||||
use WWW::SwaggerClient::Object::Dog;
|
use WWW::SwaggerClient::Object::Dog;
|
||||||
use WWW::SwaggerClient::Object::FormatTest;
|
use WWW::SwaggerClient::Object::FormatTest;
|
||||||
use WWW::SwaggerClient::Object::InlineResponse200;
|
|
||||||
use WWW::SwaggerClient::Object::Model200Response;
|
use WWW::SwaggerClient::Object::Model200Response;
|
||||||
use WWW::SwaggerClient::Object::ModelReturn;
|
use WWW::SwaggerClient::Object::ModelReturn;
|
||||||
use WWW::SwaggerClient::Object::Name;
|
use WWW::SwaggerClient::Object::Name;
|
||||||
@@ -301,20 +301,15 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
|||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
|
*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
|
||||||
*PetApi* | [**add_pet_using_byte_array**](docs/PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
|
||||||
*PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
|
*PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||||
*PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
|
*PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
|
||||||
*PetApi* | [**find_pets_by_tags**](docs/PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
|
*PetApi* | [**find_pets_by_tags**](docs/PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||||
*PetApi* | [**get_pet_by_id**](docs/PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
|
*PetApi* | [**get_pet_by_id**](docs/PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
|
||||||
*PetApi* | [**get_pet_by_id_in_object**](docs/PetApi.md#get_pet_by_id_in_object) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
|
||||||
*PetApi* | [**pet_pet_idtesting_byte_arraytrue_get**](docs/PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
|
||||||
*PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
|
*PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
|
||||||
*PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
*PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||||
*PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
|
*PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||||
*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||||
*StoreApi* | [**find_orders_by_status**](docs/StoreApi.md#find_orders_by_status) | **GET** /store/findByStatus | Finds orders by status
|
|
||||||
*StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
|
*StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||||
*StoreApi* | [**get_inventory_in_object**](docs/StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
|
||||||
*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
|
*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||||
*StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
|
*StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
|
||||||
*UserApi* | [**create_user**](docs/UserApi.md#create_user) | **POST** /user | Create user
|
*UserApi* | [**create_user**](docs/UserApi.md#create_user) | **POST** /user | Create user
|
||||||
@@ -329,11 +324,11 @@ Class | Method | HTTP request | Description
|
|||||||
|
|
||||||
# DOCUMENTATION FOR MODELS
|
# DOCUMENTATION FOR MODELS
|
||||||
- [WWW::SwaggerClient::Object::Animal](docs/Animal.md)
|
- [WWW::SwaggerClient::Object::Animal](docs/Animal.md)
|
||||||
|
- [WWW::SwaggerClient::Object::ApiResponse](docs/ApiResponse.md)
|
||||||
- [WWW::SwaggerClient::Object::Cat](docs/Cat.md)
|
- [WWW::SwaggerClient::Object::Cat](docs/Cat.md)
|
||||||
- [WWW::SwaggerClient::Object::Category](docs/Category.md)
|
- [WWW::SwaggerClient::Object::Category](docs/Category.md)
|
||||||
- [WWW::SwaggerClient::Object::Dog](docs/Dog.md)
|
- [WWW::SwaggerClient::Object::Dog](docs/Dog.md)
|
||||||
- [WWW::SwaggerClient::Object::FormatTest](docs/FormatTest.md)
|
- [WWW::SwaggerClient::Object::FormatTest](docs/FormatTest.md)
|
||||||
- [WWW::SwaggerClient::Object::InlineResponse200](docs/InlineResponse200.md)
|
|
||||||
- [WWW::SwaggerClient::Object::Model200Response](docs/Model200Response.md)
|
- [WWW::SwaggerClient::Object::Model200Response](docs/Model200Response.md)
|
||||||
- [WWW::SwaggerClient::Object::ModelReturn](docs/ModelReturn.md)
|
- [WWW::SwaggerClient::Object::ModelReturn](docs/ModelReturn.md)
|
||||||
- [WWW::SwaggerClient::Object::Name](docs/Name.md)
|
- [WWW::SwaggerClient::Object::Name](docs/Name.md)
|
||||||
@@ -346,40 +341,12 @@ Class | Method | HTTP request | Description
|
|||||||
|
|
||||||
# DOCUMENTATION FOR AUTHORIATION
|
# DOCUMENTATION FOR AUTHORIATION
|
||||||
|
|
||||||
## test_api_key_header
|
|
||||||
|
|
||||||
- **Type**: API key
|
|
||||||
- **API key parameter name**: test_api_key_header
|
|
||||||
- **Location**: HTTP header
|
|
||||||
|
|
||||||
## api_key
|
## api_key
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key
|
- **API key parameter name**: api_key
|
||||||
- **Location**: HTTP header
|
- **Location**: HTTP header
|
||||||
|
|
||||||
## test_http_basic
|
|
||||||
|
|
||||||
- **Type**: HTTP basic authentication
|
|
||||||
|
|
||||||
## test_api_client_secret
|
|
||||||
|
|
||||||
- **Type**: API key
|
|
||||||
- **API key parameter name**: x-test_api_client_secret
|
|
||||||
- **Location**: HTTP header
|
|
||||||
|
|
||||||
## test_api_client_id
|
|
||||||
|
|
||||||
- **Type**: API key
|
|
||||||
- **API key parameter name**: x-test_api_client_id
|
|
||||||
- **Location**: HTTP header
|
|
||||||
|
|
||||||
## test_api_key_query
|
|
||||||
|
|
||||||
- **Type**: API key
|
|
||||||
- **API key parameter name**: test_api_key_query
|
|
||||||
- **Location**: URL query string
|
|
||||||
|
|
||||||
## petstore_auth
|
## petstore_auth
|
||||||
|
|
||||||
- **Type**: OAuth
|
- **Type**: OAuth
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
|
|||||||
**quantity** | **int** | | [optional]
|
**quantity** | **int** | | [optional]
|
||||||
**ship_date** | **DateTime** | | [optional]
|
**ship_date** | **DateTime** | | [optional]
|
||||||
**status** | **string** | Order Status | [optional]
|
**status** | **string** | Order Status | [optional]
|
||||||
**complete** | **boolean** | | [optional]
|
**complete** | **boolean** | | [optional] [default to false]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ if ($@) {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**User**](User.md)| Created user object | [optional]
|
**body** | [**User**](User.md)| Created user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ if ($@) {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**ARRAY[User]**](User.md)| List of user object | [optional]
|
**body** | [**ARRAY[User]**](User.md)| List of user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ if ($@) {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**ARRAY[User]**](User.md)| List of user object | [optional]
|
**body** | [**ARRAY[User]**](User.md)| List of user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
@@ -159,10 +159,6 @@ This can only be done by the logged in user.
|
|||||||
```perl
|
```perl
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure HTTP basic authorization: test_http_basic
|
|
||||||
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
|
|
||||||
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';
|
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::UserApi->new();
|
my $api_instance = WWW::SwaggerClient::UserApi->new();
|
||||||
my $username = 'username_example'; # string | The name that needs to be deleted
|
my $username = 'username_example'; # string | The name that needs to be deleted
|
||||||
|
|
||||||
@@ -186,12 +182,12 @@ void (empty response body)
|
|||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
[test_http_basic](../README.md#test_http_basic)
|
No authorization required
|
||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
@@ -235,7 +231,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
@@ -267,8 +263,8 @@ if ($@) {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**username** | **string**| The user name for login | [optional]
|
**username** | **string**| The user name for login |
|
||||||
**password** | **string**| The password for login in clear text | [optional]
|
**password** | **string**| The password for login in clear text |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -281,7 +277,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
@@ -320,7 +316,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
@@ -352,7 +348,7 @@ if ($@) {
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**username** | **string**| name that need to be deleted |
|
**username** | **string**| name that need to be deleted |
|
||||||
**body** | [**User**](User.md)| Updated user object | [optional]
|
**body** | [**User**](User.md)| Updated user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -365,7 +361,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@@ -319,47 +319,13 @@ sub update_params_for_auth {
|
|||||||
if (!defined($auth)) {
|
if (!defined($auth)) {
|
||||||
# TODO show warning about auth setting not defined
|
# TODO show warning about auth setting not defined
|
||||||
}
|
}
|
||||||
elsif ($auth eq 'test_api_key_header') {
|
elsif ($auth eq 'api_key') {
|
||||||
|
|
||||||
my $api_key = $self->get_api_key_with_prefix('test_api_key_header');
|
|
||||||
if ($api_key) {
|
|
||||||
$header_params->{'test_api_key_header'} = $api_key;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elsif ($auth eq 'api_key') {
|
|
||||||
|
|
||||||
my $api_key = $self->get_api_key_with_prefix('api_key');
|
my $api_key = $self->get_api_key_with_prefix('api_key');
|
||||||
if ($api_key) {
|
if ($api_key) {
|
||||||
$header_params->{'api_key'} = $api_key;
|
$header_params->{'api_key'} = $api_key;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif ($auth eq 'test_http_basic') {
|
|
||||||
|
|
||||||
if ($WWW::SwaggerClient::Configuration::username || $WWW::SwaggerClient::Configuration::password) {
|
|
||||||
$header_params->{'Authorization'} = 'Basic ' . encode_base64($WWW::SwaggerClient::Configuration::username . ":" . $WWW::SwaggerClient::Configuration::password);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elsif ($auth eq 'test_api_client_secret') {
|
|
||||||
|
|
||||||
my $api_key = $self->get_api_key_with_prefix('x-test_api_client_secret');
|
|
||||||
if ($api_key) {
|
|
||||||
$header_params->{'x-test_api_client_secret'} = $api_key;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elsif ($auth eq 'test_api_client_id') {
|
|
||||||
|
|
||||||
my $api_key = $self->get_api_key_with_prefix('x-test_api_client_id');
|
|
||||||
if ($api_key) {
|
|
||||||
$header_params->{'x-test_api_client_id'} = $api_key;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elsif ($auth eq 'test_api_key_query') {
|
|
||||||
|
|
||||||
my $api_key = $self->get_api_key_with_prefix('test_api_key_query');
|
|
||||||
if ($api_key) {
|
|
||||||
$query_params->{'test_api_key_query'} = $api_key;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elsif ($auth eq 'petstore_auth') {
|
elsif ($auth eq 'petstore_auth') {
|
||||||
|
|
||||||
if ($WWW::SwaggerClient::Configuration::access_token) {
|
if ($WWW::SwaggerClient::Configuration::access_token) {
|
||||||
|
|||||||
@@ -56,13 +56,13 @@ sub new {
|
|||||||
#
|
#
|
||||||
# Add a new pet to the store
|
# Add a new pet to the store
|
||||||
#
|
#
|
||||||
# @param Pet $body Pet object that needs to be added to the store (optional)
|
# @param Pet $body Pet object that needs to be added to the store (required)
|
||||||
{
|
{
|
||||||
my $params = {
|
my $params = {
|
||||||
'body' => {
|
'body' => {
|
||||||
data_type => 'Pet',
|
data_type => 'Pet',
|
||||||
description => 'Pet object that needs to be added to the store',
|
description => 'Pet object that needs to be added to the store',
|
||||||
required => '0',
|
required => '1',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
__PACKAGE__->method_documentation->{ add_pet } = {
|
__PACKAGE__->method_documentation->{ add_pet } = {
|
||||||
@@ -76,6 +76,11 @@ sub new {
|
|||||||
sub add_pet {
|
sub add_pet {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
# verify the required parameter 'body' is set
|
||||||
|
unless (exists $args{'body'}) {
|
||||||
|
croak("Missing the required parameter 'body' when calling add_pet");
|
||||||
|
}
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/pet';
|
my $_resource_path = '/pet';
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@@ -86,64 +91,7 @@ sub add_pet {
|
|||||||
my $form_params = {};
|
my $form_params = {};
|
||||||
|
|
||||||
# 'Accept' and 'Content-Type' header
|
# 'Accept' and 'Content-Type' header
|
||||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/xml');
|
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json');
|
||||||
if ($_header_accept) {
|
|
||||||
$header_params->{'Accept'} = $_header_accept;
|
|
||||||
}
|
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json', 'application/xml');
|
|
||||||
|
|
||||||
my $_body_data;
|
|
||||||
# body params
|
|
||||||
if ( exists $args{'body'}) {
|
|
||||||
$_body_data = $args{'body'};
|
|
||||||
}
|
|
||||||
|
|
||||||
# authentication setting, if any
|
|
||||||
my $auth_settings = [qw(petstore_auth )];
|
|
||||||
|
|
||||||
# make the API Call
|
|
||||||
$self->{api_client}->call_api($_resource_path, $_method,
|
|
||||||
$query_params, $form_params,
|
|
||||||
$header_params, $_body_data, $auth_settings);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# add_pet_using_byte_array
|
|
||||||
#
|
|
||||||
# Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
|
||||||
#
|
|
||||||
# @param string $body Pet object in the form of byte array (optional)
|
|
||||||
{
|
|
||||||
my $params = {
|
|
||||||
'body' => {
|
|
||||||
data_type => 'string',
|
|
||||||
description => 'Pet object in the form of byte array',
|
|
||||||
required => '0',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
__PACKAGE__->method_documentation->{ add_pet_using_byte_array } = {
|
|
||||||
summary => 'Fake endpoint to test byte array in body parameter for adding a new pet to the store',
|
|
||||||
params => $params,
|
|
||||||
returns => undef,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
# @return void
|
|
||||||
#
|
|
||||||
sub add_pet_using_byte_array {
|
|
||||||
my ($self, %args) = @_;
|
|
||||||
|
|
||||||
# parse inputs
|
|
||||||
my $_resource_path = '/pet?testing_byte_array=true';
|
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
|
||||||
|
|
||||||
my $_method = 'POST';
|
|
||||||
my $query_params = {};
|
|
||||||
my $header_params = {};
|
|
||||||
my $form_params = {};
|
|
||||||
|
|
||||||
# 'Accept' and 'Content-Type' header
|
|
||||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/xml');
|
|
||||||
if ($_header_accept) {
|
if ($_header_accept) {
|
||||||
$header_params->{'Accept'} = $_header_accept;
|
$header_params->{'Accept'} = $_header_accept;
|
||||||
}
|
}
|
||||||
@@ -211,7 +159,7 @@ sub delete_pet {
|
|||||||
my $form_params = {};
|
my $form_params = {};
|
||||||
|
|
||||||
# 'Accept' and 'Content-Type' header
|
# 'Accept' and 'Content-Type' header
|
||||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/xml');
|
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json');
|
||||||
if ($_header_accept) {
|
if ($_header_accept) {
|
||||||
$header_params->{'Accept'} = $_header_accept;
|
$header_params->{'Accept'} = $_header_accept;
|
||||||
}
|
}
|
||||||
@@ -245,13 +193,13 @@ sub delete_pet {
|
|||||||
#
|
#
|
||||||
# Finds Pets by status
|
# Finds Pets by status
|
||||||
#
|
#
|
||||||
# @param ARRAY[string] $status Status values that need to be considered for query (optional, default to available)
|
# @param ARRAY[string] $status Status values that need to be considered for filter (required)
|
||||||
{
|
{
|
||||||
my $params = {
|
my $params = {
|
||||||
'status' => {
|
'status' => {
|
||||||
data_type => 'ARRAY[string]',
|
data_type => 'ARRAY[string]',
|
||||||
description => 'Status values that need to be considered for query',
|
description => 'Status values that need to be considered for filter',
|
||||||
required => '0',
|
required => '1',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
__PACKAGE__->method_documentation->{ find_pets_by_status } = {
|
__PACKAGE__->method_documentation->{ find_pets_by_status } = {
|
||||||
@@ -265,6 +213,11 @@ sub delete_pet {
|
|||||||
sub find_pets_by_status {
|
sub find_pets_by_status {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
# verify the required parameter 'status' is set
|
||||||
|
unless (exists $args{'status'}) {
|
||||||
|
croak("Missing the required parameter 'status' when calling find_pets_by_status");
|
||||||
|
}
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/pet/findByStatus';
|
my $_resource_path = '/pet/findByStatus';
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@@ -275,7 +228,7 @@ sub find_pets_by_status {
|
|||||||
my $form_params = {};
|
my $form_params = {};
|
||||||
|
|
||||||
# 'Accept' and 'Content-Type' header
|
# 'Accept' and 'Content-Type' header
|
||||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/xml');
|
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json');
|
||||||
if ($_header_accept) {
|
if ($_header_accept) {
|
||||||
$header_params->{'Accept'} = $_header_accept;
|
$header_params->{'Accept'} = $_header_accept;
|
||||||
}
|
}
|
||||||
@@ -306,13 +259,13 @@ sub find_pets_by_status {
|
|||||||
#
|
#
|
||||||
# Finds Pets by tags
|
# Finds Pets by tags
|
||||||
#
|
#
|
||||||
# @param ARRAY[string] $tags Tags to filter by (optional)
|
# @param ARRAY[string] $tags Tags to filter by (required)
|
||||||
{
|
{
|
||||||
my $params = {
|
my $params = {
|
||||||
'tags' => {
|
'tags' => {
|
||||||
data_type => 'ARRAY[string]',
|
data_type => 'ARRAY[string]',
|
||||||
description => 'Tags to filter by',
|
description => 'Tags to filter by',
|
||||||
required => '0',
|
required => '1',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
__PACKAGE__->method_documentation->{ find_pets_by_tags } = {
|
__PACKAGE__->method_documentation->{ find_pets_by_tags } = {
|
||||||
@@ -326,6 +279,11 @@ sub find_pets_by_status {
|
|||||||
sub find_pets_by_tags {
|
sub find_pets_by_tags {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
# verify the required parameter 'tags' is set
|
||||||
|
unless (exists $args{'tags'}) {
|
||||||
|
croak("Missing the required parameter 'tags' when calling find_pets_by_tags");
|
||||||
|
}
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/pet/findByTags';
|
my $_resource_path = '/pet/findByTags';
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@@ -336,7 +294,7 @@ sub find_pets_by_tags {
|
|||||||
my $form_params = {};
|
my $form_params = {};
|
||||||
|
|
||||||
# 'Accept' and 'Content-Type' header
|
# 'Accept' and 'Content-Type' header
|
||||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/xml');
|
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json');
|
||||||
if ($_header_accept) {
|
if ($_header_accept) {
|
||||||
$header_params->{'Accept'} = $_header_accept;
|
$header_params->{'Accept'} = $_header_accept;
|
||||||
}
|
}
|
||||||
@@ -367,12 +325,12 @@ sub find_pets_by_tags {
|
|||||||
#
|
#
|
||||||
# Find pet by ID
|
# Find pet by ID
|
||||||
#
|
#
|
||||||
# @param int $pet_id ID of pet that needs to be fetched (required)
|
# @param int $pet_id ID of pet to return (required)
|
||||||
{
|
{
|
||||||
my $params = {
|
my $params = {
|
||||||
'pet_id' => {
|
'pet_id' => {
|
||||||
data_type => 'int',
|
data_type => 'int',
|
||||||
description => 'ID of pet that needs to be fetched',
|
description => 'ID of pet to return',
|
||||||
required => '1',
|
required => '1',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -402,7 +360,7 @@ sub get_pet_by_id {
|
|||||||
my $form_params = {};
|
my $form_params = {};
|
||||||
|
|
||||||
# 'Accept' and 'Content-Type' header
|
# 'Accept' and 'Content-Type' header
|
||||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/xml');
|
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json');
|
||||||
if ($_header_accept) {
|
if ($_header_accept) {
|
||||||
$header_params->{'Accept'} = $_header_accept;
|
$header_params->{'Accept'} = $_header_accept;
|
||||||
}
|
}
|
||||||
@@ -417,7 +375,7 @@ sub get_pet_by_id {
|
|||||||
|
|
||||||
my $_body_data;
|
my $_body_data;
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw(api_key petstore_auth )];
|
my $auth_settings = [qw(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,
|
||||||
@@ -430,154 +388,18 @@ sub get_pet_by_id {
|
|||||||
return $_response_object;
|
return $_response_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
|
||||||
# get_pet_by_id_in_object
|
|
||||||
#
|
|
||||||
# Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
|
||||||
#
|
|
||||||
# @param int $pet_id ID of pet that needs to be fetched (required)
|
|
||||||
{
|
|
||||||
my $params = {
|
|
||||||
'pet_id' => {
|
|
||||||
data_type => 'int',
|
|
||||||
description => 'ID of pet that needs to be fetched',
|
|
||||||
required => '1',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
__PACKAGE__->method_documentation->{ get_pet_by_id_in_object } = {
|
|
||||||
summary => 'Fake endpoint to test inline arbitrary object return by 'Find pet by ID'',
|
|
||||||
params => $params,
|
|
||||||
returns => 'InlineResponse200',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
# @return InlineResponse200
|
|
||||||
#
|
|
||||||
sub get_pet_by_id_in_object {
|
|
||||||
my ($self, %args) = @_;
|
|
||||||
|
|
||||||
# verify the required parameter 'pet_id' is set
|
|
||||||
unless (exists $args{'pet_id'}) {
|
|
||||||
croak("Missing the required parameter 'pet_id' when calling get_pet_by_id_in_object");
|
|
||||||
}
|
|
||||||
|
|
||||||
# parse inputs
|
|
||||||
my $_resource_path = '/pet/{petId}?response=inline_arbitrary_object';
|
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
|
||||||
|
|
||||||
my $_method = 'GET';
|
|
||||||
my $query_params = {};
|
|
||||||
my $header_params = {};
|
|
||||||
my $form_params = {};
|
|
||||||
|
|
||||||
# 'Accept' and 'Content-Type' header
|
|
||||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/xml');
|
|
||||||
if ($_header_accept) {
|
|
||||||
$header_params->{'Accept'} = $_header_accept;
|
|
||||||
}
|
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
|
||||||
|
|
||||||
# path params
|
|
||||||
if ( exists $args{'pet_id'}) {
|
|
||||||
my $_base_variable = "{" . "petId" . "}";
|
|
||||||
my $_base_value = $self->{api_client}->to_path_value($args{'pet_id'});
|
|
||||||
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $_body_data;
|
|
||||||
# authentication setting, if any
|
|
||||||
my $auth_settings = [qw(api_key petstore_auth )];
|
|
||||||
|
|
||||||
# make the API Call
|
|
||||||
my $response = $self->{api_client}->call_api($_resource_path, $_method,
|
|
||||||
$query_params, $form_params,
|
|
||||||
$header_params, $_body_data, $auth_settings);
|
|
||||||
if (!$response) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
my $_response_object = $self->{api_client}->deserialize('InlineResponse200', $response);
|
|
||||||
return $_response_object;
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# pet_pet_idtesting_byte_arraytrue_get
|
|
||||||
#
|
|
||||||
# Fake endpoint to test byte array return by 'Find pet by ID'
|
|
||||||
#
|
|
||||||
# @param int $pet_id ID of pet that needs to be fetched (required)
|
|
||||||
{
|
|
||||||
my $params = {
|
|
||||||
'pet_id' => {
|
|
||||||
data_type => 'int',
|
|
||||||
description => 'ID of pet that needs to be fetched',
|
|
||||||
required => '1',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
__PACKAGE__->method_documentation->{ pet_pet_idtesting_byte_arraytrue_get } = {
|
|
||||||
summary => 'Fake endpoint to test byte array return by 'Find pet by ID'',
|
|
||||||
params => $params,
|
|
||||||
returns => 'string',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
# @return string
|
|
||||||
#
|
|
||||||
sub pet_pet_idtesting_byte_arraytrue_get {
|
|
||||||
my ($self, %args) = @_;
|
|
||||||
|
|
||||||
# verify the required parameter 'pet_id' is set
|
|
||||||
unless (exists $args{'pet_id'}) {
|
|
||||||
croak("Missing the required parameter 'pet_id' when calling pet_pet_idtesting_byte_arraytrue_get");
|
|
||||||
}
|
|
||||||
|
|
||||||
# parse inputs
|
|
||||||
my $_resource_path = '/pet/{petId}?testing_byte_array=true';
|
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
|
||||||
|
|
||||||
my $_method = 'GET';
|
|
||||||
my $query_params = {};
|
|
||||||
my $header_params = {};
|
|
||||||
my $form_params = {};
|
|
||||||
|
|
||||||
# 'Accept' and 'Content-Type' header
|
|
||||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/xml');
|
|
||||||
if ($_header_accept) {
|
|
||||||
$header_params->{'Accept'} = $_header_accept;
|
|
||||||
}
|
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
|
||||||
|
|
||||||
# path params
|
|
||||||
if ( exists $args{'pet_id'}) {
|
|
||||||
my $_base_variable = "{" . "petId" . "}";
|
|
||||||
my $_base_value = $self->{api_client}->to_path_value($args{'pet_id'});
|
|
||||||
$_resource_path =~ s/$_base_variable/$_base_value/g;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $_body_data;
|
|
||||||
# authentication setting, if any
|
|
||||||
my $auth_settings = [qw(api_key petstore_auth )];
|
|
||||||
|
|
||||||
# make the API Call
|
|
||||||
my $response = $self->{api_client}->call_api($_resource_path, $_method,
|
|
||||||
$query_params, $form_params,
|
|
||||||
$header_params, $_body_data, $auth_settings);
|
|
||||||
if (!$response) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
my $_response_object = $self->{api_client}->deserialize('string', $response);
|
|
||||||
return $_response_object;
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# update_pet
|
# update_pet
|
||||||
#
|
#
|
||||||
# Update an existing pet
|
# Update an existing pet
|
||||||
#
|
#
|
||||||
# @param Pet $body Pet object that needs to be added to the store (optional)
|
# @param Pet $body Pet object that needs to be added to the store (required)
|
||||||
{
|
{
|
||||||
my $params = {
|
my $params = {
|
||||||
'body' => {
|
'body' => {
|
||||||
data_type => 'Pet',
|
data_type => 'Pet',
|
||||||
description => 'Pet object that needs to be added to the store',
|
description => 'Pet object that needs to be added to the store',
|
||||||
required => '0',
|
required => '1',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
__PACKAGE__->method_documentation->{ update_pet } = {
|
__PACKAGE__->method_documentation->{ update_pet } = {
|
||||||
@@ -591,6 +413,11 @@ sub pet_pet_idtesting_byte_arraytrue_get {
|
|||||||
sub update_pet {
|
sub update_pet {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
# verify the required parameter 'body' is set
|
||||||
|
unless (exists $args{'body'}) {
|
||||||
|
croak("Missing the required parameter 'body' when calling update_pet");
|
||||||
|
}
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/pet';
|
my $_resource_path = '/pet';
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@@ -601,7 +428,7 @@ sub update_pet {
|
|||||||
my $form_params = {};
|
my $form_params = {};
|
||||||
|
|
||||||
# 'Accept' and 'Content-Type' header
|
# 'Accept' and 'Content-Type' header
|
||||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/xml');
|
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json');
|
||||||
if ($_header_accept) {
|
if ($_header_accept) {
|
||||||
$header_params->{'Accept'} = $_header_accept;
|
$header_params->{'Accept'} = $_header_accept;
|
||||||
}
|
}
|
||||||
@@ -628,13 +455,13 @@ sub update_pet {
|
|||||||
#
|
#
|
||||||
# Updates a pet in the store with form data
|
# Updates a pet in the store with form data
|
||||||
#
|
#
|
||||||
# @param string $pet_id ID of pet that needs to be updated (required)
|
# @param int $pet_id ID of pet that needs to be updated (required)
|
||||||
# @param string $name Updated name of the pet (optional)
|
# @param string $name Updated name of the pet (optional)
|
||||||
# @param string $status Updated status of the pet (optional)
|
# @param string $status Updated status of the pet (optional)
|
||||||
{
|
{
|
||||||
my $params = {
|
my $params = {
|
||||||
'pet_id' => {
|
'pet_id' => {
|
||||||
data_type => 'string',
|
data_type => 'int',
|
||||||
description => 'ID of pet that needs to be updated',
|
description => 'ID of pet that needs to be updated',
|
||||||
required => '1',
|
required => '1',
|
||||||
},
|
},
|
||||||
@@ -675,7 +502,7 @@ sub update_pet_with_form {
|
|||||||
my $form_params = {};
|
my $form_params = {};
|
||||||
|
|
||||||
# 'Accept' and 'Content-Type' header
|
# 'Accept' and 'Content-Type' header
|
||||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/xml');
|
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json');
|
||||||
if ($_header_accept) {
|
if ($_header_accept) {
|
||||||
$header_params->{'Accept'} = $_header_accept;
|
$header_params->{'Accept'} = $_header_accept;
|
||||||
}
|
}
|
||||||
@@ -738,10 +565,10 @@ sub update_pet_with_form {
|
|||||||
__PACKAGE__->method_documentation->{ upload_file } = {
|
__PACKAGE__->method_documentation->{ upload_file } = {
|
||||||
summary => 'uploads an image',
|
summary => 'uploads an image',
|
||||||
params => $params,
|
params => $params,
|
||||||
returns => undef,
|
returns => 'ApiResponse',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
# @return void
|
# @return ApiResponse
|
||||||
#
|
#
|
||||||
sub upload_file {
|
sub upload_file {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
@@ -761,7 +588,7 @@ sub upload_file {
|
|||||||
my $form_params = {};
|
my $form_params = {};
|
||||||
|
|
||||||
# 'Accept' and 'Content-Type' header
|
# 'Accept' and 'Content-Type' header
|
||||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/xml');
|
my $_header_accept = $self->{api_client}->select_header_accept('application/json');
|
||||||
if ($_header_accept) {
|
if ($_header_accept) {
|
||||||
$header_params->{'Accept'} = $_header_accept;
|
$header_params->{'Accept'} = $_header_accept;
|
||||||
}
|
}
|
||||||
@@ -790,10 +617,14 @@ sub upload_file {
|
|||||||
my $auth_settings = [qw(petstore_auth )];
|
my $auth_settings = [qw(petstore_auth )];
|
||||||
|
|
||||||
# make the API Call
|
# make the API Call
|
||||||
$self->{api_client}->call_api($_resource_path, $_method,
|
my $response = $self->{api_client}->call_api($_resource_path, $_method,
|
||||||
$query_params, $form_params,
|
$query_params, $form_params,
|
||||||
$header_params, $_body_data, $auth_settings);
|
$header_params, $_body_data, $auth_settings);
|
||||||
return;
|
if (!$response) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
my $_response_object = $self->{api_client}->deserialize('ApiResponse', $response);
|
||||||
|
return $_response_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ has version_info => ( is => 'ro',
|
|||||||
default => sub { {
|
default => sub { {
|
||||||
app_name => 'Swagger Petstore',
|
app_name => 'Swagger Petstore',
|
||||||
app_version => '1.0.0',
|
app_version => '1.0.0',
|
||||||
generated_date => '2016-04-12T12:54:53.924+08:00',
|
generated_date => '2016-04-13T22:41:41.133+08:00',
|
||||||
generator_class => 'class io.swagger.codegen.languages.PerlClientCodegen',
|
generator_class => 'class io.swagger.codegen.languages.PerlClientCodegen',
|
||||||
} },
|
} },
|
||||||
documentation => 'Information about the application version and the codegen codebase version'
|
documentation => 'Information about the application version and the codegen codebase version'
|
||||||
@@ -103,7 +103,7 @@ Automatically generated by the Perl Swagger Codegen project:
|
|||||||
|
|
||||||
=over 4
|
=over 4
|
||||||
|
|
||||||
=item Build date: 2016-04-12T12:54:53.924+08:00
|
=item Build date: 2016-04-13T22:41:41.133+08:00
|
||||||
|
|
||||||
=item Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
=item Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ sub delete_order {
|
|||||||
my $form_params = {};
|
my $form_params = {};
|
||||||
|
|
||||||
# 'Accept' and 'Content-Type' header
|
# 'Accept' and 'Content-Type' header
|
||||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/xml');
|
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json');
|
||||||
if ($_header_accept) {
|
if ($_header_accept) {
|
||||||
$header_params->{'Accept'} = $_header_accept;
|
$header_params->{'Accept'} = $_header_accept;
|
||||||
}
|
}
|
||||||
@@ -115,67 +115,6 @@ sub delete_order {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
|
||||||
# find_orders_by_status
|
|
||||||
#
|
|
||||||
# Finds orders by status
|
|
||||||
#
|
|
||||||
# @param string $status Status value that needs to be considered for query (optional, default to placed)
|
|
||||||
{
|
|
||||||
my $params = {
|
|
||||||
'status' => {
|
|
||||||
data_type => 'string',
|
|
||||||
description => 'Status value that needs to be considered for query',
|
|
||||||
required => '0',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
__PACKAGE__->method_documentation->{ find_orders_by_status } = {
|
|
||||||
summary => 'Finds orders by status',
|
|
||||||
params => $params,
|
|
||||||
returns => 'ARRAY[Order]',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
# @return ARRAY[Order]
|
|
||||||
#
|
|
||||||
sub find_orders_by_status {
|
|
||||||
my ($self, %args) = @_;
|
|
||||||
|
|
||||||
# parse inputs
|
|
||||||
my $_resource_path = '/store/findByStatus';
|
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
|
||||||
|
|
||||||
my $_method = 'GET';
|
|
||||||
my $query_params = {};
|
|
||||||
my $header_params = {};
|
|
||||||
my $form_params = {};
|
|
||||||
|
|
||||||
# 'Accept' and 'Content-Type' header
|
|
||||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/xml');
|
|
||||||
if ($_header_accept) {
|
|
||||||
$header_params->{'Accept'} = $_header_accept;
|
|
||||||
}
|
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
|
||||||
|
|
||||||
# query params
|
|
||||||
if ( exists $args{'status'}) {
|
|
||||||
$query_params->{'status'} = $self->{api_client}->to_query_value($args{'status'});
|
|
||||||
}
|
|
||||||
|
|
||||||
my $_body_data;
|
|
||||||
# authentication setting, if any
|
|
||||||
my $auth_settings = [qw(test_api_client_id test_api_client_secret )];
|
|
||||||
|
|
||||||
# make the API Call
|
|
||||||
my $response = $self->{api_client}->call_api($_resource_path, $_method,
|
|
||||||
$query_params, $form_params,
|
|
||||||
$header_params, $_body_data, $auth_settings);
|
|
||||||
if (!$response) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
my $_response_object = $self->{api_client}->deserialize('ARRAY[Order]', $response);
|
|
||||||
return $_response_object;
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# get_inventory
|
# get_inventory
|
||||||
#
|
#
|
||||||
@@ -205,7 +144,7 @@ sub get_inventory {
|
|||||||
my $form_params = {};
|
my $form_params = {};
|
||||||
|
|
||||||
# 'Accept' and 'Content-Type' header
|
# 'Accept' and 'Content-Type' header
|
||||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/xml');
|
my $_header_accept = $self->{api_client}->select_header_accept('application/json');
|
||||||
if ($_header_accept) {
|
if ($_header_accept) {
|
||||||
$header_params->{'Accept'} = $_header_accept;
|
$header_params->{'Accept'} = $_header_accept;
|
||||||
}
|
}
|
||||||
@@ -226,66 +165,16 @@ sub get_inventory {
|
|||||||
return $_response_object;
|
return $_response_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
|
||||||
# get_inventory_in_object
|
|
||||||
#
|
|
||||||
# Fake endpoint to test arbitrary object return by 'Get inventory'
|
|
||||||
#
|
|
||||||
{
|
|
||||||
my $params = {
|
|
||||||
};
|
|
||||||
__PACKAGE__->method_documentation->{ get_inventory_in_object } = {
|
|
||||||
summary => 'Fake endpoint to test arbitrary object return by 'Get inventory'',
|
|
||||||
params => $params,
|
|
||||||
returns => 'object',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
# @return object
|
|
||||||
#
|
|
||||||
sub get_inventory_in_object {
|
|
||||||
my ($self, %args) = @_;
|
|
||||||
|
|
||||||
# parse inputs
|
|
||||||
my $_resource_path = '/store/inventory?response=arbitrary_object';
|
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
|
||||||
|
|
||||||
my $_method = 'GET';
|
|
||||||
my $query_params = {};
|
|
||||||
my $header_params = {};
|
|
||||||
my $form_params = {};
|
|
||||||
|
|
||||||
# 'Accept' and 'Content-Type' header
|
|
||||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/xml');
|
|
||||||
if ($_header_accept) {
|
|
||||||
$header_params->{'Accept'} = $_header_accept;
|
|
||||||
}
|
|
||||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
|
||||||
|
|
||||||
my $_body_data;
|
|
||||||
# authentication setting, if any
|
|
||||||
my $auth_settings = [qw(api_key )];
|
|
||||||
|
|
||||||
# make the API Call
|
|
||||||
my $response = $self->{api_client}->call_api($_resource_path, $_method,
|
|
||||||
$query_params, $form_params,
|
|
||||||
$header_params, $_body_data, $auth_settings);
|
|
||||||
if (!$response) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
my $_response_object = $self->{api_client}->deserialize('object', $response);
|
|
||||||
return $_response_object;
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# get_order_by_id
|
# get_order_by_id
|
||||||
#
|
#
|
||||||
# Find purchase order by ID
|
# Find purchase order by ID
|
||||||
#
|
#
|
||||||
# @param string $order_id ID of pet that needs to be fetched (required)
|
# @param int $order_id ID of pet that needs to be fetched (required)
|
||||||
{
|
{
|
||||||
my $params = {
|
my $params = {
|
||||||
'order_id' => {
|
'order_id' => {
|
||||||
data_type => 'string',
|
data_type => 'int',
|
||||||
description => 'ID of pet that needs to be fetched',
|
description => 'ID of pet that needs to be fetched',
|
||||||
required => '1',
|
required => '1',
|
||||||
},
|
},
|
||||||
@@ -316,7 +205,7 @@ sub get_order_by_id {
|
|||||||
my $form_params = {};
|
my $form_params = {};
|
||||||
|
|
||||||
# 'Accept' and 'Content-Type' header
|
# 'Accept' and 'Content-Type' header
|
||||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/xml');
|
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json');
|
||||||
if ($_header_accept) {
|
if ($_header_accept) {
|
||||||
$header_params->{'Accept'} = $_header_accept;
|
$header_params->{'Accept'} = $_header_accept;
|
||||||
}
|
}
|
||||||
@@ -331,7 +220,7 @@ sub get_order_by_id {
|
|||||||
|
|
||||||
my $_body_data;
|
my $_body_data;
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw(test_api_key_header test_api_key_query )];
|
my $auth_settings = [qw()];
|
||||||
|
|
||||||
# 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,
|
||||||
@@ -349,13 +238,13 @@ sub get_order_by_id {
|
|||||||
#
|
#
|
||||||
# Place an order for a pet
|
# Place an order for a pet
|
||||||
#
|
#
|
||||||
# @param Order $body order placed for purchasing the pet (optional)
|
# @param Order $body order placed for purchasing the pet (required)
|
||||||
{
|
{
|
||||||
my $params = {
|
my $params = {
|
||||||
'body' => {
|
'body' => {
|
||||||
data_type => 'Order',
|
data_type => 'Order',
|
||||||
description => 'order placed for purchasing the pet',
|
description => 'order placed for purchasing the pet',
|
||||||
required => '0',
|
required => '1',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
__PACKAGE__->method_documentation->{ place_order } = {
|
__PACKAGE__->method_documentation->{ place_order } = {
|
||||||
@@ -369,6 +258,11 @@ sub get_order_by_id {
|
|||||||
sub place_order {
|
sub place_order {
|
||||||
my ($self, %args) = @_;
|
my ($self, %args) = @_;
|
||||||
|
|
||||||
|
# verify the required parameter 'body' is set
|
||||||
|
unless (exists $args{'body'}) {
|
||||||
|
croak("Missing the required parameter 'body' when calling place_order");
|
||||||
|
}
|
||||||
|
|
||||||
# parse inputs
|
# parse inputs
|
||||||
my $_resource_path = '/store/order';
|
my $_resource_path = '/store/order';
|
||||||
$_resource_path =~ s/{format}/json/; # default format to json
|
$_resource_path =~ s/{format}/json/; # default format to json
|
||||||
@@ -379,7 +273,7 @@ sub place_order {
|
|||||||
my $form_params = {};
|
my $form_params = {};
|
||||||
|
|
||||||
# 'Accept' and 'Content-Type' header
|
# 'Accept' and 'Content-Type' header
|
||||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/xml');
|
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json');
|
||||||
if ($_header_accept) {
|
if ($_header_accept) {
|
||||||
$header_params->{'Accept'} = $_header_accept;
|
$header_params->{'Accept'} = $_header_accept;
|
||||||
}
|
}
|
||||||
@@ -392,7 +286,7 @@ sub place_order {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# authentication setting, if any
|
# authentication setting, if any
|
||||||
my $auth_settings = [qw(test_api_client_id test_api_client_secret )];
|
my $auth_settings = [qw()];
|
||||||
|
|
||||||
# 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,
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user