fix swift mapping with int and number

This commit is contained in:
wing328 2016-04-11 19:37:56 +08:00
parent 6c7efd502b
commit 44a4219e3e
120 changed files with 1291 additions and 1723 deletions

View File

@ -1125,6 +1125,24 @@ public class DefaultCodegen {
} }
} }
if (p instanceof BaseIntegerProperty) {
BaseIntegerProperty sp = (BaseIntegerProperty) p;
property.isInteger = true;
/*if (sp.getEnum() != null) {
List<Integer> _enum = sp.getEnum();
property._enum = new ArrayList<String>();
for(Integer i : _enum) {
property._enum.add(i.toString());
}
property.isEnum = true;
// legacy support
Map<String, Object> allowableValues = new HashMap<String, Object>();
allowableValues.put("values", _enum);
property.allowableValues = allowableValues;
}*/
}
if (p instanceof IntegerProperty) { if (p instanceof IntegerProperty) {
IntegerProperty sp = (IntegerProperty) p; IntegerProperty sp = (IntegerProperty) p;
property.isInteger = true; property.isInteger = true;
@ -1173,6 +1191,24 @@ public class DefaultCodegen {
property.isByteArray = true; property.isByteArray = true;
} }
if (p instanceof DecimalProperty) {
DecimalProperty sp = (DecimalProperty) p;
property.isFloat = true;
/*if (sp.getEnum() != null) {
List<Double> _enum = sp.getEnum();
property._enum = new ArrayList<String>();
for(Double i : _enum) {
property._enum.add(i.toString());
}
property.isEnum = true;
// legacy support
Map<String, Object> allowableValues = new HashMap<String, Object>();
allowableValues.put("values", _enum);
property.allowableValues = allowableValues;
}*/
}
if (p instanceof DoubleProperty) { if (p instanceof DoubleProperty) {
DoubleProperty sp = (DoubleProperty) p; DoubleProperty sp = (DoubleProperty) p;
property.isDouble = true; property.isDouble = true;

View File

@ -91,6 +91,7 @@ public class GoClientCodegen extends DefaultCodegen implements CodegenConfig {
// map binary to string as a workaround // map binary to string as a workaround
// the correct solution is to use []byte // the correct solution is to use []byte
typeMapping.put("binary", "string"); typeMapping.put("binary", "string");
typeMapping.put("ByteArray", "string");
importMapping = new HashMap<String, String>(); importMapping = new HashMap<String, String>();
importMapping.put("time.Time", "time"); importMapping.put("time.Time", "time");

View File

@ -95,6 +95,7 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig {
//TODO binary should be mapped to byte array //TODO binary should be mapped to byte array
// mapped to String as a workaround // mapped to String as a workaround
typeMapping.put("binary", "string"); typeMapping.put("binary", "string");
typeMapping.put("ByteArray", "string");
cliOptions.clear(); cliOptions.clear();
cliOptions.add(new CliOption(MODULE_NAME, "Perl module name (convention: CamelCase or Long::Module).").defaultValue("SwaggerClient")); cliOptions.add(new CliOption(MODULE_NAME, "Perl module name (convention: CamelCase or Long::Module).").defaultValue("SwaggerClient"));

View File

@ -110,6 +110,7 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping.put("list", "array"); typeMapping.put("list", "array");
typeMapping.put("object", "object"); typeMapping.put("object", "object");
typeMapping.put("binary", "string"); typeMapping.put("binary", "string");
typeMapping.put("ByteArray", "string");
cliOptions.add(new CliOption(CodegenConstants.MODEL_PACKAGE, CodegenConstants.MODEL_PACKAGE_DESC)); cliOptions.add(new CliOption(CodegenConstants.MODEL_PACKAGE, CodegenConstants.MODEL_PACKAGE_DESC));
cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC)); cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC));

View File

@ -61,6 +61,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
//TODO binary should be mapped to byte array //TODO binary should be mapped to byte array
// mapped to String as a workaround // mapped to String as a workaround
typeMapping.put("binary", "str"); typeMapping.put("binary", "str");
typeMapping.put("ByteArray", "str");
// from https://docs.python.org/release/2.5.4/ref/keywords.html // from https://docs.python.org/release/2.5.4/ref/keywords.html
setReservedWordsLowerCase( setReservedWordsLowerCase(

View File

@ -116,6 +116,7 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping.put("object", "Object"); typeMapping.put("object", "Object");
typeMapping.put("file", "File"); typeMapping.put("file", "File");
typeMapping.put("binary", "String"); typeMapping.put("binary", "String");
typeMapping.put("ByteArray", "String");
// remove modelPackage and apiPackage added by default // remove modelPackage and apiPackage added by default
Iterator<CliOption> itr = cliOptions.iterator(); Iterator<CliOption> itr = cliOptions.iterator();

View File

@ -101,6 +101,7 @@ public class ScalaClientCodegen extends DefaultCodegen implements CodegenConfig
//TODO binary should be mapped to byte array //TODO binary should be mapped to byte array
// mapped to String as a workaround // mapped to String as a workaround
typeMapping.put("binary", "String"); typeMapping.put("binary", "String");
typeMapping.put("ByteArray", "String");
languageSpecificPrimitives = new HashSet<String>( languageSpecificPrimitives = new HashSet<String>(
Arrays.asList( Arrays.asList(

View File

@ -97,6 +97,7 @@ public class SwiftCodegen extends DefaultCodegen implements CodegenConfig {
); );
setReservedWordsLowerCase( setReservedWordsLowerCase(
Arrays.asList( Arrays.asList(
"Int", "Int32", "Int64", "Int64", "Float", "Double", "Bool", "Void", "String", "Character", "AnyObject",
"class", "break", "as", "associativity", "deinit", "case", "dynamicType", "convenience", "enum", "continue", "class", "break", "as", "associativity", "deinit", "case", "dynamicType", "convenience", "enum", "continue",
"false", "dynamic", "extension", "default", "is", "didSet", "func", "do", "nil", "final", "import", "else", "false", "dynamic", "extension", "default", "is", "didSet", "func", "do", "nil", "final", "import", "else",
"self", "get", "init", "fallthrough", "Self", "infix", "internal", "for", "super", "inout", "let", "if", "self", "get", "init", "fallthrough", "Self", "infix", "internal", "for", "super", "inout", "let", "if",
@ -129,6 +130,7 @@ public class SwiftCodegen extends DefaultCodegen implements CodegenConfig {
//TODO binary should be mapped to byte array //TODO binary should be mapped to byte array
// mapped to String as a workaround // mapped to String as a workaround
typeMapping.put("binary", "String"); typeMapping.put("binary", "String");
typeMapping.put("ByteArray", "String");
importMapping = new HashMap<String, String>(); importMapping = new HashMap<String, String>();

View File

@ -81,8 +81,9 @@ namespace {{packageName}}.Model
{ {
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class {{classname}} {\n"); sb.Append("class {{classname}} {\n");
{{#vars}}sb.Append(" {{name}}: ").Append({{name}}).Append("\n"); {{#vars}}
{{/vars}} sb.Append(" {{name}}: ").Append({{name}}).Append("\n");
{{/vars}}
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }

View File

@ -23,7 +23,8 @@ module {{moduleName}}{{#models}}{{#model}}{{#description}}
# Attribute type mapping. # Attribute type mapping.
def self.swagger_types def self.swagger_types
{ {
{{#vars}}:'{{{name}}}' => :'{{{datatype}}}'{{#hasMore}},{{/hasMore}} {{#vars}}
:'{{{name}}}' => :'{{{datatype}}}'{{#hasMore}},{{/hasMore}}
{{/vars}} {{/vars}}
} }
end end

View File

@ -11,15 +11,23 @@ import Foundation
/** {{description}} */{{/description}} /** {{description}} */{{/description}}
public class {{classname}}: JSONEncodable { public class {{classname}}: JSONEncodable {
{{#vars}}{{#isEnum}} {{#vars}}
{{#isEnum}}
public enum {{datatypeWithEnum}}: String { {{#allowableValues}}{{#values}} public enum {{datatypeWithEnum}}: String { {{#allowableValues}}{{#values}}
case {{enum}} = "{{raw}}"{{/values}}{{/allowableValues}} case {{enum}} = "{{raw}}"{{/values}}{{/allowableValues}}
} }
{{/isEnum}}{{/vars}} {{/isEnum}}
{{#vars}}{{#isEnum}}{{#description}}/** {{description}} */ {{/vars}}
{{/description}}public var {{name}}: {{{datatypeWithEnum}}}{{^unwrapRequired}}?{{/unwrapRequired}}{{#unwrapRequired}}{{^required}}?{{/required}}{{#required}}!{{/required}}{{/unwrapRequired}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{/isEnum}}{{^isEnum}}{{#description}}/** {{description}} */ {{#vars}}
{{/description}}public var {{name}}: {{{datatype}}}{{^unwrapRequired}}?{{/unwrapRequired}}{{#unwrapRequired}}{{^required}}?{{/required}}{{#required}}!{{/required}}{{/unwrapRequired}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{/isEnum}} {{#isEnum}}
{{/vars}} {{#description}}/** {{description}} */
{{/description}}public var {{name}}: {{{datatypeWithEnum}}}{{^unwrapRequired}}?{{/unwrapRequired}}{{#unwrapRequired}}{{^required}}?{{/required}}{{#required}}!{{/required}}{{/unwrapRequired}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}
{{/isEnum}}
{{^isEnum}}
{{#description}}/** {{description}} */
{{/description}}public var {{name}}: {{{datatype}}}{{^unwrapRequired}}?{{/unwrapRequired}}{{#unwrapRequired}}{{^required}}?{{/required}}{{#required}}!{{/required}}{{/unwrapRequired}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}
{{/isEnum}}
{{/vars}}
public init() {} public init() {}

View File

@ -62,7 +62,7 @@ namespace IO.Swagger.Model
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class Cat {\n"); sb.Append("class Cat {\n");
sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n");
sb.Append(" Declawed: ").Append(Declawed).Append("\n"); sb.Append(" Declawed: ").Append(Declawed).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }

View File

@ -54,7 +54,7 @@ namespace IO.Swagger.Model
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();
} }

View File

@ -62,7 +62,7 @@ namespace IO.Swagger.Model
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class Dog {\n"); sb.Append("class Dog {\n");
sb.Append(" ClassName: ").Append(ClassName).Append("\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n");
sb.Append(" Breed: ").Append(Breed).Append("\n"); sb.Append(" Breed: ").Append(Breed).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }

View File

@ -134,16 +134,16 @@ namespace IO.Swagger.Model
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class FormatTest {\n"); sb.Append("class FormatTest {\n");
sb.Append(" Integer: ").Append(Integer).Append("\n"); sb.Append(" Integer: ").Append(Integer).Append("\n");
sb.Append(" Int32: ").Append(Int32).Append("\n"); sb.Append(" Int32: ").Append(Int32).Append("\n");
sb.Append(" Int64: ").Append(Int64).Append("\n"); sb.Append(" Int64: ").Append(Int64).Append("\n");
sb.Append(" Number: ").Append(Number).Append("\n"); sb.Append(" Number: ").Append(Number).Append("\n");
sb.Append(" _Float: ").Append(_Float).Append("\n"); sb.Append(" _Float: ").Append(_Float).Append("\n");
sb.Append(" _Double: ").Append(_Double).Append("\n"); sb.Append(" _Double: ").Append(_Double).Append("\n");
sb.Append(" _String: ").Append(_String).Append("\n"); sb.Append(" _String: ").Append(_String).Append("\n");
sb.Append(" _Byte: ").Append(_Byte).Append("\n"); sb.Append(" _Byte: ").Append(_Byte).Append("\n");
sb.Append(" Binary: ").Append(Binary).Append("\n"); sb.Append(" Binary: ").Append(Binary).Append("\n");
sb.Append(" Date: ").Append(Date).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n");
sb.Append(" DateTime: ").Append(DateTime).Append("\n"); sb.Append(" DateTime: ").Append(DateTime).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }

View File

@ -113,11 +113,11 @@ namespace IO.Swagger.Model
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class InlineResponse200 {\n"); sb.Append("class InlineResponse200 {\n");
sb.Append(" Tags: ").Append(Tags).Append("\n"); sb.Append(" Tags: ").Append(Tags).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(" Status: ").Append(Status).Append("\n"); sb.Append(" Status: ").Append(Status).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("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }

View File

@ -60,7 +60,7 @@ namespace IO.Swagger.Model
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class Name {\n"); sb.Append("class Name {\n");
sb.Append(" _Name: ").Append(_Name).Append("\n"); sb.Append(" _Name: ").Append(_Name).Append("\n");
sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
} }

View File

@ -103,11 +103,11 @@ namespace IO.Swagger.Model
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();
} }

View File

@ -121,11 +121,11 @@ namespace IO.Swagger.Model
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();
} }

View File

@ -54,7 +54,7 @@ namespace IO.Swagger.Model
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();
} }

View File

@ -103,13 +103,13 @@ namespace IO.Swagger.Model
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();
} }

View File

@ -2,7 +2,7 @@
<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="222" Column="29" /> <File FileName="TestPet.cs" Line="216" Column="25" />
<File FileName="TestOrder.cs" Line="1" Column="1" /> <File FileName="TestOrder.cs" Line="1" Column="1" />
</Files> </Files>
</MonoDevelop.Ide.Workbench> </MonoDevelop.Ide.Workbench>

View File

@ -36,7 +36,6 @@ public class PetApi {
this.apiClient = apiClient; this.apiClient = apiClient;
} }
/** /**
* Add a new pet to the store * Add a new pet to the store
* *
@ -54,12 +53,9 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -72,11 +68,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" }; String[] localVarAuthNames = new String[] { "petstore_auth" };
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
} }
/** /**
* 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
* *
@ -94,12 +88,9 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -112,11 +103,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" }; String[] localVarAuthNames = new String[] { "petstore_auth" };
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
} }
/** /**
* Deletes a pet * Deletes a pet
* *
@ -141,14 +130,11 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (apiKey != null) if (apiKey != null)
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -161,11 +147,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" }; String[] localVarAuthNames = new String[] { "petstore_auth" };
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
} }
/** /**
* 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
@ -184,14 +168,10 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "status", status)); localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "status", status));
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -204,12 +184,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" }; String[] localVarAuthNames = new String[] { "petstore_auth" };
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {}; GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}
/** /**
* 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.
@ -228,14 +205,10 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "tags", tags)); localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "tags", tags));
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -248,12 +221,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" }; String[] localVarAuthNames = new String[] { "petstore_auth" };
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {}; GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}
/** /**
* Find pet by ID * Find pet by ID
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions * Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
@ -278,12 +248,9 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -296,12 +263,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" }; String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" };
GenericType<Pet> localVarReturnType = new GenericType<Pet>() {}; GenericType<Pet> localVarReturnType = new GenericType<Pet>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}
/** /**
* Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39; * Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39;
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions * Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
@ -326,12 +290,9 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -344,12 +305,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" }; String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" };
GenericType<InlineResponse200> localVarReturnType = new GenericType<InlineResponse200>() {}; GenericType<InlineResponse200> localVarReturnType = new GenericType<InlineResponse200>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}
/** /**
* Fake endpoint to test byte array return by &#39;Find pet by ID&#39; * Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions * Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
@ -374,12 +332,9 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -392,12 +347,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" }; String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" };
GenericType<byte[]> localVarReturnType = new GenericType<byte[]>() {}; GenericType<byte[]> localVarReturnType = new GenericType<byte[]>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}
/** /**
* Update an existing pet * Update an existing pet
* *
@ -415,12 +367,9 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -433,11 +382,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" }; String[] localVarAuthNames = new String[] { "petstore_auth" };
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
} }
/** /**
* Updates a pet in the store with form data * Updates a pet in the store with form data
* *
@ -463,15 +410,12 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (name != null) if (name != null)
localVarFormParams.put("name", name); localVarFormParams.put("name", name);
if (status != null) if (status != null)
localVarFormParams.put("status", status); localVarFormParams.put("status", status);
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
@ -485,11 +429,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" }; String[] localVarAuthNames = new String[] { "petstore_auth" };
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
} }
/** /**
* uploads an image * uploads an image
* *
@ -515,15 +457,12 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (additionalMetadata != null) if (additionalMetadata != null)
localVarFormParams.put("additionalMetadata", additionalMetadata); localVarFormParams.put("additionalMetadata", additionalMetadata);
if (file != null) if (file != null)
localVarFormParams.put("file", file); localVarFormParams.put("file", file);
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
@ -537,9 +476,7 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" }; String[] localVarAuthNames = new String[] { "petstore_auth" };
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
} }
} }

View File

@ -34,7 +34,6 @@ public class StoreApi {
this.apiClient = apiClient; this.apiClient = apiClient;
} }
/** /**
* Delete purchase order by ID * Delete purchase order by ID
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors * For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
@ -58,12 +57,9 @@ public class StoreApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -76,11 +72,9 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] { };
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
} }
/** /**
* 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
@ -99,14 +93,10 @@ public class StoreApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status));
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -119,12 +109,9 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { "test_api_client_id", "test_api_client_secret" }; String[] localVarAuthNames = new String[] { "test_api_client_id", "test_api_client_secret" };
GenericType<List<Order>> localVarReturnType = new GenericType<List<Order>>() {}; GenericType<List<Order>> localVarReturnType = new GenericType<List<Order>>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}
/** /**
* 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
@ -142,12 +129,9 @@ public class StoreApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -160,12 +144,9 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { "api_key" }; String[] localVarAuthNames = new String[] { "api_key" };
GenericType<Map<String, Integer>> localVarReturnType = new GenericType<Map<String, Integer>>() {}; GenericType<Map<String, Integer>> localVarReturnType = new GenericType<Map<String, Integer>>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}
/** /**
* Fake endpoint to test arbitrary object return by &#39;Get inventory&#39; * Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
* 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
@ -183,12 +164,9 @@ public class StoreApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -201,15 +179,12 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { "api_key" }; String[] localVarAuthNames = new String[] { "api_key" };
GenericType<Object> localVarReturnType = new GenericType<Object>() {}; GenericType<Object> localVarReturnType = new GenericType<Object>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}
/** /**
* Find purchase order by ID * Find purchase order by ID
* For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions * For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required) * @param orderId ID of pet that needs to be fetched (required)
* @return Order * @return Order
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
@ -231,12 +206,9 @@ public class StoreApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -249,12 +221,9 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { "test_api_key_header", "test_api_key_query" }; String[] localVarAuthNames = new String[] { "test_api_key_header", "test_api_key_query" };
GenericType<Order> localVarReturnType = new GenericType<Order>() {}; GenericType<Order> localVarReturnType = new GenericType<Order>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}
/** /**
* Place an order for a pet * Place an order for a pet
* *
@ -273,12 +242,9 @@ public class StoreApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -291,10 +257,7 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { "test_api_client_id", "test_api_client_secret" }; String[] localVarAuthNames = new String[] { "test_api_client_id", "test_api_client_secret" };
GenericType<Order> localVarReturnType = new GenericType<Order>() {}; GenericType<Order> localVarReturnType = new GenericType<Order>() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}
} }

View File

@ -34,7 +34,6 @@ public class UserApi {
this.apiClient = apiClient; this.apiClient = apiClient;
} }
/** /**
* Create user * Create user
* This can only be done by the logged in user. * This can only be done by the logged in user.
@ -52,12 +51,9 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -70,11 +66,9 @@ public class UserApi {
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] { };
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
} }
/** /**
* Creates list of users with given input array * Creates list of users with given input array
* *
@ -92,12 +86,9 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -110,11 +101,9 @@ public class UserApi {
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] { };
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
} }
/** /**
* Creates list of users with given input array * Creates list of users with given input array
* *
@ -132,12 +121,9 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -150,11 +136,9 @@ public class UserApi {
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] { };
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
} }
/** /**
* Delete user * Delete user
* This can only be done by the logged in user. * This can only be done by the logged in user.
@ -178,12 +162,9 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -196,11 +177,9 @@ public class UserApi {
String[] localVarAuthNames = new String[] { "test_http_basic" }; String[] localVarAuthNames = new String[] { "test_http_basic" };
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
} }
/** /**
* Get user by user name * Get user by user name
* *
@ -225,12 +204,9 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -243,12 +219,9 @@ public class UserApi {
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] { };
GenericType<User> localVarReturnType = new GenericType<User>() {}; GenericType<User> localVarReturnType = new GenericType<User>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}
/** /**
* Logs user into the system * Logs user into the system
* *
@ -268,16 +241,11 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -290,12 +258,9 @@ public class UserApi {
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] { };
GenericType<String> localVarReturnType = new GenericType<String>() {}; GenericType<String> localVarReturnType = new GenericType<String>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}
/** /**
* Logs out current logged in user session * Logs out current logged in user session
* *
@ -312,12 +277,9 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -330,11 +292,9 @@ public class UserApi {
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] { };
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
} }
/** /**
* Updated user * Updated user
* This can only be done by the logged in user. * This can only be done by the logged in user.
@ -359,12 +319,9 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json", "application/xml" "application/json", "application/xml"
}; };
@ -377,9 +334,7 @@ public class UserApi {
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] { };
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
} }
} }

View File

@ -32,7 +32,7 @@ public class Category {
this.id = id; this.id = id;
} }
/** /**
**/ **/
public Category name(String name) { public Category name(String name) {
@ -49,7 +49,6 @@ public class Category {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {

View File

@ -60,7 +60,7 @@ public class InlineResponse200 {
this.tags = tags; this.tags = tags;
} }
/** /**
**/ **/
public InlineResponse200 id(Long id) { public InlineResponse200 id(Long id) {
@ -77,7 +77,7 @@ public class InlineResponse200 {
this.id = id; this.id = id;
} }
/** /**
**/ **/
public InlineResponse200 category(Object category) { public InlineResponse200 category(Object category) {
@ -94,7 +94,7 @@ public class InlineResponse200 {
this.category = category; this.category = category;
} }
/** /**
* pet status in the store * pet status in the store
**/ **/
@ -112,7 +112,7 @@ public class InlineResponse200 {
this.status = status; this.status = status;
} }
/** /**
**/ **/
public InlineResponse200 name(String name) { public InlineResponse200 name(String name) {
@ -129,7 +129,7 @@ public class InlineResponse200 {
this.name = name; this.name = name;
} }
/** /**
**/ **/
public InlineResponse200 photoUrls(List<String> photoUrls) { public InlineResponse200 photoUrls(List<String> photoUrls) {
@ -146,7 +146,6 @@ public class InlineResponse200 {
this.photoUrls = photoUrls; this.photoUrls = photoUrls;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {

View File

@ -7,8 +7,11 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing model name starting with number
**/
@ApiModel(description = "Model for testing model name starting with number")
public class Model200Response { public class Model200Response {
@ -31,7 +34,6 @@ public class Model200Response {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {

View File

@ -7,8 +7,11 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing reserved words
**/
@ApiModel(description = "Model for testing reserved words")
public class ModelReturn { public class ModelReturn {
@ -31,7 +34,6 @@ public class ModelReturn {
this._return = _return; this._return = _return;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {

View File

@ -7,8 +7,11 @@ import io.swagger.annotations.ApiModelProperty;
/**
* 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 {
@ -23,7 +26,7 @@ public class Name {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("name") @JsonProperty("name")
public Integer getName() { public Integer getName() {
return name; return name;
@ -32,24 +35,13 @@ public class Name {
this.name = name; this.name = name;
} }
/**
**/
public Name snakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
return this;
}
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("snake_case") @JsonProperty("snake_case")
public Integer getSnakeCase() { public Integer getSnakeCase() {
return snakeCase; return snakeCase;
} }
public void setSnakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
}
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {

View File

@ -48,7 +48,7 @@ public class Order {
return id; return id;
} }
/** /**
**/ **/
public Order petId(Long petId) { public Order petId(Long petId) {
@ -65,7 +65,7 @@ public class Order {
this.petId = petId; this.petId = petId;
} }
/** /**
**/ **/
public Order quantity(Integer quantity) { public Order quantity(Integer quantity) {
@ -82,7 +82,7 @@ public class Order {
this.quantity = quantity; this.quantity = quantity;
} }
/** /**
**/ **/
public Order shipDate(Date shipDate) { public Order shipDate(Date shipDate) {
@ -99,7 +99,7 @@ public class Order {
this.shipDate = shipDate; this.shipDate = shipDate;
} }
/** /**
* Order Status * Order Status
**/ **/
@ -117,7 +117,7 @@ public class Order {
this.status = status; this.status = status;
} }
/** /**
**/ **/
public Order complete(Boolean complete) { public Order complete(Boolean complete) {
@ -134,7 +134,6 @@ public class Order {
this.complete = complete; this.complete = complete;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {

View File

@ -61,7 +61,7 @@ public class Pet {
this.id = id; this.id = id;
} }
/** /**
**/ **/
public Pet category(Category category) { public Pet category(Category category) {
@ -78,7 +78,7 @@ public class Pet {
this.category = category; this.category = category;
} }
/** /**
**/ **/
public Pet name(String name) { public Pet name(String name) {
@ -95,7 +95,7 @@ public class Pet {
this.name = name; this.name = name;
} }
/** /**
**/ **/
public Pet photoUrls(List<String> photoUrls) { public Pet photoUrls(List<String> photoUrls) {
@ -112,7 +112,7 @@ public class Pet {
this.photoUrls = photoUrls; this.photoUrls = photoUrls;
} }
/** /**
**/ **/
public Pet tags(List<Tag> tags) { public Pet tags(List<Tag> tags) {
@ -129,7 +129,7 @@ public class Pet {
this.tags = tags; this.tags = tags;
} }
/** /**
* pet status in the store * pet status in the store
**/ **/
@ -147,7 +147,6 @@ public class Pet {
this.status = status; this.status = status;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {

View File

@ -31,7 +31,6 @@ public class SpecialModelName {
this.specialPropertyName = specialPropertyName; this.specialPropertyName = specialPropertyName;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {

View File

@ -32,7 +32,7 @@ public class Tag {
this.id = id; this.id = id;
} }
/** /**
**/ **/
public Tag name(String name) { public Tag name(String name) {
@ -49,7 +49,6 @@ public class Tag {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {

View File

@ -38,7 +38,7 @@ public class User {
this.id = id; this.id = id;
} }
/** /**
**/ **/
public User username(String username) { public User username(String username) {
@ -55,7 +55,7 @@ public class User {
this.username = username; this.username = username;
} }
/** /**
**/ **/
public User firstName(String firstName) { public User firstName(String firstName) {
@ -72,7 +72,7 @@ public class User {
this.firstName = firstName; this.firstName = firstName;
} }
/** /**
**/ **/
public User lastName(String lastName) { public User lastName(String lastName) {
@ -89,7 +89,7 @@ public class User {
this.lastName = lastName; this.lastName = lastName;
} }
/** /**
**/ **/
public User email(String email) { public User email(String email) {
@ -106,7 +106,7 @@ public class User {
this.email = email; this.email = email;
} }
/** /**
**/ **/
public User password(String password) { public User password(String password) {
@ -123,7 +123,7 @@ public class User {
this.password = password; this.password = password;
} }
/** /**
**/ **/
public User phone(String phone) { public User phone(String phone) {
@ -140,7 +140,7 @@ public class User {
this.phone = phone; this.phone = phone;
} }
/** /**
* User Status * User Status
**/ **/
@ -158,7 +158,6 @@ public class User {
this.userStatus = userStatus; this.userStatus = userStatus;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {

View File

@ -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-03-30T20:57:51.908+08:00 - Build date: 2016-04-11T17:07:28.577+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
@ -235,6 +235,7 @@ use WWW::SwaggerClient::Object::Animal;
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::InlineResponse200; 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;
@ -264,6 +265,7 @@ use WWW::SwaggerClient::Object::Animal;
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::InlineResponse200; 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;
@ -299,20 +301,20 @@ 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* | [**add_pet_using_byte_array**](docs/PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array&#x3D;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 &#39;Find pet by ID&#39; *PetApi* | [**get_pet_by_id_in_object**](docs/PetApi.md#get_pet_by_id_in_object) | **GET** /pet/{petId}?response&#x3D;inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39;
*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 &#39;Find pet by ID&#39; *PetApi* | [**pet_pet_idtesting_byte_arraytrue_get**](docs/PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array&#x3D;true | Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
*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* | [**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 &#39;Get inventory&#39; *StoreApi* | [**get_inventory_in_object**](docs/StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response&#x3D;arbitrary_object | Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
*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
@ -330,6 +332,7 @@ Class | Method | HTTP request | Description
- [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::InlineResponse200](docs/InlineResponse200.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)

View File

@ -8,7 +8,7 @@ use WWW::SwaggerClient::Object::Name;
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**name** | **int** | | [optional] **name** | **int** | |
**snake_case** | **int** | | [optional] **snake_case** | **int** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -10,13 +10,13 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store [**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
[**add_pet_using_byte_array**](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 [**add_pet_using_byte_array**](PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array&#x3D;true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
[**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet [**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status [**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags [**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID [**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
[**get_pet_by_id_in_object**](PetApi.md#get_pet_by_id_in_object) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39; [**get_pet_by_id_in_object**](PetApi.md#get_pet_by_id_in_object) | **GET** /pet/{petId}?response&#x3D;inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39;
[**pet_pet_idtesting_byte_arraytrue_get**](PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by &#39;Find pet by ID&#39; [**pet_pet_idtesting_byte_arraytrue_get**](PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array&#x3D;true | Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
[**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet [**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data [**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image [**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image

View File

@ -12,7 +12,7 @@ Method | HTTP request | Description
[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID [**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
[**find_orders_by_status**](StoreApi.md#find_orders_by_status) | **GET** /store/findByStatus | Finds orders by status [**find_orders_by_status**](StoreApi.md#find_orders_by_status) | **GET** /store/findByStatus | Finds orders by status
[**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status [**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
[**get_inventory_in_object**](StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by &#39;Get inventory&#39; [**get_inventory_in_object**](StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response&#x3D;arbitrary_object | Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID [**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet [**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet

View File

@ -207,7 +207,7 @@ Get user by user name
use Data::Dumper; use Data::Dumper;
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 fetched. Use user1 for testing. my $username = 'username_example'; # string | The name that needs to be fetched. Use user1 for testing.
eval { eval {
my $result = $api_instance->get_user_by_name(username => $username); my $result = $api_instance->get_user_by_name(username => $username);
@ -222,7 +222,7 @@ if ($@) {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**username** | **string**| The name that needs to be fetched. Use user1 for testing. | **username** | **string**| The name that needs to be fetched. Use user1 for testing. |
### Return type ### Return type

View File

@ -326,47 +326,46 @@ sub update_params_for_auth {
$header_params->{'test_api_key_header'} = $api_key; $header_params->{'test_api_key_header'} = $api_key;
} }
} }
elsif ($auth eq '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') { elsif ($auth eq 'test_http_basic') {
if ($WWW::SwaggerClient::Configuration::username || $WWW::SwaggerClient::Configuration::password) { if ($WWW::SwaggerClient::Configuration::username || $WWW::SwaggerClient::Configuration::password) {
$header_params->{'Authorization'} = 'Basic ' . encode_base64($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') { elsif ($auth eq 'test_api_client_secret') {
my $api_key = $self->get_api_key_with_prefix('x-test_api_client_secret'); my $api_key = $self->get_api_key_with_prefix('x-test_api_client_secret');
if ($api_key) { if ($api_key) {
$header_params->{'x-test_api_client_secret'} = $api_key; $header_params->{'x-test_api_client_secret'} = $api_key;
} }
} }
elsif ($auth eq 'test_api_client_id') { elsif ($auth eq 'test_api_client_id') {
my $api_key = $self->get_api_key_with_prefix('x-test_api_client_id'); my $api_key = $self->get_api_key_with_prefix('x-test_api_client_id');
if ($api_key) { if ($api_key) {
$header_params->{'x-test_api_client_id'} = $api_key; $header_params->{'x-test_api_client_id'} = $api_key;
} }
} }
elsif ($auth eq 'test_api_key_query') { elsif ($auth eq 'test_api_key_query') {
my $api_key = $self->get_api_key_with_prefix('test_api_key_query'); my $api_key = $self->get_api_key_with_prefix('test_api_key_query');
if ($api_key) { if ($api_key) {
$query_params->{'test_api_key_query'} = $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) {
$header_params->{'Authorization'} = 'Bearer ' . $WWW::SwaggerClient::Configuration::access_token; $header_params->{'Authorization'} = 'Bearer ' . $WWW::SwaggerClient::Configuration::access_token;
} }
} }
else { else {
# TODO show warning about security definition not found # TODO show warning about security definition not found
} }

View File

@ -110,7 +110,6 @@ __PACKAGE__->method_documentation({
format => '', format => '',
read_only => '', read_only => '',
}, },
}); });
__PACKAGE__->swagger_types( { __PACKAGE__->swagger_types( {

View File

@ -110,14 +110,13 @@ __PACKAGE__->method_documentation({
format => '', format => '',
read_only => '', read_only => '',
}, },
'declawed' => { 'declawed' => {
datatype => 'boolean', datatype => 'boolean',
base_name => 'declawed', base_name => 'declawed',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
}); });
__PACKAGE__->swagger_types( { __PACKAGE__->swagger_types( {

View File

@ -110,14 +110,13 @@ __PACKAGE__->method_documentation({
format => '', format => '',
read_only => '', read_only => '',
}, },
'name' => { 'name' => {
datatype => 'string', datatype => 'string',
base_name => 'name', base_name => 'name',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
}); });
__PACKAGE__->swagger_types( { __PACKAGE__->swagger_types( {

View File

@ -110,14 +110,13 @@ __PACKAGE__->method_documentation({
format => '', format => '',
read_only => '', read_only => '',
}, },
'breed' => { 'breed' => {
datatype => 'string', datatype => 'string',
base_name => 'breed', base_name => 'breed',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
}); });
__PACKAGE__->swagger_types( { __PACKAGE__->swagger_types( {

View File

@ -110,42 +110,41 @@ __PACKAGE__->method_documentation({
format => '', format => '',
read_only => '', read_only => '',
}, },
'id' => { 'id' => {
datatype => 'int', datatype => 'int',
base_name => 'id', base_name => 'id',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
'category' => { 'category' => {
datatype => 'object', datatype => 'object',
base_name => 'category', base_name => 'category',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
'status' => { 'status' => {
datatype => 'string', datatype => 'string',
base_name => 'status', base_name => 'status',
description => 'pet status in the store', description => 'pet status in the store',
format => '', format => '',
read_only => '', read_only => '',
}, },
'name' => { 'name' => {
datatype => 'string', datatype => 'string',
base_name => 'name', base_name => 'name',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
'photo_urls' => { 'photo_urls' => {
datatype => 'ARRAY[string]', datatype => 'ARRAY[string]',
base_name => 'photoUrls', base_name => 'photoUrls',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
}); });
__PACKAGE__->swagger_types( { __PACKAGE__->swagger_types( {

View File

@ -15,7 +15,7 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
# #
# #Model for testing model name starting with number
# #
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. #NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
# #
@ -97,7 +97,7 @@ sub _deserialize {
__PACKAGE__->class_documentation({description => '', __PACKAGE__->class_documentation({description => 'Model for testing model name starting with number',
class => 'Model200Response', class => 'Model200Response',
required => [], # TODO required => [], # TODO
} ); } );
@ -110,7 +110,6 @@ __PACKAGE__->method_documentation({
format => '', format => '',
read_only => '', read_only => '',
}, },
}); });
__PACKAGE__->swagger_types( { __PACKAGE__->swagger_types( {

View File

@ -15,7 +15,7 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
# #
# #Model for testing reserved words
# #
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. #NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
# #
@ -97,7 +97,7 @@ sub _deserialize {
__PACKAGE__->class_documentation({description => '', __PACKAGE__->class_documentation({description => 'Model for testing reserved words',
class => 'ModelReturn', class => 'ModelReturn',
required => [], # TODO required => [], # TODO
} ); } );
@ -110,7 +110,6 @@ __PACKAGE__->method_documentation({
format => '', format => '',
read_only => '', read_only => '',
}, },
}); });
__PACKAGE__->swagger_types( { __PACKAGE__->swagger_types( {

View File

@ -15,7 +15,7 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
# #
# #Model for testing model name same as property name
# #
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. #NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
# #
@ -97,7 +97,7 @@ sub _deserialize {
__PACKAGE__->class_documentation({description => '', __PACKAGE__->class_documentation({description => 'Model for testing model name same as property name',
class => 'Name', class => 'Name',
required => [], # TODO required => [], # TODO
} ); } );
@ -110,14 +110,13 @@ __PACKAGE__->method_documentation({
format => '', format => '',
read_only => '', read_only => '',
}, },
'snake_case' => { 'snake_case' => {
datatype => 'int', datatype => 'int',
base_name => 'snake_case', base_name => 'snake_case',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
}); });
__PACKAGE__->swagger_types( { __PACKAGE__->swagger_types( {

View File

@ -110,42 +110,41 @@ __PACKAGE__->method_documentation({
format => '', format => '',
read_only => '', read_only => '',
}, },
'pet_id' => { 'pet_id' => {
datatype => 'int', datatype => 'int',
base_name => 'petId', base_name => 'petId',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
'quantity' => { 'quantity' => {
datatype => 'int', datatype => 'int',
base_name => 'quantity', base_name => 'quantity',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
'ship_date' => { 'ship_date' => {
datatype => 'DateTime', datatype => 'DateTime',
base_name => 'shipDate', base_name => 'shipDate',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
'status' => { 'status' => {
datatype => 'string', datatype => 'string',
base_name => 'status', base_name => 'status',
description => 'Order Status', description => 'Order Status',
format => '', format => '',
read_only => '', read_only => '',
}, },
'complete' => { 'complete' => {
datatype => 'boolean', datatype => 'boolean',
base_name => 'complete', base_name => 'complete',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
}); });
__PACKAGE__->swagger_types( { __PACKAGE__->swagger_types( {

View File

@ -110,42 +110,41 @@ __PACKAGE__->method_documentation({
format => '', format => '',
read_only => '', read_only => '',
}, },
'category' => { 'category' => {
datatype => 'Category', datatype => 'Category',
base_name => 'category', base_name => 'category',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
'name' => { 'name' => {
datatype => 'string', datatype => 'string',
base_name => 'name', base_name => 'name',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
'photo_urls' => { 'photo_urls' => {
datatype => 'ARRAY[string]', datatype => 'ARRAY[string]',
base_name => 'photoUrls', base_name => 'photoUrls',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
'tags' => { 'tags' => {
datatype => 'ARRAY[Tag]', datatype => 'ARRAY[Tag]',
base_name => 'tags', base_name => 'tags',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
'status' => { 'status' => {
datatype => 'string', datatype => 'string',
base_name => 'status', base_name => 'status',
description => 'pet status in the store', description => 'pet status in the store',
format => '', format => '',
read_only => '', read_only => '',
}, },
}); });
__PACKAGE__->swagger_types( { __PACKAGE__->swagger_types( {

View File

@ -110,7 +110,6 @@ __PACKAGE__->method_documentation({
format => '', format => '',
read_only => '', read_only => '',
}, },
}); });
__PACKAGE__->swagger_types( { __PACKAGE__->swagger_types( {

View File

@ -110,14 +110,13 @@ __PACKAGE__->method_documentation({
format => '', format => '',
read_only => '', read_only => '',
}, },
'name' => { 'name' => {
datatype => 'string', datatype => 'string',
base_name => 'name', base_name => 'name',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
}); });
__PACKAGE__->swagger_types( { __PACKAGE__->swagger_types( {

View File

@ -110,56 +110,55 @@ __PACKAGE__->method_documentation({
format => '', format => '',
read_only => '', read_only => '',
}, },
'username' => { 'username' => {
datatype => 'string', datatype => 'string',
base_name => 'username', base_name => 'username',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
'first_name' => { 'first_name' => {
datatype => 'string', datatype => 'string',
base_name => 'firstName', base_name => 'firstName',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
'last_name' => { 'last_name' => {
datatype => 'string', datatype => 'string',
base_name => 'lastName', base_name => 'lastName',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
'email' => { 'email' => {
datatype => 'string', datatype => 'string',
base_name => 'email', base_name => 'email',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
'password' => { 'password' => {
datatype => 'string', datatype => 'string',
base_name => 'password', base_name => 'password',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
'phone' => { 'phone' => {
datatype => 'string', datatype => 'string',
base_name => 'phone', base_name => 'phone',
description => '', description => '',
format => '', format => '',
read_only => '', read_only => '',
}, },
'user_status' => { 'user_status' => {
datatype => 'int', datatype => 'int',
base_name => 'userStatus', base_name => 'userStatus',
description => 'User Status', description => 'User Status',
format => '', format => '',
read_only => '', read_only => '',
}, },
}); });
__PACKAGE__->swagger_types( { __PACKAGE__->swagger_types( {

View File

@ -113,7 +113,6 @@ sub add_pet {
$query_params, $form_params, $query_params, $form_params,
$header_params, $_body_data, $auth_settings); $header_params, $_body_data, $auth_settings);
return; return;
} }
# #
@ -144,7 +143,7 @@ sub add_pet_using_byte_array {
# parse inputs # parse inputs
my $_resource_path = '/pet?testing_byte_array=true'; my $_resource_path = '/pet?testing_byte_array&#x3D;true';
$_resource_path =~ s/{format}/json/; # default format to json $_resource_path =~ s/{format}/json/; # default format to json
my $_method = 'POST'; my $_method = 'POST';
@ -178,7 +177,6 @@ sub add_pet_using_byte_array {
$query_params, $form_params, $query_params, $form_params,
$header_params, $_body_data, $auth_settings); $header_params, $_body_data, $auth_settings);
return; return;
} }
# #
@ -259,7 +257,6 @@ sub delete_pet {
$query_params, $form_params, $query_params, $form_params,
$header_params, $_body_data, $auth_settings); $header_params, $_body_data, $auth_settings);
return; return;
} }
# #
@ -327,8 +324,7 @@ sub find_pets_by_status {
} }
my $_response_object = $self->{api_client}->deserialize('ARRAY[Pet]', $response); my $_response_object = $self->{api_client}->deserialize('ARRAY[Pet]', $response);
return $_response_object; return $_response_object;
}
}
# #
# find_pets_by_tags # find_pets_by_tags
@ -395,8 +391,7 @@ sub find_pets_by_tags {
} }
my $_response_object = $self->{api_client}->deserialize('ARRAY[Pet]', $response); my $_response_object = $self->{api_client}->deserialize('ARRAY[Pet]', $response);
return $_response_object; return $_response_object;
}
}
# #
# get_pet_by_id # get_pet_by_id
@ -470,8 +465,7 @@ sub get_pet_by_id {
} }
my $_response_object = $self->{api_client}->deserialize('Pet', $response); my $_response_object = $self->{api_client}->deserialize('Pet', $response);
return $_response_object; return $_response_object;
}
}
# #
# get_pet_by_id_in_object # get_pet_by_id_in_object
@ -506,7 +500,7 @@ sub get_pet_by_id_in_object {
# parse inputs # parse inputs
my $_resource_path = '/pet/{petId}?response=inline_arbitrary_object'; my $_resource_path = '/pet/{petId}?response&#x3D;inline_arbitrary_object';
$_resource_path =~ s/{format}/json/; # default format to json $_resource_path =~ s/{format}/json/; # default format to json
my $_method = 'GET'; my $_method = 'GET';
@ -545,8 +539,7 @@ sub get_pet_by_id_in_object {
} }
my $_response_object = $self->{api_client}->deserialize('InlineResponse200', $response); my $_response_object = $self->{api_client}->deserialize('InlineResponse200', $response);
return $_response_object; return $_response_object;
}
}
# #
# pet_pet_idtesting_byte_arraytrue_get # pet_pet_idtesting_byte_arraytrue_get
@ -581,7 +574,7 @@ sub pet_pet_idtesting_byte_arraytrue_get {
# parse inputs # parse inputs
my $_resource_path = '/pet/{petId}?testing_byte_array=true'; my $_resource_path = '/pet/{petId}?testing_byte_array&#x3D;true';
$_resource_path =~ s/{format}/json/; # default format to json $_resource_path =~ s/{format}/json/; # default format to json
my $_method = 'GET'; my $_method = 'GET';
@ -620,8 +613,7 @@ sub pet_pet_idtesting_byte_arraytrue_get {
} }
my $_response_object = $self->{api_client}->deserialize('string', $response); my $_response_object = $self->{api_client}->deserialize('string', $response);
return $_response_object; return $_response_object;
}
}
# #
# update_pet # update_pet
@ -685,7 +677,6 @@ sub update_pet {
$query_params, $form_params, $query_params, $form_params,
$header_params, $_body_data, $auth_settings); $header_params, $_body_data, $auth_settings);
return; return;
} }
# #
@ -758,14 +749,10 @@ sub update_pet_with_form {
} }
# form params # form params
if ( exists $args{'name'} ) { if ( exists $args{'name'} ) {
$form_params->{'name'} = $self->{api_client}->to_form_value($args{'name'});
$form_params->{'name'} = $self->{api_client}->to_form_value($args{'name'});
}# form params }# form params
if ( exists $args{'status'} ) { if ( exists $args{'status'} ) {
$form_params->{'status'} = $self->{api_client}->to_form_value($args{'status'});
$form_params->{'status'} = $self->{api_client}->to_form_value($args{'status'});
} }
my $_body_data; my $_body_data;
@ -779,7 +766,6 @@ sub update_pet_with_form {
$query_params, $form_params, $query_params, $form_params,
$header_params, $_body_data, $auth_settings); $header_params, $_body_data, $auth_settings);
return; return;
} }
# #
@ -852,16 +838,12 @@ sub upload_file {
} }
# form params # form params
if ( exists $args{'additional_metadata'} ) { if ( exists $args{'additional_metadata'} ) {
$form_params->{'additionalMetadata'} = $self->{api_client}->to_form_value($args{'additional_metadata'});
$form_params->{'additionalMetadata'} = $self->{api_client}->to_form_value($args{'additional_metadata'});
}# form params }# form params
if ( exists $args{'file'} ) { if ( exists $args{'file'} ) {
$form_params->{'file'} = [] unless defined $form_params->{'file'}; $form_params->{'file'} = [] unless defined $form_params->{'file'};
push @{$form_params->{'file'}}, $args{'file'}; push @{$form_params->{'file'}}, $args{'file'};
}
}
my $_body_data; my $_body_data;
@ -874,7 +856,6 @@ sub upload_file {
$query_params, $form_params, $query_params, $form_params,
$header_params, $_body_data, $auth_settings); $header_params, $_body_data, $auth_settings);
return; return;
} }

View File

@ -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-03-30T20:57:51.908+08:00', generated_date => '2016-04-11T17:07:28.577+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-03-30T20:57:51.908+08:00 =item Build date: 2016-04-11T17:07:28.577+08:00
=item Build package: class io.swagger.codegen.languages.PerlClientCodegen =item Build package: class io.swagger.codegen.languages.PerlClientCodegen

View File

@ -120,7 +120,6 @@ sub delete_order {
$query_params, $form_params, $query_params, $form_params,
$header_params, $_body_data, $auth_settings); $header_params, $_body_data, $auth_settings);
return; return;
} }
# #
@ -188,8 +187,7 @@ sub find_orders_by_status {
} }
my $_response_object = $self->{api_client}->deserialize('ARRAY[Order]', $response); my $_response_object = $self->{api_client}->deserialize('ARRAY[Order]', $response);
return $_response_object; return $_response_object;
}
}
# #
# get_inventory # get_inventory
@ -247,8 +245,7 @@ sub get_inventory {
} }
my $_response_object = $self->{api_client}->deserialize('HASH[string,int]', $response); my $_response_object = $self->{api_client}->deserialize('HASH[string,int]', $response);
return $_response_object; return $_response_object;
}
}
# #
# get_inventory_in_object # get_inventory_in_object
@ -272,7 +269,7 @@ sub get_inventory_in_object {
# parse inputs # parse inputs
my $_resource_path = '/store/inventory?response=arbitrary_object'; my $_resource_path = '/store/inventory?response&#x3D;arbitrary_object';
$_resource_path =~ s/{format}/json/; # default format to json $_resource_path =~ s/{format}/json/; # default format to json
my $_method = 'GET'; my $_method = 'GET';
@ -306,8 +303,7 @@ sub get_inventory_in_object {
} }
my $_response_object = $self->{api_client}->deserialize('object', $response); my $_response_object = $self->{api_client}->deserialize('object', $response);
return $_response_object; return $_response_object;
}
}
# #
# get_order_by_id # get_order_by_id
@ -381,8 +377,7 @@ sub get_order_by_id {
} }
my $_response_object = $self->{api_client}->deserialize('Order', $response); my $_response_object = $self->{api_client}->deserialize('Order', $response);
return $_response_object; return $_response_object;
}
}
# #
# place_order # place_order
@ -449,8 +444,7 @@ sub place_order {
} }
my $_response_object = $self->{api_client}->deserialize('Order', $response); my $_response_object = $self->{api_client}->deserialize('Order', $response);
return $_response_object; return $_response_object;
}
}
1; 1;

View File

@ -113,7 +113,6 @@ sub create_user {
$query_params, $form_params, $query_params, $form_params,
$header_params, $_body_data, $auth_settings); $header_params, $_body_data, $auth_settings);
return; return;
} }
# #
@ -178,7 +177,6 @@ sub create_users_with_array_input {
$query_params, $form_params, $query_params, $form_params,
$header_params, $_body_data, $auth_settings); $header_params, $_body_data, $auth_settings);
return; return;
} }
# #
@ -243,7 +241,6 @@ sub create_users_with_list_input {
$query_params, $form_params, $query_params, $form_params,
$header_params, $_body_data, $auth_settings); $header_params, $_body_data, $auth_settings);
return; return;
} }
# #
@ -315,7 +312,6 @@ sub delete_user {
$query_params, $form_params, $query_params, $form_params,
$header_params, $_body_data, $auth_settings); $header_params, $_body_data, $auth_settings);
return; return;
} }
# #
@ -323,12 +319,12 @@ sub delete_user {
# #
# Get user by user name # Get user by user name
# #
# @param string $username The name that needs to be fetched. Use user1 for testing. (required) # @param string $username The name that needs to be fetched. Use user1 for testing. (required)
{ {
my $params = { my $params = {
'username' => { 'username' => {
data_type => 'string', data_type => 'string',
description => 'The name that needs to be fetched. Use user1 for testing.', description => 'The name that needs to be fetched. Use user1 for testing. ',
required => '1', required => '1',
}, },
}; };
@ -390,8 +386,7 @@ sub get_user_by_name {
} }
my $_response_object = $self->{api_client}->deserialize('User', $response); my $_response_object = $self->{api_client}->deserialize('User', $response);
return $_response_object; return $_response_object;
}
}
# #
# login_user # login_user
@ -467,8 +462,7 @@ sub login_user {
} }
my $_response_object = $self->{api_client}->deserialize('string', $response); my $_response_object = $self->{api_client}->deserialize('string', $response);
return $_response_object; return $_response_object;
}
}
# #
# logout_user # logout_user
@ -523,7 +517,6 @@ sub logout_user {
$query_params, $form_params, $query_params, $form_params,
$header_params, $_body_data, $auth_settings); $header_params, $_body_data, $auth_settings);
return; return;
} }
# #
@ -604,7 +597,6 @@ sub update_user {
$query_params, $form_params, $query_params, $form_params,
$header_params, $_body_data, $auth_settings); $header_params, $_body_data, $auth_settings);
return; return;
} }

View File

@ -5,7 +5,7 @@ This PHP package is automatically generated by the [Swagger Codegen](https://git
- API version: 1.0.0 - API version: 1.0.0
- Package version: 1.0.0 - Package version: 1.0.0
- Build date: 2016-04-09T21:05:22.902+02:00 - Build date: 2016-04-11T16:59:06.544+08:00
- Build package: class io.swagger.codegen.languages.PhpClientCodegen - Build package: class io.swagger.codegen.languages.PhpClientCodegen
## Requirements ## Requirements
@ -127,25 +127,10 @@ Class | Method | HTTP request | Description
## Documentation For Authorization ## Documentation For Authorization
## petstore_auth ## test_api_key_header
- **Type**: OAuth
- **Flow**: implicit
- **Authorizatoin URL**: http://petstore.swagger.io/api/oauth/dialog
- **Scopes**:
- **write:pets**: modify pets in your account
- **read:pets**: read your pets
## test_api_client_id
- **Type**: API key - **Type**: API key
- **API key parameter name**: x-test_api_client_id - **API key parameter name**: test_api_key_header
- **Location**: HTTP header
## test_api_client_secret
- **Type**: API key
- **API key parameter name**: x-test_api_client_secret
- **Location**: HTTP header - **Location**: HTTP header
## api_key ## api_key
@ -158,17 +143,32 @@ Class | Method | HTTP request | Description
- **Type**: HTTP basic authentication - **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 ## test_api_key_query
- **Type**: API key - **Type**: API key
- **API key parameter name**: test_api_key_query - **API key parameter name**: test_api_key_query
- **Location**: URL query string - **Location**: URL query string
## test_api_key_header ## petstore_auth
- **Type**: API key - **Type**: OAuth
- **API key parameter name**: test_api_key_header - **Flow**: implicit
- **Location**: HTTP header - **Authorizatoin URL**: http://petstore.swagger.io/api/oauth/dialog
- **Scopes**:
- **write:pets**: modify pets in your account
- **read:pets**: read your pets
## Author ## Author

View File

@ -3,12 +3,12 @@
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**photo_urls** | **string[]** | | [optional] **tags** | [**\Swagger\Client\Model\Tag[]**](Tag.md) | | [optional]
**name** | **string** | | [optional]
**id** | **int** | | **id** | **int** | |
**category** | **object** | | [optional] **category** | **object** | | [optional]
**tags** | [**\Swagger\Client\Model\Tag[]**](Tag.md) | | [optional]
**status** | **string** | pet status in the store | [optional] **status** | **string** | pet status in the store | [optional]
**name** | **string** | | [optional]
**photo_urls** | **string[]** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -268,12 +268,12 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
<?php <?php
require_once(__DIR__ . '/vendor/autoload.php'); require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: petstore_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure API key authorization: api_key // Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed // Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER'); // Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER');
// Configure OAuth2 access token for authorization: petstore_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Swagger\Client\Api\PetApi(); $api_instance = new Swagger\Client\Api\PetApi();
$pet_id = 789; // int | ID of pet that needs to be fetched $pet_id = 789; // int | ID of pet that needs to be fetched
@ -299,7 +299,7 @@ Name | Type | Description | Notes
### Authorization ### Authorization
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key) [api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP reuqest headers
@ -320,12 +320,12 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
<?php <?php
require_once(__DIR__ . '/vendor/autoload.php'); require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: petstore_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure API key authorization: api_key // Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed // Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER'); // Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER');
// Configure OAuth2 access token for authorization: petstore_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Swagger\Client\Api\PetApi(); $api_instance = new Swagger\Client\Api\PetApi();
$pet_id = 789; // int | ID of pet that needs to be fetched $pet_id = 789; // int | ID of pet that needs to be fetched
@ -351,7 +351,7 @@ Name | Type | Description | Notes
### Authorization ### Authorization
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key) [api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP reuqest headers
@ -372,12 +372,12 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
<?php <?php
require_once(__DIR__ . '/vendor/autoload.php'); require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: petstore_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure API key authorization: api_key // Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed // Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER'); // Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER');
// Configure OAuth2 access token for authorization: petstore_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Swagger\Client\Api\PetApi(); $api_instance = new Swagger\Client\Api\PetApi();
$pet_id = 789; // int | ID of pet that needs to be fetched $pet_id = 789; // int | ID of pet that needs to be fetched
@ -403,7 +403,7 @@ Name | Type | Description | Notes
### Authorization ### Authorization
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key) [api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP reuqest headers

View File

@ -214,14 +214,14 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
<?php <?php
require_once(__DIR__ . '/vendor/autoload.php'); require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: test_api_key_query
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('test_api_key_query', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('test_api_key_query', 'BEARER');
// Configure API key authorization: test_api_key_header // Configure API key authorization: test_api_key_header
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('test_api_key_header', 'YOUR_API_KEY'); Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('test_api_key_header', '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
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('test_api_key_header', 'BEARER'); // Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('test_api_key_header', 'BEARER');
// Configure API key authorization: test_api_key_query
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('test_api_key_query', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('test_api_key_query', 'BEARER');
$api_instance = new Swagger\Client\Api\StoreApi(); $api_instance = new Swagger\Client\Api\StoreApi();
$order_id = "order_id_example"; // string | ID of pet that needs to be fetched $order_id = "order_id_example"; // string | ID of pet that needs to be fetched
@ -247,7 +247,7 @@ 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) [test_api_key_header](../README.md#test_api_key_header), [test_api_key_query](../README.md#test_api_key_query)
### HTTP reuqest headers ### HTTP reuqest headers

View File

@ -593,17 +593,17 @@ class PetApi
$httpBody = $formParams; // for HTTP post (form) $httpBody = $formParams; // for HTTP post (form)
} }
// this endpoint requires OAuth (access token)
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// this endpoint requires API key authentication // this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');
if (strlen($apiKey) !== 0) { if (strlen($apiKey) !== 0) {
$headerParams['api_key'] = $apiKey; $headerParams['api_key'] = $apiKey;
} }
// this endpoint requires OAuth (access token)
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call // make the API Call
try { try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -695,17 +695,17 @@ class PetApi
$httpBody = $formParams; // for HTTP post (form) $httpBody = $formParams; // for HTTP post (form)
} }
// this endpoint requires OAuth (access token)
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// this endpoint requires API key authentication // this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');
if (strlen($apiKey) !== 0) { if (strlen($apiKey) !== 0) {
$headerParams['api_key'] = $apiKey; $headerParams['api_key'] = $apiKey;
} }
// this endpoint requires OAuth (access token)
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call // make the API Call
try { try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -797,17 +797,17 @@ class PetApi
$httpBody = $formParams; // for HTTP post (form) $httpBody = $formParams; // for HTTP post (form)
} }
// this endpoint requires OAuth (access token)
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// this endpoint requires API key authentication // this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');
if (strlen($apiKey) !== 0) { if (strlen($apiKey) !== 0) {
$headerParams['api_key'] = $apiKey; $headerParams['api_key'] = $apiKey;
} }
// this endpoint requires OAuth (access token)
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call // make the API Call
try { try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(

View File

@ -506,16 +506,16 @@ class StoreApi
} }
// this endpoint requires API key authentication // this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('test_api_key_query'); $apiKey = $this->apiClient->getApiKeyWithPrefix('test_api_key_header');
if (strlen($apiKey) !== 0) { if (strlen($apiKey) !== 0) {
$queryParams['test_api_key_query'] = $apiKey; $headerParams['test_api_key_header'] = $apiKey;
} }
// this endpoint requires API key authentication // this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('test_api_key_header'); $apiKey = $this->apiClient->getApiKeyWithPrefix('test_api_key_query');
if (strlen($apiKey) !== 0) { if (strlen($apiKey) !== 0) {
$headerParams['test_api_key_header'] = $apiKey; $queryParams['test_api_key_query'] = $apiKey;
} }
// make the API Call // make the API Call

View File

@ -57,12 +57,12 @@ class InlineResponse200 implements ArrayAccess
* @var string[] * @var string[]
*/ */
static $swaggerTypes = array( static $swaggerTypes = array(
'photo_urls' => 'string[]', 'tags' => '\Swagger\Client\Model\Tag[]',
'name' => 'string',
'id' => 'int', 'id' => 'int',
'category' => 'object', 'category' => 'object',
'tags' => '\Swagger\Client\Model\Tag[]', 'status' => 'string',
'status' => 'string' 'name' => 'string',
'photo_urls' => 'string[]'
); );
static function swaggerTypes() { static function swaggerTypes() {
@ -74,12 +74,12 @@ class InlineResponse200 implements ArrayAccess
* @var string[] * @var string[]
*/ */
static $attributeMap = array( static $attributeMap = array(
'photo_urls' => 'photoUrls', 'tags' => 'tags',
'name' => 'name',
'id' => 'id', 'id' => 'id',
'category' => 'category', 'category' => 'category',
'tags' => 'tags', 'status' => 'status',
'status' => 'status' 'name' => 'name',
'photo_urls' => 'photoUrls'
); );
static function attributeMap() { static function attributeMap() {
@ -91,12 +91,12 @@ class InlineResponse200 implements ArrayAccess
* @var string[] * @var string[]
*/ */
static $setters = array( static $setters = array(
'photo_urls' => 'setPhotoUrls', 'tags' => 'setTags',
'name' => 'setName',
'id' => 'setId', 'id' => 'setId',
'category' => 'setCategory', 'category' => 'setCategory',
'tags' => 'setTags', 'status' => 'setStatus',
'status' => 'setStatus' 'name' => 'setName',
'photo_urls' => 'setPhotoUrls'
); );
static function setters() { static function setters() {
@ -108,12 +108,12 @@ class InlineResponse200 implements ArrayAccess
* @var string[] * @var string[]
*/ */
static $getters = array( static $getters = array(
'photo_urls' => 'getPhotoUrls', 'tags' => 'getTags',
'name' => 'getName',
'id' => 'getId', 'id' => 'getId',
'category' => 'getCategory', 'category' => 'getCategory',
'tags' => 'getTags', 'status' => 'getStatus',
'status' => 'getStatus' 'name' => 'getName',
'photo_urls' => 'getPhotoUrls'
); );
static function getters() { static function getters() {
@ -121,15 +121,10 @@ class InlineResponse200 implements ArrayAccess
} }
/** /**
* $photo_urls * $tags
* @var string[] * @var \Swagger\Client\Model\Tag[]
*/ */
protected $photo_urls; protected $tags;
/**
* $name
* @var string
*/
protected $name;
/** /**
* $id * $id
* @var int * @var int
@ -140,16 +135,21 @@ class InlineResponse200 implements ArrayAccess
* @var object * @var object
*/ */
protected $category; protected $category;
/**
* $tags
* @var \Swagger\Client\Model\Tag[]
*/
protected $tags;
/** /**
* $status pet status in the store * $status pet status in the store
* @var string * @var string
*/ */
protected $status; protected $status;
/**
* $name
* @var string
*/
protected $name;
/**
* $photo_urls
* @var string[]
*/
protected $photo_urls;
/** /**
* Constructor * Constructor
@ -160,52 +160,32 @@ class InlineResponse200 implements ArrayAccess
if ($data != null) { if ($data != null) {
$this->photo_urls = $data["photo_urls"]; $this->tags = $data["tags"];
$this->name = $data["name"];
$this->id = $data["id"]; $this->id = $data["id"];
$this->category = $data["category"]; $this->category = $data["category"];
$this->tags = $data["tags"];
$this->status = $data["status"]; $this->status = $data["status"];
$this->name = $data["name"];
$this->photo_urls = $data["photo_urls"];
} }
} }
/** /**
* Gets photo_urls * Gets tags
* @return string[] * @return \Swagger\Client\Model\Tag[]
*/ */
public function getPhotoUrls() public function getTags()
{ {
return $this->photo_urls; return $this->tags;
} }
/** /**
* Sets photo_urls * Sets tags
* @param string[] $photo_urls * @param \Swagger\Client\Model\Tag[] $tags
* @return $this * @return $this
*/ */
public function setPhotoUrls($photo_urls) public function setTags($tags)
{ {
$this->photo_urls = $photo_urls; $this->tags = $tags;
return $this;
}
/**
* Gets name
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Sets name
* @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
return $this; return $this;
} }
/** /**
@ -248,26 +228,6 @@ class InlineResponse200 implements ArrayAccess
$this->category = $category; $this->category = $category;
return $this; return $this;
} }
/**
* Gets tags
* @return \Swagger\Client\Model\Tag[]
*/
public function getTags()
{
return $this->tags;
}
/**
* Sets tags
* @param \Swagger\Client\Model\Tag[] $tags
* @return $this
*/
public function setTags($tags)
{
$this->tags = $tags;
return $this;
}
/** /**
* Gets status * Gets status
* @return string * @return string
@ -291,6 +251,46 @@ class InlineResponse200 implements ArrayAccess
$this->status = $status; $this->status = $status;
return $this; return $this;
} }
/**
* Gets name
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Sets name
* @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Gets photo_urls
* @return string[]
*/
public function getPhotoUrls()
{
return $this->photo_urls;
}
/**
* Sets photo_urls
* @param string[] $photo_urls
* @return $this
*/
public function setPhotoUrls($photo_urls)
{
$this->photo_urls = $photo_urls;
return $this;
}
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset * @param integer $offset Offset

View File

@ -256,7 +256,7 @@ class ObjectSerializer
} else { } else {
return null; return null;
} }
} elseif (in_array($class, array('void', 'bool', 'string', 'double', 'byte', 'mixed', 'integer', 'float', 'int', 'DateTime', 'number', 'boolean', 'object'))) { } elseif (in_array($class, array('integer', 'int', 'void', 'number', 'object', 'double', 'float', 'byte', 'DateTime', 'string', 'mixed', 'boolean', 'bool'))) {
settype($data, $class); settype($data, $class);
return $data; return $data;
} elseif ($class === '\SplFileObject') { } elseif ($class === '\SplFileObject') {

View File

@ -3,9 +3,9 @@ This is a sample server Petstore server. You can find out more about Swagger at
This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API verion: 1.0.0 - API version: 1.0.0
- Package version: - Package version: 1.0.0
- Build date: 2016-03-30T17:18:44.943+08:00 - Build date: 2016-04-11T16:56:24.045+08:00
- Build package: class io.swagger.codegen.languages.PythonClientCodegen - Build package: class io.swagger.codegen.languages.PythonClientCodegen
## Requirements. ## Requirements.
@ -20,9 +20,9 @@ If the python package is hosted on Github, you can install directly from Github
```sh ```sh
pip install git+https://github.com/YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID.git pip install git+https://github.com/YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID.git
``` ```
(you may need to run the command with root permission: `sudo pip install git+https://github.com/YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID.git`) (you may need to run `pip` with root permission: `sudo pip install git+https://github.com/YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID.git`)
Import the pacakge: Then import the package:
```python ```python
import swagger_client import swagger_client
``` ```
@ -36,19 +36,11 @@ python setup.py install --user
``` ```
(or `sudo python setup.py install` to install the package for all users) (or `sudo python setup.py install` to install the package for all users)
Import the pacakge: Then import the package:
```python ```python
import swagger_client import swagger_client
``` ```
### Manual Installation
Download the latest release to the project folder (e.g. ./path/to/swagger_client) and import the package:
```python
import path.to.swagger_client
```
## Getting Started ## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following: Please follow the [installation procedure](#installation--usage) and then run the following:
@ -67,7 +59,7 @@ body = swagger_client.Pet() # Pet | Pet object that needs to be added to the sto
try: try:
# Add a new pet to the store # Add a new pet to the store
api_instance.add_pet(body=body); api_instance.add_pet(body=body)
except ApiException as e: except ApiException as e:
print "Exception when calling PetApi->add_pet: %s\n" % e print "Exception when calling PetApi->add_pet: %s\n" % e
@ -80,20 +72,20 @@ 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* | [**add_pet_using_byte_array**](docs/PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array&#x3D;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 &#39;Find pet by ID&#39; *PetApi* | [**get_pet_by_id_in_object**](docs/PetApi.md#get_pet_by_id_in_object) | **GET** /pet/{petId}?response&#x3D;inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39;
*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 &#39;Find pet by ID&#39; *PetApi* | [**pet_pet_idtesting_byte_arraytrue_get**](docs/PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array&#x3D;true | Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
*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* | [**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 &#39;Get inventory&#39; *StoreApi* | [**get_inventory_in_object**](docs/StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response&#x3D;arbitrary_object | Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
*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
@ -112,6 +104,7 @@ Class | Method | HTTP request | Description
- [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)
- [InlineResponse200](docs/InlineResponse200.md) - [InlineResponse200](docs/InlineResponse200.md)
- [Model200Response](docs/Model200Response.md) - [Model200Response](docs/Model200Response.md)
- [ModelReturn](docs/ModelReturn.md) - [ModelReturn](docs/ModelReturn.md)

View File

@ -3,7 +3,7 @@
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**name** | **int** | | [optional] **name** | **int** | |
**snake_case** | **int** | | [optional] **snake_case** | **int** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,17 +1,17 @@
# swagger_client\PetApi # swagger_client.PetApi
All URIs are relative to *http://petstore.swagger.io/v2* All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store [**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
[**add_pet_using_byte_array**](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 [**add_pet_using_byte_array**](PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array&#x3D;true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
[**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet [**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status [**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags [**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID [**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
[**get_pet_by_id_in_object**](PetApi.md#get_pet_by_id_in_object) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39; [**get_pet_by_id_in_object**](PetApi.md#get_pet_by_id_in_object) | **GET** /pet/{petId}?response&#x3D;inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39;
[**pet_pet_idtesting_byte_arraytrue_get**](PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by &#39;Find pet by ID&#39; [**pet_pet_idtesting_byte_arraytrue_get**](PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array&#x3D;true | Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
[**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet [**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data [**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image [**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
@ -26,11 +26,10 @@ Add a new pet to the store
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# Configure OAuth2 access token for authorization: petstore_auth # Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
@ -41,7 +40,7 @@ body = swagger_client.Pet() # Pet | Pet object that needs to be added to the sto
try: try:
# Add a new pet to the store # Add a new pet to the store
api_instance.add_pet(body=body); api_instance.add_pet(body=body)
except ApiException as e: except ApiException as e:
print "Exception when calling PetApi->add_pet: %s\n" % e print "Exception when calling PetApi->add_pet: %s\n" % e
``` ```
@ -76,11 +75,10 @@ Fake endpoint to test byte array in body parameter for adding a new pet to the s
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# Configure OAuth2 access token for authorization: petstore_auth # Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
@ -91,7 +89,7 @@ body = 'B' # str | Pet object in the form of byte array (optional)
try: try:
# 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
api_instance.add_pet_using_byte_array(body=body); api_instance.add_pet_using_byte_array(body=body)
except ApiException as e: except ApiException as e:
print "Exception when calling PetApi->add_pet_using_byte_array: %s\n" % e print "Exception when calling PetApi->add_pet_using_byte_array: %s\n" % e
``` ```
@ -126,11 +124,10 @@ Deletes a pet
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# Configure OAuth2 access token for authorization: petstore_auth # Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
@ -142,7 +139,7 @@ api_key = 'api_key_example' # str | (optional)
try: try:
# Deletes a pet # Deletes a pet
api_instance.delete_pet(pet_id, api_key=api_key); api_instance.delete_pet(pet_id, api_key=api_key)
except ApiException as e: except ApiException as e:
print "Exception when calling PetApi->delete_pet: %s\n" % e print "Exception when calling PetApi->delete_pet: %s\n" % e
``` ```
@ -178,11 +175,10 @@ Multiple status values can be provided with comma separated strings
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# Configure OAuth2 access token for authorization: petstore_auth # Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
@ -193,7 +189,7 @@ status = ['available'] # list[str] | Status values that need to be considered fo
try: try:
# Finds Pets by status # Finds Pets by status
api_response = api_instance.find_pets_by_status(status=status); api_response = api_instance.find_pets_by_status(status=status)
pprint(api_response) pprint(api_response)
except ApiException as e: except ApiException as e:
print "Exception when calling PetApi->find_pets_by_status: %s\n" % e print "Exception when calling PetApi->find_pets_by_status: %s\n" % e
@ -229,11 +225,10 @@ Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# Configure OAuth2 access token for authorization: petstore_auth # Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
@ -244,7 +239,7 @@ tags = ['tags_example'] # list[str] | Tags to filter by (optional)
try: try:
# Finds Pets by tags # Finds Pets by tags
api_response = api_instance.find_pets_by_tags(tags=tags); api_response = api_instance.find_pets_by_tags(tags=tags)
pprint(api_response) pprint(api_response)
except ApiException as e: except ApiException as e:
print "Exception when calling PetApi->find_pets_by_tags: %s\n" % e print "Exception when calling PetApi->find_pets_by_tags: %s\n" % e
@ -280,14 +275,13 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# Configure API key authorization: api_key # Configure API key authorization: api_key
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'; swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed # Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER' # swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
# Configure OAuth2 access token for authorization: petstore_auth # Configure OAuth2 access token for authorization: petstore_auth
@ -299,7 +293,7 @@ pet_id = 789 # int | ID of pet that needs to be fetched
try: try:
# Find pet by ID # Find pet by ID
api_response = api_instance.get_pet_by_id(pet_id); api_response = api_instance.get_pet_by_id(pet_id)
pprint(api_response) pprint(api_response)
except ApiException as e: except ApiException as e:
print "Exception when calling PetApi->get_pet_by_id: %s\n" % e print "Exception when calling PetApi->get_pet_by_id: %s\n" % e
@ -335,14 +329,13 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# Configure API key authorization: api_key # Configure API key authorization: api_key
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'; swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed # Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER' # swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
# Configure OAuth2 access token for authorization: petstore_auth # Configure OAuth2 access token for authorization: petstore_auth
@ -354,7 +347,7 @@ pet_id = 789 # int | ID of pet that needs to be fetched
try: try:
# 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'
api_response = api_instance.get_pet_by_id_in_object(pet_id); api_response = api_instance.get_pet_by_id_in_object(pet_id)
pprint(api_response) pprint(api_response)
except ApiException as e: except ApiException as e:
print "Exception when calling PetApi->get_pet_by_id_in_object: %s\n" % e print "Exception when calling PetApi->get_pet_by_id_in_object: %s\n" % e
@ -390,14 +383,13 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# Configure API key authorization: api_key # Configure API key authorization: api_key
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'; swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed # Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER' # swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
# Configure OAuth2 access token for authorization: petstore_auth # Configure OAuth2 access token for authorization: petstore_auth
@ -409,7 +401,7 @@ pet_id = 789 # int | ID of pet that needs to be fetched
try: try:
# Fake endpoint to test byte array return by 'Find pet by ID' # Fake endpoint to test byte array return by 'Find pet by ID'
api_response = api_instance.pet_pet_idtesting_byte_arraytrue_get(pet_id); api_response = api_instance.pet_pet_idtesting_byte_arraytrue_get(pet_id)
pprint(api_response) pprint(api_response)
except ApiException as e: except ApiException as e:
print "Exception when calling PetApi->pet_pet_idtesting_byte_arraytrue_get: %s\n" % e print "Exception when calling PetApi->pet_pet_idtesting_byte_arraytrue_get: %s\n" % e
@ -445,11 +437,10 @@ Update an existing pet
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# Configure OAuth2 access token for authorization: petstore_auth # Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
@ -460,7 +451,7 @@ body = swagger_client.Pet() # Pet | Pet object that needs to be added to the sto
try: try:
# Update an existing pet # Update an existing pet
api_instance.update_pet(body=body); api_instance.update_pet(body=body)
except ApiException as e: except ApiException as e:
print "Exception when calling PetApi->update_pet: %s\n" % e print "Exception when calling PetApi->update_pet: %s\n" % e
``` ```
@ -495,11 +486,10 @@ Updates a pet in the store with form data
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# Configure OAuth2 access token for authorization: petstore_auth # Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
@ -512,7 +502,7 @@ status = 'status_example' # str | Updated status of the pet (optional)
try: try:
# Updates a pet in the store with form data # Updates a pet in the store with form data
api_instance.update_pet_with_form(pet_id, name=name, status=status); api_instance.update_pet_with_form(pet_id, name=name, status=status)
except ApiException as e: except ApiException as e:
print "Exception when calling PetApi->update_pet_with_form: %s\n" % e print "Exception when calling PetApi->update_pet_with_form: %s\n" % e
``` ```
@ -549,11 +539,10 @@ uploads an image
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# Configure OAuth2 access token for authorization: petstore_auth # Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
@ -566,7 +555,7 @@ file = '/path/to/file.txt' # file | file to upload (optional)
try: try:
# uploads an image # uploads an image
api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file); api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file)
except ApiException as e: except ApiException as e:
print "Exception when calling PetApi->upload_file: %s\n" % e print "Exception when calling PetApi->upload_file: %s\n" % e
``` ```

View File

@ -1,4 +1,4 @@
# swagger_client\StoreApi # swagger_client.StoreApi
All URIs are relative to *http://petstore.swagger.io/v2* All URIs are relative to *http://petstore.swagger.io/v2*
@ -7,7 +7,7 @@ Method | HTTP request | Description
[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID [**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
[**find_orders_by_status**](StoreApi.md#find_orders_by_status) | **GET** /store/findByStatus | Finds orders by status [**find_orders_by_status**](StoreApi.md#find_orders_by_status) | **GET** /store/findByStatus | Finds orders by status
[**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status [**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
[**get_inventory_in_object**](StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by &#39;Get inventory&#39; [**get_inventory_in_object**](StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response&#x3D;arbitrary_object | Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID [**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet [**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
@ -21,11 +21,10 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# create an instance of the API class # create an instance of the API class
api_instance = swagger_client.StoreApi() api_instance = swagger_client.StoreApi()
@ -33,7 +32,7 @@ order_id = 'order_id_example' # str | ID of the order that needs to be deleted
try: try:
# Delete purchase order by ID # Delete purchase order by ID
api_instance.delete_order(order_id); api_instance.delete_order(order_id)
except ApiException as e: except ApiException as e:
print "Exception when calling StoreApi->delete_order: %s\n" % e print "Exception when calling StoreApi->delete_order: %s\n" % e
``` ```
@ -68,18 +67,17 @@ A single status value can be provided as a string
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# Configure API key authorization: test_api_client_id # Configure API key authorization: test_api_client_id
swagger_client.configuration.api_key['x-test_api_client_id'] = 'YOUR_API_KEY'; swagger_client.configuration.api_key['x-test_api_client_id'] = '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
# swagger_client.configuration.api_key_prefix['x-test_api_client_id'] = 'BEARER' # swagger_client.configuration.api_key_prefix['x-test_api_client_id'] = 'BEARER'
# Configure API key authorization: test_api_client_secret # Configure API key authorization: test_api_client_secret
swagger_client.configuration.api_key['x-test_api_client_secret'] = 'YOUR_API_KEY'; swagger_client.configuration.api_key['x-test_api_client_secret'] = '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
# swagger_client.configuration.api_key_prefix['x-test_api_client_secret'] = 'BEARER' # swagger_client.configuration.api_key_prefix['x-test_api_client_secret'] = 'BEARER'
@ -89,7 +87,7 @@ status = 'placed' # str | Status value that needs to be considered for query (op
try: try:
# Finds orders by status # Finds orders by status
api_response = api_instance.find_orders_by_status(status=status); api_response = api_instance.find_orders_by_status(status=status)
pprint(api_response) pprint(api_response)
except ApiException as e: except ApiException as e:
print "Exception when calling StoreApi->find_orders_by_status: %s\n" % e print "Exception when calling StoreApi->find_orders_by_status: %s\n" % e
@ -125,14 +123,13 @@ Returns a map of status codes to quantities
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# Configure API key authorization: api_key # Configure API key authorization: api_key
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'; swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed # Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER' # swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
@ -141,7 +138,7 @@ api_instance = swagger_client.StoreApi()
try: try:
# Returns pet inventories by status # Returns pet inventories by status
api_response = api_instance.get_inventory(); api_response = api_instance.get_inventory()
pprint(api_response) pprint(api_response)
except ApiException as e: except ApiException as e:
print "Exception when calling StoreApi->get_inventory: %s\n" % e print "Exception when calling StoreApi->get_inventory: %s\n" % e
@ -174,14 +171,13 @@ Returns an arbitrary object which is actually a map of status codes to quantitie
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# Configure API key authorization: api_key # Configure API key authorization: api_key
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'; swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed # Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER' # swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
@ -190,7 +186,7 @@ api_instance = swagger_client.StoreApi()
try: try:
# Fake endpoint to test arbitrary object return by 'Get inventory' # Fake endpoint to test arbitrary object return by 'Get inventory'
api_response = api_instance.get_inventory_in_object(); api_response = api_instance.get_inventory_in_object()
pprint(api_response) pprint(api_response)
except ApiException as e: except ApiException as e:
print "Exception when calling StoreApi->get_inventory_in_object: %s\n" % e print "Exception when calling StoreApi->get_inventory_in_object: %s\n" % e
@ -223,18 +219,17 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# Configure API key authorization: test_api_key_header # Configure API key authorization: test_api_key_header
swagger_client.configuration.api_key['test_api_key_header'] = 'YOUR_API_KEY'; swagger_client.configuration.api_key['test_api_key_header'] = '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
# swagger_client.configuration.api_key_prefix['test_api_key_header'] = 'BEARER' # swagger_client.configuration.api_key_prefix['test_api_key_header'] = 'BEARER'
# Configure API key authorization: test_api_key_query # Configure API key authorization: test_api_key_query
swagger_client.configuration.api_key['test_api_key_query'] = 'YOUR_API_KEY'; swagger_client.configuration.api_key['test_api_key_query'] = '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
# swagger_client.configuration.api_key_prefix['test_api_key_query'] = 'BEARER' # swagger_client.configuration.api_key_prefix['test_api_key_query'] = 'BEARER'
@ -244,7 +239,7 @@ order_id = 'order_id_example' # str | ID of pet that needs to be fetched
try: try:
# Find purchase order by ID # Find purchase order by ID
api_response = api_instance.get_order_by_id(order_id); api_response = api_instance.get_order_by_id(order_id)
pprint(api_response) pprint(api_response)
except ApiException as e: except ApiException as e:
print "Exception when calling StoreApi->get_order_by_id: %s\n" % e print "Exception when calling StoreApi->get_order_by_id: %s\n" % e
@ -280,18 +275,17 @@ Place an order for a pet
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# Configure API key authorization: test_api_client_id # Configure API key authorization: test_api_client_id
swagger_client.configuration.api_key['x-test_api_client_id'] = 'YOUR_API_KEY'; swagger_client.configuration.api_key['x-test_api_client_id'] = '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
# swagger_client.configuration.api_key_prefix['x-test_api_client_id'] = 'BEARER' # swagger_client.configuration.api_key_prefix['x-test_api_client_id'] = 'BEARER'
# Configure API key authorization: test_api_client_secret # Configure API key authorization: test_api_client_secret
swagger_client.configuration.api_key['x-test_api_client_secret'] = 'YOUR_API_KEY'; swagger_client.configuration.api_key['x-test_api_client_secret'] = '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
# swagger_client.configuration.api_key_prefix['x-test_api_client_secret'] = 'BEARER' # swagger_client.configuration.api_key_prefix['x-test_api_client_secret'] = 'BEARER'
@ -301,7 +295,7 @@ body = swagger_client.Order() # Order | order placed for purchasing the pet (opt
try: try:
# Place an order for a pet # Place an order for a pet
api_response = api_instance.place_order(body=body); api_response = api_instance.place_order(body=body)
pprint(api_response) pprint(api_response)
except ApiException as e: except ApiException as e:
print "Exception when calling StoreApi->place_order: %s\n" % e print "Exception when calling StoreApi->place_order: %s\n" % e

View File

@ -1,4 +1,4 @@
# swagger_client\UserApi # swagger_client.UserApi
All URIs are relative to *http://petstore.swagger.io/v2* All URIs are relative to *http://petstore.swagger.io/v2*
@ -23,11 +23,10 @@ This can only be done by the logged in user.
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# create an instance of the API class # create an instance of the API class
api_instance = swagger_client.UserApi() api_instance = swagger_client.UserApi()
@ -35,7 +34,7 @@ body = swagger_client.User() # User | Created user object (optional)
try: try:
# Create user # Create user
api_instance.create_user(body=body); api_instance.create_user(body=body)
except ApiException as e: except ApiException as e:
print "Exception when calling UserApi->create_user: %s\n" % e print "Exception when calling UserApi->create_user: %s\n" % e
``` ```
@ -70,11 +69,10 @@ Creates list of users with given input array
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# create an instance of the API class # create an instance of the API class
api_instance = swagger_client.UserApi() api_instance = swagger_client.UserApi()
@ -82,7 +80,7 @@ body = [swagger_client.User()] # list[User] | List of user object (optional)
try: try:
# Creates list of users with given input array # Creates list of users with given input array
api_instance.create_users_with_array_input(body=body); api_instance.create_users_with_array_input(body=body)
except ApiException as e: except ApiException as e:
print "Exception when calling UserApi->create_users_with_array_input: %s\n" % e print "Exception when calling UserApi->create_users_with_array_input: %s\n" % e
``` ```
@ -117,11 +115,10 @@ Creates list of users with given input array
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# create an instance of the API class # create an instance of the API class
api_instance = swagger_client.UserApi() api_instance = swagger_client.UserApi()
@ -129,7 +126,7 @@ body = [swagger_client.User()] # list[User] | List of user object (optional)
try: try:
# Creates list of users with given input array # Creates list of users with given input array
api_instance.create_users_with_list_input(body=body); api_instance.create_users_with_list_input(body=body)
except ApiException as e: except ApiException as e:
print "Exception when calling UserApi->create_users_with_list_input: %s\n" % e print "Exception when calling UserApi->create_users_with_list_input: %s\n" % e
``` ```
@ -164,11 +161,10 @@ This can only be done by the logged in user.
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# Configure HTTP basic authorization: test_http_basic # Configure HTTP basic authorization: test_http_basic
swagger_client.configuration.username = 'YOUR_USERNAME' swagger_client.configuration.username = 'YOUR_USERNAME'
@ -180,7 +176,7 @@ username = 'username_example' # str | The name that needs to be deleted
try: try:
# Delete user # Delete user
api_instance.delete_user(username); api_instance.delete_user(username)
except ApiException as e: except ApiException as e:
print "Exception when calling UserApi->delete_user: %s\n" % e print "Exception when calling UserApi->delete_user: %s\n" % e
``` ```
@ -215,19 +211,18 @@ Get user by user name
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# create an instance of the API class # create an instance of the API class
api_instance = swagger_client.UserApi() api_instance = swagger_client.UserApi()
username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing.
try: try:
# Get user by user name # Get user by user name
api_response = api_instance.get_user_by_name(username); api_response = api_instance.get_user_by_name(username)
pprint(api_response) pprint(api_response)
except ApiException as e: except ApiException as e:
print "Exception when calling UserApi->get_user_by_name: %s\n" % e print "Exception when calling UserApi->get_user_by_name: %s\n" % e
@ -237,7 +232,7 @@ except ApiException as e:
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**username** | **str**| The name that needs to be fetched. Use user1 for testing. | **username** | **str**| The name that needs to be fetched. Use user1 for testing. |
### Return type ### Return type
@ -263,11 +258,10 @@ Logs user into the system
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# create an instance of the API class # create an instance of the API class
api_instance = swagger_client.UserApi() api_instance = swagger_client.UserApi()
@ -276,7 +270,7 @@ password = 'password_example' # str | The password for login in clear text (opti
try: try:
# Logs user into the system # Logs user into the system
api_response = api_instance.login_user(username=username, password=password); api_response = api_instance.login_user(username=username, password=password)
pprint(api_response) pprint(api_response)
except ApiException as e: except ApiException as e:
print "Exception when calling UserApi->login_user: %s\n" % e print "Exception when calling UserApi->login_user: %s\n" % e
@ -313,18 +307,17 @@ Logs out current logged in user session
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# create an instance of the API class # create an instance of the API class
api_instance = swagger_client.UserApi() api_instance = swagger_client.UserApi()
try: try:
# Logs out current logged in user session # Logs out current logged in user session
api_instance.logout_user(); api_instance.logout_user()
except ApiException as e: except ApiException as e:
print "Exception when calling UserApi->logout_user: %s\n" % e print "Exception when calling UserApi->logout_user: %s\n" % e
``` ```
@ -356,11 +349,10 @@ This can only be done by the logged in user.
### Example ### Example
```python ```python
import time
import swagger_client import swagger_client
from swagger_client.rest import ApiException from swagger_client.rest import ApiException
from pprint import pprint from pprint import pprint
import time
# create an instance of the API class # create an instance of the API class
api_instance = swagger_client.UserApi() api_instance = swagger_client.UserApi()
@ -369,7 +361,7 @@ body = swagger_client.User() # User | Updated user object (optional)
try: try:
# Updated user # Updated user
api_instance.update_user(username, body=body); api_instance.update_user(username, body=body)
except ApiException as e: except ApiException as e:
print "Exception when calling UserApi->update_user: %s\n" % e print "Exception when calling UserApi->update_user: %s\n" % e
``` ```

View File

@ -28,7 +28,7 @@ setup(
packages=find_packages(), packages=find_packages(),
include_package_data=True, include_package_data=True,
long_description="""\ long_description="""\
This is a sample server Petstore server. You can find out more about Swagger at &lt;a href=\&quot;http://swagger.io\&quot;&gt;http://swagger.io&lt;/a&gt; or on irc.freenode.net, #swagger. For this sample, you can use the api key \&quot;special-key\&quot; to test the authorization filters This is a sample server Petstore server. You can find out more about Swagger at &lt;a href&#x3D;\&quot;http://swagger.io\&quot;&gt;http://swagger.io&lt;/a&gt; or on irc.freenode.net, #swagger. For this sample, you can use the api key \&quot;special-key\&quot; to test the authorization filters
""" """
) )

View File

@ -6,7 +6,7 @@ Home-page: UNKNOWN
Author: UNKNOWN Author: UNKNOWN
Author-email: apiteam@swagger.io Author-email: apiteam@swagger.io
License: UNKNOWN License: UNKNOWN
Description: This is a sample server Petstore server. You can find out more about Swagger at &lt;a href=\&quot;http://swagger.io\&quot;&gt;http://swagger.io&lt;/a&gt; or on irc.freenode.net, #swagger. For this sample, you can use the api key \&quot;special-key\&quot; to test the authorization filters Description: This is a sample server Petstore server. You can find out more about Swagger at &lt;a href&#x3D;\&quot;http://swagger.io\&quot;&gt;http://swagger.io&lt;/a&gt; or on irc.freenode.net, #swagger. For this sample, you can use the api key \&quot;special-key\&quot; to test the authorization filters
Keywords: Swagger,Swagger Petstore Keywords: Swagger,Swagger Petstore
Platform: UNKNOWN Platform: UNKNOWN

View File

@ -5,6 +5,7 @@ from .models.animal import Animal
from .models.cat import Cat from .models.cat import Cat
from .models.category import Category from .models.category import Category
from .models.dog import Dog from .models.dog import Dog
from .models.format_test import FormatTest
from .models.inline_response_200 import InlineResponse200 from .models.inline_response_200 import InlineResponse200
from .models.model_200_response import Model200Response from .models.model_200_response import Model200Response
from .models.model_return import ModelReturn from .models.model_return import ModelReturn

View File

@ -154,7 +154,7 @@ class PetApi(object):
del params['kwargs'] del params['kwargs']
resource_path = '/pet?testing_byte_array=true'.replace('{format}', 'json') resource_path = '/pet?testing_byte_array&#x3D;true'.replace('{format}', 'json')
path_params = {} path_params = {}
query_params = {} query_params = {}
@ -536,7 +536,7 @@ class PetApi(object):
if ('pet_id' not in params) or (params['pet_id'] is None): if ('pet_id' not in params) or (params['pet_id'] is None):
raise ValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id_in_object`") raise ValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id_in_object`")
resource_path = '/pet/{petId}?response=inline_arbitrary_object'.replace('{format}', 'json') resource_path = '/pet/{petId}?response&#x3D;inline_arbitrary_object'.replace('{format}', 'json')
path_params = {} path_params = {}
if 'pet_id' in params: if 'pet_id' in params:
path_params['petId'] = params['pet_id'] path_params['petId'] = params['pet_id']
@ -613,7 +613,7 @@ class PetApi(object):
if ('pet_id' not in params) or (params['pet_id'] is None): if ('pet_id' not in params) or (params['pet_id'] is None):
raise ValueError("Missing the required parameter `pet_id` when calling `pet_pet_idtesting_byte_arraytrue_get`") raise ValueError("Missing the required parameter `pet_id` when calling `pet_pet_idtesting_byte_arraytrue_get`")
resource_path = '/pet/{petId}?testing_byte_array=true'.replace('{format}', 'json') resource_path = '/pet/{petId}?testing_byte_array&#x3D;true'.replace('{format}', 'json')
path_params = {} path_params = {}
if 'pet_id' in params: if 'pet_id' in params:
path_params['petId'] = params['pet_id'] path_params['petId'] = params['pet_id']

View File

@ -301,7 +301,7 @@ class StoreApi(object):
del params['kwargs'] del params['kwargs']
resource_path = '/store/inventory?response=arbitrary_object'.replace('{format}', 'json') resource_path = '/store/inventory?response&#x3D;arbitrary_object'.replace('{format}', 'json')
path_params = {} path_params = {}
query_params = {} query_params = {}

View File

@ -359,7 +359,7 @@ class UserApi(object):
:param callback function: The callback function :param callback function: The callback function
for asynchronous request. (optional) for asynchronous request. (optional)
:param str username: The name that needs to be fetched. Use user1 for testing. (required) :param str username: The name that needs to be fetched. Use user1 for testing. (required)
:return: User :return: User
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.

View File

@ -5,6 +5,7 @@ from .animal import Animal
from .cat import Cat from .cat import Cat
from .category import Category from .category import Category
from .dog import Dog from .dog import Dog
from .format_test import FormatTest
from .inline_response_200 import InlineResponse200 from .inline_response_200 import InlineResponse200
from .model_200_response import Model200Response from .model_200_response import Model200Response
from .model_return import ModelReturn from .model_return import ModelReturn

View File

@ -8,7 +8,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
- API version: 1.0.0 - API version: 1.0.0
- Package version: 1.0.0 - Package version: 1.0.0
- Build date: 2016-04-09T17:50:53.781+08:00 - Build date: 2016-04-11T17:03:41.311+08:00
- Build package: class io.swagger.codegen.languages.RubyClientCodegen - Build package: class io.swagger.codegen.languages.RubyClientCodegen
## Installation ## Installation
@ -114,6 +114,7 @@ Class | Method | HTTP request | Description
- [Petstore::Cat](docs/Cat.md) - [Petstore::Cat](docs/Cat.md)
- [Petstore::Category](docs/Category.md) - [Petstore::Category](docs/Category.md)
- [Petstore::Dog](docs/Dog.md) - [Petstore::Dog](docs/Dog.md)
- [Petstore::FormatTest](docs/FormatTest.md)
- [Petstore::InlineResponse200](docs/InlineResponse200.md) - [Petstore::InlineResponse200](docs/InlineResponse200.md)
- [Petstore::Model200Response](docs/Model200Response.md) - [Petstore::Model200Response](docs/Model200Response.md)
- [Petstore::ModelReturn](docs/ModelReturn.md) - [Petstore::ModelReturn](docs/ModelReturn.md)

View File

@ -3,7 +3,7 @@
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**name** | **Integer** | | [optional] **name** | **Integer** | |
**snake_case** | **Integer** | | [optional] **snake_case** | **Integer** | | [optional]

View File

@ -25,6 +25,7 @@ require 'petstore/models/animal'
require 'petstore/models/cat' require 'petstore/models/cat'
require 'petstore/models/category' require 'petstore/models/category'
require 'petstore/models/dog' require 'petstore/models/dog'
require 'petstore/models/format_test'
require 'petstore/models/inline_response_200' require 'petstore/models/inline_response_200'
require 'petstore/models/model_200_response' require 'petstore/models/model_200_response'
require 'petstore/models/model_return' require 'petstore/models/model_return'

View File

@ -34,7 +34,7 @@ module Petstore
def self.swagger_types def self.swagger_types
{ {
:'class_name' => :'String', :'class_name' => :'String',
:'declawed' => :'BOOLEAN' :'declawed' => :'BOOLEAN'
} }
end end

View File

@ -34,7 +34,7 @@ module Petstore
def self.swagger_types def self.swagger_types
{ {
:'id' => :'Integer', :'id' => :'Integer',
:'name' => :'String' :'name' => :'String'
} }
end end

View File

@ -34,7 +34,7 @@ module Petstore
def self.swagger_types def self.swagger_types
{ {
:'class_name' => :'String', :'class_name' => :'String',
:'breed' => :'String' :'breed' => :'String'
} }
end end

View File

@ -47,11 +47,11 @@ module Petstore
def self.swagger_types def self.swagger_types
{ {
:'tags' => :'Array<Tag>', :'tags' => :'Array<Tag>',
:'id' => :'Integer', :'id' => :'Integer',
:'category' => :'Object', :'category' => :'Object',
:'status' => :'String', :'status' => :'String',
:'name' => :'String', :'name' => :'String',
:'photo_urls' => :'Array<String>' :'photo_urls' => :'Array<String>'
} }
end end

View File

@ -35,7 +35,7 @@ module Petstore
def self.swagger_types def self.swagger_types
{ {
:'name' => :'Integer', :'name' => :'Integer',
:'snake_case' => :'Integer' :'snake_case' => :'Integer'
} }
end end

View File

@ -47,11 +47,11 @@ module Petstore
def self.swagger_types def self.swagger_types
{ {
:'id' => :'Integer', :'id' => :'Integer',
:'pet_id' => :'Integer', :'pet_id' => :'Integer',
:'quantity' => :'Integer', :'quantity' => :'Integer',
:'ship_date' => :'DateTime', :'ship_date' => :'DateTime',
:'status' => :'String', :'status' => :'String',
:'complete' => :'BOOLEAN' :'complete' => :'BOOLEAN'
} }
end end

View File

@ -47,11 +47,11 @@ module Petstore
def self.swagger_types def self.swagger_types
{ {
:'id' => :'Integer', :'id' => :'Integer',
:'category' => :'Category', :'category' => :'Category',
:'name' => :'String', :'name' => :'String',
:'photo_urls' => :'Array<String>', :'photo_urls' => :'Array<String>',
:'tags' => :'Array<Tag>', :'tags' => :'Array<Tag>',
:'status' => :'String' :'status' => :'String'
} }
end end

View File

@ -34,7 +34,7 @@ module Petstore
def self.swagger_types def self.swagger_types
{ {
:'id' => :'Integer', :'id' => :'Integer',
:'name' => :'String' :'name' => :'String'
} }
end end

View File

@ -53,13 +53,13 @@ module Petstore
def self.swagger_types def self.swagger_types
{ {
:'id' => :'Integer', :'id' => :'Integer',
:'username' => :'String', :'username' => :'String',
:'first_name' => :'String', :'first_name' => :'String',
:'last_name' => :'String', :'last_name' => :'String',
:'email' => :'String', :'email' => :'String',
:'password' => :'String', :'password' => :'String',
:'phone' => :'String', :'phone' => :'String',
:'user_status' => :'Integer' :'user_status' => :'Integer'
} }
end end

View File

@ -210,7 +210,7 @@
<joda-version>1.2</joda-version> <joda-version>1.2</joda-version>
<joda-time-version>2.2</joda-time-version> <joda-time-version>2.2</joda-time-version>
<jersey-version>1.19</jersey-version> <jersey-version>1.19</jersey-version>
<swagger-core-version>1.5.7</swagger-core-version> <swagger-core-version>1.5.8</swagger-core-version>
<jersey-async-version>1.0.5</jersey-async-version> <jersey-async-version>1.0.5</jersey-async-version>
<maven-plugin.version>1.0.0</maven-plugin.version> <maven-plugin.version>1.0.0</maven-plugin.version>
<jackson-version>2.4.2</jackson-version> <jackson-version>2.4.2</jackson-version>

View File

@ -23,7 +23,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
def addHeader(key: String, value: String) = apiInvoker.defaultHeaders += key -> value def addHeader(key: String, value: String) = apiInvoker.defaultHeaders += key -> value
/** /**
* Add a new pet to the store * Add a new pet to the store
* *
@ -33,7 +32,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
def addPet (body: Pet) = { def addPet (body: Pet) = {
// create path and map variables // create path and map variables
val path = "/pet".replaceAll("\\{format\\}","json") val path = "/pet".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json", "application/xml", "application/json") val contentTypes = List("application/json", "application/xml", "application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -42,12 +40,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = body var postBody: AnyRef = body
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -56,21 +51,18 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
case _ => None
case _ => None
} }
} catch { } catch {
case ex: ApiException if ex.code == 404 => None case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex case ex: ApiException => throw 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
* *
@ -79,8 +71,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
*/ */
def addPetUsingByteArray (body: String) = { def addPetUsingByteArray (body: String) = {
// create path and map variables // create path and map variables
val path = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json") val path = "/pet?testing_byte_array&#x3D;true".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json", "application/xml", "application/json") val contentTypes = List("application/json", "application/xml", "application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -89,12 +80,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = body var postBody: AnyRef = body
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -103,21 +91,18 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
case _ => None
case _ => None
} }
} catch { } catch {
case ex: ApiException if ex.code == 404 => None case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex case ex: ApiException => throw ex
} }
} }
/** /**
* Deletes a pet * Deletes a pet
* *
@ -129,7 +114,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
// create path and map variables // create path and map variables
val path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId)) val path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -139,12 +123,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
headerParams += "api_key" -> apiKey headerParams += "api_key" -> apiKey
var postBody: AnyRef = null var postBody: AnyRef = null
@ -154,21 +135,18 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
case _ => None
case _ => None
} }
} catch { } catch {
case ex: ApiException if ex.code == 404 => None case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex case ex: ApiException => throw 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
@ -178,7 +156,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
def findPetsByStatus (status: List[String] /* = available */) : Option[List[Pet]] = { def findPetsByStatus (status: List[String] /* = available */) : Option[List[Pet]] = {
// create path and map variables // create path and map variables
val path = "/pet/findByStatus".replaceAll("\\{format\\}","json") val path = "/pet/findByStatus".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -187,13 +164,10 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
if(String.valueOf(status) != "null") queryParams += "status" -> status.toString if(String.valueOf(status) != "null") queryParams += "status" -> status.toString
var postBody: AnyRef = null var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -202,14 +176,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
Some(ApiInvoker.deserialize(s, "array", classOf[Pet]).asInstanceOf[List[Pet]]) Some(ApiInvoker.deserialize(s, "array", classOf[Pet]).asInstanceOf[List[Pet]])
case _ => None case _ => None
} }
} catch { } catch {
@ -217,7 +189,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex case ex: ApiException => throw 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.
@ -227,7 +198,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
def findPetsByTags (tags: List[String]) : Option[List[Pet]] = { def findPetsByTags (tags: List[String]) : Option[List[Pet]] = {
// create path and map variables // create path and map variables
val path = "/pet/findByTags".replaceAll("\\{format\\}","json") val path = "/pet/findByTags".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -236,13 +206,10 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
if(String.valueOf(tags) != "null") queryParams += "tags" -> tags.toString if(String.valueOf(tags) != "null") queryParams += "tags" -> tags.toString
var postBody: AnyRef = null var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -251,14 +218,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
Some(ApiInvoker.deserialize(s, "array", classOf[Pet]).asInstanceOf[List[Pet]]) Some(ApiInvoker.deserialize(s, "array", classOf[Pet]).asInstanceOf[List[Pet]])
case _ => None case _ => None
} }
} catch { } catch {
@ -266,7 +231,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex case ex: ApiException => throw ex
} }
} }
/** /**
* Find pet by ID * Find pet by ID
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions * Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
@ -277,7 +241,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
// create path and map variables // create path and map variables
val path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId)) val path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -287,12 +250,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = null var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -301,14 +261,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[Pet]).asInstanceOf[Pet]) Some(ApiInvoker.deserialize(s, "", classOf[Pet]).asInstanceOf[Pet])
case _ => None case _ => None
} }
} catch { } catch {
@ -316,7 +274,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex case ex: ApiException => throw ex
} }
} }
/** /**
* Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39; * Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39;
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions * Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
@ -325,9 +282,8 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
*/ */
def getPetByIdInObject (petId: Long) : Option[InlineResponse200] = { def getPetByIdInObject (petId: Long) : Option[InlineResponse200] = {
// create path and map variables // create path and map variables
val path = "/pet/{petId}?response=inline_arbitrary_object".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId)) val path = "/pet/{petId}?response&#x3D;inline_arbitrary_object".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -337,12 +293,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = null var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -351,14 +304,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[InlineResponse200]).asInstanceOf[InlineResponse200]) Some(ApiInvoker.deserialize(s, "", classOf[InlineResponse200]).asInstanceOf[InlineResponse200])
case _ => None case _ => None
} }
} catch { } catch {
@ -366,7 +317,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex case ex: ApiException => throw ex
} }
} }
/** /**
* Fake endpoint to test byte array return by &#39;Find pet by ID&#39; * Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions * Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
@ -375,9 +325,8 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
*/ */
def petPetIdtestingByteArraytrueGet (petId: Long) : Option[String] = { def petPetIdtestingByteArraytrueGet (petId: Long) : Option[String] = {
// create path and map variables // create path and map variables
val path = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId)) val path = "/pet/{petId}?testing_byte_array&#x3D;true".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -387,12 +336,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = null var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -401,14 +347,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[String]).asInstanceOf[String]) Some(ApiInvoker.deserialize(s, "", classOf[String]).asInstanceOf[String])
case _ => None case _ => None
} }
} catch { } catch {
@ -416,7 +360,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex case ex: ApiException => throw ex
} }
} }
/** /**
* Update an existing pet * Update an existing pet
* *
@ -426,7 +369,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
def updatePet (body: Pet) = { def updatePet (body: Pet) = {
// create path and map variables // create path and map variables
val path = "/pet".replaceAll("\\{format\\}","json") val path = "/pet".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json", "application/xml", "application/json") val contentTypes = List("application/json", "application/xml", "application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -435,12 +377,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = body var postBody: AnyRef = body
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -449,21 +388,18 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "PUT", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "PUT", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
case _ => None
case _ => None
} }
} catch { } catch {
case ex: ApiException if ex.code == 404 => None case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex case ex: ApiException => throw ex
} }
} }
/** /**
* Updates a pet in the store with form data * Updates a pet in the store with form data
* *
@ -476,7 +412,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
// create path and map variables // create path and map variables
val path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId)) val path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
val contentTypes = List("application/x-www-form-urlencoded", "application/json") val contentTypes = List("application/x-www-form-urlencoded", "application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -486,12 +421,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = null var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -505,22 +437,19 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
} }
else { else {
formParams += "name" -> name.toString() formParams += "name" -> name.toString()
formParams += "status" -> status.toString() formParams += "status" -> status.toString()
} }
try { try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
case _ => None
case _ => None
} }
} catch { } catch {
case ex: ApiException if ex.code == 404 => None case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex case ex: ApiException => throw ex
} }
} }
/** /**
* uploads an image * uploads an image
* *
@ -533,7 +462,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
// create path and map variables // create path and map variables
val path = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId)) val path = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
val contentTypes = List("multipart/form-data", "application/json") val contentTypes = List("multipart/form-data", "application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -543,12 +471,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = null var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -563,20 +488,17 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
} }
else { else {
formParams += "additionalMetadata" -> additionalMetadata.toString() formParams += "additionalMetadata" -> additionalMetadata.toString()
} }
try { try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
case _ => None
case _ => None
} }
} catch { } catch {
case ex: ApiException if ex.code == 404 => None case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex case ex: ApiException => throw ex
} }
} }
} }

View File

@ -21,7 +21,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
def addHeader(key: String, value: String) = apiInvoker.defaultHeaders += key -> value def addHeader(key: String, value: String) = apiInvoker.defaultHeaders += key -> value
/** /**
* Delete purchase order by ID * Delete purchase order by ID
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors * For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
@ -32,7 +31,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
// create path and map variables // create path and map variables
val path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}",apiInvoker.escape(orderId)) val path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}",apiInvoker.escape(orderId))
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -42,12 +40,9 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = null var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -56,21 +51,18 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
case _ => None
case _ => None
} }
} catch { } catch {
case ex: ApiException if ex.code == 404 => None case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex case ex: ApiException => throw 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
@ -80,7 +72,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
def findOrdersByStatus (status: String /* = placed */) : Option[List[Order]] = { def findOrdersByStatus (status: String /* = placed */) : Option[List[Order]] = {
// create path and map variables // create path and map variables
val path = "/store/findByStatus".replaceAll("\\{format\\}","json") val path = "/store/findByStatus".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -89,13 +80,10 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
if(String.valueOf(status) != "null") queryParams += "status" -> status.toString if(String.valueOf(status) != "null") queryParams += "status" -> status.toString
var postBody: AnyRef = null var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -104,14 +92,12 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
Some(ApiInvoker.deserialize(s, "array", classOf[Order]).asInstanceOf[List[Order]]) Some(ApiInvoker.deserialize(s, "array", classOf[Order]).asInstanceOf[List[Order]])
case _ => None case _ => None
} }
} catch { } catch {
@ -119,7 +105,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex case ex: ApiException => throw 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
@ -128,7 +113,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
def getInventory () : Option[Map[String, Integer]] = { def getInventory () : Option[Map[String, Integer]] = {
// create path and map variables // create path and map variables
val path = "/store/inventory".replaceAll("\\{format\\}","json") val path = "/store/inventory".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -137,12 +121,9 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = null var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -151,14 +132,12 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
Some(ApiInvoker.deserialize(s, "map", classOf[Integer]).asInstanceOf[Map[String, Integer]]) Some(ApiInvoker.deserialize(s, "map", classOf[Integer]).asInstanceOf[Map[String, Integer]])
case _ => None case _ => None
} }
} catch { } catch {
@ -166,7 +145,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex case ex: ApiException => throw ex
} }
} }
/** /**
* Fake endpoint to test arbitrary object return by &#39;Get inventory&#39; * Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
* 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
@ -174,8 +152,7 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
*/ */
def getInventoryInObject () : Option[Any] = { def getInventoryInObject () : Option[Any] = {
// create path and map variables // create path and map variables
val path = "/store/inventory?response=arbitrary_object".replaceAll("\\{format\\}","json") val path = "/store/inventory?response&#x3D;arbitrary_object".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -184,12 +161,9 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = null var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -198,14 +172,12 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[Any]).asInstanceOf[Any]) Some(ApiInvoker.deserialize(s, "", classOf[Any]).asInstanceOf[Any])
case _ => None case _ => None
} }
} catch { } catch {
@ -213,10 +185,9 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex case ex: ApiException => throw ex
} }
} }
/** /**
* Find purchase order by ID * Find purchase order by ID
* For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions * For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 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
*/ */
@ -224,7 +195,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
// create path and map variables // create path and map variables
val path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}",apiInvoker.escape(orderId)) val path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}",apiInvoker.escape(orderId))
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -234,12 +204,9 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = null var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -248,14 +215,12 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[Order]).asInstanceOf[Order]) Some(ApiInvoker.deserialize(s, "", classOf[Order]).asInstanceOf[Order])
case _ => None case _ => None
} }
} catch { } catch {
@ -263,7 +228,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex case ex: ApiException => throw ex
} }
} }
/** /**
* Place an order for a pet * Place an order for a pet
* *
@ -273,7 +237,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
def placeOrder (body: Order) : Option[Order] = { def placeOrder (body: Order) : Option[Order] = {
// create path and map variables // create path and map variables
val path = "/store/order".replaceAll("\\{format\\}","json") val path = "/store/order".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -282,12 +245,9 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = body var postBody: AnyRef = body
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -296,14 +256,12 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[Order]).asInstanceOf[Order]) Some(ApiInvoker.deserialize(s, "", classOf[Order]).asInstanceOf[Order])
case _ => None case _ => None
} }
} catch { } catch {
@ -311,5 +269,4 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex case ex: ApiException => throw ex
} }
} }
} }

View File

@ -21,7 +21,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
def addHeader(key: String, value: String) = apiInvoker.defaultHeaders += key -> value def addHeader(key: String, value: String) = apiInvoker.defaultHeaders += key -> value
/** /**
* Create user * Create user
* This can only be done by the logged in user. * This can only be done by the logged in user.
@ -31,7 +30,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
def createUser (body: User) = { def createUser (body: User) = {
// create path and map variables // create path and map variables
val path = "/user".replaceAll("\\{format\\}","json") val path = "/user".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -40,12 +38,9 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = body var postBody: AnyRef = body
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -54,21 +49,18 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
case _ => None
case _ => None
} }
} catch { } catch {
case ex: ApiException if ex.code == 404 => None case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex case ex: ApiException => throw ex
} }
} }
/** /**
* Creates list of users with given input array * Creates list of users with given input array
* *
@ -78,7 +70,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
def createUsersWithArrayInput (body: List[User]) = { def createUsersWithArrayInput (body: List[User]) = {
// create path and map variables // create path and map variables
val path = "/user/createWithArray".replaceAll("\\{format\\}","json") val path = "/user/createWithArray".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -87,12 +78,9 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = body var postBody: AnyRef = body
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -101,21 +89,18 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
case _ => None
case _ => None
} }
} catch { } catch {
case ex: ApiException if ex.code == 404 => None case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex case ex: ApiException => throw ex
} }
} }
/** /**
* Creates list of users with given input array * Creates list of users with given input array
* *
@ -125,7 +110,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
def createUsersWithListInput (body: List[User]) = { def createUsersWithListInput (body: List[User]) = {
// create path and map variables // create path and map variables
val path = "/user/createWithList".replaceAll("\\{format\\}","json") val path = "/user/createWithList".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -134,12 +118,9 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = body var postBody: AnyRef = body
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -148,21 +129,18 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
case _ => None
case _ => None
} }
} catch { } catch {
case ex: ApiException if ex.code == 404 => None case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex case ex: ApiException => throw 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.
@ -173,7 +151,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
// create path and map variables // create path and map variables
val path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}",apiInvoker.escape(username)) val path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}",apiInvoker.escape(username))
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -183,12 +160,9 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = null var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -197,32 +171,28 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
case _ => None
case _ => None
} }
} catch { } catch {
case ex: ApiException if ex.code == 404 => None case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex case ex: ApiException => throw 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
*/ */
def getUserByName (username: String) : Option[User] = { def getUserByName (username: String) : Option[User] = {
// create path and map variables // create path and map variables
val path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}",apiInvoker.escape(username)) val path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}",apiInvoker.escape(username))
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -232,12 +202,9 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = null var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -246,14 +213,12 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[User]).asInstanceOf[User]) Some(ApiInvoker.deserialize(s, "", classOf[User]).asInstanceOf[User])
case _ => None case _ => None
} }
} catch { } catch {
@ -261,7 +226,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex case ex: ApiException => throw ex
} }
} }
/** /**
* Logs user into the system * Logs user into the system
* *
@ -272,7 +236,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
def loginUser (username: String, password: String) : Option[String] = { def loginUser (username: String, password: String) : Option[String] = {
// create path and map variables // create path and map variables
val path = "/user/login".replaceAll("\\{format\\}","json") val path = "/user/login".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -281,14 +244,11 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
if(String.valueOf(username) != "null") queryParams += "username" -> username.toString if(String.valueOf(username) != "null") queryParams += "username" -> username.toString
if(String.valueOf(password) != "null") queryParams += "password" -> password.toString if(String.valueOf(password) != "null") queryParams += "password" -> password.toString
var postBody: AnyRef = null var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -297,14 +257,12 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[String]).asInstanceOf[String]) Some(ApiInvoker.deserialize(s, "", classOf[String]).asInstanceOf[String])
case _ => None case _ => None
} }
} catch { } catch {
@ -312,7 +270,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex case ex: ApiException => throw ex
} }
} }
/** /**
* Logs out current logged in user session * Logs out current logged in user session
* *
@ -321,7 +278,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
def logoutUser () = { def logoutUser () = {
// create path and map variables // create path and map variables
val path = "/user/logout".replaceAll("\\{format\\}","json") val path = "/user/logout".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -330,12 +286,9 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = null var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -344,21 +297,18 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
case _ => None
case _ => None
} }
} catch { } catch {
case ex: ApiException if ex.code == 404 => None case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex case ex: ApiException => throw 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.
@ -370,7 +320,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
// create path and map variables // create path and map variables
val path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}",apiInvoker.escape(username)) val path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}",apiInvoker.escape(username))
val contentTypes = List("application/json") val contentTypes = List("application/json")
val contentType = contentTypes(0) val contentType = contentTypes(0)
@ -380,12 +329,9 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val headerParams = new HashMap[String, String] val headerParams = new HashMap[String, String]
val formParams = new HashMap[String, String] val formParams = new HashMap[String, String]
var postBody: AnyRef = body var postBody: AnyRef = body
if(contentType.startsWith("multipart/form-data")) { if(contentType.startsWith("multipart/form-data")) {
@ -394,19 +340,16 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp postBody = mp
} }
else { else {
}
}
try { try {
apiInvoker.invokeApi(basePath, path, "PUT", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { apiInvoker.invokeApi(basePath, path, "PUT", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String => case s: String =>
case _ => None
case _ => None
} }
} catch { } catch {
case ex: ApiException if ex.code == 404 => None case ex: ApiException if ex.code == 404 => None
case ex: ApiException => throw ex case ex: ApiException => throw ex
} }
} }
} }

View File

@ -5,5 +5,4 @@ package io.swagger.client.model
case class Category ( case class Category (
id: Long, id: Long,
name: String) name: String)

View File

@ -5,10 +5,9 @@ package io.swagger.client.model
case class InlineResponse200 ( case class InlineResponse200 (
tags: List[Tag], tags: List[Tag],
id: Long, id: Long,
category: Any, category: Any,
/* pet status in the store */ /* pet status in the store */
status: String, status: String,
name: String, name: String,
photoUrls: List[String]) photoUrls: List[String])

View File

@ -5,4 +5,3 @@ package io.swagger.client.model
case class Model200Response ( case class Model200Response (
name: Integer) name: Integer)

View File

@ -5,4 +5,3 @@ package io.swagger.client.model
case class ModelReturn ( case class ModelReturn (
_return: Integer) _return: Integer)

View File

@ -4,5 +4,5 @@ package io.swagger.client.model
case class Name ( case class Name (
name: Integer) name: Integer,
snakeCase: Integer)

View File

@ -6,10 +6,9 @@ import org.joda.time.DateTime
case class Order ( case class Order (
id: Long, id: Long,
petId: Long, petId: Long,
quantity: Integer, quantity: Integer,
shipDate: DateTime, shipDate: DateTime,
/* Order Status */ /* Order Status */
status: String, status: String,
complete: Boolean) complete: Boolean)

Some files were not shown because too many files have changed in this diff Show More