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) {
IntegerProperty sp = (IntegerProperty) p;
property.isInteger = true;
@ -1173,6 +1191,24 @@ public class DefaultCodegen {
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) {
DoubleProperty sp = (DoubleProperty) p;
property.isDouble = true;

View File

@ -91,6 +91,7 @@ public class GoClientCodegen extends DefaultCodegen implements CodegenConfig {
// map binary to string as a workaround
// the correct solution is to use []byte
typeMapping.put("binary", "string");
typeMapping.put("ByteArray", "string");
importMapping = new HashMap<String, String>();
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
// mapped to String as a workaround
typeMapping.put("binary", "string");
typeMapping.put("ByteArray", "string");
cliOptions.clear();
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("object", "object");
typeMapping.put("binary", "string");
typeMapping.put("ByteArray", "string");
cliOptions.add(new CliOption(CodegenConstants.MODEL_PACKAGE, CodegenConstants.MODEL_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
// mapped to String as a workaround
typeMapping.put("binary", "str");
typeMapping.put("ByteArray", "str");
// from https://docs.python.org/release/2.5.4/ref/keywords.html
setReservedWordsLowerCase(

View File

@ -116,6 +116,7 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping.put("object", "Object");
typeMapping.put("file", "File");
typeMapping.put("binary", "String");
typeMapping.put("ByteArray", "String");
// remove modelPackage and apiPackage added by default
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
// mapped to String as a workaround
typeMapping.put("binary", "String");
typeMapping.put("ByteArray", "String");
languageSpecificPrimitives = new HashSet<String>(
Arrays.asList(

View File

@ -97,6 +97,7 @@ public class SwiftCodegen extends DefaultCodegen implements CodegenConfig {
);
setReservedWordsLowerCase(
Arrays.asList(
"Int", "Int32", "Int64", "Int64", "Float", "Double", "Bool", "Void", "String", "Character", "AnyObject",
"class", "break", "as", "associativity", "deinit", "case", "dynamicType", "convenience", "enum", "continue",
"false", "dynamic", "extension", "default", "is", "didSet", "func", "do", "nil", "final", "import", "else",
"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
// mapped to String as a workaround
typeMapping.put("binary", "String");
typeMapping.put("ByteArray", "String");
importMapping = new HashMap<String, String>();

View File

@ -81,8 +81,9 @@ namespace {{packageName}}.Model
{
var sb = new StringBuilder();
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");
return sb.ToString();
}

View File

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

View File

@ -11,15 +11,23 @@ import Foundation
/** {{description}} */{{/description}}
public class {{classname}}: JSONEncodable {
{{#vars}}{{#isEnum}}
{{#vars}}
{{#isEnum}}
public enum {{datatypeWithEnum}}: String { {{#allowableValues}}{{#values}}
case {{enum}} = "{{raw}}"{{/values}}{{/allowableValues}}
}
{{/isEnum}}{{/vars}}
{{#vars}}{{#isEnum}}{{#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}}
{{/isEnum}}
{{/vars}}
{{#vars}}
{{#isEnum}}
{{#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() {}

View File

@ -62,7 +62,7 @@ namespace IO.Swagger.Model
var sb = new StringBuilder();
sb.Append("class Cat {\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");
return sb.ToString();
}

View File

@ -54,7 +54,7 @@ namespace IO.Swagger.Model
var sb = new StringBuilder();
sb.Append("class Category {\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");
return sb.ToString();
}

View File

@ -62,7 +62,7 @@ namespace IO.Swagger.Model
var sb = new StringBuilder();
sb.Append("class Dog {\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");
return sb.ToString();
}

View File

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

View File

@ -113,11 +113,11 @@ namespace IO.Swagger.Model
var sb = new StringBuilder();
sb.Append("class InlineResponse200 {\n");
sb.Append(" Tags: ").Append(Tags).Append("\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Category: ").Append(Category).Append("\n");
sb.Append(" Status: ").Append(Status).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Category: ").Append(Category).Append("\n");
sb.Append(" Status: ").Append(Status).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n");
sb.Append("}\n");
return sb.ToString();
}

View File

@ -60,7 +60,7 @@ namespace IO.Swagger.Model
var sb = new StringBuilder();
sb.Append("class Name {\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");
return sb.ToString();
}

View File

@ -103,11 +103,11 @@ namespace IO.Swagger.Model
var sb = new StringBuilder();
sb.Append("class Order {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" PetId: ").Append(PetId).Append("\n");
sb.Append(" Quantity: ").Append(Quantity).Append("\n");
sb.Append(" ShipDate: ").Append(ShipDate).Append("\n");
sb.Append(" Status: ").Append(Status).Append("\n");
sb.Append(" Complete: ").Append(Complete).Append("\n");
sb.Append(" PetId: ").Append(PetId).Append("\n");
sb.Append(" Quantity: ").Append(Quantity).Append("\n");
sb.Append(" ShipDate: ").Append(ShipDate).Append("\n");
sb.Append(" Status: ").Append(Status).Append("\n");
sb.Append(" Complete: ").Append(Complete).Append("\n");
sb.Append("}\n");
return sb.ToString();
}

View File

@ -121,11 +121,11 @@ namespace IO.Swagger.Model
var sb = new StringBuilder();
sb.Append("class Pet {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Category: ").Append(Category).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n");
sb.Append(" Tags: ").Append(Tags).Append("\n");
sb.Append(" Status: ").Append(Status).Append("\n");
sb.Append(" Category: ").Append(Category).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n");
sb.Append(" Tags: ").Append(Tags).Append("\n");
sb.Append(" Status: ").Append(Status).Append("\n");
sb.Append("}\n");
return sb.ToString();
}

View File

@ -54,7 +54,7 @@ namespace IO.Swagger.Model
var sb = new StringBuilder();
sb.Append("class Tag {\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");
return sb.ToString();
}

View File

@ -103,13 +103,13 @@ namespace IO.Swagger.Model
var sb = new StringBuilder();
sb.Append("class User {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Username: ").Append(Username).Append("\n");
sb.Append(" FirstName: ").Append(FirstName).Append("\n");
sb.Append(" LastName: ").Append(LastName).Append("\n");
sb.Append(" Email: ").Append(Email).Append("\n");
sb.Append(" Password: ").Append(Password).Append("\n");
sb.Append(" Phone: ").Append(Phone).Append("\n");
sb.Append(" UserStatus: ").Append(UserStatus).Append("\n");
sb.Append(" Username: ").Append(Username).Append("\n");
sb.Append(" FirstName: ").Append(FirstName).Append("\n");
sb.Append(" LastName: ").Append(LastName).Append("\n");
sb.Append(" Email: ").Append(Email).Append("\n");
sb.Append(" Password: ").Append(Password).Append("\n");
sb.Append(" Phone: ").Append(Phone).Append("\n");
sb.Append(" UserStatus: ").Append(UserStatus).Append("\n");
sb.Append("}\n");
return sb.ToString();
}

View File

@ -2,7 +2,7 @@
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.Workbench ActiveDocument="TestPet.cs">
<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" />
</Files>
</MonoDevelop.Ide.Workbench>

View File

@ -36,7 +36,6 @@ public class PetApi {
this.apiClient = apiClient;
}
/**
* Add a new pet to the store
*
@ -57,9 +56,6 @@ public class PetApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -74,9 +70,7 @@ public class PetApi {
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
*
@ -97,9 +91,6 @@ public class PetApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -114,9 +105,7 @@ public class PetApi {
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Deletes a pet
*
@ -142,13 +131,10 @@ public class PetApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (apiKey != null)
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -163,9 +149,7 @@ public class PetApi {
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Finds Pets by status
* 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, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "status", status));
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -204,12 +184,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Finds Pets by tags
* 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, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "tags", tags));
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -248,12 +221,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Find pet by ID
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
@ -281,9 +251,6 @@ public class PetApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -296,12 +263,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" };
GenericType<Pet> localVarReturnType = new GenericType<Pet>() {};
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;
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
@ -329,9 +293,6 @@ public class PetApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -344,12 +305,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" };
GenericType<InlineResponse200> localVarReturnType = new GenericType<InlineResponse200>() {};
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;
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
@ -377,9 +335,6 @@ public class PetApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -392,12 +347,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" };
GenericType<byte[]> localVarReturnType = new GenericType<byte[]>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update an existing pet
*
@ -418,9 +370,6 @@ public class PetApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -435,9 +384,7 @@ public class PetApi {
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Updates a pet in the store with form data
*
@ -465,14 +412,11 @@ public class PetApi {
if (name != null)
localVarFormParams.put("name", name);
if (status != null)
if (status != null)
localVarFormParams.put("status", status);
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -487,9 +431,7 @@ public class PetApi {
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* uploads an image
*
@ -517,14 +459,11 @@ public class PetApi {
if (additionalMetadata != null)
localVarFormParams.put("additionalMetadata", additionalMetadata);
if (file != null)
if (file != null)
localVarFormParams.put("file", file);
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -539,7 +478,5 @@ public class PetApi {
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
}

View File

@ -34,7 +34,6 @@ public class StoreApi {
this.apiClient = apiClient;
}
/**
* Delete purchase order by ID
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
@ -61,9 +60,6 @@ public class StoreApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -78,9 +74,7 @@ public class StoreApi {
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Finds orders by status
* 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, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status));
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -119,12 +109,9 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { "test_api_client_id", "test_api_client_secret" };
GenericType<List<Order>> localVarReturnType = new GenericType<List<Order>>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
@ -145,9 +132,6 @@ public class StoreApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -160,12 +144,9 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { "api_key" };
GenericType<Map<String, Integer>> localVarReturnType = new GenericType<Map<String, Integer>>() {};
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;
* Returns an arbitrary object which is actually a map of status codes to quantities
@ -186,9 +167,6 @@ public class StoreApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -201,15 +179,12 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { "api_key" };
GenericType<Object> localVarReturnType = new GenericType<Object>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* 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)
* @return Order
* @throws ApiException if fails to make API call
@ -234,9 +209,6 @@ public class StoreApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -249,12 +221,9 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { "test_api_key_header", "test_api_key_query" };
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Place an order for a pet
*
@ -276,9 +245,6 @@ public class StoreApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -291,10 +257,7 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { "test_api_client_id", "test_api_client_secret" };
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
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;
}
/**
* Create user
* This can only be done by the logged in user.
@ -55,9 +54,6 @@ public class UserApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -72,9 +68,7 @@ public class UserApi {
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Creates list of users with given input array
*
@ -95,9 +89,6 @@ public class UserApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -112,9 +103,7 @@ public class UserApi {
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Creates list of users with given input array
*
@ -135,9 +124,6 @@ public class UserApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -152,9 +138,7 @@ public class UserApi {
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Delete user
* This can only be done by the logged in user.
@ -181,9 +165,6 @@ public class UserApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -198,9 +179,7 @@ public class UserApi {
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Get user by user name
*
@ -228,9 +207,6 @@ public class UserApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -243,12 +219,9 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
GenericType<User> localVarReturnType = new GenericType<User>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Logs user into the system
*
@ -268,16 +241,11 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -290,12 +258,9 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
GenericType<String> localVarReturnType = new GenericType<String>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Logs out current logged in user session
*
@ -315,9 +280,6 @@ public class UserApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -332,9 +294,7 @@ public class UserApi {
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Updated user
* This can only be done by the logged in user.
@ -362,9 +322,6 @@ public class UserApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@ -379,7 +336,5 @@ public class UserApi {
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
}

View File

@ -50,7 +50,6 @@ public class Category {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -147,7 +147,6 @@ public class InlineResponse200 {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == 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 {
@ -32,7 +35,6 @@ public class Model200Response {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == 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 {
@ -32,7 +35,6 @@ public class ModelReturn {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == 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 {
@ -23,7 +26,7 @@ public class Name {
return this;
}
@ApiModelProperty(example = "null", value = "")
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("name")
public Integer getName() {
return name;
@ -33,22 +36,11 @@ public class Name {
}
/**
**/
public Name snakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("snake_case")
public Integer getSnakeCase() {
return snakeCase;
}
public void setSnakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
}
@Override

View File

@ -135,7 +135,6 @@ public class Order {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -148,7 +148,6 @@ public class Pet {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

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

View File

@ -50,7 +50,6 @@ public class Tag {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -159,7 +159,6 @@ public class User {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -10,7 +10,7 @@ Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/
- API 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
## A note on Moose
@ -235,6 +235,7 @@ use WWW::SwaggerClient::Object::Animal;
use WWW::SwaggerClient::Object::Cat;
use WWW::SwaggerClient::Object::Category;
use WWW::SwaggerClient::Object::Dog;
use WWW::SwaggerClient::Object::FormatTest;
use WWW::SwaggerClient::Object::InlineResponse200;
use WWW::SwaggerClient::Object::Model200Response;
use WWW::SwaggerClient::Object::ModelReturn;
@ -264,6 +265,7 @@ use WWW::SwaggerClient::Object::Animal;
use WWW::SwaggerClient::Object::Cat;
use WWW::SwaggerClient::Object::Category;
use WWW::SwaggerClient::Object::Dog;
use WWW::SwaggerClient::Object::FormatTest;
use WWW::SwaggerClient::Object::InlineResponse200;
use WWW::SwaggerClient::Object::Model200Response;
use WWW::SwaggerClient::Object::ModelReturn;
@ -299,20 +301,20 @@ All URIs are relative to *http://petstore.swagger.io/v2*
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_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* | [**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* | [**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* | [**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* | [**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&#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_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
*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
*StoreApi* | [**find_orders_by_status**](docs/StoreApi.md#find_orders_by_status) | **GET** /store/findByStatus | Finds orders by status
*StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
*StoreApi* | [**get_inventory_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* | [**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
@ -330,6 +332,7 @@ Class | Method | HTTP request | Description
- [WWW::SwaggerClient::Object::Cat](docs/Cat.md)
- [WWW::SwaggerClient::Object::Category](docs/Category.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::Model200Response](docs/Model200Response.md)
- [WWW::SwaggerClient::Object::ModelReturn](docs/ModelReturn.md)

View File

@ -8,7 +8,7 @@ use WWW::SwaggerClient::Object::Name;
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **int** | | [optional]
**name** | **int** | |
**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)

View File

@ -10,13 +10,13 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**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
[**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
[**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;
[**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;
[**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&#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_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

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
[**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_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
[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet

View File

@ -326,47 +326,46 @@ sub update_params_for_auth {
$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');
if ($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) {
$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');
if ($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');
if ($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');
if ($api_key) {
$query_params->{'test_api_key_query'} = $api_key;
}
}
elsif ($auth eq 'petstore_auth') {
elsif ($auth eq 'petstore_auth') {
if ($WWW::SwaggerClient::Configuration::access_token) {
$header_params->{'Authorization'} = 'Bearer ' . $WWW::SwaggerClient::Configuration::access_token;
}
}
else {
# TODO show warning about security definition not found
}

View File

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

View File

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

View File

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

View File

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

View File

@ -110,42 +110,41 @@ __PACKAGE__->method_documentation({
format => '',
read_only => '',
},
'id' => {
'id' => {
datatype => 'int',
base_name => 'id',
description => '',
format => '',
read_only => '',
},
'category' => {
'category' => {
datatype => 'object',
base_name => 'category',
description => '',
format => '',
read_only => '',
},
'status' => {
'status' => {
datatype => 'string',
base_name => 'status',
description => 'pet status in the store',
format => '',
read_only => '',
},
'name' => {
'name' => {
datatype => 'string',
base_name => 'name',
description => '',
format => '',
read_only => '',
},
'photo_urls' => {
'photo_urls' => {
datatype => 'ARRAY[string]',
base_name => 'photoUrls',
description => '',
format => '',
read_only => '',
},
});
__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.
#
@ -97,7 +97,7 @@ sub _deserialize {
__PACKAGE__->class_documentation({description => '',
__PACKAGE__->class_documentation({description => 'Model for testing model name starting with number',
class => 'Model200Response',
required => [], # TODO
} );
@ -110,7 +110,6 @@ __PACKAGE__->method_documentation({
format => '',
read_only => '',
},
});
__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.
#
@ -97,7 +97,7 @@ sub _deserialize {
__PACKAGE__->class_documentation({description => '',
__PACKAGE__->class_documentation({description => 'Model for testing reserved words',
class => 'ModelReturn',
required => [], # TODO
} );
@ -110,7 +110,6 @@ __PACKAGE__->method_documentation({
format => '',
read_only => '',
},
});
__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.
#
@ -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',
required => [], # TODO
} );
@ -110,14 +110,13 @@ __PACKAGE__->method_documentation({
format => '',
read_only => '',
},
'snake_case' => {
'snake_case' => {
datatype => 'int',
base_name => 'snake_case',
description => '',
format => '',
read_only => '',
},
});
__PACKAGE__->swagger_types( {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -113,7 +113,6 @@ sub add_pet {
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
return;
}
#
@ -144,7 +143,7 @@ sub add_pet_using_byte_array {
# 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
my $_method = 'POST';
@ -178,7 +177,6 @@ sub add_pet_using_byte_array {
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
return;
}
#
@ -259,7 +257,6 @@ sub delete_pet {
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
return;
}
#
@ -327,8 +324,7 @@ sub find_pets_by_status {
}
my $_response_object = $self->{api_client}->deserialize('ARRAY[Pet]', $response);
return $_response_object;
}
}
#
# find_pets_by_tags
@ -395,8 +391,7 @@ sub find_pets_by_tags {
}
my $_response_object = $self->{api_client}->deserialize('ARRAY[Pet]', $response);
return $_response_object;
}
}
#
# get_pet_by_id
@ -470,8 +465,7 @@ sub get_pet_by_id {
}
my $_response_object = $self->{api_client}->deserialize('Pet', $response);
return $_response_object;
}
}
#
# get_pet_by_id_in_object
@ -506,7 +500,7 @@ sub get_pet_by_id_in_object {
# 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
my $_method = 'GET';
@ -545,8 +539,7 @@ sub get_pet_by_id_in_object {
}
my $_response_object = $self->{api_client}->deserialize('InlineResponse200', $response);
return $_response_object;
}
}
#
# pet_pet_idtesting_byte_arraytrue_get
@ -581,7 +574,7 @@ sub pet_pet_idtesting_byte_arraytrue_get {
# 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
my $_method = 'GET';
@ -620,8 +613,7 @@ sub pet_pet_idtesting_byte_arraytrue_get {
}
my $_response_object = $self->{api_client}->deserialize('string', $response);
return $_response_object;
}
}
#
# update_pet
@ -685,7 +677,6 @@ sub update_pet {
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
return;
}
#
@ -758,14 +749,10 @@ sub update_pet_with_form {
}
# form params
if ( exists $args{'name'} ) {
$form_params->{'name'} = $self->{api_client}->to_form_value($args{'name'});
}# form params
if ( exists $args{'status'} ) {
$form_params->{'status'} = $self->{api_client}->to_form_value($args{'status'});
}
my $_body_data;
@ -779,7 +766,6 @@ sub update_pet_with_form {
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
return;
}
#
@ -852,15 +838,11 @@ sub upload_file {
}
# form params
if ( exists $args{'additional_metadata'} ) {
$form_params->{'additionalMetadata'} = $self->{api_client}->to_form_value($args{'additional_metadata'});
}# form params
if ( exists $args{'file'} ) {
$form_params->{'file'} = [] unless defined $form_params->{'file'};
push @{$form_params->{'file'}}, $args{'file'};
}
my $_body_data;
@ -874,7 +856,6 @@ sub upload_file {
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
return;
}

View File

@ -37,7 +37,7 @@ has version_info => ( is => 'ro',
default => sub { {
app_name => 'Swagger Petstore',
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',
} },
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
=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

View File

@ -120,7 +120,6 @@ sub delete_order {
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
return;
}
#
@ -188,8 +187,7 @@ sub find_orders_by_status {
}
my $_response_object = $self->{api_client}->deserialize('ARRAY[Order]', $response);
return $_response_object;
}
}
#
# get_inventory
@ -247,8 +245,7 @@ sub get_inventory {
}
my $_response_object = $self->{api_client}->deserialize('HASH[string,int]', $response);
return $_response_object;
}
}
#
# get_inventory_in_object
@ -272,7 +269,7 @@ sub get_inventory_in_object {
# 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
my $_method = 'GET';
@ -306,8 +303,7 @@ sub get_inventory_in_object {
}
my $_response_object = $self->{api_client}->deserialize('object', $response);
return $_response_object;
}
}
#
# get_order_by_id
@ -381,8 +377,7 @@ sub get_order_by_id {
}
my $_response_object = $self->{api_client}->deserialize('Order', $response);
return $_response_object;
}
}
#
# place_order
@ -449,8 +444,7 @@ sub place_order {
}
my $_response_object = $self->{api_client}->deserialize('Order', $response);
return $_response_object;
}
}
1;

View File

@ -113,7 +113,6 @@ sub create_user {
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
return;
}
#
@ -178,7 +177,6 @@ sub create_users_with_array_input {
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
return;
}
#
@ -243,7 +241,6 @@ sub create_users_with_list_input {
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
return;
}
#
@ -315,7 +312,6 @@ sub delete_user {
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
return;
}
#
@ -328,7 +324,7 @@ sub delete_user {
my $params = {
'username' => {
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',
},
};
@ -390,8 +386,7 @@ sub get_user_by_name {
}
my $_response_object = $self->{api_client}->deserialize('User', $response);
return $_response_object;
}
}
#
# login_user
@ -467,8 +462,7 @@ sub login_user {
}
my $_response_object = $self->{api_client}->deserialize('string', $response);
return $_response_object;
}
}
#
# logout_user
@ -523,7 +517,6 @@ sub logout_user {
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
return;
}
#
@ -604,7 +597,6 @@ sub update_user {
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
return;
}

View File

@ -5,7 +5,7 @@ This PHP package is automatically generated by the [Swagger Codegen](https://git
- API 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
## Requirements
@ -127,25 +127,10 @@ Class | Method | HTTP request | Description
## Documentation For Authorization
## petstore_auth
- **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
## test_api_key_header
- **Type**: API key
- **API key parameter name**: x-test_api_client_id
- **Location**: HTTP header
## test_api_client_secret
- **Type**: API key
- **API key parameter name**: x-test_api_client_secret
- **API key parameter name**: test_api_key_header
- **Location**: HTTP header
## api_key
@ -158,17 +143,32 @@ Class | Method | HTTP request | Description
- **Type**: HTTP basic authentication
## test_api_client_secret
- **Type**: API key
- **API key parameter name**: x-test_api_client_secret
- **Location**: HTTP header
## test_api_client_id
- **Type**: API key
- **API key parameter name**: x-test_api_client_id
- **Location**: HTTP header
## test_api_key_query
- **Type**: API key
- **API key parameter name**: test_api_key_query
- **Location**: URL query string
## test_api_key_header
## petstore_auth
- **Type**: API key
- **API key parameter name**: test_api_key_header
- **Location**: HTTP 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
## Author

View File

@ -3,12 +3,12 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**photo_urls** | **string[]** | | [optional]
**name** | **string** | | [optional]
**tags** | [**\Swagger\Client\Model\Tag[]**](Tag.md) | | [optional]
**id** | **int** | |
**category** | **object** | | [optional]
**tags** | [**\Swagger\Client\Model\Tag[]**](Tag.md) | | [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)

View File

@ -268,12 +268,12 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
<?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
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// 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();
$pet_id = 789; // int | ID of pet that needs to be fetched
@ -299,7 +299,7 @@ Name | Type | Description | Notes
### 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
@ -320,12 +320,12 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
<?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
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// 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();
$pet_id = 789; // int | ID of pet that needs to be fetched
@ -351,7 +351,7 @@ Name | Type | Description | Notes
### 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
@ -372,12 +372,12 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
<?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
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// 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();
$pet_id = 789; // int | ID of pet that needs to be fetched
@ -403,7 +403,7 @@ Name | Type | Description | Notes
### 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

View File

@ -214,14 +214,14 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
<?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
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
// 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();
$order_id = "order_id_example"; // string | ID of pet that needs to be fetched
@ -247,7 +247,7 @@ Name | Type | Description | Notes
### 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

View File

@ -593,17 +593,17 @@ class PetApi
$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
$apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');
if (strlen($apiKey) !== 0) {
$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
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -695,17 +695,17 @@ class PetApi
$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
$apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');
if (strlen($apiKey) !== 0) {
$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
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -797,17 +797,17 @@ class PetApi
$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
$apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');
if (strlen($apiKey) !== 0) {
$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
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(

View File

@ -506,16 +506,16 @@ class StoreApi
}
// 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) {
$queryParams['test_api_key_query'] = $apiKey;
$headerParams['test_api_key_header'] = $apiKey;
}
// 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) {
$headerParams['test_api_key_header'] = $apiKey;
$queryParams['test_api_key_query'] = $apiKey;
}
// make the API Call

View File

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

View File

@ -256,7 +256,7 @@ class ObjectSerializer
} else {
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);
return $data;
} 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:
- API verion: 1.0.0
- Package version:
- Build date: 2016-03-30T17:18:44.943+08:00
- API version: 1.0.0
- Package version: 1.0.0
- Build date: 2016-04-11T16:56:24.045+08:00
- Build package: class io.swagger.codegen.languages.PythonClientCodegen
## Requirements.
@ -20,9 +20,9 @@ If the python package is hosted on Github, you can install directly from Github
```sh
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
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)
Import the pacakge:
Then import the package:
```python
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
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:
# Add a new pet to the store
api_instance.add_pet(body=body);
api_instance.add_pet(body=body)
except ApiException as 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
------------ | ------------- | ------------- | -------------
*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* | [**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* | [**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* | [**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* | [**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&#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_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
*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
*StoreApi* | [**find_orders_by_status**](docs/StoreApi.md#find_orders_by_status) | **GET** /store/findByStatus | Finds orders by status
*StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
*StoreApi* | [**get_inventory_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* | [**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
@ -112,6 +104,7 @@ Class | Method | HTTP request | Description
- [Cat](docs/Cat.md)
- [Category](docs/Category.md)
- [Dog](docs/Dog.md)
- [FormatTest](docs/FormatTest.md)
- [InlineResponse200](docs/InlineResponse200.md)
- [Model200Response](docs/Model200Response.md)
- [ModelReturn](docs/ModelReturn.md)

View File

@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **int** | | [optional]
**name** | **int** | |
**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)

View File

@ -1,17 +1,17 @@
# swagger_client\PetApi
# swagger_client.PetApi
All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**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
[**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
[**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;
[**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;
[**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&#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_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
@ -26,11 +26,10 @@ Add a new pet to the store
### Example
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# Configure OAuth2 access token for authorization: petstore_auth
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:
# Add a new pet to the store
api_instance.add_pet(body=body);
api_instance.add_pet(body=body)
except ApiException as 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
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# Configure OAuth2 access token for authorization: petstore_auth
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:
# 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:
print "Exception when calling PetApi->add_pet_using_byte_array: %s\n" % e
```
@ -126,11 +124,10 @@ Deletes a pet
### Example
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
@ -142,7 +139,7 @@ api_key = 'api_key_example' # str | (optional)
try:
# 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:
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
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# Configure OAuth2 access token for authorization: petstore_auth
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:
# 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)
except ApiException as 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
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
@ -244,7 +239,7 @@ tags = ['tags_example'] # list[str] | Tags to filter by (optional)
try:
# 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)
except ApiException as 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
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# 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
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
# 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:
# 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)
except ApiException as 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
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# 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
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
# 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:
# 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)
except ApiException as 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
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# 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
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
# 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:
# 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)
except ApiException as e:
print "Exception when calling PetApi->pet_pet_idtesting_byte_arraytrue_get: %s\n" % e
@ -445,11 +437,10 @@ Update an existing pet
### Example
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# Configure OAuth2 access token for authorization: petstore_auth
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:
# Update an existing pet
api_instance.update_pet(body=body);
api_instance.update_pet(body=body)
except ApiException as 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
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
@ -512,7 +502,7 @@ status = 'status_example' # str | Updated status of the pet (optional)
try:
# 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:
print "Exception when calling PetApi->update_pet_with_form: %s\n" % e
```
@ -549,11 +539,10 @@ uploads an image
### Example
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
@ -566,7 +555,7 @@ file = '/path/to/file.txt' # file | file to upload (optional)
try:
# 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:
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*
@ -7,7 +7,7 @@ Method | HTTP request | Description
[**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
[**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
[**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
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# create an instance of the API class
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:
# Delete purchase order by ID
api_instance.delete_order(order_id);
api_instance.delete_order(order_id)
except ApiException as 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
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# 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
# swagger_client.configuration.api_key_prefix['x-test_api_client_id'] = 'BEARER'
# 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
# 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:
# 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)
except ApiException as 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
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# 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
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
@ -141,7 +138,7 @@ api_instance = swagger_client.StoreApi()
try:
# Returns pet inventories by status
api_response = api_instance.get_inventory();
api_response = api_instance.get_inventory()
pprint(api_response)
except ApiException as 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
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# 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
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
@ -190,7 +186,7 @@ api_instance = swagger_client.StoreApi()
try:
# 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)
except ApiException as 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
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# 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
# swagger_client.configuration.api_key_prefix['test_api_key_header'] = 'BEARER'
# 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
# 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:
# 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)
except ApiException as e:
print "Exception when calling StoreApi->get_order_by_id: %s\n" % e
@ -280,18 +275,17 @@ Place an order for a pet
### Example
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# 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
# swagger_client.configuration.api_key_prefix['x-test_api_client_id'] = 'BEARER'
# 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
# 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:
# 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)
except ApiException as 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*
@ -23,11 +23,10 @@ This can only be done by the logged in user.
### Example
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# create an instance of the API class
api_instance = swagger_client.UserApi()
@ -35,7 +34,7 @@ body = swagger_client.User() # User | Created user object (optional)
try:
# Create user
api_instance.create_user(body=body);
api_instance.create_user(body=body)
except ApiException as e:
print "Exception when calling UserApi->create_user: %s\n" % e
```
@ -70,11 +69,10 @@ Creates list of users with given input array
### Example
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# create an instance of the API class
api_instance = swagger_client.UserApi()
@ -82,7 +80,7 @@ body = [swagger_client.User()] # list[User] | List of user object (optional)
try:
# 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:
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
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# create an instance of the API class
api_instance = swagger_client.UserApi()
@ -129,7 +126,7 @@ body = [swagger_client.User()] # list[User] | List of user object (optional)
try:
# 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:
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
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# Configure HTTP basic authorization: test_http_basic
swagger_client.configuration.username = 'YOUR_USERNAME'
@ -180,7 +176,7 @@ username = 'username_example' # str | The name that needs to be deleted
try:
# Delete user
api_instance.delete_user(username);
api_instance.delete_user(username)
except ApiException as e:
print "Exception when calling UserApi->delete_user: %s\n" % e
```
@ -215,11 +211,10 @@ Get user by user name
### Example
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# create an instance of the API class
api_instance = swagger_client.UserApi()
@ -227,7 +222,7 @@ username = 'username_example' # str | The name that needs to be fetched. Use use
try:
# 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)
except ApiException as e:
print "Exception when calling UserApi->get_user_by_name: %s\n" % e
@ -263,11 +258,10 @@ Logs user into the system
### Example
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# create an instance of the API class
api_instance = swagger_client.UserApi()
@ -276,7 +270,7 @@ password = 'password_example' # str | The password for login in clear text (opti
try:
# 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)
except ApiException as e:
print "Exception when calling UserApi->login_user: %s\n" % e
@ -313,18 +307,17 @@ Logs out current logged in user session
### Example
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# create an instance of the API class
api_instance = swagger_client.UserApi()
try:
# Logs out current logged in user session
api_instance.logout_user();
api_instance.logout_user()
except ApiException as 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
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
import time
# create an instance of the API class
api_instance = swagger_client.UserApi()
@ -369,7 +361,7 @@ body = swagger_client.User() # User | Updated user object (optional)
try:
# Updated user
api_instance.update_user(username, body=body);
api_instance.update_user(username, body=body)
except ApiException as e:
print "Exception when calling UserApi->update_user: %s\n" % e
```

View File

@ -28,7 +28,7 @@ setup(
packages=find_packages(),
include_package_data=True,
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-email: apiteam@swagger.io
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
Platform: UNKNOWN

View File

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

View File

@ -154,7 +154,7 @@ class PetApi(object):
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 = {}
query_params = {}
@ -536,7 +536,7 @@ class PetApi(object):
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`")
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 = {}
if 'pet_id' in params:
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):
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 = {}
if 'pet_id' in params:
path_params['petId'] = params['pet_id']

View File

@ -301,7 +301,7 @@ class StoreApi(object):
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 = {}
query_params = {}

View File

@ -5,6 +5,7 @@ from .animal import Animal
from .cat import Cat
from .category import Category
from .dog import Dog
from .format_test import FormatTest
from .inline_response_200 import InlineResponse200
from .model_200_response import Model200Response
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
- 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
## Installation
@ -114,6 +114,7 @@ Class | Method | HTTP request | Description
- [Petstore::Cat](docs/Cat.md)
- [Petstore::Category](docs/Category.md)
- [Petstore::Dog](docs/Dog.md)
- [Petstore::FormatTest](docs/FormatTest.md)
- [Petstore::InlineResponse200](docs/InlineResponse200.md)
- [Petstore::Model200Response](docs/Model200Response.md)
- [Petstore::ModelReturn](docs/ModelReturn.md)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -210,7 +210,7 @@
<joda-version>1.2</joda-version>
<joda-time-version>2.2</joda-time-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>
<maven-plugin.version>1.0.0</maven-plugin.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
/**
* 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) = {
// create path and map variables
val path = "/pet".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json", "application/xml", "application/json")
val contentType = contentTypes(0)
@ -45,9 +43,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = body
if(contentType.startsWith("multipart/form-data")) {
@ -56,13 +51,11 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
case _ => None
}
} catch {
@ -70,7 +63,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* 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) = {
// 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 contentType = contentTypes(0)
@ -92,9 +83,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = body
if(contentType.startsWith("multipart/form-data")) {
@ -103,13 +91,11 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
case _ => None
}
} catch {
@ -117,7 +103,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Deletes a pet
*
@ -130,7 +115,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
val contentTypes = List("application/json")
val contentType = contentTypes(0)
@ -141,11 +125,8 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
headerParams += "api_key" -> apiKey
var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) {
@ -154,13 +135,11 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
case _ => None
}
} catch {
@ -168,7 +147,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Finds Pets by status
* 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]] = {
// create path and map variables
val path = "/pet/findByStatus".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json")
val contentType = contentTypes(0)
@ -188,12 +165,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val formParams = new HashMap[String, String]
if(String.valueOf(status) != "null") queryParams += "status" -> status.toString
var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) {
@ -202,14 +176,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
Some(ApiInvoker.deserialize(s, "array", classOf[Pet]).asInstanceOf[List[Pet]])
case _ => None
}
} catch {
@ -217,7 +189,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Finds Pets by tags
* 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]] = {
// create path and map variables
val path = "/pet/findByTags".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json")
val contentType = contentTypes(0)
@ -237,12 +207,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val formParams = new HashMap[String, String]
if(String.valueOf(tags) != "null") queryParams += "tags" -> tags.toString
var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) {
@ -251,14 +218,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
Some(ApiInvoker.deserialize(s, "array", classOf[Pet]).asInstanceOf[List[Pet]])
case _ => None
}
} catch {
@ -266,7 +231,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Find pet by ID
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
@ -278,7 +242,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
val contentTypes = List("application/json")
val contentType = contentTypes(0)
@ -290,9 +253,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) {
@ -301,14 +261,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[Pet]).asInstanceOf[Pet])
case _ => None
}
} catch {
@ -316,7 +274,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* 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
@ -325,8 +282,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
*/
def getPetByIdInObject (petId: Long) : Option[InlineResponse200] = {
// 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")
@ -340,9 +296,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) {
@ -351,14 +304,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[InlineResponse200]).asInstanceOf[InlineResponse200])
case _ => None
}
} catch {
@ -366,7 +317,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* 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
@ -375,8 +325,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
*/
def petPetIdtestingByteArraytrueGet (petId: Long) : Option[String] = {
// 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")
@ -390,9 +339,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) {
@ -401,14 +347,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[String]).asInstanceOf[String])
case _ => None
}
} catch {
@ -416,7 +360,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Update an existing pet
*
@ -426,7 +369,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
def updatePet (body: Pet) = {
// create path and map variables
val path = "/pet".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json", "application/xml", "application/json")
val contentType = contentTypes(0)
@ -438,9 +380,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = body
if(contentType.startsWith("multipart/form-data")) {
@ -449,13 +388,11 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "PUT", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
case _ => None
}
} catch {
@ -463,7 +400,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Updates a pet in the store with form data
*
@ -477,7 +413,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
val contentTypes = List("application/x-www-form-urlencoded", "application/json")
val contentType = contentTypes(0)
@ -489,9 +424,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) {
@ -505,14 +437,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
}
else {
formParams += "name" -> name.toString()
formParams += "status" -> status.toString()
formParams += "status" -> status.toString()
}
try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
case _ => None
}
} catch {
@ -520,7 +450,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* uploads an image
*
@ -534,7 +463,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val path = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
val contentTypes = List("multipart/form-data", "application/json")
val contentType = contentTypes(0)
@ -546,9 +474,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) {
@ -564,13 +489,11 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
else {
formParams += "additionalMetadata" -> additionalMetadata.toString()
}
try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
case _ => None
}
} catch {
@ -578,5 +501,4 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
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
/**
* Delete purchase order by ID
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
@ -33,7 +32,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}",apiInvoker.escape(orderId))
val contentTypes = List("application/json")
val contentType = contentTypes(0)
@ -45,9 +43,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) {
@ -56,13 +51,11 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
case _ => None
}
} catch {
@ -70,7 +63,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Finds orders by status
* 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]] = {
// create path and map variables
val path = "/store/findByStatus".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json")
val contentType = contentTypes(0)
@ -90,12 +81,9 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val formParams = new HashMap[String, String]
if(String.valueOf(status) != "null") queryParams += "status" -> status.toString
var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) {
@ -104,14 +92,12 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
Some(ApiInvoker.deserialize(s, "array", classOf[Order]).asInstanceOf[List[Order]])
case _ => None
}
} catch {
@ -119,7 +105,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Returns pet inventories by status
* 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]] = {
// create path and map variables
val path = "/store/inventory".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json")
val contentType = contentTypes(0)
@ -140,9 +124,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) {
@ -151,14 +132,12 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
Some(ApiInvoker.deserialize(s, "map", classOf[Integer]).asInstanceOf[Map[String, Integer]])
case _ => None
}
} catch {
@ -166,7 +145,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* 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
@ -174,8 +152,7 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
*/
def getInventoryInObject () : Option[Any] = {
// 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 contentType = contentTypes(0)
@ -187,9 +164,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) {
@ -198,14 +172,12 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[Any]).asInstanceOf[Any])
case _ => None
}
} catch {
@ -213,10 +185,9 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* 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
* @return Order
*/
@ -225,7 +196,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}",apiInvoker.escape(orderId))
val contentTypes = List("application/json")
val contentType = contentTypes(0)
@ -237,9 +207,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) {
@ -248,14 +215,12 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[Order]).asInstanceOf[Order])
case _ => None
}
} catch {
@ -263,7 +228,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* 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] = {
// create path and map variables
val path = "/store/order".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json")
val contentType = contentTypes(0)
@ -285,9 +248,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = body
if(contentType.startsWith("multipart/form-data")) {
@ -296,14 +256,12 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[Order]).asInstanceOf[Order])
case _ => None
}
} catch {
@ -311,5 +269,4 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
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
/**
* Create 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) = {
// create path and map variables
val path = "/user".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json")
val contentType = contentTypes(0)
@ -43,9 +41,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = body
if(contentType.startsWith("multipart/form-data")) {
@ -54,13 +49,11 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
case _ => None
}
} catch {
@ -68,7 +61,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* 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]) = {
// create path and map variables
val path = "/user/createWithArray".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json")
val contentType = contentTypes(0)
@ -90,9 +81,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = body
if(contentType.startsWith("multipart/form-data")) {
@ -101,13 +89,11 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
case _ => None
}
} catch {
@ -115,7 +101,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* 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]) = {
// create path and map variables
val path = "/user/createWithList".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json")
val contentType = contentTypes(0)
@ -137,9 +121,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = body
if(contentType.startsWith("multipart/form-data")) {
@ -148,13 +129,11 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
case _ => None
}
} catch {
@ -162,7 +141,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Delete user
* This can only be done by the logged in user.
@ -174,7 +152,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}",apiInvoker.escape(username))
val contentTypes = List("application/json")
val contentType = contentTypes(0)
@ -186,9 +163,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) {
@ -197,13 +171,11 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
case _ => None
}
} catch {
@ -211,7 +183,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Get user by user name
*
@ -223,7 +194,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}",apiInvoker.escape(username))
val contentTypes = List("application/json")
val contentType = contentTypes(0)
@ -235,9 +205,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) {
@ -246,14 +213,12 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[User]).asInstanceOf[User])
case _ => None
}
} catch {
@ -261,7 +226,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* 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] = {
// create path and map variables
val path = "/user/login".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json")
val contentType = contentTypes(0)
@ -282,11 +245,8 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val formParams = new HashMap[String, String]
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
@ -297,14 +257,12 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
Some(ApiInvoker.deserialize(s, "", classOf[String]).asInstanceOf[String])
case _ => None
}
} catch {
@ -312,7 +270,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Logs out current logged in user session
*
@ -321,7 +278,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
def logoutUser () = {
// create path and map variables
val path = "/user/logout".replaceAll("\\{format\\}","json")
val contentTypes = List("application/json")
val contentType = contentTypes(0)
@ -333,9 +289,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = null
if(contentType.startsWith("multipart/form-data")) {
@ -344,13 +297,11 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
case _ => None
}
} catch {
@ -358,7 +309,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
/**
* Updated user
* This can only be done by the logged in user.
@ -371,7 +321,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
val path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}",apiInvoker.escape(username))
val contentTypes = List("application/json")
val contentType = contentTypes(0)
@ -383,9 +332,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
var postBody: AnyRef = body
if(contentType.startsWith("multipart/form-data")) {
@ -394,13 +340,11 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
postBody = mp
}
else {
}
try {
apiInvoker.invokeApi(basePath, path, "PUT", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match {
case s: String =>
case _ => None
}
} catch {
@ -408,5 +352,4 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
case ex: ApiException => throw ex
}
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -5,4 +5,3 @@ package io.swagger.client.model
case class SpecialModelName (
specialPropertyName: Long)

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