mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 03:18:53 +00:00
Merge pull request #2554 from wing328/add_format_test
Add tests for different type and format for model's properties
This commit is contained in:
commit
c8f4edff68
@ -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;
|
||||
|
@ -59,6 +59,7 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
|
||||
//TODO binary should be mapped to byte array
|
||||
// mapped to String as a workaround
|
||||
typeMapping.put("binary", "string");
|
||||
typeMapping.put("ByteArray", "string");
|
||||
|
||||
cliOptions.add(new CliOption(CodegenConstants.MODEL_PROPERTY_NAMING, CodegenConstants.MODEL_PROPERTY_NAMING_DESC).defaultValue("camelCase"));
|
||||
|
||||
|
@ -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");
|
||||
|
@ -122,7 +122,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
|
||||
typeMapping.put("float", "Number");
|
||||
typeMapping.put("number", "Number");
|
||||
typeMapping.put("DateTime", "Date"); // Should this be dateTime?
|
||||
typeMapping.put("Date", "Date"); // Should this be date?
|
||||
typeMapping.put("date", "Date"); // Should this be date?
|
||||
typeMapping.put("long", "Integer");
|
||||
typeMapping.put("short", "Integer");
|
||||
typeMapping.put("char", "String");
|
||||
|
@ -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"));
|
||||
|
@ -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));
|
||||
|
@ -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(
|
||||
|
@ -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();
|
||||
|
@ -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(
|
||||
|
@ -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>();
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -30,14 +30,15 @@ __PACKAGE__->class_documentation({description => '{{description}}',
|
||||
} );
|
||||
|
||||
__PACKAGE__->method_documentation({
|
||||
{{#vars}}'{{name}}' => {
|
||||
{{#vars}}
|
||||
'{{name}}' => {
|
||||
datatype => '{{datatype}}',
|
||||
base_name => '{{baseName}}',
|
||||
description => '{{description}}',
|
||||
format => '{{format}}',
|
||||
read_only => '{{readOnly}}',
|
||||
},
|
||||
{{/vars}}
|
||||
{{/vars}}
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
@ -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
|
||||
|
@ -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() {}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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>
|
||||
|
@ -36,7 +36,6 @@ public class PetApi {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
@ -54,12 +53,9 @@ public class PetApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json", "application/xml"
|
||||
};
|
||||
@ -72,11 +68,9 @@ public class PetApi {
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
|
||||
|
||||
|
||||
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
|
||||
*
|
||||
@ -94,12 +88,9 @@ public class PetApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json", "application/xml"
|
||||
};
|
||||
@ -112,11 +103,9 @@ public class PetApi {
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
@ -141,14 +130,11 @@ public class PetApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
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"
|
||||
};
|
||||
@ -161,11 +147,9 @@ public class PetApi {
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
|
||||
|
||||
|
||||
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 < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
@ -278,12 +248,9 @@ public class PetApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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 'Find pet by ID'
|
||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
@ -326,12 +290,9 @@ public class PetApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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 'Find pet by ID'
|
||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
@ -374,12 +332,9 @@ public class PetApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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
|
||||
*
|
||||
@ -415,12 +367,9 @@ public class PetApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json", "application/xml"
|
||||
};
|
||||
@ -433,11 +382,9 @@ public class PetApi {
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
@ -463,15 +410,12 @@ public class PetApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (name != null)
|
||||
localVarFormParams.put("name", name);
|
||||
if (status != null)
|
||||
if (status != null)
|
||||
localVarFormParams.put("status", status);
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json", "application/xml"
|
||||
@ -485,11 +429,9 @@ public class PetApi {
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
@ -515,15 +457,12 @@ public class PetApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (additionalMetadata != null)
|
||||
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||
if (file != null)
|
||||
if (file != null)
|
||||
localVarFormParams.put("file", file);
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json", "application/xml"
|
||||
@ -537,9 +476,7 @@ public class PetApi {
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -34,7 +34,6 @@ public class StoreApi {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
@ -58,12 +57,9 @@ public class StoreApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json", "application/xml"
|
||||
};
|
||||
@ -76,11 +72,9 @@ public class StoreApi {
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
|
||||
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
|
||||
@ -142,12 +129,9 @@ public class StoreApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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 'Get inventory'
|
||||
* Returns an arbitrary object which is actually a map of status codes to quantities
|
||||
@ -183,12 +164,9 @@ public class StoreApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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 <= 5 or > 10. Other values will generated exceptions
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @return Order
|
||||
* @throws ApiException if fails to make API call
|
||||
@ -231,12 +206,9 @@ public class StoreApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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
|
||||
*
|
||||
@ -273,12 +242,9 @@ public class StoreApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,6 @@ public class UserApi {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
@ -52,12 +51,9 @@ public class UserApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json", "application/xml"
|
||||
};
|
||||
@ -70,11 +66,9 @@ public class UserApi {
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
@ -92,12 +86,9 @@ public class UserApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json", "application/xml"
|
||||
};
|
||||
@ -110,11 +101,9 @@ public class UserApi {
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
@ -132,12 +121,9 @@ public class UserApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json", "application/xml"
|
||||
};
|
||||
@ -150,11 +136,9 @@ public class UserApi {
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
@ -178,12 +162,9 @@ public class UserApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json", "application/xml"
|
||||
};
|
||||
@ -196,11 +177,9 @@ public class UserApi {
|
||||
|
||||
String[] localVarAuthNames = new String[] { "test_http_basic" };
|
||||
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
@ -225,12 +204,9 @@ public class UserApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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
|
||||
*
|
||||
@ -312,12 +277,9 @@ public class UserApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json", "application/xml"
|
||||
};
|
||||
@ -330,11 +292,9 @@ public class UserApi {
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
@ -359,12 +319,9 @@ public class UserApi {
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json", "application/xml"
|
||||
};
|
||||
@ -377,9 +334,7 @@ public class UserApi {
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,73 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class Animal {
|
||||
|
||||
private String className = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Animal className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
@JsonProperty("className")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Animal animal = (Animal) o;
|
||||
return Objects.equals(this.className, animal.className);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Animal {\n");
|
||||
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,95 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.client.model.Animal;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class Cat extends Animal {
|
||||
|
||||
private String className = null;
|
||||
private Boolean declawed = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Cat className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
@JsonProperty("className")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Cat declawed(Boolean declawed) {
|
||||
this.declawed = declawed;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("declawed")
|
||||
public Boolean getDeclawed() {
|
||||
return declawed;
|
||||
}
|
||||
public void setDeclawed(Boolean declawed) {
|
||||
this.declawed = declawed;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Cat cat = (Cat) o;
|
||||
return Objects.equals(this.className, cat.className) &&
|
||||
Objects.equals(this.declawed, cat.declawed) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className, declawed, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Cat {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ public class Category {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Category name(String name) {
|
||||
@ -49,7 +49,6 @@ public class Category {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
@ -0,0 +1,95 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.client.model.Animal;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class Dog extends Animal {
|
||||
|
||||
private String className = null;
|
||||
private String breed = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Dog className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
@JsonProperty("className")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Dog breed(String breed) {
|
||||
this.breed = breed;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("breed")
|
||||
public String getBreed() {
|
||||
return breed;
|
||||
}
|
||||
public void setBreed(String breed) {
|
||||
this.breed = breed;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Dog dog = (Dog) o;
|
||||
return Objects.equals(this.className, dog.className) &&
|
||||
Objects.equals(this.breed, dog.breed) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className, breed, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Dog {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,275 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class FormatTest {
|
||||
|
||||
private Integer integer = null;
|
||||
private Integer int32 = null;
|
||||
private Long int64 = null;
|
||||
private BigDecimal number = null;
|
||||
private Float _float = null;
|
||||
private Double _double = null;
|
||||
private String string = null;
|
||||
private byte[] _byte = null;
|
||||
private byte[] binary = null;
|
||||
private Date date = null;
|
||||
private String dateTime = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public FormatTest integer(Integer integer) {
|
||||
this.integer = integer;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("integer")
|
||||
public Integer getInteger() {
|
||||
return integer;
|
||||
}
|
||||
public void setInteger(Integer integer) {
|
||||
this.integer = integer;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public FormatTest int32(Integer int32) {
|
||||
this.int32 = int32;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("int32")
|
||||
public Integer getInt32() {
|
||||
return int32;
|
||||
}
|
||||
public void setInt32(Integer int32) {
|
||||
this.int32 = int32;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public FormatTest int64(Long int64) {
|
||||
this.int64 = int64;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("int64")
|
||||
public Long getInt64() {
|
||||
return int64;
|
||||
}
|
||||
public void setInt64(Long int64) {
|
||||
this.int64 = int64;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public FormatTest number(BigDecimal number) {
|
||||
this.number = number;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
@JsonProperty("number")
|
||||
public BigDecimal getNumber() {
|
||||
return number;
|
||||
}
|
||||
public void setNumber(BigDecimal number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public FormatTest _float(Float _float) {
|
||||
this._float = _float;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("float")
|
||||
public Float getFloat() {
|
||||
return _float;
|
||||
}
|
||||
public void setFloat(Float _float) {
|
||||
this._float = _float;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public FormatTest _double(Double _double) {
|
||||
this._double = _double;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("double")
|
||||
public Double getDouble() {
|
||||
return _double;
|
||||
}
|
||||
public void setDouble(Double _double) {
|
||||
this._double = _double;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public FormatTest string(String string) {
|
||||
this.string = string;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("string")
|
||||
public String getString() {
|
||||
return string;
|
||||
}
|
||||
public void setString(String string) {
|
||||
this.string = string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public FormatTest _byte(byte[] _byte) {
|
||||
this._byte = _byte;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("byte")
|
||||
public byte[] getByte() {
|
||||
return _byte;
|
||||
}
|
||||
public void setByte(byte[] _byte) {
|
||||
this._byte = _byte;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public FormatTest binary(byte[] binary) {
|
||||
this.binary = binary;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("binary")
|
||||
public byte[] getBinary() {
|
||||
return binary;
|
||||
}
|
||||
public void setBinary(byte[] binary) {
|
||||
this.binary = binary;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public FormatTest date(Date date) {
|
||||
this.date = date;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("date")
|
||||
public Date getDate() {
|
||||
return date;
|
||||
}
|
||||
public void setDate(Date date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public FormatTest dateTime(String dateTime) {
|
||||
this.dateTime = dateTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("dateTime")
|
||||
public String getDateTime() {
|
||||
return dateTime;
|
||||
}
|
||||
public void setDateTime(String dateTime) {
|
||||
this.dateTime = dateTime;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
FormatTest formatTest = (FormatTest) o;
|
||||
return Objects.equals(this.integer, formatTest.integer) &&
|
||||
Objects.equals(this.int32, formatTest.int32) &&
|
||||
Objects.equals(this.int64, formatTest.int64) &&
|
||||
Objects.equals(this.number, formatTest.number) &&
|
||||
Objects.equals(this._float, formatTest._float) &&
|
||||
Objects.equals(this._double, formatTest._double) &&
|
||||
Objects.equals(this.string, formatTest.string) &&
|
||||
Objects.equals(this._byte, formatTest._byte) &&
|
||||
Objects.equals(this.binary, formatTest.binary) &&
|
||||
Objects.equals(this.date, formatTest.date) &&
|
||||
Objects.equals(this.dateTime, formatTest.dateTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class FormatTest {\n");
|
||||
|
||||
sb.append(" integer: ").append(toIndentedString(integer)).append("\n");
|
||||
sb.append(" int32: ").append(toIndentedString(int32)).append("\n");
|
||||
sb.append(" int64: ").append(toIndentedString(int64)).append("\n");
|
||||
sb.append(" number: ").append(toIndentedString(number)).append("\n");
|
||||
sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
|
||||
sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
|
||||
sb.append(" string: ").append(toIndentedString(string)).append("\n");
|
||||
sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
|
||||
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
|
||||
sb.append(" date: ").append(toIndentedString(date)).append("\n");
|
||||
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ public class InlineResponse200 {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public InlineResponse200 id(Long id) {
|
||||
@ -77,7 +77,7 @@ public class InlineResponse200 {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public InlineResponse200 category(Object category) {
|
||||
@ -94,7 +94,7 @@ public class InlineResponse200 {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
**/
|
||||
@ -112,7 +112,7 @@ public class InlineResponse200 {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public InlineResponse200 name(String name) {
|
||||
@ -129,7 +129,7 @@ public class InlineResponse200 {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public InlineResponse200 photoUrls(List<String> photoUrls) {
|
||||
@ -146,7 +146,6 @@ public class InlineResponse200 {
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
@ -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 {
|
||||
|
||||
@ -31,7 +34,6 @@ public class Model200Response {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
@ -7,8 +7,11 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Model for testing reserved words
|
||||
**/
|
||||
|
||||
|
||||
@ApiModel(description = "Model for testing reserved words")
|
||||
|
||||
public class ModelReturn {
|
||||
|
||||
@ -31,7 +34,6 @@ public class ModelReturn {
|
||||
this._return = _return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
@ -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;
|
||||
@ -32,24 +35,13 @@ public class Name {
|
||||
this.name = 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
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
@ -48,7 +48,7 @@ public class Order {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Order petId(Long petId) {
|
||||
@ -65,7 +65,7 @@ public class Order {
|
||||
this.petId = petId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Order quantity(Integer quantity) {
|
||||
@ -82,7 +82,7 @@ public class Order {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Order shipDate(Date shipDate) {
|
||||
@ -99,7 +99,7 @@ public class Order {
|
||||
this.shipDate = shipDate;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
**/
|
||||
@ -117,7 +117,7 @@ public class Order {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Order complete(Boolean complete) {
|
||||
@ -134,7 +134,6 @@ public class Order {
|
||||
this.complete = complete;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
@ -61,7 +61,7 @@ public class Pet {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Pet category(Category category) {
|
||||
@ -78,7 +78,7 @@ public class Pet {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Pet name(String name) {
|
||||
@ -95,7 +95,7 @@ public class Pet {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Pet photoUrls(List<String> photoUrls) {
|
||||
@ -112,7 +112,7 @@ public class Pet {
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Pet tags(List<Tag> tags) {
|
||||
@ -129,7 +129,7 @@ public class Pet {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
**/
|
||||
@ -147,7 +147,6 @@ public class Pet {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
@ -31,7 +31,6 @@ public class SpecialModelName {
|
||||
this.specialPropertyName = specialPropertyName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
@ -32,7 +32,7 @@ public class Tag {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Tag name(String name) {
|
||||
@ -49,7 +49,6 @@ public class Tag {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
@ -38,7 +38,7 @@ public class User {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public User username(String username) {
|
||||
@ -55,7 +55,7 @@ public class User {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public User firstName(String firstName) {
|
||||
@ -72,7 +72,7 @@ public class User {
|
||||
this.firstName = firstName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public User lastName(String lastName) {
|
||||
@ -89,7 +89,7 @@ public class User {
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public User email(String email) {
|
||||
@ -106,7 +106,7 @@ public class User {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public User password(String password) {
|
||||
@ -123,7 +123,7 @@ public class User {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public User phone(String phone) {
|
||||
@ -140,7 +140,7 @@ public class User {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* User Status
|
||||
**/
|
||||
@ -158,7 +158,6 @@ public class User {
|
||||
this.userStatus = userStatus;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
@ -6,7 +6,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-03-30T20:58:13.565+08:00
|
||||
- Build date: 2016-04-11T22:19:40.915+08:00
|
||||
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen
|
||||
|
||||
## Installation
|
||||
@ -80,20 +80,20 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*SwaggerPetstore.PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||
*SwaggerPetstore.PetApi* | [**addPetUsingByteArray**](docs/PetApi.md#addPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
*SwaggerPetstore.PetApi* | [**addPetUsingByteArray**](docs/PetApi.md#addPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
*SwaggerPetstore.PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
*SwaggerPetstore.PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
*SwaggerPetstore.PetApi* | [**findPetsByTags**](docs/PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
*SwaggerPetstore.PetApi* | [**getPetById**](docs/PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
*SwaggerPetstore.PetApi* | [**getPetByIdInObject**](docs/PetApi.md#getPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
*SwaggerPetstore.PetApi* | [**petPetIdtestingByteArraytrueGet**](docs/PetApi.md#petPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
*SwaggerPetstore.PetApi* | [**getPetByIdInObject**](docs/PetApi.md#getPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
*SwaggerPetstore.PetApi* | [**petPetIdtestingByteArraytrueGet**](docs/PetApi.md#petPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
*SwaggerPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
*SwaggerPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*SwaggerPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*SwaggerPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
*SwaggerPetstore.StoreApi* | [**findOrdersByStatus**](docs/StoreApi.md#findOrdersByStatus) | **GET** /store/findByStatus | Finds orders by status
|
||||
*SwaggerPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*SwaggerPetstore.StoreApi* | [**getInventoryInObject**](docs/StoreApi.md#getInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
*SwaggerPetstore.StoreApi* | [**getInventoryInObject**](docs/StoreApi.md#getInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
*SwaggerPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
*SwaggerPetstore.StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||
*SwaggerPetstore.UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user
|
||||
@ -112,6 +112,7 @@ Class | Method | HTTP request | Description
|
||||
- [SwaggerPetstore.Cat](docs/Cat.md)
|
||||
- [SwaggerPetstore.Category](docs/Category.md)
|
||||
- [SwaggerPetstore.Dog](docs/Dog.md)
|
||||
- [SwaggerPetstore.FormatTest](docs/FormatTest.md)
|
||||
- [SwaggerPetstore.InlineResponse200](docs/InlineResponse200.md)
|
||||
- [SwaggerPetstore.Model200Response](docs/Model200Response.md)
|
||||
- [SwaggerPetstore.ModelReturn](docs/ModelReturn.md)
|
||||
|
@ -0,0 +1,18 @@
|
||||
# SwaggerPetstore.FormatTest
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**integer** | **Integer** | | [optional]
|
||||
**int32** | **Integer** | | [optional]
|
||||
**int64** | **Integer** | | [optional]
|
||||
**_number** | **Number** | |
|
||||
**_float** | **Number** | | [optional]
|
||||
**_double** | **Number** | | [optional]
|
||||
**_string** | **String** | | [optional]
|
||||
**_byte** | **String** | | [optional]
|
||||
**binary** | **String** | | [optional]
|
||||
**_date** | **Date** | | [optional]
|
||||
**dateTime** | **String** | | [optional]
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **Integer** | | [optional]
|
||||
**name** | **Integer** | |
|
||||
**snakeCase** | **Integer** | | [optional]
|
||||
|
||||
|
||||
|
@ -5,13 +5,13 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||
[**addPetUsingByteArray**](PetApi.md#addPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
[**addPetUsingByteArray**](PetApi.md#addPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**getPetByIdInObject**](PetApi.md#getPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
[**petPetIdtestingByteArraytrueGet**](PetApi.md#petPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
[**getPetByIdInObject**](PetApi.md#getPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
[**petPetIdtestingByteArraytrueGet**](PetApi.md#petPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
|
@ -7,7 +7,7 @@ Method | HTTP request | Description
|
||||
[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
[**findOrdersByStatus**](StoreApi.md#findOrdersByStatus) | **GET** /store/findByStatus | Finds orders by status
|
||||
[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**getInventoryInObject**](StoreApi.md#getInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
[**getInventoryInObject**](StoreApi.md#getInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||
|
||||
@ -206,7 +206,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
Find purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
|
@ -209,7 +209,7 @@ var SwaggerPetstore = require('swagger-petstore');
|
||||
|
||||
var apiInstance = new SwaggerPetstore.UserApi()
|
||||
|
||||
var username = "username_example"; // {String} The name that needs to be fetched. Use user1 for testing.
|
||||
var username = "username_example"; // {String} The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
apiInstance.getUserByName(username).then(function(data) {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
@ -223,7 +223,7 @@ apiInstance.getUserByName(username).then(function(data) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -48,7 +48,6 @@
|
||||
'test_api_key_query': {type: 'apiKey', 'in': 'query', name: 'test_api_key_query'},
|
||||
'petstore_auth': {type: 'oauth2'}
|
||||
};
|
||||
|
||||
/**
|
||||
* The default HTTP headers to be included for all API calls.
|
||||
* @type {Array.<String>}
|
||||
|
@ -169,7 +169,7 @@
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param {String} orderId ID of pet that needs to be fetched
|
||||
* data is of type: {module:model/Order}
|
||||
*/
|
||||
|
@ -172,7 +172,7 @@
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param {String} username The name that needs to be fetched. Use user1 for testing.
|
||||
* @param {String} username The name that needs to be fetched. Use user1 for testing.
|
||||
* data is of type: {module:model/User}
|
||||
*/
|
||||
this.getUserByName = function(username) {
|
||||
|
@ -1,16 +1,16 @@
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['./ApiClient', './model/Animal', './model/Cat', './model/Category', './model/Dog', './model/InlineResponse200', './model/Model200Response', './model/ModelReturn', './model/Name', './model/Order', './model/Pet', './model/SpecialModelName', './model/Tag', './model/User', './api/PetApi', './api/StoreApi', './api/UserApi'], factory);
|
||||
define(['./ApiClient', './model/Animal', './model/Cat', './model/Category', './model/Dog', './model/FormatTest', './model/InlineResponse200', './model/Model200Response', './model/ModelReturn', './model/Name', './model/Order', './model/Pet', './model/SpecialModelName', './model/Tag', './model/User', './api/PetApi', './api/StoreApi', './api/UserApi'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('./ApiClient'), require('./model/Animal'), require('./model/Cat'), require('./model/Category'), require('./model/Dog'), require('./model/InlineResponse200'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/Order'), require('./model/Pet'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
|
||||
module.exports = factory(require('./ApiClient'), require('./model/Animal'), require('./model/Cat'), require('./model/Category'), require('./model/Dog'), require('./model/FormatTest'), require('./model/InlineResponse200'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/Order'), require('./model/Pet'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
|
||||
}
|
||||
}(function(ApiClient, Animal, Cat, Category, Dog, InlineResponse200, Model200Response, ModelReturn, Name, Order, Pet, SpecialModelName, Tag, User, PetApi, StoreApi, UserApi) {
|
||||
}(function(ApiClient, Animal, Cat, Category, Dog, FormatTest, InlineResponse200, Model200Response, ModelReturn, Name, Order, Pet, SpecialModelName, Tag, User, PetApi, StoreApi, UserApi) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters.<br>
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters.<br>
|
||||
* The <code>index</code> module provides access to constructors for all the classes which comprise the public API.
|
||||
* <p>
|
||||
* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following:
|
||||
@ -66,6 +66,11 @@
|
||||
* @property {module:model/Dog}
|
||||
*/
|
||||
Dog: Dog,
|
||||
/**
|
||||
* The FormatTest model constructor.
|
||||
* @property {module:model/FormatTest}
|
||||
*/
|
||||
FormatTest: FormatTest,
|
||||
/**
|
||||
* The InlineResponse200 model constructor.
|
||||
* @property {module:model/InlineResponse200}
|
||||
|
@ -0,0 +1,153 @@
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['../ApiClient'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('../ApiClient'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
if (!root.SwaggerPetstore) {
|
||||
root.SwaggerPetstore = {};
|
||||
}
|
||||
root.SwaggerPetstore.FormatTest = factory(root.SwaggerPetstore.ApiClient);
|
||||
}
|
||||
}(this, function(ApiClient) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The FormatTest model module.
|
||||
* @module model/FormatTest
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new <code>FormatTest</code>.
|
||||
* @alias module:model/FormatTest
|
||||
* @class
|
||||
* @param _number
|
||||
*/
|
||||
var exports = function(_number) {
|
||||
|
||||
|
||||
|
||||
|
||||
this['number'] = _number;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructs a <code>FormatTest</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/FormatTest} obj Optional instance to populate.
|
||||
* @return {module:model/FormatTest} The populated <code>FormatTest</code> instance.
|
||||
*/
|
||||
exports.constructFromObject = function(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new exports();
|
||||
|
||||
if (data.hasOwnProperty('integer')) {
|
||||
obj['integer'] = ApiClient.convertToType(data['integer'], 'Integer');
|
||||
}
|
||||
if (data.hasOwnProperty('int32')) {
|
||||
obj['int32'] = ApiClient.convertToType(data['int32'], 'Integer');
|
||||
}
|
||||
if (data.hasOwnProperty('int64')) {
|
||||
obj['int64'] = ApiClient.convertToType(data['int64'], 'Integer');
|
||||
}
|
||||
if (data.hasOwnProperty('number')) {
|
||||
obj['number'] = ApiClient.convertToType(data['number'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('float')) {
|
||||
obj['float'] = ApiClient.convertToType(data['float'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('double')) {
|
||||
obj['double'] = ApiClient.convertToType(data['double'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('string')) {
|
||||
obj['string'] = ApiClient.convertToType(data['string'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('byte')) {
|
||||
obj['byte'] = ApiClient.convertToType(data['byte'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('binary')) {
|
||||
obj['binary'] = ApiClient.convertToType(data['binary'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('date')) {
|
||||
obj['date'] = ApiClient.convertToType(data['date'], 'Date');
|
||||
}
|
||||
if (data.hasOwnProperty('dateTime')) {
|
||||
obj['dateTime'] = ApiClient.convertToType(data['dateTime'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @member {Integer} integer
|
||||
*/
|
||||
exports.prototype['integer'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Integer} int32
|
||||
*/
|
||||
exports.prototype['int32'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Integer} int64
|
||||
*/
|
||||
exports.prototype['int64'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Number} number
|
||||
*/
|
||||
exports.prototype['number'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Number} float
|
||||
*/
|
||||
exports.prototype['float'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Number} double
|
||||
*/
|
||||
exports.prototype['double'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} string
|
||||
*/
|
||||
exports.prototype['string'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} byte
|
||||
*/
|
||||
exports.prototype['byte'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} binary
|
||||
*/
|
||||
exports.prototype['binary'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Date} date
|
||||
*/
|
||||
exports.prototype['date'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} dateTime
|
||||
*/
|
||||
exports.prototype['dateTime'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
return exports;
|
||||
}));
|
@ -23,6 +23,7 @@
|
||||
|
||||
/**
|
||||
* Constructs a new <code>Model200Response</code>.
|
||||
* Model for testing model name starting with number
|
||||
* @alias module:model/Model200Response
|
||||
* @class
|
||||
*/
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
/**
|
||||
* Constructs a new <code>ModelReturn</code>.
|
||||
* Model for testing reserved words
|
||||
* @alias module:model/ModelReturn
|
||||
* @class
|
||||
*/
|
||||
|
@ -23,12 +23,14 @@
|
||||
|
||||
/**
|
||||
* Constructs a new <code>Name</code>.
|
||||
* Model for testing model name same as property name
|
||||
* @alias module:model/Name
|
||||
* @class
|
||||
* @param name
|
||||
*/
|
||||
var exports = function() {
|
||||
|
||||
var exports = function(name) {
|
||||
|
||||
this['name'] = name;
|
||||
|
||||
};
|
||||
|
||||
|
@ -6,7 +6,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-03-30T20:58:07.996+08:00
|
||||
- Build date: 2016-04-11T22:17:15.122+08:00
|
||||
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen
|
||||
|
||||
## Installation
|
||||
@ -83,20 +83,20 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*SwaggerPetstore.PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||
*SwaggerPetstore.PetApi* | [**addPetUsingByteArray**](docs/PetApi.md#addPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
*SwaggerPetstore.PetApi* | [**addPetUsingByteArray**](docs/PetApi.md#addPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
*SwaggerPetstore.PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
*SwaggerPetstore.PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
*SwaggerPetstore.PetApi* | [**findPetsByTags**](docs/PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
*SwaggerPetstore.PetApi* | [**getPetById**](docs/PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
*SwaggerPetstore.PetApi* | [**getPetByIdInObject**](docs/PetApi.md#getPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
*SwaggerPetstore.PetApi* | [**petPetIdtestingByteArraytrueGet**](docs/PetApi.md#petPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
*SwaggerPetstore.PetApi* | [**getPetByIdInObject**](docs/PetApi.md#getPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
*SwaggerPetstore.PetApi* | [**petPetIdtestingByteArraytrueGet**](docs/PetApi.md#petPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
*SwaggerPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
*SwaggerPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*SwaggerPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*SwaggerPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
*SwaggerPetstore.StoreApi* | [**findOrdersByStatus**](docs/StoreApi.md#findOrdersByStatus) | **GET** /store/findByStatus | Finds orders by status
|
||||
*SwaggerPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*SwaggerPetstore.StoreApi* | [**getInventoryInObject**](docs/StoreApi.md#getInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
*SwaggerPetstore.StoreApi* | [**getInventoryInObject**](docs/StoreApi.md#getInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
*SwaggerPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
*SwaggerPetstore.StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||
*SwaggerPetstore.UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user
|
||||
@ -115,6 +115,7 @@ Class | Method | HTTP request | Description
|
||||
- [SwaggerPetstore.Cat](docs/Cat.md)
|
||||
- [SwaggerPetstore.Category](docs/Category.md)
|
||||
- [SwaggerPetstore.Dog](docs/Dog.md)
|
||||
- [SwaggerPetstore.FormatTest](docs/FormatTest.md)
|
||||
- [SwaggerPetstore.InlineResponse200](docs/InlineResponse200.md)
|
||||
- [SwaggerPetstore.Model200Response](docs/Model200Response.md)
|
||||
- [SwaggerPetstore.ModelReturn](docs/ModelReturn.md)
|
||||
|
18
samples/client/petstore/javascript/docs/FormatTest.md
Normal file
18
samples/client/petstore/javascript/docs/FormatTest.md
Normal file
@ -0,0 +1,18 @@
|
||||
# SwaggerPetstore.FormatTest
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**integer** | **Integer** | | [optional]
|
||||
**int32** | **Integer** | | [optional]
|
||||
**int64** | **Integer** | | [optional]
|
||||
**_number** | **Number** | |
|
||||
**_float** | **Number** | | [optional]
|
||||
**_double** | **Number** | | [optional]
|
||||
**_string** | **String** | | [optional]
|
||||
**_byte** | **String** | | [optional]
|
||||
**binary** | **String** | | [optional]
|
||||
**_date** | **Date** | | [optional]
|
||||
**dateTime** | **String** | | [optional]
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **Integer** | | [optional]
|
||||
**name** | **Integer** | |
|
||||
**snakeCase** | **Integer** | | [optional]
|
||||
|
||||
|
||||
|
@ -5,13 +5,13 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||
[**addPetUsingByteArray**](PetApi.md#addPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
[**addPetUsingByteArray**](PetApi.md#addPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**getPetByIdInObject**](PetApi.md#getPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
[**petPetIdtestingByteArraytrueGet**](PetApi.md#petPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
[**getPetByIdInObject**](PetApi.md#getPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
[**petPetIdtestingByteArraytrueGet**](PetApi.md#petPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
|
@ -7,7 +7,7 @@ Method | HTTP request | Description
|
||||
[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
[**findOrdersByStatus**](StoreApi.md#findOrdersByStatus) | **GET** /store/findByStatus | Finds orders by status
|
||||
[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**getInventoryInObject**](StoreApi.md#getInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
[**getInventoryInObject**](StoreApi.md#getInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||
|
||||
@ -218,7 +218,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
Find purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
|
@ -221,7 +221,7 @@ var SwaggerPetstore = require('swagger-petstore');
|
||||
|
||||
var apiInstance = new SwaggerPetstore.UserApi()
|
||||
|
||||
var username = "username_example"; // {String} The name that needs to be fetched. Use user1 for testing.
|
||||
var username = "username_example"; // {String} The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
|
||||
var callback = function(error, data, response) {
|
||||
@ -238,7 +238,7 @@ api.getUserByName(username, callback);
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -48,7 +48,6 @@
|
||||
'test_api_key_query': {type: 'apiKey', 'in': 'query', name: 'test_api_key_query'},
|
||||
'petstore_auth': {type: 'oauth2'}
|
||||
};
|
||||
|
||||
/**
|
||||
* The default HTTP headers to be included for all API calls.
|
||||
* @type {Array.<String>}
|
||||
|
@ -208,7 +208,7 @@
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param {String} orderId ID of pet that needs to be fetched
|
||||
* @param {module:api/StoreApi~getOrderByIdCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {module:model/Order}
|
||||
|
@ -211,7 +211,7 @@
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param {String} username The name that needs to be fetched. Use user1 for testing.
|
||||
* @param {String} username The name that needs to be fetched. Use user1 for testing.
|
||||
* @param {module:api/UserApi~getUserByNameCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {module:model/User}
|
||||
*/
|
||||
|
@ -1,16 +1,16 @@
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['./ApiClient', './model/Animal', './model/Cat', './model/Category', './model/Dog', './model/InlineResponse200', './model/Model200Response', './model/ModelReturn', './model/Name', './model/Order', './model/Pet', './model/SpecialModelName', './model/Tag', './model/User', './api/PetApi', './api/StoreApi', './api/UserApi'], factory);
|
||||
define(['./ApiClient', './model/Animal', './model/Cat', './model/Category', './model/Dog', './model/FormatTest', './model/InlineResponse200', './model/Model200Response', './model/ModelReturn', './model/Name', './model/Order', './model/Pet', './model/SpecialModelName', './model/Tag', './model/User', './api/PetApi', './api/StoreApi', './api/UserApi'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('./ApiClient'), require('./model/Animal'), require('./model/Cat'), require('./model/Category'), require('./model/Dog'), require('./model/InlineResponse200'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/Order'), require('./model/Pet'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
|
||||
module.exports = factory(require('./ApiClient'), require('./model/Animal'), require('./model/Cat'), require('./model/Category'), require('./model/Dog'), require('./model/FormatTest'), require('./model/InlineResponse200'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/Order'), require('./model/Pet'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
|
||||
}
|
||||
}(function(ApiClient, Animal, Cat, Category, Dog, InlineResponse200, Model200Response, ModelReturn, Name, Order, Pet, SpecialModelName, Tag, User, PetApi, StoreApi, UserApi) {
|
||||
}(function(ApiClient, Animal, Cat, Category, Dog, FormatTest, InlineResponse200, Model200Response, ModelReturn, Name, Order, Pet, SpecialModelName, Tag, User, PetApi, StoreApi, UserApi) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters.<br>
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters.<br>
|
||||
* The <code>index</code> module provides access to constructors for all the classes which comprise the public API.
|
||||
* <p>
|
||||
* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following:
|
||||
@ -66,6 +66,11 @@
|
||||
* @property {module:model/Dog}
|
||||
*/
|
||||
Dog: Dog,
|
||||
/**
|
||||
* The FormatTest model constructor.
|
||||
* @property {module:model/FormatTest}
|
||||
*/
|
||||
FormatTest: FormatTest,
|
||||
/**
|
||||
* The InlineResponse200 model constructor.
|
||||
* @property {module:model/InlineResponse200}
|
||||
|
153
samples/client/petstore/javascript/src/model/FormatTest.js
Normal file
153
samples/client/petstore/javascript/src/model/FormatTest.js
Normal file
@ -0,0 +1,153 @@
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['../ApiClient'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('../ApiClient'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
if (!root.SwaggerPetstore) {
|
||||
root.SwaggerPetstore = {};
|
||||
}
|
||||
root.SwaggerPetstore.FormatTest = factory(root.SwaggerPetstore.ApiClient);
|
||||
}
|
||||
}(this, function(ApiClient) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The FormatTest model module.
|
||||
* @module model/FormatTest
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new <code>FormatTest</code>.
|
||||
* @alias module:model/FormatTest
|
||||
* @class
|
||||
* @param _number
|
||||
*/
|
||||
var exports = function(_number) {
|
||||
|
||||
|
||||
|
||||
|
||||
this['number'] = _number;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructs a <code>FormatTest</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/FormatTest} obj Optional instance to populate.
|
||||
* @return {module:model/FormatTest} The populated <code>FormatTest</code> instance.
|
||||
*/
|
||||
exports.constructFromObject = function(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new exports();
|
||||
|
||||
if (data.hasOwnProperty('integer')) {
|
||||
obj['integer'] = ApiClient.convertToType(data['integer'], 'Integer');
|
||||
}
|
||||
if (data.hasOwnProperty('int32')) {
|
||||
obj['int32'] = ApiClient.convertToType(data['int32'], 'Integer');
|
||||
}
|
||||
if (data.hasOwnProperty('int64')) {
|
||||
obj['int64'] = ApiClient.convertToType(data['int64'], 'Integer');
|
||||
}
|
||||
if (data.hasOwnProperty('number')) {
|
||||
obj['number'] = ApiClient.convertToType(data['number'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('float')) {
|
||||
obj['float'] = ApiClient.convertToType(data['float'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('double')) {
|
||||
obj['double'] = ApiClient.convertToType(data['double'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('string')) {
|
||||
obj['string'] = ApiClient.convertToType(data['string'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('byte')) {
|
||||
obj['byte'] = ApiClient.convertToType(data['byte'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('binary')) {
|
||||
obj['binary'] = ApiClient.convertToType(data['binary'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('date')) {
|
||||
obj['date'] = ApiClient.convertToType(data['date'], 'Date');
|
||||
}
|
||||
if (data.hasOwnProperty('dateTime')) {
|
||||
obj['dateTime'] = ApiClient.convertToType(data['dateTime'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @member {Integer} integer
|
||||
*/
|
||||
exports.prototype['integer'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Integer} int32
|
||||
*/
|
||||
exports.prototype['int32'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Integer} int64
|
||||
*/
|
||||
exports.prototype['int64'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Number} number
|
||||
*/
|
||||
exports.prototype['number'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Number} float
|
||||
*/
|
||||
exports.prototype['float'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Number} double
|
||||
*/
|
||||
exports.prototype['double'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} string
|
||||
*/
|
||||
exports.prototype['string'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} byte
|
||||
*/
|
||||
exports.prototype['byte'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} binary
|
||||
*/
|
||||
exports.prototype['binary'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Date} date
|
||||
*/
|
||||
exports.prototype['date'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} dateTime
|
||||
*/
|
||||
exports.prototype['dateTime'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
return exports;
|
||||
}));
|
@ -23,6 +23,7 @@
|
||||
|
||||
/**
|
||||
* Constructs a new <code>Model200Response</code>.
|
||||
* Model for testing model name starting with number
|
||||
* @alias module:model/Model200Response
|
||||
* @class
|
||||
*/
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
/**
|
||||
* Constructs a new <code>ModelReturn</code>.
|
||||
* Model for testing reserved words
|
||||
* @alias module:model/ModelReturn
|
||||
* @class
|
||||
*/
|
||||
|
@ -23,12 +23,14 @@
|
||||
|
||||
/**
|
||||
* Constructs a new <code>Name</code>.
|
||||
* Model for testing model name same as property name
|
||||
* @alias module:model/Name
|
||||
* @class
|
||||
* @param name
|
||||
*/
|
||||
var exports = function() {
|
||||
|
||||
var exports = function(name) {
|
||||
|
||||
this['name'] = name;
|
||||
|
||||
};
|
||||
|
||||
|
@ -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-11T20:30:20.696+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=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 'Find pet by ID'
|
||||
*PetApi* | [**pet_pet_idtesting_byte_arraytrue_get**](docs/PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
*PetApi* | [**get_pet_by_id_in_object**](docs/PetApi.md#get_pet_by_id_in_object) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
*PetApi* | [**pet_pet_idtesting_byte_arraytrue_get**](docs/PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
*PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
|
||||
*PetApi* | [**update_pet_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 'Get inventory'
|
||||
*StoreApi* | [**get_inventory_in_object**](docs/StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
*StoreApi* | [**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)
|
||||
|
25
samples/client/petstore/perl/docs/FormatTest.md
Normal file
25
samples/client/petstore/perl/docs/FormatTest.md
Normal file
@ -0,0 +1,25 @@
|
||||
# WWW::SwaggerClient::Object::FormatTest
|
||||
|
||||
## Load the model package
|
||||
```perl
|
||||
use WWW::SwaggerClient::Object::FormatTest;
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**integer** | **int** | | [optional]
|
||||
**int32** | **int** | | [optional]
|
||||
**int64** | **int** | | [optional]
|
||||
**number** | [**Number**](Number.md) | |
|
||||
**float** | **double** | | [optional]
|
||||
**double** | **double** | | [optional]
|
||||
**string** | **string** | | [optional]
|
||||
**byte** | **string** | | [optional]
|
||||
**binary** | **string** | | [optional]
|
||||
**date** | **DateTime** | | [optional]
|
||||
**date_time** | **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)
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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=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 'Find pet by ID'
|
||||
[**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 '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 'Find pet by ID'
|
||||
[**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 'Find pet by ID'
|
||||
[**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
|
||||
|
@ -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 'Get inventory'
|
||||
[**get_inventory_in_object**](StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
[**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
|
||||
|
||||
|
@ -207,7 +207,7 @@ Get user by user name
|
||||
use Data::Dumper;
|
||||
|
||||
my $api_instance = WWW::SwaggerClient::UserApi->new();
|
||||
my $username = 'username_example'; # string | The name that needs to be fetched. Use user1 for testing.
|
||||
my $username = 'username_example'; # string | The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
eval {
|
||||
my $result = $api_instance->get_user_by_name(username => $username);
|
||||
@ -222,7 +222,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **string**| The name that needs to be fetched. Use user1 for testing. |
|
||||
**username** | **string**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -110,7 +110,6 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
@ -117,7 +117,6 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
@ -117,7 +117,6 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
@ -117,7 +117,6 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
@ -0,0 +1,216 @@
|
||||
package WWW::SwaggerClient::Object::FormatTest;
|
||||
|
||||
require 5.6.0;
|
||||
use strict;
|
||||
use warnings;
|
||||
use utf8;
|
||||
use JSON qw(decode_json);
|
||||
use Data::Dumper;
|
||||
use Module::Runtime qw(use_module);
|
||||
use Log::Any qw($log);
|
||||
use Date::Parse;
|
||||
use DateTime;
|
||||
|
||||
use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
#
|
||||
|
||||
__PACKAGE__->mk_classdata('attribute_map' => {});
|
||||
__PACKAGE__->mk_classdata('swagger_types' => {});
|
||||
__PACKAGE__->mk_classdata('method_documentation' => {});
|
||||
__PACKAGE__->mk_classdata('class_documentation' => {});
|
||||
|
||||
# new object
|
||||
sub new {
|
||||
my ($class, %args) = @_;
|
||||
|
||||
my $self = bless {}, $class;
|
||||
|
||||
foreach my $attribute (keys %{$class->attribute_map}) {
|
||||
my $args_key = $class->attribute_map->{$attribute};
|
||||
$self->$attribute( $args{ $args_key } );
|
||||
}
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
# return perl hash
|
||||
sub to_hash {
|
||||
return decode_json(JSON->new->convert_blessed->encode( shift ));
|
||||
}
|
||||
|
||||
# used by JSON for serialization
|
||||
sub TO_JSON {
|
||||
my $self = shift;
|
||||
my $_data = {};
|
||||
foreach my $_key (keys %{$self->attribute_map}) {
|
||||
if (defined $self->{$_key}) {
|
||||
$_data->{$self->attribute_map->{$_key}} = $self->{$_key};
|
||||
}
|
||||
}
|
||||
return $_data;
|
||||
}
|
||||
|
||||
# from Perl hashref
|
||||
sub from_hash {
|
||||
my ($self, $hash) = @_;
|
||||
|
||||
# loop through attributes and use swagger_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->swagger_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
$log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute);
|
||||
}
|
||||
}
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
# deserialize non-array data
|
||||
sub _deserialize {
|
||||
my ($self, $type, $data) = @_;
|
||||
$log->debugf("deserializing %s with %s",Dumper($data), $type);
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
|
||||
return $_instance->from_hash($data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
__PACKAGE__->class_documentation({description => '',
|
||||
class => 'FormatTest',
|
||||
required => [], # TODO
|
||||
} );
|
||||
|
||||
__PACKAGE__->method_documentation({
|
||||
'integer' => {
|
||||
datatype => 'int',
|
||||
base_name => 'integer',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'int32' => {
|
||||
datatype => 'int',
|
||||
base_name => 'int32',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'int64' => {
|
||||
datatype => 'int',
|
||||
base_name => 'int64',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'number' => {
|
||||
datatype => 'Number',
|
||||
base_name => 'number',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'float' => {
|
||||
datatype => 'double',
|
||||
base_name => 'float',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'double' => {
|
||||
datatype => 'double',
|
||||
base_name => 'double',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'string' => {
|
||||
datatype => 'string',
|
||||
base_name => 'string',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'byte' => {
|
||||
datatype => 'string',
|
||||
base_name => 'byte',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'binary' => {
|
||||
datatype => 'string',
|
||||
base_name => 'binary',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'date' => {
|
||||
datatype => 'DateTime',
|
||||
base_name => 'date',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'date_time' => {
|
||||
datatype => 'string',
|
||||
base_name => 'dateTime',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
'integer' => 'int',
|
||||
'int32' => 'int',
|
||||
'int64' => 'int',
|
||||
'number' => 'Number',
|
||||
'float' => 'double',
|
||||
'double' => 'double',
|
||||
'string' => 'string',
|
||||
'byte' => 'string',
|
||||
'binary' => 'string',
|
||||
'date' => 'DateTime',
|
||||
'date_time' => 'string'
|
||||
} );
|
||||
|
||||
__PACKAGE__->attribute_map( {
|
||||
'integer' => 'integer',
|
||||
'int32' => 'int32',
|
||||
'int64' => 'int64',
|
||||
'number' => 'number',
|
||||
'float' => 'float',
|
||||
'double' => 'double',
|
||||
'string' => 'string',
|
||||
'byte' => 'byte',
|
||||
'binary' => 'binary',
|
||||
'date' => 'date',
|
||||
'date_time' => 'dateTime'
|
||||
} );
|
||||
|
||||
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
|
||||
|
||||
|
||||
1;
|
@ -145,7 +145,6 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
@ -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( {
|
||||
|
@ -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( {
|
||||
|
@ -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
|
||||
} );
|
||||
@ -117,7 +117,6 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
@ -145,7 +145,6 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
@ -145,7 +145,6 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
@ -110,7 +110,6 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
@ -117,7 +117,6 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
@ -159,7 +159,6 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
__PACKAGE__->swagger_types( {
|
||||
|
@ -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=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=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=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->{'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'});
|
||||
|
||||
$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,16 +838,12 @@ sub upload_file {
|
||||
}
|
||||
# form params
|
||||
if ( exists $args{'additional_metadata'} ) {
|
||||
|
||||
$form_params->{'additionalMetadata'} = $self->{api_client}->to_form_value($args{'additional_metadata'});
|
||||
|
||||
$form_params->{'additionalMetadata'} = $self->{api_client}->to_form_value($args{'additional_metadata'});
|
||||
}# form params
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -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-11T20:30:20.696+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-11T20:30:20.696+08:00
|
||||
|
||||
=item Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
||||
|
||||
|
@ -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=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;
|
||||
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
#
|
||||
@ -323,12 +319,12 @@ sub delete_user {
|
||||
#
|
||||
# Get user by user name
|
||||
#
|
||||
# @param string $username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
# @param string $username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
{
|
||||
my $params = {
|
||||
'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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
17
samples/client/petstore/perl/t/FormatTestTest.t
Normal file
17
samples/client/petstore/perl/t/FormatTestTest.t
Normal file
@ -0,0 +1,17 @@
|
||||
# NOTE: This class is auto generated by the Swagger Codegen
|
||||
# Please update the test case below to test the model.
|
||||
|
||||
use Test::More tests => 2;
|
||||
use Test::Exception;
|
||||
|
||||
use lib 'lib';
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
|
||||
use_ok('WWW::SwaggerClient::Object::FormatTest');
|
||||
|
||||
my $instance = WWW::SwaggerClient::Object::FormatTest->new();
|
||||
|
||||
isa_ok($instance, 'WWW::SwaggerClient::Object::FormatTest');
|
||||
|
@ -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
|
||||
|
@ -0,0 +1,20 @@
|
||||
# FormatTest
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**integer** | **int** | | [optional]
|
||||
**int32** | **int** | | [optional]
|
||||
**int64** | **int** | | [optional]
|
||||
**number** | **float** | |
|
||||
**float** | **float** | | [optional]
|
||||
**double** | **double** | | [optional]
|
||||
**string** | **string** | | [optional]
|
||||
**byte** | **string** | | [optional]
|
||||
**binary** | **string** | | [optional]
|
||||
**date** | [**\DateTime**](Date.md) | | [optional]
|
||||
**date_time** | **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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user