diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java index 9cd719dbe87c..e95293ede9c0 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java @@ -1125,6 +1125,24 @@ public class DefaultCodegen { } } + if (p instanceof BaseIntegerProperty) { + BaseIntegerProperty sp = (BaseIntegerProperty) p; + property.isInteger = true; + /*if (sp.getEnum() != null) { + List _enum = sp.getEnum(); + property._enum = new ArrayList(); + for(Integer i : _enum) { + property._enum.add(i.toString()); + } + property.isEnum = true; + + // legacy support + Map allowableValues = new HashMap(); + 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 _enum = sp.getEnum(); + property._enum = new ArrayList(); + for(Double i : _enum) { + property._enum.add(i.toString()); + } + property.isEnum = true; + + // legacy support + Map allowableValues = new HashMap(); + allowableValues.put("values", _enum); + property.allowableValues = allowableValues; + }*/ + } + if (p instanceof DoubleProperty) { DoubleProperty sp = (DoubleProperty) p; property.isDouble = true; diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractTypeScriptClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractTypeScriptClientCodegen.java index 5389c509d76d..0676372e64a7 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractTypeScriptClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractTypeScriptClientCodegen.java @@ -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")); diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java index 0db384adf8b0..3e4daa01fcb9 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java @@ -34,6 +34,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { private static final Logger LOGGER = LoggerFactory.getLogger(CSharpClientCodegen.class); private static final String NET45 = "v4.5"; private static final String NET35 = "v3.5"; + private static final String UWP = "uwp"; private static final String DATA_TYPE_WITH_ENUM_EXTENSION = "plainDatatypeWithEnum"; protected String packageGuid = "{" + java.util.UUID.randomUUID().toString().toUpperCase() + "}"; @@ -48,6 +49,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { protected String targetFramework = NET45; protected String targetFrameworkNuget = "net45"; protected boolean supportsAsync = Boolean.TRUE; + protected boolean supportsUWP = Boolean.FALSE; protected final Map frameworks; @@ -89,6 +91,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { frameworks = new ImmutableMap.Builder() .put(NET35, ".NET Framework 3.5 compatible") .put(NET45, ".NET Framework 4.5+ compatible") + .put(UWP, "Universal Windows Platform - beta support") .build(); framework.defaultValue(this.targetFramework); framework.setEnum(frameworks); @@ -156,6 +159,13 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { if(additionalProperties.containsKey("supportsAsync")){ additionalProperties.remove("supportsAsync"); } + } else if (UWP.equals(this.targetFramework)){ + setTargetFrameworkNuget("uwp"); + setSupportsAsync(Boolean.TRUE); + setSupportsUWP(Boolean.TRUE); + additionalProperties.put("supportsAsync", this.supportsUWP); + additionalProperties.put("supportsUWP", this.supportsAsync); + } else { setTargetFrameworkNuget("net45"); setSupportsAsync(Boolean.TRUE); @@ -453,4 +463,8 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { public void setSupportsAsync(Boolean supportsAsync){ this.supportsAsync = supportsAsync; } + + public void setSupportsUWP(Boolean supportsUWP){ + this.supportsUWP = supportsUWP; + } } diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/GoClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/GoClientCodegen.java index 234bda9adb78..a497aafec98a 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/GoClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/GoClientCodegen.java @@ -79,11 +79,12 @@ public class GoClientCodegen extends DefaultCodegen implements CodegenConfig { typeMapping.clear(); typeMapping.put("integer", "int32"); typeMapping.put("long", "int64"); + typeMapping.put("number", "float32"); typeMapping.put("float", "float32"); typeMapping.put("double", "float64"); typeMapping.put("boolean", "bool"); typeMapping.put("string", "string"); - typeMapping.put("Date", "time.Time"); + typeMapping.put("date", "time.Time"); typeMapping.put("DateTime", "time.Time"); typeMapping.put("password", "string"); typeMapping.put("File", "*os.File"); @@ -91,6 +92,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(); importMapping.put("time.Time", "time"); diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavascriptClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavascriptClientCodegen.java index d9c93e4f69ea..d2d3808f8ebf 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavascriptClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavascriptClientCodegen.java @@ -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"); diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PerlClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PerlClientCodegen.java index f264a86b6a5d..e4744bf037c0 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PerlClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PerlClientCodegen.java @@ -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")); diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java index 33d5875de6e2..0aed793fc090 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java @@ -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)); diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java index 6091b36b90ad..d560a9462143 100755 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java @@ -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( diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/RubyClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/RubyClientCodegen.java index 2eedc14ed27b..828cd0eb7190 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/RubyClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/RubyClientCodegen.java @@ -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 itr = cliOptions.iterator(); diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ScalaClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ScalaClientCodegen.java index 993ef095441e..a13c7a54e701 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ScalaClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ScalaClientCodegen.java @@ -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( Arrays.asList( diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SwiftCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SwiftCodegen.java index 0725d36eec89..aa6d73f3abfe 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SwiftCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SwiftCodegen.java @@ -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(); diff --git a/modules/swagger-codegen/src/main/resources/TypeScript-node/api.mustache b/modules/swagger-codegen/src/main/resources/TypeScript-node/api.mustache index 9e78174b9564..6e7ef1c19f36 100644 --- a/modules/swagger-codegen/src/main/resources/TypeScript-node/api.mustache +++ b/modules/swagger-codegen/src/main/resources/TypeScript-node/api.mustache @@ -96,13 +96,19 @@ class VoidAuth implements Authentication { * {{&description}} */ {{/description}} +export enum {{classname}}ApiKeys { +{{#authMethods}} +{{#isApiKey}} + {{name}}, +{{/isApiKey}} +{{/authMethods}} +} + export class {{classname}} { protected basePath = '{{basePath}}'; protected defaultHeaders : any = {}; - - - public authentications = { + protected authentications = { 'default': new VoidAuth(), {{#authMethods}} {{#isBasic}} @@ -140,6 +146,10 @@ export class {{classname}} { } } } + + public setApiKey(key: {{classname}}ApiKeys, value: string) { + this.authentications[{{classname}}ApiKeys[key]].apiKey = value; + } {{#authMethods}} {{#isBasic}} @@ -151,12 +161,6 @@ export class {{classname}} { this.authentications.{{name}}.password = password; } {{/isBasic}} -{{#isApiKey}} - - set apiKey(key: string) { - this.authentications.{{name}}.apiKey = key; - } -{{/isApiKey}} {{#isOAuth}} set accessToken(token: string) { diff --git a/modules/swagger-codegen/src/main/resources/asyncscala/model.mustache b/modules/swagger-codegen/src/main/resources/asyncscala/model.mustache index bf63e76658aa..68d361c4c591 100644 --- a/modules/swagger-codegen/src/main/resources/asyncscala/model.mustache +++ b/modules/swagger-codegen/src/main/resources/asyncscala/model.mustache @@ -7,7 +7,7 @@ import java.util.UUID {{#model}} case class {{classname}} ( - {{#vars}}{{name}}: {{#isNotRequired}}Option[{{/isNotRequired}}{{datatype}}{{#isNotRequired}}]{{/isNotRequired}}{{#hasMore}},{{/hasMore}}{{#description}} // {{description}}{{/description}} + {{#vars}}{{name}}: {{^required}}Option[{{/required}}{{datatype}}{{^required}}]{{/required}}{{#hasMore}},{{/hasMore}}{{#description}} // {{description}}{{/description}} {{/vars}} ) {{/model}} diff --git a/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache b/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache index 75f43b8aa1cd..2c0f8f681e38 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache @@ -4,7 +4,9 @@ using System.Collections.Generic; using System.Globalization; using System.Text.RegularExpressions; using System.IO; +{{^supportsUWP}} using System.Web; +{{/supportsUWP}} using System.Linq; using System.Net; using System.Text; @@ -103,7 +105,16 @@ namespace {{packageName}}.Client // add file parameter, if any foreach(var param in fileParams) + { + {{^supportsUWP}} request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); + {{/supportsUWP}} + {{#supportsUWP}} + byte[] paramWriter = null; + param.Value.Writer = delegate (Stream stream) { paramWriter = ToByteArray(stream); }; + request.AddFile(param.Value.Name, paramWriter, param.Value.FileName, param.Value.ContentType); + {{/supportsUWP}} + } if (postBody != null) // http body (model or byte[]) parameter { @@ -148,7 +159,13 @@ namespace {{packageName}}.Client // set user agent RestClient.UserAgent = Configuration.UserAgent; + {{^supportsUWP}} var response = RestClient.Execute(request); + {{/supportsUWP}} + {{#supportsUWP}} + // Using async method to perform sync call (uwp-only) + var response = RestClient.ExecuteTaskAsync(request).Result; + {{/supportsUWP}} return (Object) response; } {{#supportsAsync}} @@ -444,5 +461,20 @@ namespace {{packageName}}.Client return filename; } } + {{#supportsUWP}} + /// + /// Convert stream to byte array + /// + /// IO stream + /// Byte array + public static byte[] ToByteArray(Stream stream) + { + stream.Position = 0; + byte[] buffer = new byte[stream.Length]; + for (int totalBytesCopied = 0; totalBytesCopied < stream.Length;) + totalBytesCopied += stream.Read(buffer, totalBytesCopied, Convert.ToInt32(stream.Length) - totalBytesCopied); + return buffer; + } + {{/supportsUWP}} } } diff --git a/modules/swagger-codegen/src/main/resources/csharp/Configuration.mustache b/modules/swagger-codegen/src/main/resources/csharp/Configuration.mustache index 6cec586b4530..bf7f4d003ad9 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/Configuration.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/Configuration.mustache @@ -270,11 +270,13 @@ namespace {{packageName}}.Client public static String ToDebugReport() { String report = "C# SDK ({{packageName}}) Debug Report:\n"; + {{^supportsUWP}} report += " OS: " + Environment.OSVersion + "\n"; report += " .NET Framework Version: " + Assembly .GetExecutingAssembly() .GetReferencedAssemblies() .Where(x => x.Name == "System.Core").First().Version.ToString() + "\n"; + {{/supportsUWP}} report += " Version of the API: {{version}}\n"; report += " SDK Package Version: {{packageVersion}}\n"; diff --git a/modules/swagger-codegen/src/main/resources/csharp/Project.mustache b/modules/swagger-codegen/src/main/resources/csharp/Project.mustache index d418dc74f8b5..d38e5d92d1e7 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/Project.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/Project.mustache @@ -8,7 +8,15 @@ Properties {{packageTitle}} {{packageTitle}} + {{^supportsUWP}} {{targetFramework}} + {{/supportsUWP}} + {{#supportsUWP}} + UAP + 10.0.10240.0 + 10.0.10240.0 + 14 + {{/supportsUWP}} 512 diff --git a/modules/swagger-codegen/src/main/resources/csharp/model.mustache b/modules/swagger-codegen/src/main/resources/csharp/model.mustache index a3c289cdbb32..3626da0f1c45 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/model.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/model.mustache @@ -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(); } diff --git a/modules/swagger-codegen/src/main/resources/go/model.mustache b/modules/swagger-codegen/src/main/resources/go/model.mustache index 83ba416883d1..9045bea1ed2a 100644 --- a/modules/swagger-codegen/src/main/resources/go/model.mustache +++ b/modules/swagger-codegen/src/main/resources/go/model.mustache @@ -8,7 +8,8 @@ import ( {{#model}} type {{classname}} struct { - {{#vars}}{{name}} {{{datatype}}} `json:"{{baseName}},omitempty"` + {{#vars}} + {{name}} {{{datatype}}} `json:"{{baseName}},omitempty"` {{/vars}} } {{/model}} diff --git a/modules/swagger-codegen/src/main/resources/htmlDocs/index.mustache b/modules/swagger-codegen/src/main/resources/htmlDocs/index.mustache index 83cd24e72d0b..fa0e662b67f2 100644 --- a/modules/swagger-codegen/src/main/resources/htmlDocs/index.mustache +++ b/modules/swagger-codegen/src/main/resources/htmlDocs/index.mustache @@ -158,7 +158,7 @@

{{classname}} Up

- {{#vars}}
{{name}} {{#isNotRequired}}(optional){{/isNotRequired}}
{{datatype}} {{description}}
+ {{#vars}}
{{name}} {{^required}}(optional){{/required}}
{{datatype}} {{description}}
{{#isEnum}}
Enum:
{{#_enum}}
{{this}}
{{/_enum}} diff --git a/modules/swagger-codegen/src/main/resources/perl/object.mustache b/modules/swagger-codegen/src/main/resources/perl/object.mustache index 79c59cebaf39..126c6409c7f4 100644 --- a/modules/swagger-codegen/src/main/resources/perl/object.mustache +++ b/modules/swagger-codegen/src/main/resources/perl/object.mustache @@ -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( { diff --git a/modules/swagger-codegen/src/main/resources/php/model.mustache b/modules/swagger-codegen/src/main/resources/php/model.mustache index f19787f50b0b..6f292e854afe 100644 --- a/modules/swagger-codegen/src/main/resources/php/model.mustache +++ b/modules/swagger-codegen/src/main/resources/php/model.mustache @@ -48,6 +48,12 @@ use \ArrayAccess; */ class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}implements ArrayAccess { + /** + * The original name of the model. + * @var string + */ + static $swaggerModelName = '{{name}}'; + /** * Array of property to type mappings. Used for (de)serialization * @var string[] @@ -115,6 +121,11 @@ class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}implements ArrayA public function __construct(array $data = null) { {{#parent}}parent::__construct($data);{{/parent}} + {{#discriminator}}// Initialize discriminator property with the model name. + $discrimintor = array_search('{{discriminator}}', self::$attributeMap); + $this->{$discrimintor} = static::$swaggerModelName; + {{/discriminator}} + if ($data != null) { {{#vars}}$this->{{name}} = $data["{{name}}"];{{#hasMore}} {{/hasMore}}{{/vars}} diff --git a/modules/swagger-codegen/src/main/resources/ruby/model.mustache b/modules/swagger-codegen/src/main/resources/ruby/model.mustache index 373a0634be2a..5b7b617481f4 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/model.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/model.mustache @@ -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 diff --git a/modules/swagger-codegen/src/main/resources/scalatra/model.mustache b/modules/swagger-codegen/src/main/resources/scalatra/model.mustache index 8c5d19546622..e9dac65dd792 100644 --- a/modules/swagger-codegen/src/main/resources/scalatra/model.mustache +++ b/modules/swagger-codegen/src/main/resources/scalatra/model.mustache @@ -7,9 +7,8 @@ package {{package}} {{#model}} case class {{classname}} ( - {{#vars}}{{name}}: {{#isNotRequired}}Option[{{/isNotRequired}}{{datatype}}{{#isNotRequired}}] {{#description}} // {{description}}{{/description}} - {{/isNotRequired}}{{#hasMore}}, - {{/hasMore}}{{/vars}} + {{#vars}}{{name}}: {{^required}}Option[{{/required}}{{datatype}}{{^required}}]{{/required}}{{#hasMore}},{{/hasMore}}{{#description}} // {{description}}{{/description}} + {{/vars}} ) {{/model}} -{{/models}} \ No newline at end of file +{{/models}} diff --git a/modules/swagger-codegen/src/main/resources/swift/model.mustache b/modules/swagger-codegen/src/main/resources/swift/model.mustache index 7e2f99a9de85..3c0a47c2987d 100644 --- a/modules/swagger-codegen/src/main/resources/swift/model.mustache +++ b/modules/swagger-codegen/src/main/resources/swift/model.mustache @@ -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() {} diff --git a/modules/swagger-codegen/src/test/resources/2_0/petstore.json b/modules/swagger-codegen/src/test/resources/2_0/petstore.json index 64b563773939..7f707ce315ed 100644 --- a/modules/swagger-codegen/src/test/resources/2_0/petstore.json +++ b/modules/swagger-codegen/src/test/resources/2_0/petstore.json @@ -1427,7 +1427,7 @@ "type": "string", "format": "date-time" }, - "dateTime" : { + "password" : { "type": "string", "format": "password" } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/petstore b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/petstore new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiClient.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiClient.cs index ec9c793b7d3c..42299503d2a9 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiClient.cs @@ -103,7 +103,9 @@ namespace IO.Swagger.Client // add file parameter, if any foreach(var param in fileParams) + { request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); + } if (postBody != null) // http body (model or byte[]) parameter { diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Cat.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Cat.cs index 7fe58ce7f388..3b05bcc03382 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Cat.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Cat.cs @@ -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(); } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Category.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Category.cs index ded3e5253182..f5dd0154fbc7 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Category.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Category.cs @@ -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(); } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Dog.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Dog.cs index 5e40e8482433..4d7539638160 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Dog.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Dog.cs @@ -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(); } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/FormatTest.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/FormatTest.cs index 4985f365053f..9232528bfcc8 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/FormatTest.cs @@ -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(); } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/InlineResponse200.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/InlineResponse200.cs index e58dd38354da..c2bdc8c48aba 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/InlineResponse200.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/InlineResponse200.cs @@ -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(); } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs index 663e9d88e4ce..f9138390e3e2 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs @@ -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(); } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Order.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Order.cs index 7942042e0e0a..b5ce3f55c4c2 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Order.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Order.cs @@ -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(); } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Pet.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Pet.cs index 534dd6fd42de..a878f83be04a 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Pet.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Pet.cs @@ -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(); } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Tag.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Tag.cs index 84b6091bf7aa..6824a99836cd 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Tag.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Tag.cs @@ -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(); } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/User.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/User.cs index 3563543b81c7..d8b8c491a18d 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/User.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/User.cs @@ -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(); } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.userprefs b/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.userprefs index d261de4844c4..f234ffdb0cf0 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.userprefs +++ b/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.userprefs @@ -1,11 +1,9 @@  - + - + - - diff --git a/samples/client/petstore/go/petStore_test.go b/samples/client/petstore/go/petApi_test.go similarity index 79% rename from samples/client/petstore/go/petStore_test.go rename to samples/client/petstore/go/petApi_test.go index e3df602c3b87..e56468849cd8 100644 --- a/samples/client/petstore/go/petStore_test.go +++ b/samples/client/petstore/go/petApi_test.go @@ -8,7 +8,6 @@ import ( ) func TestAddPet(t *testing.T) { - t.Log("Testing TestAddPet...") s := sw.NewPetApi() newPet := (sw.Pet{Id: 12830, Name: "gopher", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending"}) @@ -23,7 +22,6 @@ func TestAddPet(t *testing.T) { func TestGetPetById(t *testing.T) { assert := assert.New(t) - t.Log("Testing TestGetPetById...") s := sw.NewPetApi() resp, err := s.GetPetById(12830) @@ -31,7 +29,7 @@ func TestGetPetById(t *testing.T) { t.Errorf("Error while getting pet by id") t.Log(err) } else { - assert.Equal(resp.Id, 12830, "Pet id should be equal") + assert.Equal(resp.Id, "12830", "Pet id should be equal") assert.Equal(resp.Name, "gopher", "Pet name should be gopher") assert.Equal(resp.Status, "pending", "Pet status should be pending") @@ -40,10 +38,8 @@ func TestGetPetById(t *testing.T) { } func TestUpdatePetWithForm(t *testing.T) { - t.Log("Testing UpdatePetWithForm...") - s := sw.NewPetApi() - err := s.UpdatePetWithForm("12830", "golang", "available") + err := s.UpdatePetWithForm(12830, "golang", "available") if err != nil { t.Errorf("Error while updating pet by id") diff --git a/samples/client/petstore/go/swagger/ApiResponse.go b/samples/client/petstore/go/swagger/ApiResponse.go new file mode 100644 index 000000000000..196af29c15dc --- /dev/null +++ b/samples/client/petstore/go/swagger/ApiResponse.go @@ -0,0 +1,10 @@ +package swagger + +import ( +) + +type ApiResponse struct { + Code int32 `json:"code,omitempty"` + Type_ string `json:"type,omitempty"` + Message string `json:"message,omitempty"` +} diff --git a/samples/client/petstore/go/swagger/Category.go b/samples/client/petstore/go/swagger/Category.go index c150c0d2599a..1739a41f1eba 100644 --- a/samples/client/petstore/go/swagger/Category.go +++ b/samples/client/petstore/go/swagger/Category.go @@ -5,5 +5,5 @@ import ( type Category struct { Id int64 `json:"id,omitempty"` -Name string `json:"name,omitempty"` + Name string `json:"name,omitempty"` } diff --git a/samples/client/petstore/go/swagger/ModelReturn.go b/samples/client/petstore/go/swagger/ModelReturn.go index daac97e1763f..8195d536e302 100644 --- a/samples/client/petstore/go/swagger/ModelReturn.go +++ b/samples/client/petstore/go/swagger/ModelReturn.go @@ -5,5 +5,4 @@ import ( type ModelReturn struct { Return_ int32 `json:"return,omitempty"` - } diff --git a/samples/client/petstore/go/swagger/Name.go b/samples/client/petstore/go/swagger/Name.go index 5c0d7bc6d445..bf106c0681ad 100644 --- a/samples/client/petstore/go/swagger/Name.go +++ b/samples/client/petstore/go/swagger/Name.go @@ -5,5 +5,5 @@ import ( type Name struct { Name int32 `json:"name,omitempty"` - + SnakeCase int32 `json:"snake_case,omitempty"` } diff --git a/samples/client/petstore/go/swagger/Order.go b/samples/client/petstore/go/swagger/Order.go index a5a4852d1dd5..8b9ddfeb2126 100644 --- a/samples/client/petstore/go/swagger/Order.go +++ b/samples/client/petstore/go/swagger/Order.go @@ -6,9 +6,9 @@ import ( type Order struct { Id int64 `json:"id,omitempty"` -PetId int64 `json:"petId,omitempty"` -Quantity int32 `json:"quantity,omitempty"` -ShipDate time.Time `json:"shipDate,omitempty"` -Status string `json:"status,omitempty"` -Complete bool `json:"complete,omitempty"` + PetId int64 `json:"petId,omitempty"` + Quantity int32 `json:"quantity,omitempty"` + ShipDate time.Time `json:"shipDate,omitempty"` + Status string `json:"status,omitempty"` + Complete bool `json:"complete,omitempty"` } diff --git a/samples/client/petstore/go/swagger/Pet.go b/samples/client/petstore/go/swagger/Pet.go index 5f1f3c06d51a..d9faa1cb90f5 100644 --- a/samples/client/petstore/go/swagger/Pet.go +++ b/samples/client/petstore/go/swagger/Pet.go @@ -5,9 +5,9 @@ import ( type Pet struct { Id int64 `json:"id,omitempty"` -Category Category `json:"category,omitempty"` -Name string `json:"name,omitempty"` -PhotoUrls []string `json:"photoUrls,omitempty"` -Tags []Tag `json:"tags,omitempty"` -Status string `json:"status,omitempty"` + Category Category `json:"category,omitempty"` + Name string `json:"name,omitempty"` + PhotoUrls []string `json:"photoUrls,omitempty"` + Tags []Tag `json:"tags,omitempty"` + Status string `json:"status,omitempty"` } diff --git a/samples/client/petstore/go/swagger/Tag.go b/samples/client/petstore/go/swagger/Tag.go index bb27c61b39c0..77b55099c4a5 100644 --- a/samples/client/petstore/go/swagger/Tag.go +++ b/samples/client/petstore/go/swagger/Tag.go @@ -5,5 +5,5 @@ import ( type Tag struct { Id int64 `json:"id,omitempty"` -Name string `json:"name,omitempty"` + Name string `json:"name,omitempty"` } diff --git a/samples/client/petstore/go/swagger/User.go b/samples/client/petstore/go/swagger/User.go index e34ad81ec8c2..03f0821252b8 100644 --- a/samples/client/petstore/go/swagger/User.go +++ b/samples/client/petstore/go/swagger/User.go @@ -5,11 +5,11 @@ import ( type User struct { Id int64 `json:"id,omitempty"` -Username string `json:"username,omitempty"` -FirstName string `json:"firstName,omitempty"` -LastName string `json:"lastName,omitempty"` -Email string `json:"email,omitempty"` -Password string `json:"password,omitempty"` -Phone string `json:"phone,omitempty"` -UserStatus int32 `json:"userStatus,omitempty"` + Username string `json:"username,omitempty"` + FirstName string `json:"firstName,omitempty"` + LastName string `json:"lastName,omitempty"` + Email string `json:"email,omitempty"` + Password string `json:"password,omitempty"` + Phone string `json:"phone,omitempty"` + UserStatus int32 `json:"userStatus,omitempty"` } diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/PetApi.java index 00bd52b9a6f6..fdc5110304f1 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/PetApi.java @@ -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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - - 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - - 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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> localVarReturnType = new GenericType>() {}; 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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> localVarReturnType = new GenericType>() {}; 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - - final String[] localVarAccepts = { "application/json", "application/xml" }; @@ -296,12 +263,9 @@ public class PetApi { String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" }; - GenericType localVarReturnType = new GenericType() {}; 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - - final String[] localVarAccepts = { "application/json", "application/xml" }; @@ -344,12 +305,9 @@ public class PetApi { String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" }; - GenericType localVarReturnType = new GenericType() {}; 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - - final String[] localVarAccepts = { "application/json", "application/xml" }; @@ -392,12 +347,9 @@ public class PetApi { String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" }; - GenericType localVarReturnType = new GenericType() {}; 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - - 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - 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); - } - } diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/StoreApi.java index 7e8bccd8da3c..3f2e38c0e3a4 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/StoreApi.java @@ -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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - - 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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> localVarReturnType = new GenericType>() {}; 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - - final String[] localVarAccepts = { "application/json", "application/xml" }; @@ -160,12 +144,9 @@ public class StoreApi { String[] localVarAuthNames = new String[] { "api_key" }; - GenericType> localVarReturnType = new GenericType>() {}; 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - - final String[] localVarAccepts = { "application/json", "application/xml" }; @@ -201,15 +179,12 @@ public class StoreApi { String[] localVarAuthNames = new String[] { "api_key" }; - GenericType localVarReturnType = new GenericType() {}; 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - - 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 localVarReturnType = new GenericType() {}; 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - - 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 localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - - } - + } } diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/UserApi.java index 848ec58ce178..600ad0b678af 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/UserApi.java @@ -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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - - 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - - 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - - 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - - 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - - final String[] localVarAccepts = { "application/json", "application/xml" }; @@ -243,12 +219,9 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - GenericType localVarReturnType = new GenericType() {}; 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - 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 localVarReturnType = new GenericType() {}; 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - - 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 localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - - - 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); - } - } diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Animal.java new file mode 100644 index 000000000000..e1e3604ad6b1 --- /dev/null +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Animal.java @@ -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 "); + } +} + diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Cat.java new file mode 100644 index 000000000000..6b4875cda38f --- /dev/null +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Cat.java @@ -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 "); + } +} + diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Category.java index 3289c4696722..08a0de3e889f 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Category.java @@ -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) { diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Dog.java new file mode 100644 index 000000000000..5aa516879964 --- /dev/null +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Dog.java @@ -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 "); + } +} + diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/FormatTest.java new file mode 100644 index 000000000000..78c76501e0a8 --- /dev/null +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/FormatTest.java @@ -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 "); + } +} + diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/InlineResponse200.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/InlineResponse200.java index c7d3c155657c..ee6afefe2658 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/InlineResponse200.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/InlineResponse200.java @@ -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 photoUrls) { @@ -146,7 +146,6 @@ public class InlineResponse200 { this.photoUrls = photoUrls; } - @Override public boolean equals(java.lang.Object o) { diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Model200Response.java index fb24ee29a3f9..4f44da640727 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Model200Response.java @@ -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) { diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/ModelReturn.java index fbb4135ce277..0f4279af8d3e 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/ModelReturn.java @@ -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) { diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Name.java index 512289310c74..6446b547742e 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Name.java @@ -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) { diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Order.java index 77df445af664..43ddec1ff6a3 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Order.java @@ -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) { diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Pet.java index 42c23a9db0e6..7a4eca82fe03 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Pet.java @@ -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 photoUrls) { @@ -112,7 +112,7 @@ public class Pet { this.photoUrls = photoUrls; } - + /** **/ public Pet tags(List 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) { diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/SpecialModelName.java index 7fa91b8827c8..f1a153e79a06 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -31,7 +31,6 @@ public class SpecialModelName { this.specialPropertyName = specialPropertyName; } - @Override public boolean equals(java.lang.Object o) { diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Tag.java index 4e6055c14108..86cb5f48b09b 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Tag.java @@ -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) { diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/User.java index 272ec6d38430..f960f1461ddb 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/User.java @@ -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) { diff --git a/samples/client/petstore/javascript-promise/README.md b/samples/client/petstore/javascript-promise/README.md index 3fc0c158a2ad..1d6678e55e8f 100644 --- a/samples/client/petstore/javascript-promise/README.md +++ b/samples/client/petstore/javascript-promise/README.md @@ -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) diff --git a/samples/client/petstore/javascript-promise/docs/FormatTest.md b/samples/client/petstore/javascript-promise/docs/FormatTest.md new file mode 100644 index 000000000000..57a4fb132d53 --- /dev/null +++ b/samples/client/petstore/javascript-promise/docs/FormatTest.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] + + diff --git a/samples/client/petstore/javascript-promise/docs/Name.md b/samples/client/petstore/javascript-promise/docs/Name.md index 5086f6c5a3ee..f0e693f2f564 100644 --- a/samples/client/petstore/javascript-promise/docs/Name.md +++ b/samples/client/petstore/javascript-promise/docs/Name.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] +**name** | **Integer** | | **snakeCase** | **Integer** | | [optional] diff --git a/samples/client/petstore/javascript-promise/docs/PetApi.md b/samples/client/petstore/javascript-promise/docs/PetApi.md index 77d9630f8889..7e5398dcc132 100644 --- a/samples/client/petstore/javascript-promise/docs/PetApi.md +++ b/samples/client/petstore/javascript-promise/docs/PetApi.md @@ -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 diff --git a/samples/client/petstore/javascript-promise/docs/StoreApi.md b/samples/client/petstore/javascript-promise/docs/StoreApi.md index 930586a96f57..f9b8e0ac6bed 100644 --- a/samples/client/petstore/javascript-promise/docs/StoreApi.md +++ b/samples/client/petstore/javascript-promise/docs/StoreApi.md @@ -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 diff --git a/samples/client/petstore/javascript-promise/docs/UserApi.md b/samples/client/petstore/javascript-promise/docs/UserApi.md index 1c14b708231c..f9a3a848f7ae 100644 --- a/samples/client/petstore/javascript-promise/docs/UserApi.md +++ b/samples/client/petstore/javascript-promise/docs/UserApi.md @@ -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 diff --git a/samples/client/petstore/javascript-promise/src/ApiClient.js b/samples/client/petstore/javascript-promise/src/ApiClient.js index 8943bd4792bf..da6c506ba649 100644 --- a/samples/client/petstore/javascript-promise/src/ApiClient.js +++ b/samples/client/petstore/javascript-promise/src/ApiClient.js @@ -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.} diff --git a/samples/client/petstore/javascript-promise/src/api/StoreApi.js b/samples/client/petstore/javascript-promise/src/api/StoreApi.js index 32a6dce47e96..77d0276ead02 100644 --- a/samples/client/petstore/javascript-promise/src/api/StoreApi.js +++ b/samples/client/petstore/javascript-promise/src/api/StoreApi.js @@ -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} */ diff --git a/samples/client/petstore/javascript-promise/src/api/UserApi.js b/samples/client/petstore/javascript-promise/src/api/UserApi.js index 8914d9c883d5..b2f3e8c16c9d 100644 --- a/samples/client/petstore/javascript-promise/src/api/UserApi.js +++ b/samples/client/petstore/javascript-promise/src/api/UserApi.js @@ -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) { diff --git a/samples/client/petstore/javascript-promise/src/index.js b/samples/client/petstore/javascript-promise/src/index.js index da193f80e4d3..c29f14094f9e 100644 --- a/samples/client/petstore/javascript-promise/src/index.js +++ b/samples/client/petstore/javascript-promise/src/index.js @@ -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.
+ * 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.
* The index module provides access to constructors for all the classes which comprise the public API. *

* 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} diff --git a/samples/client/petstore/javascript-promise/src/model/FormatTest.js b/samples/client/petstore/javascript-promise/src/model/FormatTest.js new file mode 100644 index 000000000000..46a9bc854fc6 --- /dev/null +++ b/samples/client/petstore/javascript-promise/src/model/FormatTest.js @@ -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 FormatTest. + * @alias module:model/FormatTest + * @class + * @param _number + */ + var exports = function(_number) { + + + + + this['number'] = _number; + + + + + + + + }; + + /** + * Constructs a FormatTest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj 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 FormatTest 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; +})); diff --git a/samples/client/petstore/javascript-promise/src/model/Model200Response.js b/samples/client/petstore/javascript-promise/src/model/Model200Response.js index fb559f5ebaa2..1682ed079fce 100644 --- a/samples/client/petstore/javascript-promise/src/model/Model200Response.js +++ b/samples/client/petstore/javascript-promise/src/model/Model200Response.js @@ -23,6 +23,7 @@ /** * Constructs a new Model200Response. + * Model for testing model name starting with number * @alias module:model/Model200Response * @class */ diff --git a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js index d5036e230ead..86d28d038a9f 100644 --- a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js +++ b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js @@ -23,6 +23,7 @@ /** * Constructs a new ModelReturn. + * Model for testing reserved words * @alias module:model/ModelReturn * @class */ diff --git a/samples/client/petstore/javascript-promise/src/model/Name.js b/samples/client/petstore/javascript-promise/src/model/Name.js index a5a070025f71..c8bd6862c978 100644 --- a/samples/client/petstore/javascript-promise/src/model/Name.js +++ b/samples/client/petstore/javascript-promise/src/model/Name.js @@ -23,12 +23,14 @@ /** * Constructs a new Name. + * 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; }; diff --git a/samples/client/petstore/javascript/README.md b/samples/client/petstore/javascript/README.md index 0867d3ec1d5f..9874fc7bfafe 100644 --- a/samples/client/petstore/javascript/README.md +++ b/samples/client/petstore/javascript/README.md @@ -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) diff --git a/samples/client/petstore/javascript/docs/FormatTest.md b/samples/client/petstore/javascript/docs/FormatTest.md new file mode 100644 index 000000000000..57a4fb132d53 --- /dev/null +++ b/samples/client/petstore/javascript/docs/FormatTest.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] + + diff --git a/samples/client/petstore/javascript/docs/Name.md b/samples/client/petstore/javascript/docs/Name.md index 5086f6c5a3ee..f0e693f2f564 100644 --- a/samples/client/petstore/javascript/docs/Name.md +++ b/samples/client/petstore/javascript/docs/Name.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] +**name** | **Integer** | | **snakeCase** | **Integer** | | [optional] diff --git a/samples/client/petstore/javascript/docs/PetApi.md b/samples/client/petstore/javascript/docs/PetApi.md index e33bf7c3b127..06c625d78980 100644 --- a/samples/client/petstore/javascript/docs/PetApi.md +++ b/samples/client/petstore/javascript/docs/PetApi.md @@ -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 diff --git a/samples/client/petstore/javascript/docs/StoreApi.md b/samples/client/petstore/javascript/docs/StoreApi.md index b2ea41e35ee7..19da7652129d 100644 --- a/samples/client/petstore/javascript/docs/StoreApi.md +++ b/samples/client/petstore/javascript/docs/StoreApi.md @@ -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 diff --git a/samples/client/petstore/javascript/docs/UserApi.md b/samples/client/petstore/javascript/docs/UserApi.md index f2fcf2c4b525..3ae4a2e48441 100644 --- a/samples/client/petstore/javascript/docs/UserApi.md +++ b/samples/client/petstore/javascript/docs/UserApi.md @@ -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 diff --git a/samples/client/petstore/javascript/src/ApiClient.js b/samples/client/petstore/javascript/src/ApiClient.js index 71dd888d7d9a..2b6c0c5b1922 100644 --- a/samples/client/petstore/javascript/src/ApiClient.js +++ b/samples/client/petstore/javascript/src/ApiClient.js @@ -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.} diff --git a/samples/client/petstore/javascript/src/api/StoreApi.js b/samples/client/petstore/javascript/src/api/StoreApi.js index bcef8b433c1e..cdda27abba41 100644 --- a/samples/client/petstore/javascript/src/api/StoreApi.js +++ b/samples/client/petstore/javascript/src/api/StoreApi.js @@ -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} diff --git a/samples/client/petstore/javascript/src/api/UserApi.js b/samples/client/petstore/javascript/src/api/UserApi.js index 3060a13e70c3..30f18bbb7557 100644 --- a/samples/client/petstore/javascript/src/api/UserApi.js +++ b/samples/client/petstore/javascript/src/api/UserApi.js @@ -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} */ diff --git a/samples/client/petstore/javascript/src/index.js b/samples/client/petstore/javascript/src/index.js index da193f80e4d3..c29f14094f9e 100644 --- a/samples/client/petstore/javascript/src/index.js +++ b/samples/client/petstore/javascript/src/index.js @@ -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.
+ * 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.
* The index module provides access to constructors for all the classes which comprise the public API. *

* 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} diff --git a/samples/client/petstore/javascript/src/model/FormatTest.js b/samples/client/petstore/javascript/src/model/FormatTest.js new file mode 100644 index 000000000000..46a9bc854fc6 --- /dev/null +++ b/samples/client/petstore/javascript/src/model/FormatTest.js @@ -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 FormatTest. + * @alias module:model/FormatTest + * @class + * @param _number + */ + var exports = function(_number) { + + + + + this['number'] = _number; + + + + + + + + }; + + /** + * Constructs a FormatTest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj 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 FormatTest 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; +})); diff --git a/samples/client/petstore/javascript/src/model/Model200Response.js b/samples/client/petstore/javascript/src/model/Model200Response.js index fb559f5ebaa2..1682ed079fce 100644 --- a/samples/client/petstore/javascript/src/model/Model200Response.js +++ b/samples/client/petstore/javascript/src/model/Model200Response.js @@ -23,6 +23,7 @@ /** * Constructs a new Model200Response. + * Model for testing model name starting with number * @alias module:model/Model200Response * @class */ diff --git a/samples/client/petstore/javascript/src/model/ModelReturn.js b/samples/client/petstore/javascript/src/model/ModelReturn.js index d5036e230ead..86d28d038a9f 100644 --- a/samples/client/petstore/javascript/src/model/ModelReturn.js +++ b/samples/client/petstore/javascript/src/model/ModelReturn.js @@ -23,6 +23,7 @@ /** * Constructs a new ModelReturn. + * Model for testing reserved words * @alias module:model/ModelReturn * @class */ diff --git a/samples/client/petstore/javascript/src/model/Name.js b/samples/client/petstore/javascript/src/model/Name.js index a5a070025f71..c8bd6862c978 100644 --- a/samples/client/petstore/javascript/src/model/Name.js +++ b/samples/client/petstore/javascript/src/model/Name.js @@ -23,12 +23,14 @@ /** * Constructs a new Name. + * 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; }; diff --git a/samples/client/petstore/perl/README.md b/samples/client/petstore/perl/README.md index 72fc2e264299..209bb76bca1f 100644 --- a/samples/client/petstore/perl/README.md +++ b/samples/client/petstore/perl/README.md @@ -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) diff --git a/samples/client/petstore/perl/docs/FormatTest.md b/samples/client/petstore/perl/docs/FormatTest.md new file mode 100644 index 000000000000..c99370c0040f --- /dev/null +++ b/samples/client/petstore/perl/docs/FormatTest.md @@ -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) + + diff --git a/samples/client/petstore/perl/docs/Name.md b/samples/client/petstore/perl/docs/Name.md index 13b5d0dde824..7109642a08b7 100644 --- a/samples/client/petstore/perl/docs/Name.md +++ b/samples/client/petstore/perl/docs/Name.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) diff --git a/samples/client/petstore/perl/docs/PetApi.md b/samples/client/petstore/perl/docs/PetApi.md index 971dc0772c85..554e0a68fe6c 100644 --- a/samples/client/petstore/perl/docs/PetApi.md +++ b/samples/client/petstore/perl/docs/PetApi.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 diff --git a/samples/client/petstore/perl/docs/StoreApi.md b/samples/client/petstore/perl/docs/StoreApi.md index 7b9e35c977d7..175995b6934b 100644 --- a/samples/client/petstore/perl/docs/StoreApi.md +++ b/samples/client/petstore/perl/docs/StoreApi.md @@ -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 diff --git a/samples/client/petstore/perl/docs/UserApi.md b/samples/client/petstore/perl/docs/UserApi.md index 7330c1b39801..a7318866fe69 100644 --- a/samples/client/petstore/perl/docs/UserApi.md +++ b/samples/client/petstore/perl/docs/UserApi.md @@ -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 diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/ApiClient.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/ApiClient.pm index 86dba7e1bcd6..b5fd24c2b1bc 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/ApiClient.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/ApiClient.pm @@ -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 } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Animal.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Animal.pm index c2e124ad8b45..eb1b10034e9a 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Animal.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Animal.pm @@ -110,7 +110,6 @@ __PACKAGE__->method_documentation({ format => '', read_only => '', }, - }); __PACKAGE__->swagger_types( { diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Cat.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Cat.pm index 05500d61ad08..41e542afd9f3 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Cat.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Cat.pm @@ -117,7 +117,6 @@ __PACKAGE__->method_documentation({ format => '', read_only => '', }, - }); __PACKAGE__->swagger_types( { diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Category.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Category.pm index 39767d613edd..2d49d6a99b86 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Category.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Category.pm @@ -117,7 +117,6 @@ __PACKAGE__->method_documentation({ format => '', read_only => '', }, - }); __PACKAGE__->swagger_types( { diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Dog.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Dog.pm index b4192ec71cd9..6ac41e2a9ff6 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Dog.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Dog.pm @@ -117,7 +117,6 @@ __PACKAGE__->method_documentation({ format => '', read_only => '', }, - }); __PACKAGE__->swagger_types( { diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/FormatTest.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/FormatTest.pm new file mode 100644 index 000000000000..3bc403453c59 --- /dev/null +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/FormatTest.pm @@ -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; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/InlineResponse200.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/InlineResponse200.pm index 90f7bad236e5..2f8c7f1dacd7 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/InlineResponse200.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/InlineResponse200.pm @@ -145,7 +145,6 @@ __PACKAGE__->method_documentation({ format => '', read_only => '', }, - }); __PACKAGE__->swagger_types( { diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Model200Response.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Model200Response.pm index 8ec16d4b97af..d64f94977536 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Model200Response.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Model200Response.pm @@ -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( { diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ModelReturn.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ModelReturn.pm index 5436aae64bcb..682d26d7436e 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ModelReturn.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ModelReturn.pm @@ -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( { diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Name.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Name.pm index f136a7f031e3..b5a58e0d5fa9 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Name.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Name.pm @@ -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( { diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Order.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Order.pm index 500218017bc2..6590dba22937 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Order.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Order.pm @@ -145,7 +145,6 @@ __PACKAGE__->method_documentation({ format => '', read_only => '', }, - }); __PACKAGE__->swagger_types( { diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Pet.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Pet.pm index eadf72be0054..50334ab062a8 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Pet.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Pet.pm @@ -145,7 +145,6 @@ __PACKAGE__->method_documentation({ format => '', read_only => '', }, - }); __PACKAGE__->swagger_types( { diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/SpecialModelName.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/SpecialModelName.pm index b720c10b1a6b..5666b39c07b8 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/SpecialModelName.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/SpecialModelName.pm @@ -110,7 +110,6 @@ __PACKAGE__->method_documentation({ format => '', read_only => '', }, - }); __PACKAGE__->swagger_types( { diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Tag.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Tag.pm index e114c1e1ec03..b60ccc4a0056 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Tag.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Tag.pm @@ -117,7 +117,6 @@ __PACKAGE__->method_documentation({ format => '', read_only => '', }, - }); __PACKAGE__->swagger_types( { diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/User.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/User.pm index 463424288d82..8b0555d8aaaf 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/User.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/User.pm @@ -159,7 +159,6 @@ __PACKAGE__->method_documentation({ format => '', read_only => '', }, - }); __PACKAGE__->swagger_types( { diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/PetApi.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/PetApi.pm index c55c9a5fecfa..9775dea47524 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/PetApi.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/PetApi.pm @@ -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; - } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Role.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Role.pm index 4b1f63cbb2e6..b410576517c9 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Role.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Role.pm @@ -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 diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm index f9af88c0ac9a..ddd01f75ac79 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm @@ -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; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/UserApi.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/UserApi.pm index e86cc571a709..d0510f30e063 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/UserApi.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/UserApi.pm @@ -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; - } diff --git a/samples/client/petstore/perl/t/FormatTestTest.t b/samples/client/petstore/perl/t/FormatTestTest.t new file mode 100644 index 000000000000..4d1521f906ca --- /dev/null +++ b/samples/client/petstore/perl/t/FormatTestTest.t @@ -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'); + diff --git a/samples/client/petstore/php/SwaggerClient-php/README.md b/samples/client/petstore/php/SwaggerClient-php/README.md index 37f92af6e6f5..4d73a38f0842 100644 --- a/samples/client/petstore/php/SwaggerClient-php/README.md +++ b/samples/client/petstore/php/SwaggerClient-php/README.md @@ -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-09T18:00:55.578+08:00 +- Build date: 2016-04-11T16:59:06.544+08:00 - Build package: class io.swagger.codegen.languages.PhpClientCodegen ## Requirements @@ -112,6 +112,7 @@ Class | Method | HTTP request | Description - [Cat](docs/Cat.md) - [Category](docs/Category.md) - [Dog](docs/Dog.md) + - [FormatTest](docs/FormatTest.md) - [InlineResponse200](docs/InlineResponse200.md) - [Model200Response](docs/Model200Response.md) - [ModelReturn](docs/ModelReturn.md) diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/FormatTest.md b/samples/client/petstore/php/SwaggerClient-php/docs/FormatTest.md new file mode 100644 index 000000000000..7ea1a17404f0 --- /dev/null +++ b/samples/client/petstore/php/SwaggerClient-php/docs/FormatTest.md @@ -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) + + diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Name.md b/samples/client/petstore/php/SwaggerClient-php/docs/Name.md index 26473221c327..905680a7d30c 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Name.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Name.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **int** | | [optional] +**name** | **int** | | **snake_case** | **int** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php index c267c81b18e4..3f01e789547e 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php @@ -46,6 +46,12 @@ use \ArrayAccess; */ class Animal implements ArrayAccess { + /** + * The original name of the model. + * @var string + */ + static $swaggerModelName = 'Animal'; + /** * Array of property to type mappings. Used for (de)serialization * @var string[] @@ -107,6 +113,10 @@ class Animal implements ArrayAccess public function __construct(array $data = null) { + // Initialize discriminator property with the model name. + $discrimintor = array_search('className', self::$attributeMap); + $this->{$discrimintor} = static::$swaggerModelName; + if ($data != null) { $this->class_name = $data["class_name"]; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php index 79acd0d1f22a..e0eaf7a106d6 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php @@ -46,6 +46,12 @@ use \ArrayAccess; */ class Cat extends Animal implements ArrayAccess { + /** + * The original name of the model. + * @var string + */ + static $swaggerModelName = 'Cat'; + /** * Array of property to type mappings. Used for (de)serialization * @var string[] @@ -107,6 +113,7 @@ class Cat extends Animal implements ArrayAccess public function __construct(array $data = null) { parent::__construct($data); + if ($data != null) { $this->declawed = $data["declawed"]; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php index 0f359589d0ec..fb6eed3af292 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php @@ -46,6 +46,12 @@ use \ArrayAccess; */ class Category implements ArrayAccess { + /** + * The original name of the model. + * @var string + */ + static $swaggerModelName = 'Category'; + /** * Array of property to type mappings. Used for (de)serialization * @var string[] @@ -116,6 +122,7 @@ class Category implements ArrayAccess public function __construct(array $data = null) { + if ($data != null) { $this->id = $data["id"]; $this->name = $data["name"]; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php index d12bde293fd1..6fd43d3a9447 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php @@ -46,6 +46,12 @@ use \ArrayAccess; */ class Dog extends Animal implements ArrayAccess { + /** + * The original name of the model. + * @var string + */ + static $swaggerModelName = 'Dog'; + /** * Array of property to type mappings. Used for (de)serialization * @var string[] @@ -107,6 +113,7 @@ class Dog extends Animal implements ArrayAccess public function __construct(array $data = null) { parent::__construct($data); + if ($data != null) { $this->breed = $data["breed"]; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php new file mode 100644 index 000000000000..949603d7d0ae --- /dev/null +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php @@ -0,0 +1,494 @@ + 'int', + 'int32' => 'int', + 'int64' => 'int', + 'number' => 'float', + 'float' => 'float', + 'double' => 'double', + 'string' => 'string', + 'byte' => 'string', + 'binary' => 'string', + 'date' => '\DateTime', + 'date_time' => 'string' + ); + + static function swaggerTypes() { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + static $attributeMap = array( + 'integer' => 'integer', + 'int32' => 'int32', + 'int64' => 'int64', + 'number' => 'number', + 'float' => 'float', + 'double' => 'double', + 'string' => 'string', + 'byte' => 'byte', + 'binary' => 'binary', + 'date' => 'date', + 'date_time' => 'dateTime' + ); + + static function attributeMap() { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + static $setters = array( + 'integer' => 'setInteger', + 'int32' => 'setInt32', + 'int64' => 'setInt64', + 'number' => 'setNumber', + 'float' => 'setFloat', + 'double' => 'setDouble', + 'string' => 'setString', + 'byte' => 'setByte', + 'binary' => 'setBinary', + 'date' => 'setDate', + 'date_time' => 'setDateTime' + ); + + static function setters() { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + static $getters = array( + 'integer' => 'getInteger', + 'int32' => 'getInt32', + 'int64' => 'getInt64', + 'number' => 'getNumber', + 'float' => 'getFloat', + 'double' => 'getDouble', + 'string' => 'getString', + 'byte' => 'getByte', + 'binary' => 'getBinary', + 'date' => 'getDate', + 'date_time' => 'getDateTime' + ); + + static function getters() { + return self::$getters; + } + + /** + * $integer + * @var int + */ + protected $integer; + /** + * $int32 + * @var int + */ + protected $int32; + /** + * $int64 + * @var int + */ + protected $int64; + /** + * $number + * @var float + */ + protected $number; + /** + * $float + * @var float + */ + protected $float; + /** + * $double + * @var double + */ + protected $double; + /** + * $string + * @var string + */ + protected $string; + /** + * $byte + * @var string + */ + protected $byte; + /** + * $binary + * @var string + */ + protected $binary; + /** + * $date + * @var \DateTime + */ + protected $date; + /** + * $date_time + * @var string + */ + protected $date_time; + + /** + * Constructor + * @param mixed[] $data Associated array of property value initalizing the model + */ + public function __construct(array $data = null) + { + + + if ($data != null) { + $this->integer = $data["integer"]; + $this->int32 = $data["int32"]; + $this->int64 = $data["int64"]; + $this->number = $data["number"]; + $this->float = $data["float"]; + $this->double = $data["double"]; + $this->string = $data["string"]; + $this->byte = $data["byte"]; + $this->binary = $data["binary"]; + $this->date = $data["date"]; + $this->date_time = $data["date_time"]; + } + } + /** + * Gets integer + * @return int + */ + public function getInteger() + { + return $this->integer; + } + + /** + * Sets integer + * @param int $integer + * @return $this + */ + public function setInteger($integer) + { + + $this->integer = $integer; + return $this; + } + /** + * Gets int32 + * @return int + */ + public function getInt32() + { + return $this->int32; + } + + /** + * Sets int32 + * @param int $int32 + * @return $this + */ + public function setInt32($int32) + { + + $this->int32 = $int32; + return $this; + } + /** + * Gets int64 + * @return int + */ + public function getInt64() + { + return $this->int64; + } + + /** + * Sets int64 + * @param int $int64 + * @return $this + */ + public function setInt64($int64) + { + + $this->int64 = $int64; + return $this; + } + /** + * Gets number + * @return float + */ + public function getNumber() + { + return $this->number; + } + + /** + * Sets number + * @param float $number + * @return $this + */ + public function setNumber($number) + { + + $this->number = $number; + return $this; + } + /** + * Gets float + * @return float + */ + public function getFloat() + { + return $this->float; + } + + /** + * Sets float + * @param float $float + * @return $this + */ + public function setFloat($float) + { + + $this->float = $float; + return $this; + } + /** + * Gets double + * @return double + */ + public function getDouble() + { + return $this->double; + } + + /** + * Sets double + * @param double $double + * @return $this + */ + public function setDouble($double) + { + + $this->double = $double; + return $this; + } + /** + * Gets string + * @return string + */ + public function getString() + { + return $this->string; + } + + /** + * Sets string + * @param string $string + * @return $this + */ + public function setString($string) + { + + $this->string = $string; + return $this; + } + /** + * Gets byte + * @return string + */ + public function getByte() + { + return $this->byte; + } + + /** + * Sets byte + * @param string $byte + * @return $this + */ + public function setByte($byte) + { + + $this->byte = $byte; + return $this; + } + /** + * Gets binary + * @return string + */ + public function getBinary() + { + return $this->binary; + } + + /** + * Sets binary + * @param string $binary + * @return $this + */ + public function setBinary($binary) + { + + $this->binary = $binary; + return $this; + } + /** + * Gets date + * @return \DateTime + */ + public function getDate() + { + return $this->date; + } + + /** + * Sets date + * @param \DateTime $date + * @return $this + */ + public function setDate($date) + { + + $this->date = $date; + return $this; + } + /** + * Gets date_time + * @return string + */ + public function getDateTime() + { + return $this->date_time; + } + + /** + * Sets date_time + * @param string $date_time + * @return $this + */ + public function setDateTime($date_time) + { + + $this->date_time = $date_time; + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->$offset); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return $this->$offset; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + $this->$offset = $value; + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->$offset); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/InlineResponse200.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/InlineResponse200.php index c3bb9d03315d..3bd2106ba0e5 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/InlineResponse200.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/InlineResponse200.php @@ -46,6 +46,12 @@ use \ArrayAccess; */ class InlineResponse200 implements ArrayAccess { + /** + * The original name of the model. + * @var string + */ + static $swaggerModelName = 'inline_response_200'; + /** * Array of property to type mappings. Used for (de)serialization * @var string[] @@ -152,6 +158,7 @@ class InlineResponse200 implements ArrayAccess public function __construct(array $data = null) { + if ($data != null) { $this->tags = $data["tags"]; $this->id = $data["id"]; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php index a2b4d7691edf..8d62f9531ec6 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php @@ -46,6 +46,12 @@ use \ArrayAccess; */ class Model200Response implements ArrayAccess { + /** + * The original name of the model. + * @var string + */ + static $swaggerModelName = '200_response'; + /** * Array of property to type mappings. Used for (de)serialization * @var string[] @@ -107,6 +113,7 @@ class Model200Response implements ArrayAccess public function __construct(array $data = null) { + if ($data != null) { $this->name = $data["name"]; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php index d92e61cdcd64..d4660e118fde 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php @@ -46,6 +46,12 @@ use \ArrayAccess; */ class ModelReturn implements ArrayAccess { + /** + * The original name of the model. + * @var string + */ + static $swaggerModelName = 'Return'; + /** * Array of property to type mappings. Used for (de)serialization * @var string[] @@ -107,6 +113,7 @@ class ModelReturn implements ArrayAccess public function __construct(array $data = null) { + if ($data != null) { $this->return = $data["return"]; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php index dbe1349ab881..c44cda7b7092 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php @@ -46,6 +46,12 @@ use \ArrayAccess; */ class Name implements ArrayAccess { + /** + * The original name of the model. + * @var string + */ + static $swaggerModelName = 'Name'; + /** * Array of property to type mappings. Used for (de)serialization * @var string[] @@ -116,6 +122,7 @@ class Name implements ArrayAccess public function __construct(array $data = null) { + if ($data != null) { $this->name = $data["name"]; $this->snake_case = $data["snake_case"]; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php index ae29bd61271f..a2dfe6009508 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php @@ -46,6 +46,12 @@ use \ArrayAccess; */ class Order implements ArrayAccess { + /** + * The original name of the model. + * @var string + */ + static $swaggerModelName = 'Order'; + /** * Array of property to type mappings. Used for (de)serialization * @var string[] @@ -152,6 +158,7 @@ class Order implements ArrayAccess public function __construct(array $data = null) { + if ($data != null) { $this->id = $data["id"]; $this->pet_id = $data["pet_id"]; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php index 7a7908693496..3a9e46cd3fb4 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php @@ -46,6 +46,12 @@ use \ArrayAccess; */ class Pet implements ArrayAccess { + /** + * The original name of the model. + * @var string + */ + static $swaggerModelName = 'Pet'; + /** * Array of property to type mappings. Used for (de)serialization * @var string[] @@ -152,6 +158,7 @@ class Pet implements ArrayAccess public function __construct(array $data = null) { + if ($data != null) { $this->id = $data["id"]; $this->category = $data["category"]; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php index 25248d949cf4..fb748811cf27 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php @@ -46,6 +46,12 @@ use \ArrayAccess; */ class SpecialModelName implements ArrayAccess { + /** + * The original name of the model. + * @var string + */ + static $swaggerModelName = '$special[model.name]'; + /** * Array of property to type mappings. Used for (de)serialization * @var string[] @@ -107,6 +113,7 @@ class SpecialModelName implements ArrayAccess public function __construct(array $data = null) { + if ($data != null) { $this->special_property_name = $data["special_property_name"]; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php index 8396a774e809..4bb56401c48b 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php @@ -46,6 +46,12 @@ use \ArrayAccess; */ class Tag implements ArrayAccess { + /** + * The original name of the model. + * @var string + */ + static $swaggerModelName = 'Tag'; + /** * Array of property to type mappings. Used for (de)serialization * @var string[] @@ -116,6 +122,7 @@ class Tag implements ArrayAccess public function __construct(array $data = null) { + if ($data != null) { $this->id = $data["id"]; $this->name = $data["name"]; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php index 6e5c7de36f3f..da9cc20ff4cc 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php @@ -46,6 +46,12 @@ use \ArrayAccess; */ class User implements ArrayAccess { + /** + * The original name of the model. + * @var string + */ + static $swaggerModelName = 'User'; + /** * Array of property to type mappings. Used for (de)serialization * @var string[] @@ -170,6 +176,7 @@ class User implements ArrayAccess public function __construct(array $data = null) { + if ($data != null) { $this->id = $data["id"]; $this->username = $data["username"]; diff --git a/samples/client/petstore/php/SwaggerClient-php/tests/PetApiTest.php b/samples/client/petstore/php/SwaggerClient-php/tests/PetApiTest.php index 3af1064f7115..240f32eca4f9 100644 --- a/samples/client/petstore/php/SwaggerClient-php/tests/PetApiTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/tests/PetApiTest.php @@ -402,6 +402,13 @@ class PetApiTest extends \PHPUnit_Framework_TestCase $this->assertSame('Dog', $new_dog->getClassName()); } + // test if discriminator is initialized automatically + public function testDiscriminatorInitialization() + { + $new_dog = new Swagger\Client\Model\Dog(); + $this->assertSame('Dog', $new_dog->getClassName()); + } + } ?> diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index 9e99ae273702..4b158d765fb8 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -3,9 +3,9 @@ This is a sample server Petstore server. You can find out more about Swagger at This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: -- API verion: 1.0.0 -- Package version: -- Build date: 2016-03-30T17:18:44.943+08:00 +- API version: 1.0.0 +- Package version: 1.0.0 +- Build date: 2016-04-11T16:56:24.045+08:00 - Build package: class io.swagger.codegen.languages.PythonClientCodegen ## Requirements. @@ -20,9 +20,9 @@ If the python package is hosted on Github, you can install directly from Github ```sh pip install git+https://github.com/YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID.git ``` -(you may need to run the command with root permission: `sudo pip install git+https://github.com/YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID.git`) -Import the pacakge: +Then import the package: ```python import swagger_client ``` @@ -36,19 +36,11 @@ python setup.py install --user ``` (or `sudo python setup.py install` to install the package for all users) -Import the pacakge: +Then import the package: ```python import swagger_client ``` -### Manual Installation - -Download the latest release to the project folder (e.g. ./path/to/swagger_client) and import the package: - -```python -import path.to.swagger_client -``` - ## Getting Started Please follow the [installation procedure](#installation--usage) and then run the following: @@ -67,7 +59,7 @@ body = swagger_client.Pet() # Pet | Pet object that needs to be added to the sto try: # Add a new pet to the store - api_instance.add_pet(body=body); + api_instance.add_pet(body=body) except ApiException as e: print "Exception when calling PetApi->add_pet: %s\n" % e @@ -80,20 +72,20 @@ All URIs are relative to *http://petstore.swagger.io/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store -*PetApi* | [**add_pet_using_byte_array**](docs/PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store +*PetApi* | [**add_pet_using_byte_array**](docs/PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array=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 @@ -112,6 +104,7 @@ Class | Method | HTTP request | Description - [Cat](docs/Cat.md) - [Category](docs/Category.md) - [Dog](docs/Dog.md) + - [FormatTest](docs/FormatTest.md) - [InlineResponse200](docs/InlineResponse200.md) - [Model200Response](docs/Model200Response.md) - [ModelReturn](docs/ModelReturn.md) diff --git a/samples/client/petstore/python/docs/FormatTest.md b/samples/client/petstore/python/docs/FormatTest.md new file mode 100644 index 000000000000..00244bcbeaf9 --- /dev/null +++ b/samples/client/petstore/python/docs/FormatTest.md @@ -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** | **float** | | [optional] +**string** | **str** | | [optional] +**byte** | **str** | | [optional] +**binary** | **str** | | [optional] +**date** | **date** | | [optional] +**date_time** | **str** | | [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) + + diff --git a/samples/client/petstore/python/docs/Name.md b/samples/client/petstore/python/docs/Name.md index 26473221c327..905680a7d30c 100644 --- a/samples/client/petstore/python/docs/Name.md +++ b/samples/client/petstore/python/docs/Name.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **int** | | [optional] +**name** | **int** | | **snake_case** | **int** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python/docs/PetApi.md b/samples/client/petstore/python/docs/PetApi.md index 3349a3cb7d4b..e4c510c8ced0 100644 --- a/samples/client/petstore/python/docs/PetApi.md +++ b/samples/client/petstore/python/docs/PetApi.md @@ -1,17 +1,17 @@ -# swagger_client\PetApi +# swagger_client.PetApi All URIs are relative to *http://petstore.swagger.io/v2* Method | HTTP request | Description ------------- | ------------- | ------------- [**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store -[**add_pet_using_byte_array**](PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store +[**add_pet_using_byte_array**](PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array=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 @@ -26,11 +26,10 @@ Add a new pet to the store ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # Configure OAuth2 access token for authorization: petstore_auth swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -41,7 +40,7 @@ body = swagger_client.Pet() # Pet | Pet object that needs to be added to the sto try: # Add a new pet to the store - api_instance.add_pet(body=body); + api_instance.add_pet(body=body) except ApiException as e: print "Exception when calling PetApi->add_pet: %s\n" % e ``` @@ -76,11 +75,10 @@ Fake endpoint to test byte array in body parameter for adding a new pet to the s ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # Configure OAuth2 access token for authorization: petstore_auth swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -91,7 +89,7 @@ body = 'B' # str | Pet object in the form of byte array (optional) try: # Fake endpoint to test byte array in body parameter for adding a new pet to the store - api_instance.add_pet_using_byte_array(body=body); + api_instance.add_pet_using_byte_array(body=body) except ApiException as e: print "Exception when calling PetApi->add_pet_using_byte_array: %s\n" % e ``` @@ -126,11 +124,10 @@ Deletes a pet ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # Configure OAuth2 access token for authorization: petstore_auth swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -142,7 +139,7 @@ api_key = 'api_key_example' # str | (optional) try: # Deletes a pet - api_instance.delete_pet(pet_id, api_key=api_key); + api_instance.delete_pet(pet_id, api_key=api_key) except ApiException as e: print "Exception when calling PetApi->delete_pet: %s\n" % e ``` @@ -178,11 +175,10 @@ Multiple status values can be provided with comma separated strings ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # Configure OAuth2 access token for authorization: petstore_auth swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -193,7 +189,7 @@ status = ['available'] # list[str] | Status values that need to be considered fo try: # Finds Pets by status - api_response = api_instance.find_pets_by_status(status=status); + api_response = api_instance.find_pets_by_status(status=status) pprint(api_response) except ApiException as e: print "Exception when calling PetApi->find_pets_by_status: %s\n" % e @@ -229,11 +225,10 @@ Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # Configure OAuth2 access token for authorization: petstore_auth swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -244,7 +239,7 @@ tags = ['tags_example'] # list[str] | Tags to filter by (optional) try: # Finds Pets by tags - api_response = api_instance.find_pets_by_tags(tags=tags); + api_response = api_instance.find_pets_by_tags(tags=tags) pprint(api_response) except ApiException as e: print "Exception when calling PetApi->find_pets_by_tags: %s\n" % e @@ -280,14 +275,13 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # Configure API key authorization: api_key -swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'; +swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. BEARER) for API key, if needed # swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER' # Configure OAuth2 access token for authorization: petstore_auth @@ -299,7 +293,7 @@ pet_id = 789 # int | ID of pet that needs to be fetched try: # Find pet by ID - api_response = api_instance.get_pet_by_id(pet_id); + api_response = api_instance.get_pet_by_id(pet_id) pprint(api_response) except ApiException as e: print "Exception when calling PetApi->get_pet_by_id: %s\n" % e @@ -335,14 +329,13 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # Configure API key authorization: api_key -swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'; +swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. BEARER) for API key, if needed # swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER' # Configure OAuth2 access token for authorization: petstore_auth @@ -354,7 +347,7 @@ pet_id = 789 # int | ID of pet that needs to be fetched try: # Fake endpoint to test inline arbitrary object return by 'Find pet by ID' - api_response = api_instance.get_pet_by_id_in_object(pet_id); + api_response = api_instance.get_pet_by_id_in_object(pet_id) pprint(api_response) except ApiException as e: print "Exception when calling PetApi->get_pet_by_id_in_object: %s\n" % e @@ -390,14 +383,13 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # Configure API key authorization: api_key -swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'; +swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. BEARER) for API key, if needed # swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER' # Configure OAuth2 access token for authorization: petstore_auth @@ -409,7 +401,7 @@ pet_id = 789 # int | ID of pet that needs to be fetched try: # Fake endpoint to test byte array return by 'Find pet by ID' - api_response = api_instance.pet_pet_idtesting_byte_arraytrue_get(pet_id); + api_response = api_instance.pet_pet_idtesting_byte_arraytrue_get(pet_id) pprint(api_response) except ApiException as e: print "Exception when calling PetApi->pet_pet_idtesting_byte_arraytrue_get: %s\n" % e @@ -445,11 +437,10 @@ Update an existing pet ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # Configure OAuth2 access token for authorization: petstore_auth swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -460,7 +451,7 @@ body = swagger_client.Pet() # Pet | Pet object that needs to be added to the sto try: # Update an existing pet - api_instance.update_pet(body=body); + api_instance.update_pet(body=body) except ApiException as e: print "Exception when calling PetApi->update_pet: %s\n" % e ``` @@ -495,11 +486,10 @@ Updates a pet in the store with form data ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # Configure OAuth2 access token for authorization: petstore_auth swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -512,7 +502,7 @@ status = 'status_example' # str | Updated status of the pet (optional) try: # Updates a pet in the store with form data - api_instance.update_pet_with_form(pet_id, name=name, status=status); + api_instance.update_pet_with_form(pet_id, name=name, status=status) except ApiException as e: print "Exception when calling PetApi->update_pet_with_form: %s\n" % e ``` @@ -549,11 +539,10 @@ uploads an image ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # Configure OAuth2 access token for authorization: petstore_auth swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -566,7 +555,7 @@ file = '/path/to/file.txt' # file | file to upload (optional) try: # uploads an image - api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file); + api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file) except ApiException as e: print "Exception when calling PetApi->upload_file: %s\n" % e ``` diff --git a/samples/client/petstore/python/docs/StoreApi.md b/samples/client/petstore/python/docs/StoreApi.md index bbffc6e384be..c97cca97de5e 100644 --- a/samples/client/petstore/python/docs/StoreApi.md +++ b/samples/client/petstore/python/docs/StoreApi.md @@ -1,4 +1,4 @@ -# swagger_client\StoreApi +# swagger_client.StoreApi All URIs are relative to *http://petstore.swagger.io/v2* @@ -7,7 +7,7 @@ Method | HTTP request | Description [**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID [**find_orders_by_status**](StoreApi.md#find_orders_by_status) | **GET** /store/findByStatus | Finds orders by status [**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status -[**get_inventory_in_object**](StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by '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 @@ -21,11 +21,10 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # create an instance of the API class api_instance = swagger_client.StoreApi() @@ -33,7 +32,7 @@ order_id = 'order_id_example' # str | ID of the order that needs to be deleted try: # Delete purchase order by ID - api_instance.delete_order(order_id); + api_instance.delete_order(order_id) except ApiException as e: print "Exception when calling StoreApi->delete_order: %s\n" % e ``` @@ -68,18 +67,17 @@ A single status value can be provided as a string ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # Configure API key authorization: test_api_client_id -swagger_client.configuration.api_key['x-test_api_client_id'] = 'YOUR_API_KEY'; +swagger_client.configuration.api_key['x-test_api_client_id'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. BEARER) for API key, if needed # swagger_client.configuration.api_key_prefix['x-test_api_client_id'] = 'BEARER' # Configure API key authorization: test_api_client_secret -swagger_client.configuration.api_key['x-test_api_client_secret'] = 'YOUR_API_KEY'; +swagger_client.configuration.api_key['x-test_api_client_secret'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. BEARER) for API key, if needed # swagger_client.configuration.api_key_prefix['x-test_api_client_secret'] = 'BEARER' @@ -89,7 +87,7 @@ status = 'placed' # str | Status value that needs to be considered for query (op try: # Finds orders by status - api_response = api_instance.find_orders_by_status(status=status); + api_response = api_instance.find_orders_by_status(status=status) pprint(api_response) except ApiException as e: print "Exception when calling StoreApi->find_orders_by_status: %s\n" % e @@ -125,14 +123,13 @@ Returns a map of status codes to quantities ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # Configure API key authorization: api_key -swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'; +swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. BEARER) for API key, if needed # swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER' @@ -141,7 +138,7 @@ api_instance = swagger_client.StoreApi() try: # Returns pet inventories by status - api_response = api_instance.get_inventory(); + api_response = api_instance.get_inventory() pprint(api_response) except ApiException as e: print "Exception when calling StoreApi->get_inventory: %s\n" % e @@ -174,14 +171,13 @@ Returns an arbitrary object which is actually a map of status codes to quantitie ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # Configure API key authorization: api_key -swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'; +swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. BEARER) for API key, if needed # swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER' @@ -190,7 +186,7 @@ api_instance = swagger_client.StoreApi() try: # Fake endpoint to test arbitrary object return by 'Get inventory' - api_response = api_instance.get_inventory_in_object(); + api_response = api_instance.get_inventory_in_object() pprint(api_response) except ApiException as e: print "Exception when calling StoreApi->get_inventory_in_object: %s\n" % e @@ -223,18 +219,17 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # Configure API key authorization: test_api_key_header -swagger_client.configuration.api_key['test_api_key_header'] = 'YOUR_API_KEY'; +swagger_client.configuration.api_key['test_api_key_header'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. BEARER) for API key, if needed # swagger_client.configuration.api_key_prefix['test_api_key_header'] = 'BEARER' # Configure API key authorization: test_api_key_query -swagger_client.configuration.api_key['test_api_key_query'] = 'YOUR_API_KEY'; +swagger_client.configuration.api_key['test_api_key_query'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. BEARER) for API key, if needed # swagger_client.configuration.api_key_prefix['test_api_key_query'] = 'BEARER' @@ -244,7 +239,7 @@ order_id = 'order_id_example' # str | ID of pet that needs to be fetched try: # Find purchase order by ID - api_response = api_instance.get_order_by_id(order_id); + api_response = api_instance.get_order_by_id(order_id) pprint(api_response) except ApiException as e: print "Exception when calling StoreApi->get_order_by_id: %s\n" % e @@ -280,18 +275,17 @@ Place an order for a pet ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # Configure API key authorization: test_api_client_id -swagger_client.configuration.api_key['x-test_api_client_id'] = 'YOUR_API_KEY'; +swagger_client.configuration.api_key['x-test_api_client_id'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. BEARER) for API key, if needed # swagger_client.configuration.api_key_prefix['x-test_api_client_id'] = 'BEARER' # Configure API key authorization: test_api_client_secret -swagger_client.configuration.api_key['x-test_api_client_secret'] = 'YOUR_API_KEY'; +swagger_client.configuration.api_key['x-test_api_client_secret'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. BEARER) for API key, if needed # swagger_client.configuration.api_key_prefix['x-test_api_client_secret'] = 'BEARER' @@ -301,7 +295,7 @@ body = swagger_client.Order() # Order | order placed for purchasing the pet (opt try: # Place an order for a pet - api_response = api_instance.place_order(body=body); + api_response = api_instance.place_order(body=body) pprint(api_response) except ApiException as e: print "Exception when calling StoreApi->place_order: %s\n" % e diff --git a/samples/client/petstore/python/docs/UserApi.md b/samples/client/petstore/python/docs/UserApi.md index 8145147a6fff..7718eba6efec 100644 --- a/samples/client/petstore/python/docs/UserApi.md +++ b/samples/client/petstore/python/docs/UserApi.md @@ -1,4 +1,4 @@ -# swagger_client\UserApi +# swagger_client.UserApi All URIs are relative to *http://petstore.swagger.io/v2* @@ -23,11 +23,10 @@ This can only be done by the logged in user. ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # create an instance of the API class api_instance = swagger_client.UserApi() @@ -35,7 +34,7 @@ body = swagger_client.User() # User | Created user object (optional) try: # Create user - api_instance.create_user(body=body); + api_instance.create_user(body=body) except ApiException as e: print "Exception when calling UserApi->create_user: %s\n" % e ``` @@ -70,11 +69,10 @@ Creates list of users with given input array ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # create an instance of the API class api_instance = swagger_client.UserApi() @@ -82,7 +80,7 @@ body = [swagger_client.User()] # list[User] | List of user object (optional) try: # Creates list of users with given input array - api_instance.create_users_with_array_input(body=body); + api_instance.create_users_with_array_input(body=body) except ApiException as e: print "Exception when calling UserApi->create_users_with_array_input: %s\n" % e ``` @@ -117,11 +115,10 @@ Creates list of users with given input array ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # create an instance of the API class api_instance = swagger_client.UserApi() @@ -129,7 +126,7 @@ body = [swagger_client.User()] # list[User] | List of user object (optional) try: # Creates list of users with given input array - api_instance.create_users_with_list_input(body=body); + api_instance.create_users_with_list_input(body=body) except ApiException as e: print "Exception when calling UserApi->create_users_with_list_input: %s\n" % e ``` @@ -164,11 +161,10 @@ This can only be done by the logged in user. ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # Configure HTTP basic authorization: test_http_basic swagger_client.configuration.username = 'YOUR_USERNAME' @@ -180,7 +176,7 @@ username = 'username_example' # str | The name that needs to be deleted try: # Delete user - api_instance.delete_user(username); + api_instance.delete_user(username) except ApiException as e: print "Exception when calling UserApi->delete_user: %s\n" % e ``` @@ -215,19 +211,18 @@ Get user by user name ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # create an instance of the API class api_instance = swagger_client.UserApi() -username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. +username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing. try: # Get user by user name - api_response = api_instance.get_user_by_name(username); + api_response = api_instance.get_user_by_name(username) pprint(api_response) except ApiException as e: print "Exception when calling UserApi->get_user_by_name: %s\n" % e @@ -237,7 +232,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **username** | **str**| The name that needs to be fetched. Use user1 for testing. | + **username** | **str**| The name that needs to be fetched. Use user1 for testing. | ### Return type @@ -263,11 +258,10 @@ Logs user into the system ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # create an instance of the API class api_instance = swagger_client.UserApi() @@ -276,7 +270,7 @@ password = 'password_example' # str | The password for login in clear text (opti try: # Logs user into the system - api_response = api_instance.login_user(username=username, password=password); + api_response = api_instance.login_user(username=username, password=password) pprint(api_response) except ApiException as e: print "Exception when calling UserApi->login_user: %s\n" % e @@ -313,18 +307,17 @@ Logs out current logged in user session ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # create an instance of the API class api_instance = swagger_client.UserApi() try: # Logs out current logged in user session - api_instance.logout_user(); + api_instance.logout_user() except ApiException as e: print "Exception when calling UserApi->logout_user: %s\n" % e ``` @@ -356,11 +349,10 @@ This can only be done by the logged in user. ### Example ```python +import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint -import time - # create an instance of the API class api_instance = swagger_client.UserApi() @@ -369,7 +361,7 @@ body = swagger_client.User() # User | Updated user object (optional) try: # Updated user - api_instance.update_user(username, body=body); + api_instance.update_user(username, body=body) except ApiException as e: print "Exception when calling UserApi->update_user: %s\n" % e ``` diff --git a/samples/client/petstore/python/petstore b/samples/client/petstore/python/petstore new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/samples/client/petstore/python/setup.py b/samples/client/petstore/python/setup.py index 8564466b0dda..725510e4a017 100644 --- a/samples/client/petstore/python/setup.py +++ b/samples/client/petstore/python/setup.py @@ -28,7 +28,7 @@ setup( packages=find_packages(), include_package_data=True, long_description="""\ - This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters + This 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 """ ) diff --git a/samples/client/petstore/python/swagger_client.egg-info/PKG-INFO b/samples/client/petstore/python/swagger_client.egg-info/PKG-INFO index d4fe6f978b3f..da21dbff75f5 100644 --- a/samples/client/petstore/python/swagger_client.egg-info/PKG-INFO +++ b/samples/client/petstore/python/swagger_client.egg-info/PKG-INFO @@ -6,7 +6,7 @@ Home-page: UNKNOWN Author: UNKNOWN Author-email: apiteam@swagger.io License: UNKNOWN -Description: This is a sample server Petstore server. You can find out more about Swagger at <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 +Description: 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 Keywords: Swagger,Swagger Petstore Platform: UNKNOWN diff --git a/samples/client/petstore/python/swagger_client/__init__.py b/samples/client/petstore/python/swagger_client/__init__.py index dbdd791ada2c..9d8452e61511 100644 --- a/samples/client/petstore/python/swagger_client/__init__.py +++ b/samples/client/petstore/python/swagger_client/__init__.py @@ -5,6 +5,7 @@ from .models.animal import Animal from .models.cat import Cat from .models.category import Category from .models.dog import Dog +from .models.format_test import FormatTest from .models.inline_response_200 import InlineResponse200 from .models.model_200_response import Model200Response from .models.model_return import ModelReturn diff --git a/samples/client/petstore/python/swagger_client/apis/pet_api.py b/samples/client/petstore/python/swagger_client/apis/pet_api.py index 8b081e077dc6..2948960fa294 100644 --- a/samples/client/petstore/python/swagger_client/apis/pet_api.py +++ b/samples/client/petstore/python/swagger_client/apis/pet_api.py @@ -154,7 +154,7 @@ class PetApi(object): del params['kwargs'] - resource_path = '/pet?testing_byte_array=true'.replace('{format}', 'json') + resource_path = '/pet?testing_byte_array=true'.replace('{format}', 'json') path_params = {} query_params = {} @@ -536,7 +536,7 @@ class PetApi(object): if ('pet_id' not in params) or (params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id_in_object`") - resource_path = '/pet/{petId}?response=inline_arbitrary_object'.replace('{format}', 'json') + resource_path = '/pet/{petId}?response=inline_arbitrary_object'.replace('{format}', 'json') path_params = {} if 'pet_id' in params: path_params['petId'] = params['pet_id'] @@ -613,7 +613,7 @@ class PetApi(object): if ('pet_id' not in params) or (params['pet_id'] is None): raise ValueError("Missing the required parameter `pet_id` when calling `pet_pet_idtesting_byte_arraytrue_get`") - resource_path = '/pet/{petId}?testing_byte_array=true'.replace('{format}', 'json') + resource_path = '/pet/{petId}?testing_byte_array=true'.replace('{format}', 'json') path_params = {} if 'pet_id' in params: path_params['petId'] = params['pet_id'] diff --git a/samples/client/petstore/python/swagger_client/apis/store_api.py b/samples/client/petstore/python/swagger_client/apis/store_api.py index 85bb90ed40c6..4fb03ad471b5 100644 --- a/samples/client/petstore/python/swagger_client/apis/store_api.py +++ b/samples/client/petstore/python/swagger_client/apis/store_api.py @@ -301,7 +301,7 @@ class StoreApi(object): del params['kwargs'] - resource_path = '/store/inventory?response=arbitrary_object'.replace('{format}', 'json') + resource_path = '/store/inventory?response=arbitrary_object'.replace('{format}', 'json') path_params = {} query_params = {} diff --git a/samples/client/petstore/python/swagger_client/apis/user_api.py b/samples/client/petstore/python/swagger_client/apis/user_api.py index 07d976b0bf5e..774c99334f58 100644 --- a/samples/client/petstore/python/swagger_client/apis/user_api.py +++ b/samples/client/petstore/python/swagger_client/apis/user_api.py @@ -359,7 +359,7 @@ class UserApi(object): :param callback function: The callback function for asynchronous request. (optional) - :param str username: The name that needs to be fetched. Use user1 for testing. (required) + :param str username: The name that needs to be fetched. Use user1 for testing. (required) :return: User If the method is called asynchronously, returns the request thread. diff --git a/samples/client/petstore/python/swagger_client/models/__init__.py b/samples/client/petstore/python/swagger_client/models/__init__.py index c441500bc406..86feb9e52ba4 100644 --- a/samples/client/petstore/python/swagger_client/models/__init__.py +++ b/samples/client/petstore/python/swagger_client/models/__init__.py @@ -5,6 +5,7 @@ from .animal import Animal from .cat import Cat from .category import Category from .dog import Dog +from .format_test import FormatTest from .inline_response_200 import InlineResponse200 from .model_200_response import Model200Response from .model_return import ModelReturn diff --git a/samples/client/petstore/python/swagger_client/models/format_test.py b/samples/client/petstore/python/swagger_client/models/format_test.py new file mode 100644 index 000000000000..891b8fd0991d --- /dev/null +++ b/samples/client/petstore/python/swagger_client/models/format_test.py @@ -0,0 +1,370 @@ +# coding: utf-8 + +""" +Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Ref: https://github.com/swagger-api/swagger-codegen +""" + +from pprint import pformat +from six import iteritems + + +class FormatTest(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self): + """ + FormatTest - a model defined in Swagger + + :param dict swaggerTypes: The key is attribute name + and the value is attribute type. + :param dict attributeMap: The key is attribute name + and the value is json key in definition. + """ + self.swagger_types = { + 'integer': 'int', + 'int32': 'int', + 'int64': 'int', + 'number': 'float', + 'float': 'float', + 'double': 'float', + 'string': 'str', + 'byte': 'str', + 'binary': 'str', + 'date': 'date', + 'date_time': 'str' + } + + self.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' + } + + self._integer = None + self._int32 = None + self._int64 = None + self._number = None + self._float = None + self._double = None + self._string = None + self._byte = None + self._binary = None + self._date = None + self._date_time = None + + @property + def integer(self): + """ + Gets the integer of this FormatTest. + + + :return: The integer of this FormatTest. + :rtype: int + """ + return self._integer + + @integer.setter + def integer(self, integer): + """ + Sets the integer of this FormatTest. + + + :param integer: The integer of this FormatTest. + :type: int + """ + self._integer = integer + + @property + def int32(self): + """ + Gets the int32 of this FormatTest. + + + :return: The int32 of this FormatTest. + :rtype: int + """ + return self._int32 + + @int32.setter + def int32(self, int32): + """ + Sets the int32 of this FormatTest. + + + :param int32: The int32 of this FormatTest. + :type: int + """ + self._int32 = int32 + + @property + def int64(self): + """ + Gets the int64 of this FormatTest. + + + :return: The int64 of this FormatTest. + :rtype: int + """ + return self._int64 + + @int64.setter + def int64(self, int64): + """ + Sets the int64 of this FormatTest. + + + :param int64: The int64 of this FormatTest. + :type: int + """ + self._int64 = int64 + + @property + def number(self): + """ + Gets the number of this FormatTest. + + + :return: The number of this FormatTest. + :rtype: float + """ + return self._number + + @number.setter + def number(self, number): + """ + Sets the number of this FormatTest. + + + :param number: The number of this FormatTest. + :type: float + """ + self._number = number + + @property + def float(self): + """ + Gets the float of this FormatTest. + + + :return: The float of this FormatTest. + :rtype: float + """ + return self._float + + @float.setter + def float(self, float): + """ + Sets the float of this FormatTest. + + + :param float: The float of this FormatTest. + :type: float + """ + self._float = float + + @property + def double(self): + """ + Gets the double of this FormatTest. + + + :return: The double of this FormatTest. + :rtype: float + """ + return self._double + + @double.setter + def double(self, double): + """ + Sets the double of this FormatTest. + + + :param double: The double of this FormatTest. + :type: float + """ + self._double = double + + @property + def string(self): + """ + Gets the string of this FormatTest. + + + :return: The string of this FormatTest. + :rtype: str + """ + return self._string + + @string.setter + def string(self, string): + """ + Sets the string of this FormatTest. + + + :param string: The string of this FormatTest. + :type: str + """ + self._string = string + + @property + def byte(self): + """ + Gets the byte of this FormatTest. + + + :return: The byte of this FormatTest. + :rtype: str + """ + return self._byte + + @byte.setter + def byte(self, byte): + """ + Sets the byte of this FormatTest. + + + :param byte: The byte of this FormatTest. + :type: str + """ + self._byte = byte + + @property + def binary(self): + """ + Gets the binary of this FormatTest. + + + :return: The binary of this FormatTest. + :rtype: str + """ + return self._binary + + @binary.setter + def binary(self, binary): + """ + Sets the binary of this FormatTest. + + + :param binary: The binary of this FormatTest. + :type: str + """ + self._binary = binary + + @property + def date(self): + """ + Gets the date of this FormatTest. + + + :return: The date of this FormatTest. + :rtype: date + """ + return self._date + + @date.setter + def date(self, date): + """ + Sets the date of this FormatTest. + + + :param date: The date of this FormatTest. + :type: date + """ + self._date = date + + @property + def date_time(self): + """ + Gets the date_time of this FormatTest. + + + :return: The date_time of this FormatTest. + :rtype: str + """ + return self._date_time + + @date_time.setter + def date_time(self, date_time): + """ + Sets the date_time of this FormatTest. + + + :param date_time: The date_time of this FormatTest. + :type: str + """ + self._date_time = date_time + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other + diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index 9294e57a8829..a3a02dd11694 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -8,7 +8,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/ - API version: 1.0.0 - Package version: 1.0.0 -- Build date: 2016-04-09T17:50:53.781+08:00 +- Build date: 2016-04-11T17:03:41.311+08:00 - Build package: class io.swagger.codegen.languages.RubyClientCodegen ## Installation @@ -114,6 +114,7 @@ Class | Method | HTTP request | Description - [Petstore::Cat](docs/Cat.md) - [Petstore::Category](docs/Category.md) - [Petstore::Dog](docs/Dog.md) + - [Petstore::FormatTest](docs/FormatTest.md) - [Petstore::InlineResponse200](docs/InlineResponse200.md) - [Petstore::Model200Response](docs/Model200Response.md) - [Petstore::ModelReturn](docs/ModelReturn.md) diff --git a/samples/client/petstore/ruby/docs/FormatTest.md b/samples/client/petstore/ruby/docs/FormatTest.md new file mode 100644 index 000000000000..02c44df9b669 --- /dev/null +++ b/samples/client/petstore/ruby/docs/FormatTest.md @@ -0,0 +1,18 @@ +# Petstore::FormatTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Integer** | | [optional] +**int32** | **Integer** | | [optional] +**int64** | **Integer** | | [optional] +**number** | **Float** | | +**float** | **Float** | | [optional] +**double** | **Float** | | [optional] +**string** | **String** | | [optional] +**byte** | **String** | | [optional] +**binary** | **String** | | [optional] +**date** | **Date** | | [optional] +**date_time** | **String** | | [optional] + + diff --git a/samples/client/petstore/ruby/docs/Name.md b/samples/client/petstore/ruby/docs/Name.md index d4d89f6c4ce1..2864a67fbd3d 100644 --- a/samples/client/petstore/ruby/docs/Name.md +++ b/samples/client/petstore/ruby/docs/Name.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **Integer** | | [optional] +**name** | **Integer** | | **snake_case** | **Integer** | | [optional] diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index 4b848d0c3a0b..2232f05e8ba0 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -25,6 +25,7 @@ require 'petstore/models/animal' require 'petstore/models/cat' require 'petstore/models/category' require 'petstore/models/dog' +require 'petstore/models/format_test' require 'petstore/models/inline_response_200' require 'petstore/models/model_200_response' require 'petstore/models/model_return' diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb index 1de8e299b37a..abd167dfb6c4 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb @@ -34,7 +34,7 @@ module Petstore def self.swagger_types { :'class_name' => :'String', -:'declawed' => :'BOOLEAN' + :'declawed' => :'BOOLEAN' } end diff --git a/samples/client/petstore/ruby/lib/petstore/models/category.rb b/samples/client/petstore/ruby/lib/petstore/models/category.rb index cb7091dc7884..69f4b0394759 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/category.rb @@ -34,7 +34,7 @@ module Petstore def self.swagger_types { :'id' => :'Integer', -:'name' => :'String' + :'name' => :'String' } end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb index b0efe164eb78..04c88b9d7681 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb @@ -34,7 +34,7 @@ module Petstore def self.swagger_types { :'class_name' => :'String', -:'breed' => :'String' + :'breed' => :'String' } end diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb new file mode 100644 index 000000000000..c688c1f78419 --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -0,0 +1,255 @@ +=begin +Swagger Petstore + +This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters + +OpenAPI spec version: 1.0.0 +Contact: apiteam@swagger.io +Generated by: https://github.com/swagger-api/swagger-codegen.git + +License: Apache 2.0 +http://www.apache.org/licenses/LICENSE-2.0.html + +Terms of Service: http://swagger.io/terms/ + +=end + +require 'date' + +module Petstore + class FormatTest + attr_accessor :integer + + attr_accessor :int32 + + attr_accessor :int64 + + attr_accessor :number + + attr_accessor :float + + attr_accessor :double + + attr_accessor :string + + attr_accessor :byte + + attr_accessor :binary + + attr_accessor :date + + attr_accessor :date_time + + # Attribute mapping from ruby-style variable name to JSON key. + def self.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' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'integer' => :'Integer', + :'int32' => :'Integer', + :'int64' => :'Integer', + :'number' => :'Float', + :'float' => :'Float', + :'double' => :'Float', + :'string' => :'String', + :'byte' => :'String', + :'binary' => :'String', + :'date' => :'Date', + :'date_time' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes[:'integer'] + self.integer = attributes[:'integer'] + end + if attributes[:'int32'] + self.int32 = attributes[:'int32'] + end + if attributes[:'int64'] + self.int64 = attributes[:'int64'] + end + if attributes[:'number'] + self.number = attributes[:'number'] + end + if attributes[:'float'] + self.float = attributes[:'float'] + end + if attributes[:'double'] + self.double = attributes[:'double'] + end + if attributes[:'string'] + self.string = attributes[:'string'] + end + if attributes[:'byte'] + self.byte = attributes[:'byte'] + end + if attributes[:'binary'] + self.binary = attributes[:'binary'] + end + if attributes[:'date'] + self.date = attributes[:'date'] + end + if attributes[:'dateTime'] + self.date_time = attributes[:'dateTime'] + end + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + integer == o.integer && + int32 == o.int32 && + int64 == o.int64 && + number == o.number && + float == o.float && + double == o.double && + string == o.string && + byte == o.byte && + binary == o.binary && + date == o.date && + date_time == o.date_time + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [integer, int32, int64, number, float, double, string, byte, binary, date, date_time].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /^Array<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /^(true|t|yes|y|1)$/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = Petstore.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/samples/client/petstore/ruby/lib/petstore/models/inline_response_200.rb b/samples/client/petstore/ruby/lib/petstore/models/inline_response_200.rb index 3b75ff5e41ee..a3a44b28cfef 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/inline_response_200.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/inline_response_200.rb @@ -47,11 +47,11 @@ module Petstore def self.swagger_types { :'tags' => :'Array', -:'id' => :'Integer', -:'category' => :'Object', -:'status' => :'String', -:'name' => :'String', -:'photo_urls' => :'Array' + :'id' => :'Integer', + :'category' => :'Object', + :'status' => :'String', + :'name' => :'String', + :'photo_urls' => :'Array' } end diff --git a/samples/client/petstore/ruby/lib/petstore/models/name.rb b/samples/client/petstore/ruby/lib/petstore/models/name.rb index 35ed30e193cc..c0ebf37971ba 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb @@ -35,7 +35,7 @@ module Petstore def self.swagger_types { :'name' => :'Integer', -:'snake_case' => :'Integer' + :'snake_case' => :'Integer' } end diff --git a/samples/client/petstore/ruby/lib/petstore/models/order.rb b/samples/client/petstore/ruby/lib/petstore/models/order.rb index 223d748e9900..86bc4f16197e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb @@ -47,11 +47,11 @@ module Petstore def self.swagger_types { :'id' => :'Integer', -:'pet_id' => :'Integer', -:'quantity' => :'Integer', -:'ship_date' => :'DateTime', -:'status' => :'String', -:'complete' => :'BOOLEAN' + :'pet_id' => :'Integer', + :'quantity' => :'Integer', + :'ship_date' => :'DateTime', + :'status' => :'String', + :'complete' => :'BOOLEAN' } end diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb index 07c5ee9d75bc..13c0291bb355 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb @@ -47,11 +47,11 @@ module Petstore def self.swagger_types { :'id' => :'Integer', -:'category' => :'Category', -:'name' => :'String', -:'photo_urls' => :'Array', -:'tags' => :'Array', -:'status' => :'String' + :'category' => :'Category', + :'name' => :'String', + :'photo_urls' => :'Array', + :'tags' => :'Array', + :'status' => :'String' } end diff --git a/samples/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/client/petstore/ruby/lib/petstore/models/tag.rb index c1a07d1b5e67..3a7bc3b53a7b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb @@ -34,7 +34,7 @@ module Petstore def self.swagger_types { :'id' => :'Integer', -:'name' => :'String' + :'name' => :'String' } end diff --git a/samples/client/petstore/ruby/lib/petstore/models/user.rb b/samples/client/petstore/ruby/lib/petstore/models/user.rb index 8e0c4fc99dba..2ef984493e90 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb @@ -53,13 +53,13 @@ module Petstore def self.swagger_types { :'id' => :'Integer', -:'username' => :'String', -:'first_name' => :'String', -:'last_name' => :'String', -:'email' => :'String', -:'password' => :'String', -:'phone' => :'String', -:'user_status' => :'Integer' + :'username' => :'String', + :'first_name' => :'String', + :'last_name' => :'String', + :'email' => :'String', + :'password' => :'String', + :'phone' => :'String', + :'user_status' => :'Integer' } end diff --git a/samples/client/petstore/ruby/spec/models/format_test_spec.rb b/samples/client/petstore/ruby/spec/models/format_test_spec.rb new file mode 100644 index 000000000000..e59d956fd37c --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/format_test_spec.rb @@ -0,0 +1,150 @@ +=begin +Swagger Petstore + +This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters + +OpenAPI spec version: 1.0.0 +Contact: apiteam@swagger.io +Generated by: https://github.com/swagger-api/swagger-codegen.git + +License: Apache 2.0 +http://www.apache.org/licenses/LICENSE-2.0.html + +Terms of Service: http://swagger.io/terms/ + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::FormatTest +# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) +# Please update as you see appropriate +describe 'FormatTest' do + before do + # run before each test + @instance = Petstore::FormatTest.new + end + + after do + # run after each test + end + + describe 'test an instance of FormatTest' do + it 'should create an instact of FormatTest' do + @instance.should be_a(Petstore::FormatTest) + end + end + describe 'test attribute "integer"' do + it 'should work' do + # assertion here + # should be_a() + # should be_nil + # should == + # should_not == + end + end + + describe 'test attribute "int32"' do + it 'should work' do + # assertion here + # should be_a() + # should be_nil + # should == + # should_not == + end + end + + describe 'test attribute "int64"' do + it 'should work' do + # assertion here + # should be_a() + # should be_nil + # should == + # should_not == + end + end + + describe 'test attribute "number"' do + it 'should work' do + # assertion here + # should be_a() + # should be_nil + # should == + # should_not == + end + end + + describe 'test attribute "float"' do + it 'should work' do + # assertion here + # should be_a() + # should be_nil + # should == + # should_not == + end + end + + describe 'test attribute "double"' do + it 'should work' do + # assertion here + # should be_a() + # should be_nil + # should == + # should_not == + end + end + + describe 'test attribute "string"' do + it 'should work' do + # assertion here + # should be_a() + # should be_nil + # should == + # should_not == + end + end + + describe 'test attribute "byte"' do + it 'should work' do + # assertion here + # should be_a() + # should be_nil + # should == + # should_not == + end + end + + describe 'test attribute "binary"' do + it 'should work' do + # assertion here + # should be_a() + # should be_nil + # should == + # should_not == + end + end + + describe 'test attribute "date"' do + it 'should work' do + # assertion here + # should be_a() + # should be_nil + # should == + # should_not == + end + end + + describe 'test attribute "date_time"' do + it 'should work' do + # assertion here + # should be_a() + # should be_nil + # should == + # should_not == + end + end + +end + diff --git a/samples/client/petstore/scala/pom.xml b/samples/client/petstore/scala/pom.xml index c700bebfc83e..5b036cd8fc14 100644 --- a/samples/client/petstore/scala/pom.xml +++ b/samples/client/petstore/scala/pom.xml @@ -210,7 +210,7 @@ 1.2 2.2 1.19 - 1.5.7 + 1.5.8 1.0.5 1.0.0 2.4.2 diff --git a/samples/client/petstore/scala/src/main/scala/io/swagger/client/api/PetApi.scala b/samples/client/petstore/scala/src/main/scala/io/swagger/client/api/PetApi.scala index c52f7159e4ca..7028969b90f0 100644 --- a/samples/client/petstore/scala/src/main/scala/io/swagger/client/api/PetApi.scala +++ b/samples/client/petstore/scala/src/main/scala/io/swagger/client/api/PetApi.scala @@ -23,7 +23,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", def addHeader(key: String, value: String) = apiInvoker.defaultHeaders += key -> value - /** * Add a new pet to the store * @@ -33,7 +32,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", def addPet (body: Pet) = { // create path and map variables val path = "/pet".replaceAll("\\{format\\}","json") - val contentTypes = List("application/json", "application/xml", "application/json") val contentType = contentTypes(0) @@ -42,12 +40,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = body if(contentType.startsWith("multipart/form-data")) { @@ -56,21 +51,18 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => - - case _ => None + case _ => None } } catch { case ex: ApiException if ex.code == 404 => None case ex: ApiException => throw ex } } - /** * Fake endpoint to test byte array in body parameter for adding a new pet to the store * @@ -79,8 +71,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", */ def addPetUsingByteArray (body: String) = { // create path and map variables - val path = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json") - + val path = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json") val contentTypes = List("application/json", "application/xml", "application/json") val contentType = contentTypes(0) @@ -89,12 +80,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = body if(contentType.startsWith("multipart/form-data")) { @@ -103,21 +91,18 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => - - case _ => None + case _ => None } } catch { case ex: ApiException if ex.code == 404 => None case ex: ApiException => throw ex } } - /** * Deletes a pet * @@ -129,7 +114,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", // create path and map variables val path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId)) - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -139,12 +123,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - - - + headerParams += "api_key" -> apiKey - var postBody: AnyRef = null @@ -154,21 +135,18 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => - - case _ => None + case _ => None } } catch { case ex: ApiException if ex.code == 404 => None case ex: ApiException => throw ex } } - /** * Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -178,7 +156,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", def findPetsByStatus (status: List[String] /* = available */) : Option[List[Pet]] = { // create path and map variables val path = "/pet/findByStatus".replaceAll("\\{format\\}","json") - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -187,13 +164,10 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - if(String.valueOf(status) != "null") queryParams += "status" -> status.toString - - var postBody: AnyRef = null if(contentType.startsWith("multipart/form-data")) { @@ -202,14 +176,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => Some(ApiInvoker.deserialize(s, "array", classOf[Pet]).asInstanceOf[List[Pet]]) - case _ => None } } catch { @@ -217,7 +189,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", case ex: ApiException => throw ex } } - /** * Finds Pets by tags * Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing. @@ -227,7 +198,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", def findPetsByTags (tags: List[String]) : Option[List[Pet]] = { // create path and map variables val path = "/pet/findByTags".replaceAll("\\{format\\}","json") - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -236,13 +206,10 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - if(String.valueOf(tags) != "null") queryParams += "tags" -> tags.toString - - var postBody: AnyRef = null if(contentType.startsWith("multipart/form-data")) { @@ -251,14 +218,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => Some(ApiInvoker.deserialize(s, "array", classOf[Pet]).asInstanceOf[List[Pet]]) - case _ => None } } catch { @@ -266,7 +231,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", case ex: ApiException => throw ex } } - /** * Find pet by ID * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions @@ -277,7 +241,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", // create path and map variables val path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId)) - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -287,12 +250,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = null if(contentType.startsWith("multipart/form-data")) { @@ -301,14 +261,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => Some(ApiInvoker.deserialize(s, "", classOf[Pet]).asInstanceOf[Pet]) - case _ => None } } catch { @@ -316,7 +274,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", case ex: ApiException => throw ex } } - /** * Fake endpoint to test inline arbitrary object return by 'Find pet by ID' * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions @@ -325,9 +282,8 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", */ def getPetByIdInObject (petId: Long) : Option[InlineResponse200] = { // create path and map variables - val path = "/pet/{petId}?response=inline_arbitrary_object".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId)) + val path = "/pet/{petId}?response=inline_arbitrary_object".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId)) - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -337,12 +293,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = null if(contentType.startsWith("multipart/form-data")) { @@ -351,14 +304,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => Some(ApiInvoker.deserialize(s, "", classOf[InlineResponse200]).asInstanceOf[InlineResponse200]) - case _ => None } } catch { @@ -366,7 +317,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", case ex: ApiException => throw ex } } - /** * Fake endpoint to test byte array return by 'Find pet by ID' * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions @@ -375,9 +325,8 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", */ def petPetIdtestingByteArraytrueGet (petId: Long) : Option[String] = { // create path and map variables - val path = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId)) + val path = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId)) - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -387,12 +336,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = null if(contentType.startsWith("multipart/form-data")) { @@ -401,14 +347,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => Some(ApiInvoker.deserialize(s, "", classOf[String]).asInstanceOf[String]) - case _ => None } } catch { @@ -416,7 +360,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", case ex: ApiException => throw ex } } - /** * Update an existing pet * @@ -426,7 +369,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", def updatePet (body: Pet) = { // create path and map variables val path = "/pet".replaceAll("\\{format\\}","json") - val contentTypes = List("application/json", "application/xml", "application/json") val contentType = contentTypes(0) @@ -435,12 +377,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = body if(contentType.startsWith("multipart/form-data")) { @@ -449,21 +388,18 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "PUT", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => - - case _ => None + case _ => None } } catch { case ex: ApiException if ex.code == 404 => None case ex: ApiException => throw ex } } - /** * Updates a pet in the store with form data * @@ -476,7 +412,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", // create path and map variables val path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId)) - val contentTypes = List("application/x-www-form-urlencoded", "application/json") val contentType = contentTypes(0) @@ -486,12 +421,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = null if(contentType.startsWith("multipart/form-data")) { @@ -505,22 +437,19 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", } else { formParams += "name" -> name.toString() - formParams += "status" -> status.toString() - +formParams += "status" -> status.toString() } try { apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => - - case _ => None + case _ => None } } catch { case ex: ApiException if ex.code == 404 => None case ex: ApiException => throw ex } } - /** * uploads an image * @@ -533,7 +462,6 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", // create path and map variables val path = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId)) - val contentTypes = List("multipart/form-data", "application/json") val contentType = contentTypes(0) @@ -543,12 +471,9 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = null if(contentType.startsWith("multipart/form-data")) { @@ -563,20 +488,17 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2", } else { formParams += "additionalMetadata" -> additionalMetadata.toString() - - + } try { apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => - - case _ => None + case _ => None } } catch { case ex: ApiException if ex.code == 404 => None case ex: ApiException => throw ex } } - } diff --git a/samples/client/petstore/scala/src/main/scala/io/swagger/client/api/StoreApi.scala b/samples/client/petstore/scala/src/main/scala/io/swagger/client/api/StoreApi.scala index 388c612976f0..566dbc42c123 100644 --- a/samples/client/petstore/scala/src/main/scala/io/swagger/client/api/StoreApi.scala +++ b/samples/client/petstore/scala/src/main/scala/io/swagger/client/api/StoreApi.scala @@ -21,7 +21,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", def addHeader(key: String, value: String) = apiInvoker.defaultHeaders += key -> value - /** * Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -32,7 +31,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", // create path and map variables val path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}",apiInvoker.escape(orderId)) - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -42,12 +40,9 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = null if(contentType.startsWith("multipart/form-data")) { @@ -56,21 +51,18 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => - - case _ => None + case _ => None } } catch { case ex: ApiException if ex.code == 404 => None case ex: ApiException => throw ex } } - /** * Finds orders by status * A single status value can be provided as a string @@ -80,7 +72,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", def findOrdersByStatus (status: String /* = placed */) : Option[List[Order]] = { // create path and map variables val path = "/store/findByStatus".replaceAll("\\{format\\}","json") - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -89,13 +80,10 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - if(String.valueOf(status) != "null") queryParams += "status" -> status.toString - - var postBody: AnyRef = null if(contentType.startsWith("multipart/form-data")) { @@ -104,14 +92,12 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => Some(ApiInvoker.deserialize(s, "array", classOf[Order]).asInstanceOf[List[Order]]) - case _ => None } } catch { @@ -119,7 +105,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", case ex: ApiException => throw ex } } - /** * Returns pet inventories by status * Returns a map of status codes to quantities @@ -128,7 +113,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", def getInventory () : Option[Map[String, Integer]] = { // create path and map variables val path = "/store/inventory".replaceAll("\\{format\\}","json") - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -137,12 +121,9 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = null if(contentType.startsWith("multipart/form-data")) { @@ -151,14 +132,12 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => Some(ApiInvoker.deserialize(s, "map", classOf[Integer]).asInstanceOf[Map[String, Integer]]) - case _ => None } } catch { @@ -166,7 +145,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", case ex: ApiException => throw ex } } - /** * Fake endpoint to test arbitrary object return by 'Get inventory' * Returns an arbitrary object which is actually a map of status codes to quantities @@ -174,8 +152,7 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", */ def getInventoryInObject () : Option[Any] = { // create path and map variables - val path = "/store/inventory?response=arbitrary_object".replaceAll("\\{format\\}","json") - + val path = "/store/inventory?response=arbitrary_object".replaceAll("\\{format\\}","json") val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -184,12 +161,9 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = null if(contentType.startsWith("multipart/form-data")) { @@ -198,14 +172,12 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => Some(ApiInvoker.deserialize(s, "", classOf[Any]).asInstanceOf[Any]) - case _ => None } } catch { @@ -213,10 +185,9 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", case ex: ApiException => throw ex } } - /** * Find purchase order by ID - * For valid response try integer IDs with value <= 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 * @return Order */ @@ -224,7 +195,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", // create path and map variables val path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}",apiInvoker.escape(orderId)) - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -234,12 +204,9 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = null if(contentType.startsWith("multipart/form-data")) { @@ -248,14 +215,12 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => Some(ApiInvoker.deserialize(s, "", classOf[Order]).asInstanceOf[Order]) - case _ => None } } catch { @@ -263,7 +228,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", case ex: ApiException => throw ex } } - /** * Place an order for a pet * @@ -273,7 +237,6 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", def placeOrder (body: Order) : Option[Order] = { // create path and map variables val path = "/store/order".replaceAll("\\{format\\}","json") - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -282,12 +245,9 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = body if(contentType.startsWith("multipart/form-data")) { @@ -296,14 +256,12 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => Some(ApiInvoker.deserialize(s, "", classOf[Order]).asInstanceOf[Order]) - case _ => None } } catch { @@ -311,5 +269,4 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2", case ex: ApiException => throw ex } } - } diff --git a/samples/client/petstore/scala/src/main/scala/io/swagger/client/api/UserApi.scala b/samples/client/petstore/scala/src/main/scala/io/swagger/client/api/UserApi.scala index e68922f3cce8..b15e6973d3c0 100644 --- a/samples/client/petstore/scala/src/main/scala/io/swagger/client/api/UserApi.scala +++ b/samples/client/petstore/scala/src/main/scala/io/swagger/client/api/UserApi.scala @@ -21,7 +21,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", def addHeader(key: String, value: String) = apiInvoker.defaultHeaders += key -> value - /** * Create user * This can only be done by the logged in user. @@ -31,7 +30,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", def createUser (body: User) = { // create path and map variables val path = "/user".replaceAll("\\{format\\}","json") - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -40,12 +38,9 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = body if(contentType.startsWith("multipart/form-data")) { @@ -54,21 +49,18 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => - - case _ => None + case _ => None } } catch { case ex: ApiException if ex.code == 404 => None case ex: ApiException => throw ex } } - /** * Creates list of users with given input array * @@ -78,7 +70,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", def createUsersWithArrayInput (body: List[User]) = { // create path and map variables val path = "/user/createWithArray".replaceAll("\\{format\\}","json") - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -87,12 +78,9 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = body if(contentType.startsWith("multipart/form-data")) { @@ -101,21 +89,18 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => - - case _ => None + case _ => None } } catch { case ex: ApiException if ex.code == 404 => None case ex: ApiException => throw ex } } - /** * Creates list of users with given input array * @@ -125,7 +110,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", def createUsersWithListInput (body: List[User]) = { // create path and map variables val path = "/user/createWithList".replaceAll("\\{format\\}","json") - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -134,12 +118,9 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = body if(contentType.startsWith("multipart/form-data")) { @@ -148,21 +129,18 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "POST", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => - - case _ => None + case _ => None } } catch { case ex: ApiException if ex.code == 404 => None case ex: ApiException => throw ex } } - /** * Delete user * This can only be done by the logged in user. @@ -173,7 +151,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", // create path and map variables val path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}",apiInvoker.escape(username)) - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -183,12 +160,9 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = null if(contentType.startsWith("multipart/form-data")) { @@ -197,32 +171,28 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "DELETE", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => - - case _ => None + case _ => None } } catch { case ex: ApiException if ex.code == 404 => None case ex: ApiException => throw ex } } - /** * Get user by user name * - * @param username The name that needs to be fetched. Use user1 for testing. + * @param username The name that needs to be fetched. Use user1 for testing. * @return User */ def getUserByName (username: String) : Option[User] = { // create path and map variables val path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}",apiInvoker.escape(username)) - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -232,12 +202,9 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = null if(contentType.startsWith("multipart/form-data")) { @@ -246,14 +213,12 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => Some(ApiInvoker.deserialize(s, "", classOf[User]).asInstanceOf[User]) - case _ => None } } catch { @@ -261,7 +226,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", case ex: ApiException => throw ex } } - /** * Logs user into the system * @@ -272,7 +236,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", def loginUser (username: String, password: String) : Option[String] = { // create path and map variables val path = "/user/login".replaceAll("\\{format\\}","json") - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -281,14 +244,11 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - if(String.valueOf(username) != "null") queryParams += "username" -> username.toString - if(String.valueOf(password) != "null") queryParams += "password" -> password.toString +if(String.valueOf(password) != "null") queryParams += "password" -> password.toString - - var postBody: AnyRef = null if(contentType.startsWith("multipart/form-data")) { @@ -297,14 +257,12 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => Some(ApiInvoker.deserialize(s, "", classOf[String]).asInstanceOf[String]) - case _ => None } } catch { @@ -312,7 +270,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", case ex: ApiException => throw ex } } - /** * Logs out current logged in user session * @@ -321,7 +278,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", def logoutUser () = { // create path and map variables val path = "/user/logout".replaceAll("\\{format\\}","json") - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -330,12 +286,9 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = null if(contentType.startsWith("multipart/form-data")) { @@ -344,21 +297,18 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "GET", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => - - case _ => None + case _ => None } } catch { case ex: ApiException if ex.code == 404 => None case ex: ApiException => throw ex } } - /** * Updated user * This can only be done by the logged in user. @@ -370,7 +320,6 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", // create path and map variables val path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}",apiInvoker.escape(username)) - val contentTypes = List("application/json") val contentType = contentTypes(0) @@ -380,12 +329,9 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", val headerParams = new HashMap[String, String] val formParams = new HashMap[String, String] - + - - - var postBody: AnyRef = body if(contentType.startsWith("multipart/form-data")) { @@ -394,19 +340,16 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2", postBody = mp } else { - - } + } try { apiInvoker.invokeApi(basePath, path, "PUT", queryParams.toMap, formParams.toMap, postBody, headerParams.toMap, contentType) match { case s: String => - - case _ => None + case _ => None } } catch { case ex: ApiException if ex.code == 404 => None case ex: ApiException => throw ex } } - } diff --git a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Category.scala b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Category.scala index 122411e3ff7d..f11e76cfb5a1 100644 --- a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Category.scala +++ b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Category.scala @@ -5,5 +5,4 @@ package io.swagger.client.model case class Category ( id: Long, - name: String) - +name: String) diff --git a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/InlineResponse200.scala b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/InlineResponse200.scala index e13f63eeefbf..874afe3d55ab 100644 --- a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/InlineResponse200.scala +++ b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/InlineResponse200.scala @@ -5,10 +5,9 @@ package io.swagger.client.model case class InlineResponse200 ( tags: List[Tag], - id: Long, - category: Any, - /* pet status in the store */ +id: Long, +category: Any, +/* pet status in the store */ status: String, - name: String, - photoUrls: List[String]) - +name: String, +photoUrls: List[String]) diff --git a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Model200Response.scala b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Model200Response.scala index 68601a84e1a6..1be66a217a2f 100644 --- a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Model200Response.scala +++ b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Model200Response.scala @@ -5,4 +5,3 @@ package io.swagger.client.model case class Model200Response ( name: Integer) - diff --git a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/ModelReturn.scala b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/ModelReturn.scala index e4ac8eb1ea7a..93425065d390 100644 --- a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/ModelReturn.scala +++ b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/ModelReturn.scala @@ -5,4 +5,3 @@ package io.swagger.client.model case class ModelReturn ( _return: Integer) - diff --git a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Name.scala b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Name.scala index 854a11e6088f..01b20e827b61 100644 --- a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Name.scala +++ b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Name.scala @@ -4,5 +4,5 @@ package io.swagger.client.model case class Name ( - name: Integer) - + name: Integer, +snakeCase: Integer) diff --git a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Order.scala b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Order.scala index 845fe32c9731..105db7ea9502 100644 --- a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Order.scala +++ b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Order.scala @@ -6,10 +6,9 @@ import org.joda.time.DateTime case class Order ( id: Long, - petId: Long, - quantity: Integer, - shipDate: DateTime, - /* Order Status */ +petId: Long, +quantity: Integer, +shipDate: DateTime, +/* Order Status */ status: String, - complete: Boolean) - +complete: Boolean) diff --git a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Pet.scala b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Pet.scala index 30dc87509761..1c3eb94ec29e 100644 --- a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Pet.scala +++ b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Pet.scala @@ -5,10 +5,9 @@ package io.swagger.client.model case class Pet ( id: Long, - category: Category, - name: String, - photoUrls: List[String], - tags: List[Tag], - /* pet status in the store */ +category: Category, +name: String, +photoUrls: List[String], +tags: List[Tag], +/* pet status in the store */ status: String) - diff --git a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/SpecialModelName.scala b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/SpecialModelName.scala index 2fee09a7f7c3..f934822dc802 100644 --- a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/SpecialModelName.scala +++ b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/SpecialModelName.scala @@ -5,4 +5,3 @@ package io.swagger.client.model case class SpecialModelName ( specialPropertyName: Long) - diff --git a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Tag.scala b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Tag.scala index b0b75d4a96c7..bee652081371 100644 --- a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Tag.scala +++ b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/Tag.scala @@ -5,5 +5,4 @@ package io.swagger.client.model case class Tag ( id: Long, - name: String) - +name: String) diff --git a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/User.scala b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/User.scala index 125147c0ae08..51844e211423 100644 --- a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/User.scala +++ b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/User.scala @@ -5,12 +5,11 @@ package io.swagger.client.model case class User ( id: Long, - username: String, - firstName: String, - lastName: String, - email: String, - password: String, - phone: String, - /* User Status */ +username: String, +firstName: String, +lastName: String, +email: String, +password: String, +phone: String, +/* User Status */ userStatus: Integer) - diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift index a76f0352f52a..347ccf23554f 100644 --- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift +++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift @@ -12,7 +12,6 @@ import PromiseKit public class PetAPI: APIBase { /** - Add a new pet to the store - parameter body: (body) Pet object that needs to be added to the store (optional) @@ -25,7 +24,6 @@ public class PetAPI: APIBase { } /** - Add a new pet to the store - parameter body: (body) Pet object that needs to be added to the store (optional) @@ -44,9 +42,7 @@ public class PetAPI: APIBase { } /** - Add a new pet to the store - - POST /pet - - OAuth: @@ -60,7 +56,6 @@ public class PetAPI: APIBase { public class func addPetWithRequestBuilder(body body: Pet?) -> RequestBuilder { let path = "/pet" let URLString = PetstoreClientAPI.basePath + path - let parameters = body?.encodeToJSON() as? [String:AnyObject] let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -69,7 +64,6 @@ public class PetAPI: APIBase { } /** - Fake endpoint to test byte array in body parameter for adding a new pet to the store - parameter body: (body) Pet object in the form of byte array (optional) @@ -82,7 +76,6 @@ public class PetAPI: APIBase { } /** - Fake endpoint to test byte array in body parameter for adding a new pet to the store - parameter body: (body) Pet object in the form of byte array (optional) @@ -101,10 +94,8 @@ public class PetAPI: APIBase { } /** - Fake endpoint to test byte array in body parameter for adding a new pet to the store - - - POST /pet?testing_byte_array=true + - POST /pet?testing_byte_array=true - - OAuth: - type: oauth2 @@ -115,9 +106,8 @@ public class PetAPI: APIBase { - returns: RequestBuilder */ public class func addPetUsingByteArrayWithRequestBuilder(body body: String?) -> RequestBuilder { - let path = "/pet?testing_byte_array=true" + let path = "/pet?testing_byte_array=true" let URLString = PetstoreClientAPI.basePath + path - let parameters = body?.encodeToJSON() as? [String:AnyObject] let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -126,7 +116,6 @@ public class PetAPI: APIBase { } /** - Deletes a pet - parameter petId: (path) Pet id to delete @@ -139,7 +128,6 @@ public class PetAPI: APIBase { } /** - Deletes a pet - parameter petId: (path) Pet id to delete @@ -158,9 +146,7 @@ public class PetAPI: APIBase { } /** - Deletes a pet - - DELETE /pet/{petId} - - OAuth: @@ -175,7 +161,7 @@ public class PetAPI: APIBase { var path = "/pet/{petId}" path = path.stringByReplacingOccurrencesOfString("{petId}", withString: "\(petId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - + let nillableParameters: [String:AnyObject?] = [:] let parameters = APIHelper.rejectNil(nillableParameters) @@ -185,7 +171,6 @@ public class PetAPI: APIBase { } /** - Finds Pets by status - parameter status: (query) Status values that need to be considered for query (optional, default to available) @@ -198,7 +183,6 @@ public class PetAPI: APIBase { } /** - Finds Pets by status - parameter status: (query) Status values that need to be considered for query (optional, default to available) @@ -217,28 +201,26 @@ public class PetAPI: APIBase { } /** - Finds Pets by status - - GET /pet/findByStatus - Multiple status values can be provided with comma separated strings - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{contentType=application/json, example=[ { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", + - examples: [{example=[ { + "tags" : [ { + "id" : 123456789, + "name" : "aeiou" + } ], "id" : 123456789, "category" : { - "name" : "aeiou", - "id" : 123456789 + "id" : 123456789, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 123456789 - } ], - "status" : "aeiou" -} ]}, {contentType=application/xml, example= + "status" : "aeiou", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +} ], contentType=application/json}, {example= 123456 doggie @@ -247,21 +229,21 @@ public class PetAPI: APIBase { string -}] - - examples: [{contentType=application/json, example=[ { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}] + - examples: [{example=[ { + "tags" : [ { + "id" : 123456789, + "name" : "aeiou" + } ], "id" : 123456789, "category" : { - "name" : "aeiou", - "id" : 123456789 + "id" : 123456789, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 123456789 - } ], - "status" : "aeiou" -} ]}, {contentType=application/xml, example= + "status" : "aeiou", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +} ], contentType=application/json}, {example= 123456 doggie @@ -270,7 +252,7 @@ public class PetAPI: APIBase { string -}] +, contentType=application/xml}] - parameter status: (query) Status values that need to be considered for query (optional, default to available) @@ -279,7 +261,7 @@ public class PetAPI: APIBase { public class func findPetsByStatusWithRequestBuilder(status status: [String]?) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - + let nillableParameters: [String:AnyObject?] = [ "status": status ] @@ -291,7 +273,6 @@ public class PetAPI: APIBase { } /** - Finds Pets by tags - parameter tags: (query) Tags to filter by (optional) @@ -304,7 +285,6 @@ public class PetAPI: APIBase { } /** - Finds Pets by tags - parameter tags: (query) Tags to filter by (optional) @@ -323,28 +303,26 @@ public class PetAPI: APIBase { } /** - Finds Pets by tags - - GET /pet/findByTags - Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing. - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{contentType=application/json, example=[ { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", + - examples: [{example=[ { + "tags" : [ { + "id" : 123456789, + "name" : "aeiou" + } ], "id" : 123456789, "category" : { - "name" : "aeiou", - "id" : 123456789 + "id" : 123456789, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 123456789 - } ], - "status" : "aeiou" -} ]}, {contentType=application/xml, example= + "status" : "aeiou", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +} ], contentType=application/json}, {example= 123456 doggie @@ -353,21 +331,21 @@ public class PetAPI: APIBase { string -}] - - examples: [{contentType=application/json, example=[ { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}] + - examples: [{example=[ { + "tags" : [ { + "id" : 123456789, + "name" : "aeiou" + } ], "id" : 123456789, "category" : { - "name" : "aeiou", - "id" : 123456789 + "id" : 123456789, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 123456789 - } ], - "status" : "aeiou" -} ]}, {contentType=application/xml, example= + "status" : "aeiou", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +} ], contentType=application/json}, {example= 123456 doggie @@ -376,7 +354,7 @@ public class PetAPI: APIBase { string -}] +, contentType=application/xml}] - parameter tags: (query) Tags to filter by (optional) @@ -385,7 +363,7 @@ public class PetAPI: APIBase { public class func findPetsByTagsWithRequestBuilder(tags tags: [String]?) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - + let nillableParameters: [String:AnyObject?] = [ "tags": tags ] @@ -397,7 +375,6 @@ public class PetAPI: APIBase { } /** - Find pet by ID - parameter petId: (path) ID of pet that needs to be fetched @@ -410,7 +387,6 @@ public class PetAPI: APIBase { } /** - Find pet by ID - parameter petId: (path) ID of pet that needs to be fetched @@ -429,31 +405,29 @@ public class PetAPI: APIBase { } /** - Find pet by ID - - GET /pet/{petId} - Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions - - OAuth: - - type: oauth2 - - name: petstore_auth - API Key: - type: apiKey api_key - name: api_key - - examples: [{contentType=application/json, example={ - "photoUrls" : [ "aeiou" ], - "name" : "doggie", + - OAuth: + - type: oauth2 + - name: petstore_auth + - examples: [{example={ + "tags" : [ { + "id" : 123456789, + "name" : "aeiou" + } ], "id" : 123456789, "category" : { - "name" : "aeiou", - "id" : 123456789 + "id" : 123456789, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 123456789 - } ], - "status" : "aeiou" -}}, {contentType=application/xml, example= + "status" : "aeiou", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +}, contentType=application/json}, {example= 123456 doggie @@ -462,21 +436,21 @@ public class PetAPI: APIBase { string -}] - - examples: [{contentType=application/json, example={ - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}] + - examples: [{example={ + "tags" : [ { + "id" : 123456789, + "name" : "aeiou" + } ], "id" : 123456789, "category" : { - "name" : "aeiou", - "id" : 123456789 + "id" : 123456789, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 123456789 - } ], - "status" : "aeiou" -}}, {contentType=application/xml, example= + "status" : "aeiou", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +}, contentType=application/json}, {example= 123456 doggie @@ -485,7 +459,7 @@ public class PetAPI: APIBase { string -}] +, contentType=application/xml}] - parameter petId: (path) ID of pet that needs to be fetched @@ -495,7 +469,7 @@ public class PetAPI: APIBase { var path = "/pet/{petId}" path = path.stringByReplacingOccurrencesOfString("{petId}", withString: "\(petId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - + let nillableParameters: [String:AnyObject?] = [:] let parameters = APIHelper.rejectNil(nillableParameters) @@ -505,7 +479,6 @@ public class PetAPI: APIBase { } /** - Fake endpoint to test inline arbitrary object return by 'Find pet by ID' - parameter petId: (path) ID of pet that needs to be fetched @@ -518,7 +491,6 @@ public class PetAPI: APIBase { } /** - Fake endpoint to test inline arbitrary object return by 'Find pet by ID' - parameter petId: (path) ID of pet that needs to be fetched @@ -537,61 +509,59 @@ public class PetAPI: APIBase { } /** - Fake endpoint to test inline arbitrary object return by 'Find pet by ID' - - - GET /pet/{petId}?response=inline_arbitrary_object + - GET /pet/{petId}?response=inline_arbitrary_object - Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions - - OAuth: - - type: oauth2 - - name: petstore_auth - API Key: - type: apiKey api_key - name: api_key - - examples: [{contentType=application/json, example={ - "photoUrls" : [ "aeiou" ], - "name" : "doggie", + - OAuth: + - type: oauth2 + - name: petstore_auth + - examples: [{example={ "id" : 123456789, - "category" : "{}", "tags" : [ { - "name" : "aeiou", - "id" : 123456789 + "id" : 123456789, + "name" : "aeiou" } ], - "status" : "aeiou" -}}, {contentType=application/xml, example= - string - doggie + "category" : "{}", + "status" : "aeiou", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +}, contentType=application/json}, {example= 123456 not implemented io.swagger.models.properties.ObjectProperty@37ff6855 string -}] - - examples: [{contentType=application/json, example={ - "photoUrls" : [ "aeiou" ], - "name" : "doggie", - "id" : 123456789, - "category" : "{}", - "tags" : [ { - "name" : "aeiou", - "id" : 123456789 - } ], - "status" : "aeiou" -}}, {contentType=application/xml, example= - string doggie + string +, contentType=application/xml}] + - examples: [{example={ + "id" : 123456789, + "tags" : [ { + "id" : 123456789, + "name" : "aeiou" + } ], + "category" : "{}", + "status" : "aeiou", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +}, contentType=application/json}, {example= 123456 not implemented io.swagger.models.properties.ObjectProperty@37ff6855 string -}] + doggie + string +, contentType=application/xml}] - parameter petId: (path) ID of pet that needs to be fetched - returns: RequestBuilder */ public class func getPetByIdInObjectWithRequestBuilder(petId petId: Int64) -> RequestBuilder { - var path = "/pet/{petId}?response=inline_arbitrary_object" + var path = "/pet/{petId}?response=inline_arbitrary_object" path = path.stringByReplacingOccurrencesOfString("{petId}", withString: "\(petId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - + let nillableParameters: [String:AnyObject?] = [:] let parameters = APIHelper.rejectNil(nillableParameters) @@ -601,7 +571,6 @@ public class PetAPI: APIBase { } /** - Fake endpoint to test byte array return by 'Find pet by ID' - parameter petId: (path) ID of pet that needs to be fetched @@ -614,7 +583,6 @@ public class PetAPI: APIBase { } /** - Fake endpoint to test byte array return by 'Find pet by ID' - parameter petId: (path) ID of pet that needs to be fetched @@ -633,29 +601,27 @@ public class PetAPI: APIBase { } /** - Fake endpoint to test byte array return by 'Find pet by ID' - - - GET /pet/{petId}?testing_byte_array=true + - GET /pet/{petId}?testing_byte_array=true - Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions - - OAuth: - - type: oauth2 - - name: petstore_auth - API Key: - type: apiKey api_key - name: api_key - - examples: [{contentType=application/json, example=""}, {contentType=application/xml, example=not implemented io.swagger.models.properties.BinaryProperty@55e6ae9e}] - - examples: [{contentType=application/json, example=""}, {contentType=application/xml, example=not implemented io.swagger.models.properties.BinaryProperty@55e6ae9e}] + - OAuth: + - type: oauth2 + - name: petstore_auth + - examples: [{example="", contentType=application/json}, {example=not implemented io.swagger.models.properties.BinaryProperty@55e6ae9e, contentType=application/xml}] + - examples: [{example="", contentType=application/json}, {example=not implemented io.swagger.models.properties.BinaryProperty@55e6ae9e, contentType=application/xml}] - parameter petId: (path) ID of pet that needs to be fetched - returns: RequestBuilder */ public class func petPetIdtestingByteArraytrueGetWithRequestBuilder(petId petId: Int64) -> RequestBuilder { - var path = "/pet/{petId}?testing_byte_array=true" + var path = "/pet/{petId}?testing_byte_array=true" path = path.stringByReplacingOccurrencesOfString("{petId}", withString: "\(petId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - + let nillableParameters: [String:AnyObject?] = [:] let parameters = APIHelper.rejectNil(nillableParameters) @@ -665,7 +631,6 @@ public class PetAPI: APIBase { } /** - Update an existing pet - parameter body: (body) Pet object that needs to be added to the store (optional) @@ -678,7 +643,6 @@ public class PetAPI: APIBase { } /** - Update an existing pet - parameter body: (body) Pet object that needs to be added to the store (optional) @@ -697,9 +661,7 @@ public class PetAPI: APIBase { } /** - Update an existing pet - - PUT /pet - - OAuth: @@ -713,7 +675,6 @@ public class PetAPI: APIBase { public class func updatePetWithRequestBuilder(body body: Pet?) -> RequestBuilder { let path = "/pet" let URLString = PetstoreClientAPI.basePath + path - let parameters = body?.encodeToJSON() as? [String:AnyObject] let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -722,7 +683,6 @@ public class PetAPI: APIBase { } /** - Updates a pet in the store with form data - parameter petId: (path) ID of pet that needs to be updated @@ -737,7 +697,6 @@ public class PetAPI: APIBase { } /** - Updates a pet in the store with form data - parameter petId: (path) ID of pet that needs to be updated @@ -758,9 +717,7 @@ public class PetAPI: APIBase { } /** - Updates a pet in the store with form data - - POST /pet/{petId} - - OAuth: @@ -777,7 +734,7 @@ public class PetAPI: APIBase { var path = "/pet/{petId}" path = path.stringByReplacingOccurrencesOfString("{petId}", withString: "\(petId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - + let nillableParameters: [String:AnyObject?] = [ "name": name, "status": status @@ -790,7 +747,6 @@ public class PetAPI: APIBase { } /** - uploads an image - parameter petId: (path) ID of pet to update @@ -805,7 +761,6 @@ public class PetAPI: APIBase { } /** - uploads an image - parameter petId: (path) ID of pet to update @@ -826,9 +781,7 @@ public class PetAPI: APIBase { } /** - uploads an image - - POST /pet/{petId}/uploadImage - - OAuth: @@ -845,7 +798,7 @@ public class PetAPI: APIBase { var path = "/pet/{petId}/uploadImage" path = path.stringByReplacingOccurrencesOfString("{petId}", withString: "\(petId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - + let nillableParameters: [String:AnyObject?] = [ "additionalMetadata": additionalMetadata, "file": _file diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift index 82d8ff179e53..94c311f1a444 100644 --- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift @@ -12,7 +12,6 @@ import PromiseKit public class StoreAPI: APIBase { /** - Delete purchase order by ID - parameter orderId: (path) ID of the order that needs to be deleted @@ -25,7 +24,6 @@ public class StoreAPI: APIBase { } /** - Delete purchase order by ID - parameter orderId: (path) ID of the order that needs to be deleted @@ -44,9 +42,7 @@ public class StoreAPI: APIBase { } /** - Delete purchase order by ID - - DELETE /store/order/{orderId} - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -58,7 +54,7 @@ public class StoreAPI: APIBase { var path = "/store/order/{orderId}" path = path.stringByReplacingOccurrencesOfString("{orderId}", withString: "\(orderId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - + let nillableParameters: [String:AnyObject?] = [:] let parameters = APIHelper.rejectNil(nillableParameters) @@ -68,7 +64,6 @@ public class StoreAPI: APIBase { } /** - Finds orders by status - parameter status: (query) Status value that needs to be considered for query (optional, default to placed) @@ -81,7 +76,6 @@ public class StoreAPI: APIBase { } /** - Finds orders by status - parameter status: (query) Status value that needs to be considered for query (optional, default to placed) @@ -100,9 +94,7 @@ public class StoreAPI: APIBase { } /** - Finds orders by status - - GET /store/findByStatus - A single status value can be provided as a string - API Key: @@ -111,36 +103,36 @@ public class StoreAPI: APIBase { - API Key: - type: apiKey x-test_api_client_secret - name: test_api_client_secret - - examples: [{contentType=application/json, example=[ { - "petId" : 123456789, - "quantity" : 123, + - examples: [{example=[ { "id" : 123456789, - "shipDate" : "2000-01-23T04:56:07.000+0000", + "petId" : 123456789, "complete" : true, - "status" : "aeiou" -} ]}, {contentType=application/xml, example= + "status" : "aeiou", + "quantity" : 123, + "shipDate" : "2000-01-23T04:56:07.000+0000" +} ], contentType=application/json}, {example= 123456 123456 0 2000-01-23T04:56:07.000Z string true -}] - - examples: [{contentType=application/json, example=[ { - "petId" : 123456789, - "quantity" : 123, +, contentType=application/xml}] + - examples: [{example=[ { "id" : 123456789, - "shipDate" : "2000-01-23T04:56:07.000+0000", + "petId" : 123456789, "complete" : true, - "status" : "aeiou" -} ]}, {contentType=application/xml, example= + "status" : "aeiou", + "quantity" : 123, + "shipDate" : "2000-01-23T04:56:07.000+0000" +} ], contentType=application/json}, {example= 123456 123456 0 2000-01-23T04:56:07.000Z string true -}] +, contentType=application/xml}] - parameter status: (query) Status value that needs to be considered for query (optional, default to placed) @@ -149,7 +141,7 @@ public class StoreAPI: APIBase { public class func findOrdersByStatusWithRequestBuilder(status status: String?) -> RequestBuilder<[Order]> { let path = "/store/findByStatus" let URLString = PetstoreClientAPI.basePath + path - + let nillableParameters: [String:AnyObject?] = [ "status": status ] @@ -161,7 +153,6 @@ public class StoreAPI: APIBase { } /** - Returns pet inventories by status - parameter completion: completion handler to receive the data and the error objects @@ -173,7 +164,6 @@ public class StoreAPI: APIBase { } /** - Returns pet inventories by status - returns: Promise<[String:Int32]> @@ -191,27 +181,25 @@ public class StoreAPI: APIBase { } /** - Returns pet inventories by status - - GET /store/inventory - Returns a map of status codes to quantities - API Key: - type: apiKey api_key - name: api_key - - examples: [{contentType=application/json, example={ + - examples: [{example={ "key" : 123 -}}, {contentType=application/xml, example=not implemented io.swagger.models.properties.MapProperty@d1e580af}] - - examples: [{contentType=application/json, example={ +}, contentType=application/json}, {example=not implemented io.swagger.models.properties.MapProperty@d1e580af, contentType=application/xml}] + - examples: [{example={ "key" : 123 -}}, {contentType=application/xml, example=not implemented io.swagger.models.properties.MapProperty@d1e580af}] +}, contentType=application/json}, {example=not implemented io.swagger.models.properties.MapProperty@d1e580af, contentType=application/xml}] - returns: RequestBuilder<[String:Int32]> */ public class func getInventoryWithRequestBuilder() -> RequestBuilder<[String:Int32]> { let path = "/store/inventory" let URLString = PetstoreClientAPI.basePath + path - + let nillableParameters: [String:AnyObject?] = [:] let parameters = APIHelper.rejectNil(nillableParameters) @@ -221,7 +209,6 @@ public class StoreAPI: APIBase { } /** - Fake endpoint to test arbitrary object return by 'Get inventory' - parameter completion: completion handler to receive the data and the error objects @@ -233,7 +220,6 @@ public class StoreAPI: APIBase { } /** - Fake endpoint to test arbitrary object return by 'Get inventory' - returns: Promise @@ -251,23 +237,21 @@ public class StoreAPI: APIBase { } /** - Fake endpoint to test arbitrary object return by 'Get inventory' - - - GET /store/inventory?response=arbitrary_object + - GET /store/inventory?response=arbitrary_object - Returns an arbitrary object which is actually a map of status codes to quantities - API Key: - type: apiKey api_key - name: api_key - - examples: [{contentType=application/json, example="{}"}, {contentType=application/xml, example=not implemented io.swagger.models.properties.ObjectProperty@37aadb4f}] - - examples: [{contentType=application/json, example="{}"}, {contentType=application/xml, example=not implemented io.swagger.models.properties.ObjectProperty@37aadb4f}] + - examples: [{example="{}", contentType=application/json}, {example=not implemented io.swagger.models.properties.ObjectProperty@37aadb4f, contentType=application/xml}] + - examples: [{example="{}", contentType=application/json}, {example=not implemented io.swagger.models.properties.ObjectProperty@37aadb4f, contentType=application/xml}] - returns: RequestBuilder */ public class func getInventoryInObjectWithRequestBuilder() -> RequestBuilder { - let path = "/store/inventory?response=arbitrary_object" + let path = "/store/inventory?response=arbitrary_object" let URLString = PetstoreClientAPI.basePath + path - + let nillableParameters: [String:AnyObject?] = [:] let parameters = APIHelper.rejectNil(nillableParameters) @@ -277,7 +261,6 @@ public class StoreAPI: APIBase { } /** - Find purchase order by ID - parameter orderId: (path) ID of pet that needs to be fetched @@ -290,7 +273,6 @@ public class StoreAPI: APIBase { } /** - Find purchase order by ID - parameter orderId: (path) ID of pet that needs to be fetched @@ -309,47 +291,45 @@ public class StoreAPI: APIBase { } /** - Find purchase order by ID - - GET /store/order/{orderId} - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - - API Key: - - type: apiKey test_api_key_query (QUERY) - - name: test_api_key_query - API Key: - type: apiKey test_api_key_header - name: test_api_key_header - - examples: [{contentType=application/json, example={ - "petId" : 123456789, - "quantity" : 123, + - API Key: + - type: apiKey test_api_key_query (QUERY) + - name: test_api_key_query + - examples: [{example={ "id" : 123456789, - "shipDate" : "2000-01-23T04:56:07.000+0000", + "petId" : 123456789, "complete" : true, - "status" : "aeiou" -}}, {contentType=application/xml, example= + "status" : "aeiou", + "quantity" : 123, + "shipDate" : "2000-01-23T04:56:07.000+0000" +}, contentType=application/json}, {example= 123456 123456 0 2000-01-23T04:56:07.000Z string true -}] - - examples: [{contentType=application/json, example={ - "petId" : 123456789, - "quantity" : 123, +, contentType=application/xml}] + - examples: [{example={ "id" : 123456789, - "shipDate" : "2000-01-23T04:56:07.000+0000", + "petId" : 123456789, "complete" : true, - "status" : "aeiou" -}}, {contentType=application/xml, example= + "status" : "aeiou", + "quantity" : 123, + "shipDate" : "2000-01-23T04:56:07.000+0000" +}, contentType=application/json}, {example= 123456 123456 0 2000-01-23T04:56:07.000Z string true -}] +, contentType=application/xml}] - parameter orderId: (path) ID of pet that needs to be fetched @@ -359,7 +339,7 @@ public class StoreAPI: APIBase { var path = "/store/order/{orderId}" path = path.stringByReplacingOccurrencesOfString("{orderId}", withString: "\(orderId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - + let nillableParameters: [String:AnyObject?] = [:] let parameters = APIHelper.rejectNil(nillableParameters) @@ -369,7 +349,6 @@ public class StoreAPI: APIBase { } /** - Place an order for a pet - parameter body: (body) order placed for purchasing the pet (optional) @@ -382,7 +361,6 @@ public class StoreAPI: APIBase { } /** - Place an order for a pet - parameter body: (body) order placed for purchasing the pet (optional) @@ -401,9 +379,7 @@ public class StoreAPI: APIBase { } /** - Place an order for a pet - - POST /store/order - - API Key: @@ -412,36 +388,36 @@ public class StoreAPI: APIBase { - API Key: - type: apiKey x-test_api_client_secret - name: test_api_client_secret - - examples: [{contentType=application/json, example={ - "petId" : 123456789, - "quantity" : 123, + - examples: [{example={ "id" : 123456789, - "shipDate" : "2000-01-23T04:56:07.000+0000", + "petId" : 123456789, "complete" : true, - "status" : "aeiou" -}}, {contentType=application/xml, example= + "status" : "aeiou", + "quantity" : 123, + "shipDate" : "2000-01-23T04:56:07.000+0000" +}, contentType=application/json}, {example= 123456 123456 0 2000-01-23T04:56:07.000Z string true -}] - - examples: [{contentType=application/json, example={ - "petId" : 123456789, - "quantity" : 123, +, contentType=application/xml}] + - examples: [{example={ "id" : 123456789, - "shipDate" : "2000-01-23T04:56:07.000+0000", + "petId" : 123456789, "complete" : true, - "status" : "aeiou" -}}, {contentType=application/xml, example= + "status" : "aeiou", + "quantity" : 123, + "shipDate" : "2000-01-23T04:56:07.000+0000" +}, contentType=application/json}, {example= 123456 123456 0 2000-01-23T04:56:07.000Z string true -}] +, contentType=application/xml}] - parameter body: (body) order placed for purchasing the pet (optional) @@ -450,7 +426,6 @@ public class StoreAPI: APIBase { public class func placeOrderWithRequestBuilder(body body: Order?) -> RequestBuilder { let path = "/store/order" let URLString = PetstoreClientAPI.basePath + path - let parameters = body?.encodeToJSON() as? [String:AnyObject] let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift index ec73c765ac1a..4f1f36754c6d 100644 --- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift +++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift @@ -12,7 +12,6 @@ import PromiseKit public class UserAPI: APIBase { /** - Create user - parameter body: (body) Created user object (optional) @@ -25,7 +24,6 @@ public class UserAPI: APIBase { } /** - Create user - parameter body: (body) Created user object (optional) @@ -44,9 +42,7 @@ public class UserAPI: APIBase { } /** - Create user - - POST /user - This can only be done by the logged in user. @@ -57,7 +53,6 @@ public class UserAPI: APIBase { public class func createUserWithRequestBuilder(body body: User?) -> RequestBuilder { let path = "/user" let URLString = PetstoreClientAPI.basePath + path - let parameters = body?.encodeToJSON() as? [String:AnyObject] let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -66,7 +61,6 @@ public class UserAPI: APIBase { } /** - Creates list of users with given input array - parameter body: (body) List of user object (optional) @@ -79,7 +73,6 @@ public class UserAPI: APIBase { } /** - Creates list of users with given input array - parameter body: (body) List of user object (optional) @@ -98,9 +91,7 @@ public class UserAPI: APIBase { } /** - Creates list of users with given input array - - POST /user/createWithArray - @@ -111,7 +102,6 @@ public class UserAPI: APIBase { public class func createUsersWithArrayInputWithRequestBuilder(body body: [User]?) -> RequestBuilder { let path = "/user/createWithArray" let URLString = PetstoreClientAPI.basePath + path - let parameters = body?.encodeToJSON() as? [String:AnyObject] let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -120,7 +110,6 @@ public class UserAPI: APIBase { } /** - Creates list of users with given input array - parameter body: (body) List of user object (optional) @@ -133,7 +122,6 @@ public class UserAPI: APIBase { } /** - Creates list of users with given input array - parameter body: (body) List of user object (optional) @@ -152,9 +140,7 @@ public class UserAPI: APIBase { } /** - Creates list of users with given input array - - POST /user/createWithList - @@ -165,7 +151,6 @@ public class UserAPI: APIBase { public class func createUsersWithListInputWithRequestBuilder(body body: [User]?) -> RequestBuilder { let path = "/user/createWithList" let URLString = PetstoreClientAPI.basePath + path - let parameters = body?.encodeToJSON() as? [String:AnyObject] let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -174,7 +159,6 @@ public class UserAPI: APIBase { } /** - Delete user - parameter username: (path) The name that needs to be deleted @@ -187,7 +171,6 @@ public class UserAPI: APIBase { } /** - Delete user - parameter username: (path) The name that needs to be deleted @@ -206,9 +189,7 @@ public class UserAPI: APIBase { } /** - Delete user - - DELETE /user/{username} - This can only be done by the logged in user. - BASIC: @@ -223,7 +204,7 @@ public class UserAPI: APIBase { var path = "/user/{username}" path = path.stringByReplacingOccurrencesOfString("{username}", withString: "\(username)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - + let nillableParameters: [String:AnyObject?] = [:] let parameters = APIHelper.rejectNil(nillableParameters) @@ -233,10 +214,9 @@ public class UserAPI: APIBase { } /** - Get user by user name - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - parameter completion: completion handler to receive the data and the error objects */ public class func getUserByName(username username: String, completion: ((data: User?, error: ErrorType?) -> Void)) { @@ -246,10 +226,9 @@ public class UserAPI: APIBase { } /** - Get user by user name - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - returns: Promise */ public class func getUserByName(username username: String) -> Promise { @@ -265,12 +244,10 @@ public class UserAPI: APIBase { } /** - Get user by user name - - GET /user/{username} - - - examples: [{contentType=application/json, example={ + - examples: [{example={ "id" : 1, "username" : "johnp", "firstName" : "John", @@ -279,9 +256,9 @@ public class UserAPI: APIBase { "password" : "-secret-", "phone" : "0123456789", "userStatus" : 0 -}}] +}, contentType=application/json}] - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - returns: RequestBuilder */ @@ -289,7 +266,7 @@ public class UserAPI: APIBase { var path = "/user/{username}" path = path.stringByReplacingOccurrencesOfString("{username}", withString: "\(username)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - + let nillableParameters: [String:AnyObject?] = [:] let parameters = APIHelper.rejectNil(nillableParameters) @@ -299,7 +276,6 @@ public class UserAPI: APIBase { } /** - Logs user into the system - parameter username: (query) The user name for login (optional) @@ -313,7 +289,6 @@ public class UserAPI: APIBase { } /** - Logs user into the system - parameter username: (query) The user name for login (optional) @@ -333,13 +308,11 @@ public class UserAPI: APIBase { } /** - Logs user into the system - - GET /user/login - - - examples: [{contentType=application/json, example="aeiou"}, {contentType=application/xml, example=string}] - - examples: [{contentType=application/json, example="aeiou"}, {contentType=application/xml, example=string}] + - examples: [{example="aeiou", contentType=application/json}, {example=string, contentType=application/xml}] + - examples: [{example="aeiou", contentType=application/json}, {example=string, contentType=application/xml}] - parameter username: (query) The user name for login (optional) - parameter password: (query) The password for login in clear text (optional) @@ -349,7 +322,7 @@ public class UserAPI: APIBase { public class func loginUserWithRequestBuilder(username username: String?, password: String?) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - + let nillableParameters: [String:AnyObject?] = [ "username": username, "password": password @@ -362,7 +335,6 @@ public class UserAPI: APIBase { } /** - Logs out current logged in user session - parameter completion: completion handler to receive the data and the error objects @@ -374,7 +346,6 @@ public class UserAPI: APIBase { } /** - Logs out current logged in user session - returns: Promise @@ -392,9 +363,7 @@ public class UserAPI: APIBase { } /** - Logs out current logged in user session - - GET /user/logout - @@ -403,7 +372,7 @@ public class UserAPI: APIBase { public class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - + let nillableParameters: [String:AnyObject?] = [:] let parameters = APIHelper.rejectNil(nillableParameters) @@ -413,7 +382,6 @@ public class UserAPI: APIBase { } /** - Updated user - parameter username: (path) name that need to be deleted @@ -427,7 +395,6 @@ public class UserAPI: APIBase { } /** - Updated user - parameter username: (path) name that need to be deleted @@ -447,9 +414,7 @@ public class UserAPI: APIBase { } /** - Updated user - - PUT /user/{username} - This can only be done by the logged in user. @@ -462,7 +427,6 @@ public class UserAPI: APIBase { var path = "/user/{username}" path = path.stringByReplacingOccurrencesOfString("{username}", withString: "\(username)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters = body?.encodeToJSON() as? [String:AnyObject] let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models.swift index 329eb2951578..bb8e7a7be4c3 100644 --- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models.swift +++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models.swift @@ -130,6 +130,33 @@ class Decoders { fatalError("formatter failed to parse \(source)") } + // Decoder for [Animal] + Decoders.addDecoder(clazz: [Animal].self) { (source: AnyObject) -> [Animal] in + return Decoders.decode(clazz: [Animal].self, source: source) + } + // Decoder for Animal + Decoders.addDecoder(clazz: Animal.self) { (source: AnyObject) -> Animal in + let sourceDictionary = source as! [NSObject:AnyObject] + let instance = Animal() + instance.className = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["className"]) + return instance + } + + + // Decoder for [Cat] + Decoders.addDecoder(clazz: [Cat].self) { (source: AnyObject) -> [Cat] in + return Decoders.decode(clazz: [Cat].self, source: source) + } + // Decoder for Cat + Decoders.addDecoder(clazz: Cat.self) { (source: AnyObject) -> Cat in + let sourceDictionary = source as! [NSObject:AnyObject] + let instance = Cat() + instance.className = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["className"]) + instance.declawed = Decoders.decodeOptional(clazz: Bool.self, source: sourceDictionary["declawed"]) + return instance + } + + // Decoder for [Category] Decoders.addDecoder(clazz: [Category].self) { (source: AnyObject) -> [Category] in return Decoders.decode(clazz: [Category].self, source: source) @@ -142,7 +169,44 @@ class Decoders { instance.name = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["name"]) return instance } - + + + // Decoder for [Dog] + Decoders.addDecoder(clazz: [Dog].self) { (source: AnyObject) -> [Dog] in + return Decoders.decode(clazz: [Dog].self, source: source) + } + // Decoder for Dog + Decoders.addDecoder(clazz: Dog.self) { (source: AnyObject) -> Dog in + let sourceDictionary = source as! [NSObject:AnyObject] + let instance = Dog() + instance.className = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["className"]) + instance.breed = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["breed"]) + return instance + } + + + // Decoder for [FormatTest] + Decoders.addDecoder(clazz: [FormatTest].self) { (source: AnyObject) -> [FormatTest] in + return Decoders.decode(clazz: [FormatTest].self, source: source) + } + // Decoder for FormatTest + Decoders.addDecoder(clazz: FormatTest.self) { (source: AnyObject) -> FormatTest in + let sourceDictionary = source as! [NSObject:AnyObject] + let instance = FormatTest() + instance.integer = Decoders.decodeOptional(clazz: Int32.self, source: sourceDictionary["integer"]) + instance._int32 = Decoders.decodeOptional(clazz: Int32.self, source: sourceDictionary["int32"]) + instance._int64 = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["int64"]) + instance.number = Decoders.decodeOptional(clazz: Double.self, source: sourceDictionary["number"]) + instance._float = Decoders.decodeOptional(clazz: Float.self, source: sourceDictionary["float"]) + instance._double = Decoders.decodeOptional(clazz: Double.self, source: sourceDictionary["double"]) + instance._string = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["string"]) + instance.byte = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["byte"]) + instance.binary = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["binary"]) + instance.date = Decoders.decodeOptional(clazz: NSDate.self, source: sourceDictionary["date"]) + instance.dateTime = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["dateTime"]) + return instance + } + // Decoder for [InlineResponse200] Decoders.addDecoder(clazz: [InlineResponse200].self) { (source: AnyObject) -> [InlineResponse200] in @@ -152,15 +216,15 @@ class Decoders { Decoders.addDecoder(clazz: InlineResponse200.self) { (source: AnyObject) -> InlineResponse200 in let sourceDictionary = source as! [NSObject:AnyObject] let instance = InlineResponse200() - instance.photoUrls = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["photoUrls"]) - instance.name = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["name"]) + instance.tags = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["tags"]) instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"]) instance.category = Decoders.decodeOptional(clazz: AnyObject.self, source: sourceDictionary["category"]) - instance.tags = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["tags"]) instance.status = InlineResponse200.Status(rawValue: (sourceDictionary["status"] as? String) ?? "") + instance.name = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["name"]) + instance.photoUrls = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["photoUrls"]) return instance } - + // Decoder for [Model200Response] Decoders.addDecoder(clazz: [Model200Response].self) { (source: AnyObject) -> [Model200Response] in @@ -173,7 +237,7 @@ class Decoders { instance.name = Decoders.decodeOptional(clazz: Int32.self, source: sourceDictionary["name"]) return instance } - + // Decoder for [ModelReturn] Decoders.addDecoder(clazz: [ModelReturn].self) { (source: AnyObject) -> [ModelReturn] in @@ -186,7 +250,7 @@ class Decoders { instance._return = Decoders.decodeOptional(clazz: Int32.self, source: sourceDictionary["return"]) return instance } - + // Decoder for [Name] Decoders.addDecoder(clazz: [Name].self) { (source: AnyObject) -> [Name] in @@ -200,7 +264,7 @@ class Decoders { instance.snakeCase = Decoders.decodeOptional(clazz: Int32.self, source: sourceDictionary["snake_case"]) return instance } - + // Decoder for [Order] Decoders.addDecoder(clazz: [Order].self) { (source: AnyObject) -> [Order] in @@ -218,7 +282,7 @@ class Decoders { instance.complete = Decoders.decodeOptional(clazz: Bool.self, source: sourceDictionary["complete"]) return instance } - + // Decoder for [Pet] Decoders.addDecoder(clazz: [Pet].self) { (source: AnyObject) -> [Pet] in @@ -236,7 +300,7 @@ class Decoders { instance.status = Pet.Status(rawValue: (sourceDictionary["status"] as? String) ?? "") return instance } - + // Decoder for [SpecialModelName] Decoders.addDecoder(clazz: [SpecialModelName].self) { (source: AnyObject) -> [SpecialModelName] in @@ -249,7 +313,7 @@ class Decoders { instance.specialPropertyName = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["$special[property.name]"]) return instance } - + // Decoder for [Tag] Decoders.addDecoder(clazz: [Tag].self) { (source: AnyObject) -> [Tag] in @@ -263,7 +327,7 @@ class Decoders { instance.name = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["name"]) return instance } - + // Decoder for [User] Decoders.addDecoder(clazz: [User].self) { (source: AnyObject) -> [User] in @@ -283,7 +347,6 @@ class Decoders { instance.userStatus = Decoders.decodeOptional(clazz: Int32.self, source: sourceDictionary["userStatus"]) return instance } - } } } diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Animal.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Animal.swift new file mode 100644 index 000000000000..586b10f59312 --- /dev/null +++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Animal.swift @@ -0,0 +1,23 @@ +// +// Animal.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation + + +public class Animal: JSONEncodable { + public var className: String? + + public init() {} + + // MARK: JSONEncodable + func encodeToJSON() -> AnyObject { + var nillableDictionary = [String:AnyObject?]() + nillableDictionary["className"] = self.className + let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + return dictionary + } +} diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Cat.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Cat.swift new file mode 100644 index 000000000000..bdf66b563d2b --- /dev/null +++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Cat.swift @@ -0,0 +1,25 @@ +// +// Cat.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation + + +public class Cat: JSONEncodable { + public var className: String? + public var declawed: Bool? + + public init() {} + + // MARK: JSONEncodable + func encodeToJSON() -> AnyObject { + var nillableDictionary = [String:AnyObject?]() + nillableDictionary["className"] = self.className + nillableDictionary["declawed"] = self.declawed + let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + return dictionary + } +} diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Category.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Category.swift index 2f0ab835e8f6..19f31d266efd 100644 --- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Category.swift +++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Category.swift @@ -9,10 +9,8 @@ import Foundation public class Category: JSONEncodable { - public var id: Int64? public var name: String? - public init() {} @@ -20,6 +18,7 @@ public class Category: JSONEncodable { func encodeToJSON() -> AnyObject { var nillableDictionary = [String:AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() + nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["name"] = self.name let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Dog.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Dog.swift new file mode 100644 index 000000000000..8a1fafdfc673 --- /dev/null +++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Dog.swift @@ -0,0 +1,25 @@ +// +// Dog.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation + + +public class Dog: JSONEncodable { + public var className: String? + public var breed: String? + + public init() {} + + // MARK: JSONEncodable + func encodeToJSON() -> AnyObject { + var nillableDictionary = [String:AnyObject?]() + nillableDictionary["className"] = self.className + nillableDictionary["breed"] = self.breed + let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + return dictionary + } +} diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift new file mode 100644 index 000000000000..ee2547d3e898 --- /dev/null +++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift @@ -0,0 +1,44 @@ +// +// FormatTest.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation + + +public class FormatTest: JSONEncodable { + public var integer: Int32? + public var _int32: Int32? + public var _int64: Int64? + public var number: Double? + public var _float: Float? + public var _double: Double? + public var _string: String? + public var byte: String? + public var binary: String? + public var date: NSDate? + public var dateTime: String? + + public init() {} + + // MARK: JSONEncodable + func encodeToJSON() -> AnyObject { + var nillableDictionary = [String:AnyObject?]() + nillableDictionary["integer"] = self.integer?.encodeToJSON() + nillableDictionary["int32"] = self._int32?.encodeToJSON() + nillableDictionary["int64"] = self._int64?.encodeToJSON() + nillableDictionary["int64"] = self._int64?.encodeToJSON() + nillableDictionary["number"] = self.number + nillableDictionary["float"] = self._float + nillableDictionary["double"] = self._double + nillableDictionary["string"] = self._string + nillableDictionary["byte"] = self.byte + nillableDictionary["binary"] = self.binary + nillableDictionary["date"] = self.date?.encodeToJSON() + nillableDictionary["dateTime"] = self.dateTime + let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + return dictionary + } +} diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/InlineResponse200.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/InlineResponse200.swift index fcf0679aea2e..6e3ce5aeabac 100644 --- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/InlineResponse200.swift +++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/InlineResponse200.swift @@ -9,33 +9,31 @@ import Foundation public class InlineResponse200: JSONEncodable { - public enum Status: String { case Available = "available" case Pending = "pending" case Sold = "sold" } - - public var photoUrls: [String]? - public var name: String? + public var tags: [Tag]? public var id: Int64? public var category: AnyObject? - public var tags: [Tag]? /** pet status in the store */ public var status: Status? - + public var name: String? + public var photoUrls: [String]? public init() {} // MARK: JSONEncodable func encodeToJSON() -> AnyObject { var nillableDictionary = [String:AnyObject?]() - nillableDictionary["photoUrls"] = self.photoUrls?.encodeToJSON() - nillableDictionary["name"] = self.name + nillableDictionary["tags"] = self.tags?.encodeToJSON() + nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["category"] = self.category - nillableDictionary["tags"] = self.tags?.encodeToJSON() nillableDictionary["status"] = self.status?.rawValue + nillableDictionary["name"] = self.name + nillableDictionary["photoUrls"] = self.photoUrls?.encodeToJSON() let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary } diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift index f929d2823580..43cc68a5c2dd 100644 --- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift +++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift @@ -8,10 +8,9 @@ import Foundation +/** Model for testing model name starting with number */ public class Model200Response: JSONEncodable { - public var name: Int32? - public init() {} diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/ModelReturn.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/ModelReturn.swift index f3f16f2c13e5..80e2ef13b241 100644 --- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/ModelReturn.swift +++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/ModelReturn.swift @@ -8,10 +8,9 @@ import Foundation +/** Model for testing reserved words */ public class ModelReturn: JSONEncodable { - public var _return: Int32? - public init() {} diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Name.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Name.swift index 4b49c8325d52..a0e40281d45a 100644 --- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Name.swift +++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Name.swift @@ -8,11 +8,10 @@ import Foundation +/** Model for testing model name same as property name */ public class Name: JSONEncodable { - public var name: Int32? public var snakeCase: Int32? - public init() {} diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Order.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Order.swift index 03b977c88f79..4374d95ed470 100644 --- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Order.swift +++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Order.swift @@ -9,13 +9,11 @@ import Foundation public class Order: JSONEncodable { - public enum Status: String { case Placed = "placed" case Approved = "approved" case Delivered = "delivered" } - public var id: Int64? public var petId: Int64? public var quantity: Int32? @@ -23,7 +21,6 @@ public class Order: JSONEncodable { /** Order Status */ public var status: Status? public var complete: Bool? - public init() {} @@ -31,6 +28,8 @@ public class Order: JSONEncodable { func encodeToJSON() -> AnyObject { var nillableDictionary = [String:AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() + nillableDictionary["id"] = self.id?.encodeToJSON() + nillableDictionary["petId"] = self.petId?.encodeToJSON() nillableDictionary["petId"] = self.petId?.encodeToJSON() nillableDictionary["quantity"] = self.quantity?.encodeToJSON() nillableDictionary["shipDate"] = self.shipDate?.encodeToJSON() diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Pet.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Pet.swift index 5df44cfca96f..8a467a5bf0b5 100644 --- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Pet.swift +++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Pet.swift @@ -9,13 +9,11 @@ import Foundation public class Pet: JSONEncodable { - public enum Status: String { case Available = "available" case Pending = "pending" case Sold = "sold" } - public var id: Int64? public var category: Category? public var name: String? @@ -23,7 +21,6 @@ public class Pet: JSONEncodable { public var tags: [Tag]? /** pet status in the store */ public var status: Status? - public init() {} @@ -31,6 +28,7 @@ public class Pet: JSONEncodable { func encodeToJSON() -> AnyObject { var nillableDictionary = [String:AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() + nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["category"] = self.category?.encodeToJSON() nillableDictionary["name"] = self.name nillableDictionary["photoUrls"] = self.photoUrls?.encodeToJSON() diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift index 907be7f934ac..cb92fbd2f786 100644 --- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift @@ -9,9 +9,7 @@ import Foundation public class SpecialModelName: JSONEncodable { - public var specialPropertyName: Int64? - public init() {} @@ -19,6 +17,7 @@ public class SpecialModelName: JSONEncodable { func encodeToJSON() -> AnyObject { var nillableDictionary = [String:AnyObject?]() nillableDictionary["$special[property.name]"] = self.specialPropertyName?.encodeToJSON() + nillableDictionary["$special[property.name]"] = self.specialPropertyName?.encodeToJSON() let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary } diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Tag.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Tag.swift index ecff268828f8..a3916f59b137 100644 --- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Tag.swift +++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/Tag.swift @@ -9,10 +9,8 @@ import Foundation public class Tag: JSONEncodable { - public var id: Int64? public var name: String? - public init() {} @@ -20,6 +18,7 @@ public class Tag: JSONEncodable { func encodeToJSON() -> AnyObject { var nillableDictionary = [String:AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() + nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["name"] = self.name let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary diff --git a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/User.swift b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/User.swift index 70fee87f4d5f..26e9c619927b 100644 --- a/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/User.swift +++ b/samples/client/petstore/swift/PetstoreClient/Classes/Swaggers/Models/User.swift @@ -9,7 +9,6 @@ import Foundation public class User: JSONEncodable { - public var id: Int64? public var username: String? public var firstName: String? @@ -19,7 +18,6 @@ public class User: JSONEncodable { public var phone: String? /** User Status */ public var userStatus: Int32? - public init() {} @@ -27,6 +25,7 @@ public class User: JSONEncodable { func encodeToJSON() -> AnyObject { var nillableDictionary = [String:AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() + nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["username"] = self.username nillableDictionary["firstName"] = self.firstName nillableDictionary["lastName"] = self.lastName diff --git a/samples/client/petstore/swift/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj b/samples/client/petstore/swift/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj index 0e841d33df34..fe35821d6e0c 100644 --- a/samples/client/petstore/swift/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj +++ b/samples/client/petstore/swift/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj @@ -7,109 +7,113 @@ objects = { /* Begin PBXBuildFile section */ - 0290D4A3795396ABBB81E632E5AADE3A /* UIActionSheet+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD570E28B63274E742E7D1FBBD55BB41 /* UIActionSheet+Promise.swift */; }; - 02D0672068E53F2D98CC67FBA5278022 /* UIView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = BCDD82DB3E6D43BA9769FCA9B744CB5E /* UIView+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 03790817CF6E76959C0F7E2D0734E9F6 /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = 275DA9A664C70DD40A4059090D1A00D4 /* after.swift */; }; 03F494989CC1A8857B68A317D5D6860F /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DF5FC3AF99846209C5FCE55A2E12D9A /* Response.swift */; }; 0681ADC8BAE2C3185F13487BAAB4D9DD /* Upload.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCE38472832BBCC541E646DA6C18EF9C /* Upload.swift */; }; - 08B247165C2A091EE24F79D73F8ABEC9 /* UIAlertView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA854180C132DB5511D64C82535C5FDE /* UIAlertView+Promise.swift */; }; - 09C9710BEE85A253331C8E0994FBB2BF /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC4BF94DC4B3D8B88FC160B00931B0EC /* QuartzCore.framework */; }; + 0B0F79070CD75DE3CF053E58B491A3AC /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD05F019D163F2D5FE7C8E64C1D2E299 /* UserAPI.swift */; }; 0B34EB4425C08BB021C2D09F75C9C146 /* OMGHTTPURLRQ.h in Headers */ = {isa = PBXBuildFile; fileRef = 450166FEA2155A5821D97744A0127DF8 /* OMGHTTPURLRQ.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0BA72DC6AB26C72EE080F8A08CE41643 /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = B93FB4BB16CFB41DCA35A8CFAD7A7FEF /* NSNotificationCenter+Promise.swift */; }; - 0D6DCC756D1B0B68ADB5F805D575BAB6 /* NSError+Cancellation.h in Headers */ = {isa = PBXBuildFile; fileRef = 045C1F608ADE57757E6732D721779F22 /* NSError+Cancellation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0F816E94051557A7BA9BFA5B6B4A32A5 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE5E0F8BA6AB1430D31588F5EB170889 /* Order.swift */; }; - 0FFA3D017278D8EB24A9AC4780E3AFEC /* OMGHTTPURLRQ.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3530BF15E14D1F6D7134EE67377D5C8C /* OMGHTTPURLRQ.framework */; }; - 1372840E154B63D17AACD1257C3E0520 /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 3616971BAEF40302B7F2F8B1007C0B2B /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 167B939D70FE9AADBA03ABBBBA588B4B /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7F371E5E2A26613C4DE253F4D7A3F56 /* SpecialModelName.swift */; }; - 19DAC977B6B3CBDC69EE2150BD0C1EF6 /* UIView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F0F4EDC2236E1C270DC2014181D6506 /* UIView+AnyPromise.m */; }; - 1B099FB3AA9A6794A3039899A6734205 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F98C30F79A0AB5920FB4CDBB7413E5C /* Name.swift */; }; - 222C92305B7AC5BB8E2ABAD182F50026 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D23C407A7CDBFD244D6115899F9D45D /* Promise.swift */; }; - 2676E85B9644D55E25A31D3CE61A5726 /* CALayer+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 27E0FE41D771BE8BE3F0D4F1DAD0B179 /* CALayer+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 291E2518A9E470C2E9CE1B69C088C16F /* State.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DC63EB77B3791891517B98CAA115DE8 /* State.swift */; }; + 0BB1E79782E3BE258C30A65A20C85FC1 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC4BF94DC4B3D8B88FC160B00931B0EC /* QuartzCore.framework */; }; + 10E93502CF9CED0B6341DB95B658F2F9 /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C24509ECAD94A91B30D87D8B2DEEB9B /* Model200Response.swift */; }; + 14FD108A5B931460A799BDCB874A99C3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = DED58811444E6D32A1F7B372F034DB7A /* SpecialModelName.swift */; }; + 1A4D55F76DCB3489302BC425F4DB1C04 /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 143BC30E5DDAF52A3D9578F507EC6A41 /* when.m */; }; + 1DB7E23C2A2A8D4B5CE046135E4540C6 /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BFFA6FD621E9ED341AA89AEAC1604D7 /* PromiseKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2308448E8874D3DAA33A1AEFEFCFBA2D /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BAE461B3A62164A09480E8967D29E64 /* Extensions.swift */; }; 2C5450AC69398958CF6F7539EF7D99E5 /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 30CE7341A995EF6812D71771E74CF7F7 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 335F10113F178E8D2984BE0602A0DEED /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 780827122613E6D246695ADFAA7B28B6 /* Tag.swift */; }; + 2DF2D3E610EB6F19375570C0EBA9E77F /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = B868468092D7B2489B889A50981C9247 /* after.m */; }; + 30F9F020F5B35577080063E71CDAB08C /* OMGHTTPURLRQ.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3530BF15E14D1F6D7134EE67377D5C8C /* OMGHTTPURLRQ.framework */; }; + 33326318BF830A838DA62D54ADAA5ECA /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D172F6D749B7735D04B495330AB7FE3 /* Cat.swift */; }; 35F6B35131F89EA23246C6508199FB05 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB15A61DB7ABCB74565286162157C5A0 /* Foundation.framework */; }; - 36CDD7A6638E10B9107C74D9B75079F1 /* NSURLConnection+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 412985229DA7A4DF9E129B7E8F0C09BB /* NSURLConnection+Promise.swift */; }; - 37027676CEABF1BF753684A06C2DCDDB /* URLDataPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7CE161ED0CF68954A63F30528ACAD9B /* URLDataPromise.swift */; }; + 38FE2977C973FA258977E86E1E964E02 /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5973BC143AE488C12FFB1E83E71F0C45 /* AnyPromise.swift */; }; + 39E7AFE23097B4BC393D43A44093FB63 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB15A61DB7ABCB74565286162157C5A0 /* Foundation.framework */; }; 3A8D316D4266A3309D0A98ED74F8A13A /* OMGUserAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 87BC7910B8D7D31310A07C32438A8C67 /* OMGUserAgent.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3D2B170AA3737444F26B0E07E1F5FEF1 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D0925CA00A7877078F60FAD44E2DD0F /* Category.swift */; }; - 405F6EBE4BBAAC270AF1B97AFC5B0C16 /* NSURLConnection+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = A7F0DAACAC89A93B940BBE54E6A87E9F /* NSURLConnection+AnyPromise.m */; }; - 42A66FBE567A7F5B2136FC56BFF4874A /* UIAlertView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = F075F63EFE77F7B59FF77CBA95B9AADF /* UIAlertView+AnyPromise.m */; }; - 435BD7136E0E174C6A8811D6C88DEAF2 /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6EB54C331FED437583A5F01EB2757D1 /* NSObject+Promise.swift */; }; + 41C531C4CEDCAE196A6F92FEAE66CCF3 /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C7FF1C1E487B6795C5F6734CCA49DF3 /* StoreAPI.swift */; }; + 445F515F4FAB3537878E1377562BBBA7 /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 4798BAC01B0E3F07E3BBBB07BA57F2D7 /* NSNotificationCenter+AnyPromise.m */; }; + 4827FED90242878355B47A6D34BAABCA /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 323E5DCC342B03D7AE59F37523D2626A /* APIs.swift */; }; 48CB8E7E16443CA771E4DCFB3E0709A2 /* OMGHTTPURLRQ.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D579267FC1F163C8F04B444DAEFED0D /* OMGHTTPURLRQ.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 4CE2B026C746F263F6B95534A35E76C0 /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = C476B916B763E55E4161F0B30760C4E8 /* afterlife.swift */; }; 4DE5FCC41D100B113B6645EA64410F16 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FBD351D007CF4095C98C9DFD9D83D61 /* ParameterEncoding.swift */; }; - 4EAB3713B40959FB2E0CDEAC8BDE1116 /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16730DAF3E51C161D8247E473F069E71 /* when.swift */; }; + 4E07AC40078EBB1C88ED8700859F5A1B /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E506C8F40F5AD602D83B383EAA7C0CD /* APIHelper.swift */; }; 5192A7466019F9B3D7F1E987124E96BC /* OMGHTTPURLRQ-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F7EBDD2EEED520E06ACB3538B3832049 /* OMGHTTPURLRQ-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 53FBECFDFCA1B755F2754C4DBC65E3D5 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A1DC80A0773C5A569348DC442EAFD1D /* UIKit.framework */; }; 5480169E42C456C49BE59E273D7E0115 /* OMGFormURLEncode.h in Headers */ = {isa = PBXBuildFile; fileRef = 51ADA0B6B6B00CB0E818AA8CBC311677 /* OMGFormURLEncode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 57FB6BF21435F091D48B97DBD36E8C7B /* InlineResponse200.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94FB3F3CEFBA56B306D034B69144C68E /* InlineResponse200.swift */; }; - 5849F4EAAAD24A116F0E0E948623AEC0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB15A61DB7ABCB74565286162157C5A0 /* Foundation.framework */; }; - 5EADA3CE22BF3B74E759F948DE7A66F1 /* UIViewController+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = AA24C5EC82CF437D8D1FFFAB68975408 /* UIViewController+AnyPromise.m */; }; - 63F6FFAB2BCCD07FD3DF44086E11C8B0 /* ObjectReturn.swift in Sources */ = {isa = PBXBuildFile; fileRef = A58E34C4DDB909B2CA900747C6691A5A /* ObjectReturn.swift */; }; - 64739E341A52DFA48F4169E4322E7486 /* PetstoreClient-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F681D2C508D1BA8F62893120D9343A4 /* PetstoreClient-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5E46AC6FA35723E095C2EB6ED23C0510 /* PromiseKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9042667D08D783E45394FE8B97EE6468 /* PromiseKit-dummy.m */; }; + 5EECE3F98893B2D4E03DC027C57C21F3 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A60B64E388679F589CB959AA5FC4787 /* Models.swift */; }; + 5FDCAFE73B791C4A4B863C9D65F6CF7B /* UIAlertView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA854180C132DB5511D64C82535C5FDE /* UIAlertView+Promise.swift */; }; + 623677B20997F5EC0F6CA695CADD410B /* ObjectReturn.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3CC2D1A2A451C0A3C4DBD6D7E117C01 /* ObjectReturn.swift */; }; + 63AF5DF795F5D610768B4AF53C7E9976 /* UIActionSheet+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 6846D22C9F0CCBC48DF833E309A8E84F /* UIActionSheet+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 655C3826275A76D04835F2336AC87A91 /* UIAlertView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = F075F63EFE77F7B59FF77CBA95B9AADF /* UIAlertView+AnyPromise.m */; }; + 660435DF96CE68B3A3E078030C5F54FA /* UIView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3CDA0958D6247505ECD9098D662EA74 /* UIView+Promise.swift */; }; + 66B8591A8CCC9760D933506B71A13962 /* UIViewController+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BA017E288BB42E06EBEE9C6E6993EAF /* UIViewController+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6CB84A616D7B4D189A4E94BD37621575 /* OMGUserAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = E11BFB27B43B742CB5D6086C4233A909 /* OMGUserAgent.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; 6D264CCBD7DAC0A530076FB1A847EEC7 /* Pods-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 894E5DA93A9F359521A89826BE6DA777 /* Pods-dummy.m */; }; - 6EA827E0ECB8F7CC49F8B4C92A1D93FA /* CALayer+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A22F2595054D39018E03961CA7283A /* CALayer+AnyPromise.m */; }; 6F63943B0E954F701F32BC7A1F4C2FEC /* OMGFormURLEncode.m in Sources */ = {isa = PBXBuildFile; fileRef = 25614E715DDC170DAFB0DF50C5503E33 /* OMGFormURLEncode.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 76171B607A443BE97E1DBBF6575CD558 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = B868468092D7B2489B889A50981C9247 /* after.m */; }; - 76FAA23C0A28ECF0BBF6A5C14203F414 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = A360D2EE0575D36C8C8459BCB8325D9A /* Models.swift */; }; - 77F020B749274FC61FD1D5EA3FBBBE18 /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A112EF8BB3933C1C1E42F11B3DD3B02A /* PromiseKit.framework */; }; + 7120EA2BF0D3942FF9CE0EDABBF86BA1 /* NSURLConnection+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 412985229DA7A4DF9E129B7E8F0C09BB /* NSURLConnection+Promise.swift */; }; + 72B2C8A6E81C1E99E6093BE3BDBDE554 /* join.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84319E048FE6DD89B905FA3A81005C5F /* join.swift */; }; + 752EACD07B4F948C1F24E0583C5DA165 /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 3616971BAEF40302B7F2F8B1007C0B2B /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7BCBC4FD2E385CAFC5F3949FFFFE2095 /* NSError+Cancellation.h in Headers */ = {isa = PBXBuildFile; fileRef = 045C1F608ADE57757E6732D721779F22 /* NSError+Cancellation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7C87E63D6733AC0FE083373A5FAF86CB /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71B762588C78E0A95319F5BB534965BE /* Category.swift */; }; + 7CE6DE14AB43CB51B4D5C5BA4293C47B /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = 6AD59903FAA8315AD0036AC459FFB97F /* join.m */; }; + 7D38A3624822DA504D0FBD9F4EA485BA /* UIViewController+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6D459D0AB2361B48F81C4D14C6D0DAA /* UIViewController+Promise.swift */; }; + 7DAC8F56FC00F6400AC3BF3AF79ACAFD /* ModelReturn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17CBD3DEAD30C207791B4B1A5AD66991 /* ModelReturn.swift */; }; 80F496237530D382A045A29654D8C11C /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 400A6910E83F606BCD67DC11FA706697 /* ServerTrustPolicy.swift */; }; + 81970BD13A497C0962CBEA922C1DAB3E /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = 980FD13F87B44BFD90F8AC129BEB2E61 /* race.swift */; }; 82971968CBDAB224212EEB4607C9FB8D /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53F8B2513042BD6DB957E8063EF895BD /* Result.swift */; }; - 82B5B0FF21A9A28284AE7F1124199D3F /* UIActionSheet+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 9774D31336C85248A115B569E7D95283 /* UIActionSheet+AnyPromise.m */; }; + 82BEAE7085889DB1A860FE690273EA7E /* PMKAlertController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C731FBFCC690050C6C08E5AC9D9DC724 /* PMKAlertController.swift */; }; 8399DBEE3E2D98EB1F466132E476F4D9 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F14E17B4D6BDF8BD3E384BE6528F744 /* MultipartFormData.swift */; }; - 886AC602EE7FCFDCD2DCD470CCB41721 /* PetstoreClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A8E0328DC896E0893B565FE8742167 /* PetstoreClient-dummy.m */; }; - 8ABFD5E4F7621D554DBB12C6472A8313 /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A44CBCE721F71F03C7758DB3F36CDFF /* PetAPI.swift */; }; - 91DF85663A3771DCD35D0FF07135959B /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A386C655413763AEE8133A102DF2C8 /* Extensions.swift */; }; - 9254814FE352958B5270E874E5CCD394 /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 535DF88FC12304114DEF55E4003421B2 /* NSURLSession+Promise.swift */; }; - 964EA2E9AA68D7D587ED15143FEC4BE5 /* Promise+Properties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E0DBDE561A6C2E7AC7A24160F8A5F28 /* Promise+Properties.swift */; }; + 8809E3D6CC478B4AC9FA6C2389A5447F /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6EB54C331FED437583A5F01EB2757D1 /* NSObject+Promise.swift */; }; + 8955A9B8A34594437C8D27C4C55BFC9E /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93B41BBA87E8FD7BD3513CD49733EB30 /* FormatTest.swift */; }; + 895CB65D12461DA4EA243ACE8346D21F /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = D513E5F3C28C7B452E79AE279B71813D /* User.swift */; }; + 8C749DAB8EA0585A7A5769F38CB33CBC /* NSURLConnection+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = A7F0DAACAC89A93B940BBE54E6A87E9F /* NSURLConnection+AnyPromise.m */; }; + 92EEF6DC60C3CA25AA3997D2652A28F9 /* PetstoreClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A8E0328DC896E0893B565FE8742167 /* PetstoreClient-dummy.m */; }; 96D99D0C2472535A169DED65CB231CD7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB15A61DB7ABCB74565286162157C5A0 /* Foundation.framework */; }; - 97A9635E99E7EB0F33260600E1AC82F6 /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A27DF5A602B1BB474A141C895934F712 /* StoreAPI.swift */; }; - 99710CDCDDFF9ED74B8E01EB8E4BF563 /* UIView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3CDA0958D6247505ECD9098D662EA74 /* UIView+Promise.swift */; }; - 9DA852770BE32039F2C21096F27872A0 /* ModelReturn.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEA71A34D3031D95E61F1082A5BEEB7A /* ModelReturn.swift */; }; - A2A8512E15D1A4B6DBD515D6144EC083 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 558DFECE2C740177CA6357DA71A1DFBB /* Error.swift */; }; + 97BDDBBB6BA36B90E98FCD53B9AE171A /* UIAlertView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 92D340D66F03F31237B70F23FE9B00D0 /* UIAlertView+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 994580EAAB3547FFCA0E969378A7AC2E /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D23C407A7CDBFD244D6115899F9D45D /* Promise.swift */; }; + 995CE773471ADA3D5FEB52DF624174C6 /* CALayer+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 27E0FE41D771BE8BE3F0D4F1DAD0B179 /* CALayer+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9D7DE077DBB18ADD8C4272A59BEB323A /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1D1571AB15108DF6F9C4FE2064E3C43 /* Alamofire.framework */; }; + 9E7DA5C2386E5EA1D57B8C9A38D0A509 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = A92242715FB4C0608F8DCEBF8F3791E2 /* dispatch_promise.m */; }; A2C172FE407C0BC3478ADCA91A6C9CEC /* Manager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D51C929AC51E34493AA757180C09C3B /* Manager.swift */; }; A3505FA2FB3067D53847AD288AC04F03 /* Download.swift in Sources */ = {isa = PBXBuildFile; fileRef = A04177B09D9596450D827FE49A36C4C4 /* Download.swift */; }; - AB06DA1AC0FA3BDF50BAAEBBD06AB46E /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = A02D16E80C10DF32F2A88A66B83D7DD9 /* Model200Response.swift */; }; - AC30241BA84931703B312A09DD64C648 /* Umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A8906F6D6920DF197965D1740A7E283 /* Umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5EBC0528F4371B43BFA5A2293089BB5 /* dispatch_promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 392FA21A33296B88F790D62A4FAA4E4E /* dispatch_promise.swift */; }; + AA38773839F0E81980834A7A374BA9DC /* InlineResponse200.swift in Sources */ = {isa = PBXBuildFile; fileRef = 176079DAA9CD16ADABA2C18C289C529D /* InlineResponse200.swift */; }; + AC6DCF4BF95F44A46CF6BC9230AD6604 /* UIActionSheet+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD570E28B63274E742E7D1FBBD55BB41 /* UIActionSheet+Promise.swift */; }; + B0AB13A8C68D6972CEDF64FB39D38CB4 /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = 275DA9A664C70DD40A4059090D1A00D4 /* after.swift */; }; B0FB4B01682814B9E3D32F9DC4A5E762 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B476A57549D7994745E17A6DE5BE745 /* Alamofire.swift */; }; - B0FB5055748E072728CA7129C3CAA3C6 /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7220AB25575F15EB89521DFE33F4B764 /* APIs.swift */; }; - B4FAA3F0ED04F0506E66FCD7141AD989 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4B4E403BC5209472D6DA0EEF82A8BD9 /* APIHelper.swift */; }; + B26D78FFEBAA030D8E8D44B67888C4C2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB15A61DB7ABCB74565286162157C5A0 /* Foundation.framework */; }; + B2C0216914777E4B58E1827D854886C2 /* URLDataPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7CE161ED0CF68954A63F30528ACAD9B /* URLDataPromise.swift */; }; B6D2DC3E3DA44CD382B9B425F40E11C1 /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 139346EB669CBE2DE8FE506E14A2BA9C /* Alamofire-dummy.m */; }; - B72EE02E33CE31F594630D54EEEF9A15 /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = F4B6A98D6DAF474045210F5A74FF1C3C /* hang.m */; }; - B908D3F77F293FC72B20EEB48208F5C6 /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = 980FD13F87B44BFD90F8AC129BEB2E61 /* race.swift */; }; - BF2A197091B6FC0646CFA61A5FBE66AF /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 143BC30E5DDAF52A3D9578F507EC6A41 /* when.m */; }; - BFA18BBF784D749FE8BFA654088F3630 /* join.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84319E048FE6DD89B905FA3A81005C5F /* join.swift */; }; - C04283A3B7479C8EDE2B95F4DDEE2C2C /* UIViewController+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BA017E288BB42E06EBEE9C6E6993EAF /* UIViewController+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C4688FFE2C4E161516878B521EF54FBE /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B25BD9A4F08A3124D223BDB55576886 /* AlamofireImplementations.swift */; }; + B9096C0EE89EC783BDDC77E1F07314E4 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = C716D7A2A32272C40DFA0AAC76DC0E1E /* Tag.swift */; }; + BC9F5678D442E5AA1B14083554B7B1C8 /* CALayer+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A22F2595054D39018E03961CA7283A /* CALayer+AnyPromise.m */; }; + BCCC0421EE641F782CA295FBD240E2E1 /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 535DF88FC12304114DEF55E4003421B2 /* NSURLSession+Promise.swift */; }; + BEE4B5067218AB107DDECC8B09569EFC /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B7E90A568681E000EF3CB0917584F3C /* AnyPromise.m */; }; + C5EEED0AFF5E2C5AAE2A646689B73DA3 /* UIViewController+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = AA24C5EC82CF437D8D1FFFAB68975408 /* UIViewController+AnyPromise.m */; }; C75519F0450166A6F28126ECC7664E9C /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA1AD92813B887E2D017D051B8C0E3D2 /* Validation.swift */; }; - C95D8B9276E75DA8F6DECCDCE147C781 /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = 6AD59903FAA8315AD0036AC459FFB97F /* join.m */; }; - C96CB79BD56A7931541FC22617A2D613 /* UIAlertView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 92D340D66F03F31237B70F23FE9B00D0 /* UIAlertView+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CCA3921F36A6B36DC1F993112BEF0602 /* NSURLConnection+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = BAE48ACA10E8895BB8BF5CE8C0846B4B /* NSURLConnection+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CA0AABE1706F8B94DC37330AB2BC062C /* Umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A8906F6D6920DF197965D1740A7E283 /* Umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CB4E6EA27EA59B8851C744CA7D98A2BA /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A112EF8BB3933C1C1E42F11B3DD3B02A /* PromiseKit.framework */; }; + CE7DAD64CE27C4B98432BDB1CB0E21C7 /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AEDC82569B65EDA2A3D12E1F9B8A2D8 /* Dog.swift */; }; + D1E26E1C25F870E9A0AEC9240E589D75 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = C295084120B300E8BDB7B91981B104FC /* Name.swift */; }; D1E8B31EFCBDE00F108E739AD69425C0 /* Pods-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BCC458FDD5F692BBB2BFC64BB5701FC /* Pods-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; D21B7325B3642887BFBE977E021F2D26 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD558DDCDDA1B46951548B02C34277EF /* ResponseSerialization.swift */; }; + D258F1E893340393ADABCB02B9FBA206 /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F19945EE403F7B29D8B1939EA6D579A /* AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D2C7190FC2A0F2868EB7C89F5CFA526B /* State.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DC63EB77B3791891517B98CAA115DE8 /* State.swift */; }; D358A828E68E152D06FC8E35533BF00B /* OMGHTTPURLRQ-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F36B65CF990C57DC527824ED0BA1915 /* OMGHTTPURLRQ-dummy.m */; }; - D46A1F4211ACD4C9EF7726AFAD2609EA /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71972929AF72164C887BB8F5F1059089 /* User.swift */; }; - D55A97CF31106A21298F731FC890BCA1 /* UIActionSheet+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 6846D22C9F0CCBC48DF833E309A8E84F /* UIActionSheet+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D39F4FBEE42A57E59471B2A0997FE4CF /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = F4B6A98D6DAF474045210F5A74FF1C3C /* hang.m */; }; + D57DA5AC37CE3CEA92958C9528F80FD9 /* UIActionSheet+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 9774D31336C85248A115B569E7D95283 /* UIActionSheet+AnyPromise.m */; }; D75CA395D510E08C404E55F5BDAE55CE /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A9CB35983E4859DFFBAD8840196A094 /* Error.swift */; }; - D78AD94D0DBA6A1CC4E6673D2F14C832 /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 4798BAC01B0E3F07E3BBBB07BA57F2D7 /* NSNotificationCenter+AnyPromise.m */; }; - D854F67FD7486C6D25CA841C7D2D5030 /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5973BC143AE488C12FFB1E83E71F0C45 /* AnyPromise.swift */; }; + D839A38DEEDDB887F186714D75E73431 /* Promise+Properties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E0DBDE561A6C2E7AC7A24160F8A5F28 /* Promise+Properties.swift */; }; + DC710F75309F7DFEA3C5AB01E9288681 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAA644003A8DF304D35F77FE04B8AB17 /* AlamofireImplementations.swift */; }; + DCFE64070EE0BB77557935AD2A4ABF62 /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16730DAF3E51C161D8247E473F069E71 /* when.swift */; }; DD8D067A7F742F39B87FA04CE12DD118 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB15A61DB7ABCB74565286162157C5A0 /* Foundation.framework */; }; - DF8DB782B7C2F5EEC7F29E2E2A5F8154 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB15A61DB7ABCB74565286162157C5A0 /* Foundation.framework */; }; - E6810077387057466534FD27AA294211 /* UIViewController+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6D459D0AB2361B48F81C4D14C6D0DAA /* UIViewController+Promise.swift */; }; - E6B182F5E233FB9F529BEFEAD3D02ACF /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F19945EE403F7B29D8B1939EA6D579A /* AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E6FDE3505ED7CEF6B87500A5C52B7938 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1D1571AB15108DF6F9C4FE2064E3C43 /* Alamofire.framework */; }; - E8DDC87F287107068FF40443CF059433 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = A92242715FB4C0608F8DCEBF8F3791E2 /* dispatch_promise.m */; }; - E93C3C3AABF32094F0D673E3EC3B2C20 /* dispatch_promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 392FA21A33296B88F790D62A4FAA4E4E /* dispatch_promise.swift */; }; - EC5B36837863572EC400633CD2FFAF94 /* PromiseKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9042667D08D783E45394FE8B97EE6468 /* PromiseKit-dummy.m */; }; - F049FFBDC929BB045C2AEDF0ECABE513 /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B7E90A568681E000EF3CB0917584F3C /* AnyPromise.m */; }; - F70B5EF0A4B94F8FF906073882DCDB78 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 094C870CE73CCEC940F4DA86D7FE0C30 /* UserAPI.swift */; }; - F8C6EBC22D97E301AA4EA4D04B3FC860 /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = C909E10C22B35220020268EF2BF27E18 /* Pet.swift */; }; - F8DAC10D25E6E36B83261AC032A77F1A /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BFFA6FD621E9ED341AA89AEAC1604D7 /* PromiseKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FA78EA5177275F71FD7F2C52F6B7518D /* PMKAlertController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C731FBFCC690050C6C08E5AC9D9DC724 /* PMKAlertController.swift */; }; + E1EB5507436EFBD58AF7B9FF051A5AC4 /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = C476B916B763E55E4161F0B30760C4E8 /* afterlife.swift */; }; + E3AB1EE3B8DECE5D55D9EB64B0D05E93 /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = A29C027BA870C5E7975BF50087CAE384 /* Pet.swift */; }; + E62ABEDB4D7B179589B75C8423C5BF9B /* NSURLConnection+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = BAE48ACA10E8895BB8BF5CE8C0846B4B /* NSURLConnection+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E74976C9C4A5EF60B0A9CA1285693DDF /* UIView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = BCDD82DB3E6D43BA9769FCA9B744CB5E /* UIView+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + EB0C1A986BDF161D01919BCCCAE40D7E /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 076251AD10B5F4E8880F4C350E1D9D5A /* Animal.swift */; }; + F0E47CCDA10383F8489C3839FD0DF755 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A1DC80A0773C5A569348DC442EAFD1D /* UIKit.framework */; }; + F1E37BB11F68A6A76DF44B230F965E05 /* PetstoreClient-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F681D2C508D1BA8F62893120D9343A4 /* PetstoreClient-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F3D3D4088EDA3359CC0E5EBA9B683959 /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F2773E2F96E394825BE86FA45E48132 /* PetAPI.swift */; }; + F4448E76D51EBACC2B20CDFE3D2D90D7 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91579AC4E335E76904DB4DB54228CC42 /* Order.swift */; }; + F4C2BD51185019A010DA83458B007F81 /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = B93FB4BB16CFB41DCA35A8CFAD7A7FEF /* NSNotificationCenter+Promise.swift */; }; + F4E24EB57CB59F112060100A4B9E5D10 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 558DFECE2C740177CA6357DA71A1DFBB /* Error.swift */; }; FC14480CECE872865A9C6E584F886DA3 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 133C5287CFDCB3B67578A7B1221E132C /* Request.swift */; }; FEF0D7653948988B804226129471C1EC /* Stream.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A8F373B23E0F7FB68B0BA71D92D1C60 /* Stream.swift */; }; + FF5CD62C722D6A68AD65462B56D7CB72 /* UIView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F0F4EDC2236E1C270DC2014181D6506 /* UIView+AnyPromise.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -117,23 +121,23 @@ isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = E1B34E9A45508C6EDDA7F25D88C85434; + remoteGlobalIDString = 57958C5706F810052A634C1714567A9F; remoteInfo = PetstoreClient; }; - 098BDC6B6850C9E726FB5016BB254FC7 /* PBXContainerItemProxy */ = { + 23252B1F29F10BD972ECD7BA34F20EA8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 190ACD3A51BC90B85EADB13E9CDD207B; + remoteInfo = OMGHTTPURLRQ; + }; + 56AF0748FFC13AD34ECC967C04930EF8 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; remoteGlobalIDString = 432ECC54282C84882B482CCB4CF227FC; remoteInfo = Alamofire; }; - 11BAC0C3DDD46F7C7EA2DE10681BBE09 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = A348BE32D0894EA7204BDCB3F0DF636F; - remoteInfo = PromiseKit; - }; 769630CDAAA8C24AA5B4C81A85C45AC8 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; @@ -152,24 +156,25 @@ isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = A348BE32D0894EA7204BDCB3F0DF636F; + remoteGlobalIDString = D9A01D449983C8E3EF61C0CA4A7D8F59; remoteInfo = PromiseKit; }; - BAB3DC0D4AB6EA5B20F7BA63A3F779EC /* PBXContainerItemProxy */ = { + EEB067570D28F14A138B737F596BCB1A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 190ACD3A51BC90B85EADB13E9CDD207B; - remoteInfo = OMGHTTPURLRQ; + remoteGlobalIDString = D9A01D449983C8E3EF61C0CA4A7D8F59; + remoteInfo = PromiseKit; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 045C1F608ADE57757E6732D721779F22 /* NSError+Cancellation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSError+Cancellation.h"; path = "Sources/NSError+Cancellation.h"; sourceTree = ""; }; 04A22F2595054D39018E03961CA7283A /* CALayer+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "CALayer+AnyPromise.m"; path = "Categories/QuartzCore/CALayer+AnyPromise.m"; sourceTree = ""; }; - 094C870CE73CCEC940F4DA86D7FE0C30 /* UserAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 076251AD10B5F4E8880F4C350E1D9D5A /* Animal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; 0A8906F6D6920DF197965D1740A7E283 /* Umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Umbrella.h; path = Sources/Umbrella.h; sourceTree = ""; }; 0BA017E288BB42E06EBEE9C6E6993EAF /* UIViewController+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIViewController+AnyPromise.h"; path = "Categories/UIKit/UIViewController+AnyPromise.h"; sourceTree = ""; }; + 0C24509ECAD94A91B30D87D8B2DEEB9B /* Model200Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; 0F36B65CF990C57DC527824ED0BA1915 /* OMGHTTPURLRQ-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "OMGHTTPURLRQ-dummy.m"; sourceTree = ""; }; 122D5005A81832479161CD1D223C573A /* PromiseKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-prefix.pch"; sourceTree = ""; }; 133C5287CFDCB3B67578A7B1221E132C /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; @@ -178,20 +183,23 @@ 143BC30E5DDAF52A3D9578F507EC6A41 /* when.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = when.m; path = Sources/when.m; sourceTree = ""; }; 16730DAF3E51C161D8247E473F069E71 /* when.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = when.swift; path = Sources/when.swift; sourceTree = ""; }; 16D7C901D915C251DEBA27AC1EF57E34 /* OMGHTTPURLRQ.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = OMGHTTPURLRQ.xcconfig; sourceTree = ""; }; - 1A44CBCE721F71F03C7758DB3F36CDFF /* PetAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 176079DAA9CD16ADABA2C18C289C529D /* InlineResponse200.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = InlineResponse200.swift; sourceTree = ""; }; + 17CBD3DEAD30C207791B4B1A5AD66991 /* ModelReturn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ModelReturn.swift; sourceTree = ""; }; 1B7E90A568681E000EF3CB0917584F3C /* AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AnyPromise.m; path = Sources/AnyPromise.m; sourceTree = ""; }; + 1C7FF1C1E487B6795C5F6734CCA49DF3 /* StoreAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; 1F19945EE403F7B29D8B1939EA6D579A /* AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AnyPromise.h; path = Sources/AnyPromise.h; sourceTree = ""; }; 1FBD351D007CF4095C98C9DFD9D83D61 /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; 24C79ED4B5226F263307B22E96E88F9F /* OMGHTTPURLRQ.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = OMGHTTPURLRQ.modulemap; sourceTree = ""; }; 25614E715DDC170DAFB0DF50C5503E33 /* OMGFormURLEncode.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OMGFormURLEncode.m; path = Sources/OMGFormURLEncode.m; sourceTree = ""; }; 275DA9A664C70DD40A4059090D1A00D4 /* after.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = after.swift; path = Sources/after.swift; sourceTree = ""; }; 27E0FE41D771BE8BE3F0D4F1DAD0B179 /* CALayer+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "CALayer+AnyPromise.h"; path = "Categories/QuartzCore/CALayer+AnyPromise.h"; sourceTree = ""; }; - 2B25BD9A4F08A3124D223BDB55576886 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; + 2BAE461B3A62164A09480E8967D29E64 /* Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; 2BCC458FDD5F692BBB2BFC64BB5701FC /* Pods-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-umbrella.h"; sourceTree = ""; }; 2D51C929AC51E34493AA757180C09C3B /* Manager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Manager.swift; path = Source/Manager.swift; sourceTree = ""; }; + 2E506C8F40F5AD602D83B383EAA7C0CD /* APIHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; 2F0F4EDC2236E1C270DC2014181D6506 /* UIView+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+AnyPromise.m"; path = "Categories/UIKit/UIView+AnyPromise.m"; sourceTree = ""; }; - 2F98C30F79A0AB5920FB4CDBB7413E5C /* Name.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; 30CE7341A995EF6812D71771E74CF7F7 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; + 323E5DCC342B03D7AE59F37523D2626A /* APIs.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; 3530BF15E14D1F6D7134EE67377D5C8C /* OMGHTTPURLRQ.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OMGHTTPURLRQ.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3616971BAEF40302B7F2F8B1007C0B2B /* NSNotificationCenter+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSNotificationCenter+AnyPromise.h"; path = "Categories/Foundation/NSNotificationCenter+AnyPromise.h"; sourceTree = ""; }; 392FA21A33296B88F790D62A4FAA4E4E /* dispatch_promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = dispatch_promise.swift; path = Sources/dispatch_promise.swift; sourceTree = ""; }; @@ -214,16 +222,14 @@ 5DF5FC3AF99846209C5FCE55A2E12D9A /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; 5F14E17B4D6BDF8BD3E384BE6528F744 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; 6846D22C9F0CCBC48DF833E309A8E84F /* UIActionSheet+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIActionSheet+AnyPromise.h"; path = "Categories/UIKit/UIActionSheet+AnyPromise.h"; sourceTree = ""; }; + 6A60B64E388679F589CB959AA5FC4787 /* Models.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; 6AD59903FAA8315AD0036AC459FFB97F /* join.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = join.m; path = Sources/join.m; sourceTree = ""; }; - 6D0925CA00A7877078F60FAD44E2DD0F /* Category.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 71972929AF72164C887BB8F5F1059089 /* User.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - 7220AB25575F15EB89521DFE33F4B764 /* APIs.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - 780827122613E6D246695ADFAA7B28B6 /* Tag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + 6AEDC82569B65EDA2A3D12E1F9B8A2D8 /* Dog.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + 71B762588C78E0A95319F5BB534965BE /* Category.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; 792D14AC86CD98AA9C31373287E0F353 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 79A9DEDC89FE8336BF5FEDAAF75BF7FC /* Pods.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Pods.modulemap; sourceTree = ""; }; 7E0DBDE561A6C2E7AC7A24160F8A5F28 /* Promise+Properties.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Properties.swift"; path = "Sources/Promise+Properties.swift"; sourceTree = ""; }; 84319E048FE6DD89B905FA3A81005C5F /* join.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = join.swift; path = Sources/join.swift; sourceTree = ""; }; - 84A386C655413763AEE8133A102DF2C8 /* Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; 8749F40CC17CE0C26C36B0F431A9C8F0 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Alamofire.modulemap; sourceTree = ""; }; 87B213035BAC5F75386F62D3C75D2342 /* Pods-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-acknowledgements.plist"; sourceTree = ""; }; 87BC7910B8D7D31310A07C32438A8C67 /* OMGUserAgent.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OMGUserAgent.h; path = Sources/OMGUserAgent.h; sourceTree = ""; }; @@ -233,25 +239,26 @@ 8B476A57549D7994745E17A6DE5BE745 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; 8DC63EB77B3791891517B98CAA115DE8 /* State.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = State.swift; path = Sources/State.swift; sourceTree = ""; }; 9042667D08D783E45394FE8B97EE6468 /* PromiseKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PromiseKit-dummy.m"; sourceTree = ""; }; + 91579AC4E335E76904DB4DB54228CC42 /* Order.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; 92D340D66F03F31237B70F23FE9B00D0 /* UIAlertView+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIAlertView+AnyPromise.h"; path = "Categories/UIKit/UIAlertView+AnyPromise.h"; sourceTree = ""; }; - 94FB3F3CEFBA56B306D034B69144C68E /* InlineResponse200.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = InlineResponse200.swift; sourceTree = ""; }; + 93B41BBA87E8FD7BD3513CD49733EB30 /* FormatTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; 9774D31336C85248A115B569E7D95283 /* UIActionSheet+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIActionSheet+AnyPromise.m"; path = "Categories/UIKit/UIActionSheet+AnyPromise.m"; sourceTree = ""; }; 977577C045EDA9D9D1F46E2598D19FC7 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.debug.xcconfig; sourceTree = ""; }; 980FD13F87B44BFD90F8AC129BEB2E61 /* race.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = race.swift; path = Sources/race.swift; sourceTree = ""; }; + 9D172F6D749B7735D04B495330AB7FE3 /* Cat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; 9D579267FC1F163C8F04B444DAEFED0D /* OMGHTTPURLRQ.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OMGHTTPURLRQ.m; path = Sources/OMGHTTPURLRQ.m; sourceTree = ""; }; + 9F2773E2F96E394825BE86FA45E48132 /* PetAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; 9F681D2C508D1BA8F62893120D9343A4 /* PetstoreClient-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PetstoreClient-umbrella.h"; sourceTree = ""; }; - A02D16E80C10DF32F2A88A66B83D7DD9 /* Model200Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; A04177B09D9596450D827FE49A36C4C4 /* Download.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Download.swift; path = Source/Download.swift; sourceTree = ""; }; A112EF8BB3933C1C1E42F11B3DD3B02A /* PromiseKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A1D1571AB15108DF6F9C4FE2064E3C43 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A27DF5A602B1BB474A141C895934F712 /* StoreAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - A360D2EE0575D36C8C8459BCB8325D9A /* Models.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - A4B4E403BC5209472D6DA0EEF82A8BD9 /* APIHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - A58E34C4DDB909B2CA900747C6691A5A /* ObjectReturn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ObjectReturn.swift; sourceTree = ""; }; + A29C027BA870C5E7975BF50087CAE384 /* Pet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + A3CC2D1A2A451C0A3C4DBD6D7E117C01 /* ObjectReturn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ObjectReturn.swift; sourceTree = ""; }; A7F0DAACAC89A93B940BBE54E6A87E9F /* NSURLConnection+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLConnection+AnyPromise.m"; path = "Categories/Foundation/NSURLConnection+AnyPromise.m"; sourceTree = ""; }; A92242715FB4C0608F8DCEBF8F3791E2 /* dispatch_promise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = dispatch_promise.m; path = Sources/dispatch_promise.m; sourceTree = ""; }; AA24C5EC82CF437D8D1FFFAB68975408 /* UIViewController+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+AnyPromise.m"; path = "Categories/UIKit/UIViewController+AnyPromise.m"; sourceTree = ""; }; AB4DA378490493502B34B20D4B12325B /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + AD05F019D163F2D5FE7C8E64C1D2E299 /* UserAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; B3A144887C8B13FD888B76AB096B0CA1 /* PetstoreClient-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PetstoreClient-prefix.pch"; sourceTree = ""; }; B868468092D7B2489B889A50981C9247 /* after.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = after.m; path = Sources/after.m; sourceTree = ""; }; B93FB4BB16CFB41DCA35A8CFAD7A7FEF /* NSNotificationCenter+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSNotificationCenter+Promise.swift"; path = "Categories/Foundation/NSNotificationCenter+Promise.swift"; sourceTree = ""; }; @@ -259,23 +266,26 @@ BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; BAE48ACA10E8895BB8BF5CE8C0846B4B /* NSURLConnection+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLConnection+AnyPromise.h"; path = "Categories/Foundation/NSURLConnection+AnyPromise.h"; sourceTree = ""; }; BCDD82DB3E6D43BA9769FCA9B744CB5E /* UIView+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+AnyPromise.h"; path = "Categories/UIKit/UIView+AnyPromise.h"; sourceTree = ""; }; - BEA71A34D3031D95E61F1082A5BEEB7A /* ModelReturn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ModelReturn.swift; sourceTree = ""; }; + C295084120B300E8BDB7B91981B104FC /* Name.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; C476B916B763E55E4161F0B30760C4E8 /* afterlife.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = afterlife.swift; path = Categories/Foundation/afterlife.swift; sourceTree = ""; }; + C716D7A2A32272C40DFA0AAC76DC0E1E /* Tag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; C731FBFCC690050C6C08E5AC9D9DC724 /* PMKAlertController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PMKAlertController.swift; path = Categories/UIKit/PMKAlertController.swift; sourceTree = ""; }; - C909E10C22B35220020268EF2BF27E18 /* Pet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; CA1AD92813B887E2D017D051B8C0E3D2 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; CA854180C132DB5511D64C82535C5FDE /* UIAlertView+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIAlertView+Promise.swift"; path = "Categories/UIKit/UIAlertView+Promise.swift"; sourceTree = ""; }; + CAA644003A8DF304D35F77FE04B8AB17 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; CBC0F7C552B739C909B650A0F42F7F38 /* Pods-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-resources.sh"; sourceTree = ""; }; CC49FF2A84C0E0E9349747D94036B728 /* PromiseKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PromiseKit.xcconfig; sourceTree = ""; }; CCE38472832BBCC541E646DA6C18EF9C /* Upload.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Upload.swift; path = Source/Upload.swift; sourceTree = ""; }; CDC4DD7DB9F4C34A288BECA73BC13B57 /* PromiseKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = PromiseKit.modulemap; sourceTree = ""; }; D0405803033A2A777B8E4DFA0C1800ED /* Pods-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-acknowledgements.markdown"; sourceTree = ""; }; D4248CF20178C57CEFEFAAF453C0DC75 /* PromiseKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D513E5F3C28C7B452E79AE279B71813D /* User.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; D6D459D0AB2361B48F81C4D14C6D0DAA /* UIViewController+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIViewController+Promise.swift"; path = "Categories/UIKit/UIViewController+Promise.swift"; sourceTree = ""; }; D6EB54C331FED437583A5F01EB2757D1 /* NSObject+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSObject+Promise.swift"; path = "Categories/Foundation/NSObject+Promise.swift"; sourceTree = ""; }; D931A99C6B5A8E0F69C818C6ECC3C44F /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; DA312349A49333542E6F4B36B329960E /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.release.xcconfig; sourceTree = ""; }; DADAB10704E49D6B9E18F59F995BB88F /* PetstoreClient.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PetstoreClient.xcconfig; sourceTree = ""; }; + DED58811444E6D32A1F7B372F034DB7A /* SpecialModelName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; E11BFB27B43B742CB5D6086C4233A909 /* OMGUserAgent.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OMGUserAgent.m; path = Sources/OMGUserAgent.m; sourceTree = ""; }; E160B50E4D11692AA38E74C897D69C61 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E3CDA0958D6247505ECD9098D662EA74 /* UIView+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+Promise.swift"; path = "Categories/UIKit/UIView+Promise.swift"; sourceTree = ""; }; @@ -284,12 +294,10 @@ E7F21354943D9F42A70697D5A5EF72E9 /* Pods-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-frameworks.sh"; sourceTree = ""; }; E8446514FBAD26C0E18F24A5715AEF67 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; EBC4140FCBB5B4D3A955B1608C165C04 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - EE5E0F8BA6AB1430D31588F5EB170889 /* Order.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; F075F63EFE77F7B59FF77CBA95B9AADF /* UIAlertView+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIAlertView+AnyPromise.m"; path = "Categories/UIKit/UIAlertView+AnyPromise.m"; sourceTree = ""; }; F0D4E00A8974E74325E9E53D456F9AD4 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; F4B6A98D6DAF474045210F5A74FF1C3C /* hang.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = hang.m; path = Sources/hang.m; sourceTree = ""; }; F7EBDD2EEED520E06ACB3538B3832049 /* OMGHTTPURLRQ-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OMGHTTPURLRQ-umbrella.h"; sourceTree = ""; }; - F7F371E5E2A26613C4DE253F4D7A3F56 /* SpecialModelName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; FB15A61DB7ABCB74565286162157C5A0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; FC4BF94DC4B3D8B88FC160B00931B0EC /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; FD558DDCDDA1B46951548B02C34277EF /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; @@ -297,13 +305,13 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 4B81AD7DF193F182592D3F3510F50796 /* Frameworks */ = { + 783E7A91F3C3404EDF234C828FCA6543 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - E6FDE3505ED7CEF6B87500A5C52B7938 /* Alamofire.framework in Frameworks */, - DF8DB782B7C2F5EEC7F29E2E2A5F8154 /* Foundation.framework in Frameworks */, - 77F020B749274FC61FD1D5EA3FBBBE18 /* PromiseKit.framework in Frameworks */, + 9D7DE077DBB18ADD8C4272A59BEB323A /* Alamofire.framework in Frameworks */, + B26D78FFEBAA030D8E8D44B67888C4C2 /* Foundation.framework in Frameworks */, + CB4E6EA27EA59B8851C744CA7D98A2BA /* PromiseKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -323,14 +331,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - C5452032741F5F809522C754A4393C4A /* Frameworks */ = { + DBF65F787DDFE72646CDC44CF9E22784 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 5849F4EAAAD24A116F0E0E948623AEC0 /* Foundation.framework in Frameworks */, - 0FFA3D017278D8EB24A9AC4780E3AFEC /* OMGHTTPURLRQ.framework in Frameworks */, - 09C9710BEE85A253331C8E0994FBB2BF /* QuartzCore.framework in Frameworks */, - 53FBECFDFCA1B755F2754C4DBC65E3D5 /* UIKit.framework in Frameworks */, + 39E7AFE23097B4BC393D43A44093FB63 /* Foundation.framework in Frameworks */, + 30F9F020F5B35577080063E71CDAB08C /* OMGHTTPURLRQ.framework in Frameworks */, + 0BB1E79782E3BE258C30A65A20C85FC1 /* QuartzCore.framework in Frameworks */, + F0E47CCDA10383F8489C3839FD0DF755 /* UIKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -354,6 +362,28 @@ name = UserAgent; sourceTree = ""; }; + 18E0A354B63748476BE2595538327E6C /* Models */ = { + isa = PBXGroup; + children = ( + 076251AD10B5F4E8880F4C350E1D9D5A /* Animal.swift */, + 9D172F6D749B7735D04B495330AB7FE3 /* Cat.swift */, + 71B762588C78E0A95319F5BB534965BE /* Category.swift */, + 6AEDC82569B65EDA2A3D12E1F9B8A2D8 /* Dog.swift */, + 93B41BBA87E8FD7BD3513CD49733EB30 /* FormatTest.swift */, + 176079DAA9CD16ADABA2C18C289C529D /* InlineResponse200.swift */, + 0C24509ECAD94A91B30D87D8B2DEEB9B /* Model200Response.swift */, + 17CBD3DEAD30C207791B4B1A5AD66991 /* ModelReturn.swift */, + C295084120B300E8BDB7B91981B104FC /* Name.swift */, + A3CC2D1A2A451C0A3C4DBD6D7E117C01 /* ObjectReturn.swift */, + 91579AC4E335E76904DB4DB54228CC42 /* Order.swift */, + A29C027BA870C5E7975BF50087CAE384 /* Pet.swift */, + DED58811444E6D32A1F7B372F034DB7A /* SpecialModelName.swift */, + C716D7A2A32272C40DFA0AAC76DC0E1E /* Tag.swift */, + D513E5F3C28C7B452E79AE279B71813D /* User.swift */, + ); + path = Models; + sourceTree = ""; + }; 1D2330E920AD5F6E4655BE449D006A77 /* Support Files */ = { isa = PBXGroup; children = ( @@ -376,20 +406,6 @@ name = "Development Pods"; sourceTree = ""; }; - 2B28CE488E7531BE86FAB354C15AD30E /* Swaggers */ = { - isa = PBXGroup; - children = ( - 2B25BD9A4F08A3124D223BDB55576886 /* AlamofireImplementations.swift */, - A4B4E403BC5209472D6DA0EEF82A8BD9 /* APIHelper.swift */, - 7220AB25575F15EB89521DFE33F4B764 /* APIs.swift */, - 84A386C655413763AEE8133A102DF2C8 /* Extensions.swift */, - A360D2EE0575D36C8C8459BCB8325D9A /* Models.swift */, - ADCA66FBD4BDE0A0E2B51D3E13DCA949 /* APIs */, - 8781DE8648430F3693508310D0B40CA0 /* Models */, - ); - path = Swaggers; - sourceTree = ""; - }; 75D98FF52E597A11900E131B6C4E1ADA /* Pods */ = { isa = PBXGroup; children = ( @@ -469,24 +485,6 @@ name = QuartzCore; sourceTree = ""; }; - 8781DE8648430F3693508310D0B40CA0 /* Models */ = { - isa = PBXGroup; - children = ( - 6D0925CA00A7877078F60FAD44E2DD0F /* Category.swift */, - 94FB3F3CEFBA56B306D034B69144C68E /* InlineResponse200.swift */, - A02D16E80C10DF32F2A88A66B83D7DD9 /* Model200Response.swift */, - BEA71A34D3031D95E61F1082A5BEEB7A /* ModelReturn.swift */, - 2F98C30F79A0AB5920FB4CDBB7413E5C /* Name.swift */, - A58E34C4DDB909B2CA900747C6691A5A /* ObjectReturn.swift */, - EE5E0F8BA6AB1430D31588F5EB170889 /* Order.swift */, - C909E10C22B35220020268EF2BF27E18 /* Pet.swift */, - F7F371E5E2A26613C4DE253F4D7A3F56 /* SpecialModelName.swift */, - 780827122613E6D246695ADFAA7B28B6 /* Tag.swift */, - 71972929AF72164C887BB8F5F1059089 /* User.swift */, - ); - path = Models; - sourceTree = ""; - }; 8EA2A359F1831ACBB15BAAEA04D6FB95 /* UIKit */ = { isa = PBXGroup; children = ( @@ -578,21 +576,11 @@ AD94092456F8ABCB18F74CAC75AD85DE /* Classes */ = { isa = PBXGroup; children = ( - 2B28CE488E7531BE86FAB354C15AD30E /* Swaggers */, + DFFDD7A6740B9120EF97F5F72A59157D /* Swaggers */, ); path = Classes; sourceTree = ""; }; - ADCA66FBD4BDE0A0E2B51D3E13DCA949 /* APIs */ = { - isa = PBXGroup; - children = ( - 1A44CBCE721F71F03C7758DB3F36CDFF /* PetAPI.swift */, - A27DF5A602B1BB474A141C895934F712 /* StoreAPI.swift */, - 094C870CE73CCEC940F4DA86D7FE0C30 /* UserAPI.swift */, - ); - path = APIs; - sourceTree = ""; - }; B7B80995527643776607AFFA75B91E24 /* Targets Support Files */ = { isa = PBXGroup; children = ( @@ -629,6 +617,16 @@ name = CorePromise; sourceTree = ""; }; + CA9F1413BA9B41923CFFA1AAB2765441 /* APIs */ = { + isa = PBXGroup; + children = ( + 9F2773E2F96E394825BE86FA45E48132 /* PetAPI.swift */, + 1C7FF1C1E487B6795C5F6734CCA49DF3 /* StoreAPI.swift */, + AD05F019D163F2D5FE7C8E64C1D2E299 /* UserAPI.swift */, + ); + path = APIs; + sourceTree = ""; + }; CF22FA3EE19C3EC42FEBA1247EB70D85 /* Pods */ = { isa = PBXGroup; children = ( @@ -663,6 +661,20 @@ path = PromiseKit; sourceTree = ""; }; + DFFDD7A6740B9120EF97F5F72A59157D /* Swaggers */ = { + isa = PBXGroup; + children = ( + CAA644003A8DF304D35F77FE04B8AB17 /* AlamofireImplementations.swift */, + 2E506C8F40F5AD602D83B383EAA7C0CD /* APIHelper.swift */, + 323E5DCC342B03D7AE59F37523D2626A /* APIs.swift */, + 2BAE461B3A62164A09480E8967D29E64 /* Extensions.swift */, + 6A60B64E388679F589CB959AA5FC4787 /* Models.swift */, + CA9F1413BA9B41923CFFA1AAB2765441 /* APIs */, + 18E0A354B63748476BE2595538327E6C /* Models */, + ); + path = Swaggers; + sourceTree = ""; + }; E73D9BF152C59F341559DE62A3143721 /* PetstoreClient */ = { isa = PBXGroup; children = ( @@ -713,6 +725,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 661BAF8916A434EEB8B0CDCC39DF19C2 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + F1E37BB11F68A6A76DF44B230F965E05 /* PetstoreClient-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 7E1332ABD911123D7A873D6D87E2F182 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -732,29 +752,21 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - A11C62D33B885E6DA9FECD0493A47746 /* Headers */ = { + CC349308BCECD7B68C93EB3091B72E61 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - E6B182F5E233FB9F529BEFEAD3D02ACF /* AnyPromise.h in Headers */, - 2676E85B9644D55E25A31D3CE61A5726 /* CALayer+AnyPromise.h in Headers */, - 0D6DCC756D1B0B68ADB5F805D575BAB6 /* NSError+Cancellation.h in Headers */, - 1372840E154B63D17AACD1257C3E0520 /* NSNotificationCenter+AnyPromise.h in Headers */, - CCA3921F36A6B36DC1F993112BEF0602 /* NSURLConnection+AnyPromise.h in Headers */, - F8DAC10D25E6E36B83261AC032A77F1A /* PromiseKit.h in Headers */, - D55A97CF31106A21298F731FC890BCA1 /* UIActionSheet+AnyPromise.h in Headers */, - C96CB79BD56A7931541FC22617A2D613 /* UIAlertView+AnyPromise.h in Headers */, - 02D0672068E53F2D98CC67FBA5278022 /* UIView+AnyPromise.h in Headers */, - C04283A3B7479C8EDE2B95F4DDEE2C2C /* UIViewController+AnyPromise.h in Headers */, - AC30241BA84931703B312A09DD64C648 /* Umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BE7D2FA2E9F1656CC6B0266B63C0D938 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 64739E341A52DFA48F4169E4322E7486 /* PetstoreClient-umbrella.h in Headers */, + D258F1E893340393ADABCB02B9FBA206 /* AnyPromise.h in Headers */, + 995CE773471ADA3D5FEB52DF624174C6 /* CALayer+AnyPromise.h in Headers */, + 7BCBC4FD2E385CAFC5F3949FFFFE2095 /* NSError+Cancellation.h in Headers */, + 752EACD07B4F948C1F24E0583C5DA165 /* NSNotificationCenter+AnyPromise.h in Headers */, + E62ABEDB4D7B179589B75C8423C5BF9B /* NSURLConnection+AnyPromise.h in Headers */, + 1DB7E23C2A2A8D4B5CE046135E4540C6 /* PromiseKit.h in Headers */, + 63AF5DF795F5D610768B4AF53C7E9976 /* UIActionSheet+AnyPromise.h in Headers */, + 97BDDBBB6BA36B90E98FCD53B9AE171A /* UIAlertView+AnyPromise.h in Headers */, + E74976C9C4A5EF60B0A9CA1285693DDF /* UIView+AnyPromise.h in Headers */, + 66B8591A8CCC9760D933506B71A13962 /* UIViewController+AnyPromise.h in Headers */, + CA0AABE1706F8B94DC37330AB2BC062C /* Umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -795,6 +807,25 @@ productReference = EBC4140FCBB5B4D3A955B1608C165C04 /* Alamofire.framework */; productType = "com.apple.product-type.framework"; }; + 57958C5706F810052A634C1714567A9F /* PetstoreClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = C36F9DFB9BBE472AD46194868C8F885B /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildPhases = ( + 85A7E0C7933D1BC0EB062F281D1F19AD /* Sources */, + 783E7A91F3C3404EDF234C828FCA6543 /* Frameworks */, + 661BAF8916A434EEB8B0CDCC39DF19C2 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + F6093ED00F5D11A44F55549F1A4C778F /* PBXTargetDependency */, + 38BE3993D1A8CA768731BA0465C21F17 /* PBXTargetDependency */, + ); + name = PetstoreClient; + productName = PetstoreClient; + productReference = E160B50E4D11692AA38E74C897D69C61 /* PetstoreClient.framework */; + productType = "com.apple.product-type.framework"; + }; 7A5DBD588D2CC1C0CB1C42D4ED613FE4 /* Pods */ = { isa = PBXNativeTarget; buildConfigurationList = 8CB3C5DF3F4B6413A6F2D003B58CCF32 /* Build configuration list for PBXNativeTarget "Pods" */; @@ -816,43 +847,24 @@ productReference = D931A99C6B5A8E0F69C818C6ECC3C44F /* Pods.framework */; productType = "com.apple.product-type.framework"; }; - A348BE32D0894EA7204BDCB3F0DF636F /* PromiseKit */ = { + D9A01D449983C8E3EF61C0CA4A7D8F59 /* PromiseKit */ = { isa = PBXNativeTarget; - buildConfigurationList = 8567709BC3BD98E81A0E9B5AD85D011F /* Build configuration list for PBXNativeTarget "PromiseKit" */; + buildConfigurationList = FCAE2E57B1A9453B9D35EF9071C4C581 /* Build configuration list for PBXNativeTarget "PromiseKit" */; buildPhases = ( - FCE6B9AB03DB341C5159F1510AAA9722 /* Sources */, - C5452032741F5F809522C754A4393C4A /* Frameworks */, - A11C62D33B885E6DA9FECD0493A47746 /* Headers */, + E0A9A1079F8923D78CC7F6D7F87CD779 /* Sources */, + DBF65F787DDFE72646CDC44CF9E22784 /* Frameworks */, + CC349308BCECD7B68C93EB3091B72E61 /* Headers */, ); buildRules = ( ); dependencies = ( - DDA10AB05EE4CD847D1133226B79818E /* PBXTargetDependency */, + A48A5E27A5C878B373F0FE7365829141 /* PBXTargetDependency */, ); name = PromiseKit; productName = PromiseKit; productReference = D4248CF20178C57CEFEFAAF453C0DC75 /* PromiseKit.framework */; productType = "com.apple.product-type.framework"; }; - E1B34E9A45508C6EDDA7F25D88C85434 /* PetstoreClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = 715B91C131A5E33AED9768BD75742013 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; - buildPhases = ( - A6723A33627D0A815D42193CACD7E74A /* Sources */, - 4B81AD7DF193F182592D3F3510F50796 /* Frameworks */, - BE7D2FA2E9F1656CC6B0266B63C0D938 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - 0D6B2D0CAE4FAFE97E7D7D0EC2C6DCE0 /* PBXTargetDependency */, - A102D2D546E8C75239F44407687481EE /* PBXTargetDependency */, - ); - name = PetstoreClient; - productName = PetstoreClient; - productReference = E160B50E4D11692AA38E74C897D69C61 /* PetstoreClient.framework */; - productType = "com.apple.product-type.framework"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -876,9 +888,9 @@ targets = ( 432ECC54282C84882B482CCB4CF227FC /* Alamofire */, 190ACD3A51BC90B85EADB13E9CDD207B /* OMGHTTPURLRQ */, - E1B34E9A45508C6EDDA7F25D88C85434 /* PetstoreClient */, + 57958C5706F810052A634C1714567A9F /* PetstoreClient */, 7A5DBD588D2CC1C0CB1C42D4ED613FE4 /* Pods */, - A348BE32D0894EA7204BDCB3F0DF636F /* PromiseKit */, + D9A01D449983C8E3EF61C0CA4A7D8F59 /* PromiseKit */, ); }; /* End PBXProject section */ @@ -895,6 +907,37 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 85A7E0C7933D1BC0EB062F281D1F19AD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DC710F75309F7DFEA3C5AB01E9288681 /* AlamofireImplementations.swift in Sources */, + EB0C1A986BDF161D01919BCCCAE40D7E /* Animal.swift in Sources */, + 4E07AC40078EBB1C88ED8700859F5A1B /* APIHelper.swift in Sources */, + 4827FED90242878355B47A6D34BAABCA /* APIs.swift in Sources */, + 33326318BF830A838DA62D54ADAA5ECA /* Cat.swift in Sources */, + 7C87E63D6733AC0FE083373A5FAF86CB /* Category.swift in Sources */, + CE7DAD64CE27C4B98432BDB1CB0E21C7 /* Dog.swift in Sources */, + 2308448E8874D3DAA33A1AEFEFCFBA2D /* Extensions.swift in Sources */, + 8955A9B8A34594437C8D27C4C55BFC9E /* FormatTest.swift in Sources */, + AA38773839F0E81980834A7A374BA9DC /* InlineResponse200.swift in Sources */, + 10E93502CF9CED0B6341DB95B658F2F9 /* Model200Response.swift in Sources */, + 7DAC8F56FC00F6400AC3BF3AF79ACAFD /* ModelReturn.swift in Sources */, + 5EECE3F98893B2D4E03DC027C57C21F3 /* Models.swift in Sources */, + D1E26E1C25F870E9A0AEC9240E589D75 /* Name.swift in Sources */, + 623677B20997F5EC0F6CA695CADD410B /* ObjectReturn.swift in Sources */, + F4448E76D51EBACC2B20CDFE3D2D90D7 /* Order.swift in Sources */, + E3AB1EE3B8DECE5D55D9EB64B0D05E93 /* Pet.swift in Sources */, + F3D3D4088EDA3359CC0E5EBA9B683959 /* PetAPI.swift in Sources */, + 92EEF6DC60C3CA25AA3997D2652A28F9 /* PetstoreClient-dummy.m in Sources */, + 14FD108A5B931460A799BDCB874A99C3 /* SpecialModelName.swift in Sources */, + 41C531C4CEDCAE196A6F92FEAE66CCF3 /* StoreAPI.swift in Sources */, + B9096C0EE89EC783BDDC77E1F07314E4 /* Tag.swift in Sources */, + 895CB65D12461DA4EA243ACE8346D21F /* User.swift in Sources */, + 0B0F79070CD75DE3CF053E58B491A3AC /* UserAPI.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 91F4D6732A1613C9660866E34445A67B /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -903,30 +946,45 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - A6723A33627D0A815D42193CACD7E74A /* Sources */ = { + E0A9A1079F8923D78CC7F6D7F87CD779 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - C4688FFE2C4E161516878B521EF54FBE /* AlamofireImplementations.swift in Sources */, - B4FAA3F0ED04F0506E66FCD7141AD989 /* APIHelper.swift in Sources */, - B0FB5055748E072728CA7129C3CAA3C6 /* APIs.swift in Sources */, - 3D2B170AA3737444F26B0E07E1F5FEF1 /* Category.swift in Sources */, - 91DF85663A3771DCD35D0FF07135959B /* Extensions.swift in Sources */, - 57FB6BF21435F091D48B97DBD36E8C7B /* InlineResponse200.swift in Sources */, - AB06DA1AC0FA3BDF50BAAEBBD06AB46E /* Model200Response.swift in Sources */, - 9DA852770BE32039F2C21096F27872A0 /* ModelReturn.swift in Sources */, - 76FAA23C0A28ECF0BBF6A5C14203F414 /* Models.swift in Sources */, - 1B099FB3AA9A6794A3039899A6734205 /* Name.swift in Sources */, - 63F6FFAB2BCCD07FD3DF44086E11C8B0 /* ObjectReturn.swift in Sources */, - 0F816E94051557A7BA9BFA5B6B4A32A5 /* Order.swift in Sources */, - F8C6EBC22D97E301AA4EA4D04B3FC860 /* Pet.swift in Sources */, - 8ABFD5E4F7621D554DBB12C6472A8313 /* PetAPI.swift in Sources */, - 886AC602EE7FCFDCD2DCD470CCB41721 /* PetstoreClient-dummy.m in Sources */, - 167B939D70FE9AADBA03ABBBBA588B4B /* SpecialModelName.swift in Sources */, - 97A9635E99E7EB0F33260600E1AC82F6 /* StoreAPI.swift in Sources */, - 335F10113F178E8D2984BE0602A0DEED /* Tag.swift in Sources */, - D46A1F4211ACD4C9EF7726AFAD2609EA /* User.swift in Sources */, - F70B5EF0A4B94F8FF906073882DCDB78 /* UserAPI.swift in Sources */, + 2DF2D3E610EB6F19375570C0EBA9E77F /* after.m in Sources */, + B0AB13A8C68D6972CEDF64FB39D38CB4 /* after.swift in Sources */, + E1EB5507436EFBD58AF7B9FF051A5AC4 /* afterlife.swift in Sources */, + BEE4B5067218AB107DDECC8B09569EFC /* AnyPromise.m in Sources */, + 38FE2977C973FA258977E86E1E964E02 /* AnyPromise.swift in Sources */, + BC9F5678D442E5AA1B14083554B7B1C8 /* CALayer+AnyPromise.m in Sources */, + 9E7DA5C2386E5EA1D57B8C9A38D0A509 /* dispatch_promise.m in Sources */, + A5EBC0528F4371B43BFA5A2293089BB5 /* dispatch_promise.swift in Sources */, + F4E24EB57CB59F112060100A4B9E5D10 /* Error.swift in Sources */, + D39F4FBEE42A57E59471B2A0997FE4CF /* hang.m in Sources */, + 7CE6DE14AB43CB51B4D5C5BA4293C47B /* join.m in Sources */, + 72B2C8A6E81C1E99E6093BE3BDBDE554 /* join.swift in Sources */, + 445F515F4FAB3537878E1377562BBBA7 /* NSNotificationCenter+AnyPromise.m in Sources */, + F4C2BD51185019A010DA83458B007F81 /* NSNotificationCenter+Promise.swift in Sources */, + 8809E3D6CC478B4AC9FA6C2389A5447F /* NSObject+Promise.swift in Sources */, + 8C749DAB8EA0585A7A5769F38CB33CBC /* NSURLConnection+AnyPromise.m in Sources */, + 7120EA2BF0D3942FF9CE0EDABBF86BA1 /* NSURLConnection+Promise.swift in Sources */, + BCCC0421EE641F782CA295FBD240E2E1 /* NSURLSession+Promise.swift in Sources */, + 82BEAE7085889DB1A860FE690273EA7E /* PMKAlertController.swift in Sources */, + D839A38DEEDDB887F186714D75E73431 /* Promise+Properties.swift in Sources */, + 994580EAAB3547FFCA0E969378A7AC2E /* Promise.swift in Sources */, + 5E46AC6FA35723E095C2EB6ED23C0510 /* PromiseKit-dummy.m in Sources */, + 81970BD13A497C0962CBEA922C1DAB3E /* race.swift in Sources */, + D2C7190FC2A0F2868EB7C89F5CFA526B /* State.swift in Sources */, + D57DA5AC37CE3CEA92958C9528F80FD9 /* UIActionSheet+AnyPromise.m in Sources */, + AC6DCF4BF95F44A46CF6BC9230AD6604 /* UIActionSheet+Promise.swift in Sources */, + 655C3826275A76D04835F2336AC87A91 /* UIAlertView+AnyPromise.m in Sources */, + 5FDCAFE73B791C4A4B863C9D65F6CF7B /* UIAlertView+Promise.swift in Sources */, + FF5CD62C722D6A68AD65462B56D7CB72 /* UIView+AnyPromise.m in Sources */, + 660435DF96CE68B3A3E078030C5F54FA /* UIView+Promise.swift in Sources */, + C5EEED0AFF5E2C5AAE2A646689B73DA3 /* UIViewController+AnyPromise.m in Sources */, + 7D38A3624822DA504D0FBD9F4EA485BA /* UIViewController+Promise.swift in Sources */, + B2C0216914777E4B58E1827D854886C2 /* URLDataPromise.swift in Sources */, + 1A4D55F76DCB3489302BC425F4DB1C04 /* when.m in Sources */, + DCFE64070EE0BB77557935AD2A4ABF62 /* when.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -952,67 +1010,25 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - FCE6B9AB03DB341C5159F1510AAA9722 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 76171B607A443BE97E1DBBF6575CD558 /* after.m in Sources */, - 03790817CF6E76959C0F7E2D0734E9F6 /* after.swift in Sources */, - 4CE2B026C746F263F6B95534A35E76C0 /* afterlife.swift in Sources */, - F049FFBDC929BB045C2AEDF0ECABE513 /* AnyPromise.m in Sources */, - D854F67FD7486C6D25CA841C7D2D5030 /* AnyPromise.swift in Sources */, - 6EA827E0ECB8F7CC49F8B4C92A1D93FA /* CALayer+AnyPromise.m in Sources */, - E8DDC87F287107068FF40443CF059433 /* dispatch_promise.m in Sources */, - E93C3C3AABF32094F0D673E3EC3B2C20 /* dispatch_promise.swift in Sources */, - A2A8512E15D1A4B6DBD515D6144EC083 /* Error.swift in Sources */, - B72EE02E33CE31F594630D54EEEF9A15 /* hang.m in Sources */, - C95D8B9276E75DA8F6DECCDCE147C781 /* join.m in Sources */, - BFA18BBF784D749FE8BFA654088F3630 /* join.swift in Sources */, - D78AD94D0DBA6A1CC4E6673D2F14C832 /* NSNotificationCenter+AnyPromise.m in Sources */, - 0BA72DC6AB26C72EE080F8A08CE41643 /* NSNotificationCenter+Promise.swift in Sources */, - 435BD7136E0E174C6A8811D6C88DEAF2 /* NSObject+Promise.swift in Sources */, - 405F6EBE4BBAAC270AF1B97AFC5B0C16 /* NSURLConnection+AnyPromise.m in Sources */, - 36CDD7A6638E10B9107C74D9B75079F1 /* NSURLConnection+Promise.swift in Sources */, - 9254814FE352958B5270E874E5CCD394 /* NSURLSession+Promise.swift in Sources */, - FA78EA5177275F71FD7F2C52F6B7518D /* PMKAlertController.swift in Sources */, - 964EA2E9AA68D7D587ED15143FEC4BE5 /* Promise+Properties.swift in Sources */, - 222C92305B7AC5BB8E2ABAD182F50026 /* Promise.swift in Sources */, - EC5B36837863572EC400633CD2FFAF94 /* PromiseKit-dummy.m in Sources */, - B908D3F77F293FC72B20EEB48208F5C6 /* race.swift in Sources */, - 291E2518A9E470C2E9CE1B69C088C16F /* State.swift in Sources */, - 82B5B0FF21A9A28284AE7F1124199D3F /* UIActionSheet+AnyPromise.m in Sources */, - 0290D4A3795396ABBB81E632E5AADE3A /* UIActionSheet+Promise.swift in Sources */, - 42A66FBE567A7F5B2136FC56BFF4874A /* UIAlertView+AnyPromise.m in Sources */, - 08B247165C2A091EE24F79D73F8ABEC9 /* UIAlertView+Promise.swift in Sources */, - 19DAC977B6B3CBDC69EE2150BD0C1EF6 /* UIView+AnyPromise.m in Sources */, - 99710CDCDDFF9ED74B8E01EB8E4BF563 /* UIView+Promise.swift in Sources */, - 5EADA3CE22BF3B74E759F948DE7A66F1 /* UIViewController+AnyPromise.m in Sources */, - E6810077387057466534FD27AA294211 /* UIViewController+Promise.swift in Sources */, - 37027676CEABF1BF753684A06C2DCDDB /* URLDataPromise.swift in Sources */, - BF2A197091B6FC0646CFA61A5FBE66AF /* when.m in Sources */, - 4EAB3713B40959FB2E0CDEAC8BDE1116 /* when.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 0D6B2D0CAE4FAFE97E7D7D0EC2C6DCE0 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Alamofire; - target = 432ECC54282C84882B482CCB4CF227FC /* Alamofire */; - targetProxy = 098BDC6B6850C9E726FB5016BB254FC7 /* PBXContainerItemProxy */; - }; 2673248EF608AB8375FABCFDA8141072 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = PetstoreClient; - target = E1B34E9A45508C6EDDA7F25D88C85434 /* PetstoreClient */; + target = 57958C5706F810052A634C1714567A9F /* PetstoreClient */; targetProxy = 014385BD85FA83B60A03ADE9E8844F33 /* PBXContainerItemProxy */; }; + 38BE3993D1A8CA768731BA0465C21F17 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = PromiseKit; + target = D9A01D449983C8E3EF61C0CA4A7D8F59 /* PromiseKit */; + targetProxy = EEB067570D28F14A138B737F596BCB1A /* PBXContainerItemProxy */; + }; 5433AD51A3DC696530C96B8A7D78ED7D /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = PromiseKit; - target = A348BE32D0894EA7204BDCB3F0DF636F /* PromiseKit */; + target = D9A01D449983C8E3EF61C0CA4A7D8F59 /* PromiseKit */; targetProxy = B5FB8931CDF8801206EDD2FEF94793BF /* PBXContainerItemProxy */; }; 64142DAEC5D96F7E876BBE00917C0E9D /* PBXTargetDependency */ = { @@ -1021,17 +1037,17 @@ target = 432ECC54282C84882B482CCB4CF227FC /* Alamofire */; targetProxy = 769630CDAAA8C24AA5B4C81A85C45AC8 /* PBXContainerItemProxy */; }; - A102D2D546E8C75239F44407687481EE /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = PromiseKit; - target = A348BE32D0894EA7204BDCB3F0DF636F /* PromiseKit */; - targetProxy = 11BAC0C3DDD46F7C7EA2DE10681BBE09 /* PBXContainerItemProxy */; - }; - DDA10AB05EE4CD847D1133226B79818E /* PBXTargetDependency */ = { + A48A5E27A5C878B373F0FE7365829141 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = OMGHTTPURLRQ; target = 190ACD3A51BC90B85EADB13E9CDD207B /* OMGHTTPURLRQ */; - targetProxy = BAB3DC0D4AB6EA5B20F7BA63A3F779EC /* PBXContainerItemProxy */; + targetProxy = 23252B1F29F10BD972ECD7BA34F20EA8 /* PBXContainerItemProxy */; + }; + F6093ED00F5D11A44F55549F1A4C778F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Alamofire; + target = 432ECC54282C84882B482CCB4CF227FC /* Alamofire */; + targetProxy = 56AF0748FFC13AD34ECC967C04930EF8 /* PBXContainerItemProxy */; }; F74DEE1C89F05CC835997330B0E3B7C1 /* PBXTargetDependency */ = { isa = PBXTargetDependency; @@ -1128,33 +1144,6 @@ }; name = Debug; }; - 3BDAD538EAD1230A7FDC1A3BD8F3005E /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DADAB10704E49D6B9E18F59F995BB88F /* PetstoreClient.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/PetstoreClient/PetstoreClient-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PetstoreClient/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/PetstoreClient/PetstoreClient.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = PetstoreClient; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; 4D5CD4E08FD8D405881C59A5535E6CE8 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 16D7C901D915C251DEBA27AC1EF57E34 /* OMGHTTPURLRQ.xcconfig */; @@ -1182,7 +1171,34 @@ }; name = Release; }; - 79AE81D89452EFFAB0143A9C7CD108DC /* Release */ = { + 6FD241CD58AB51A79661DD6FAEA92DBD /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DADAB10704E49D6B9E18F59F995BB88F /* PetstoreClient.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/PetstoreClient/PetstoreClient-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/PetstoreClient/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/PetstoreClient/PetstoreClient.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = PetstoreClient; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 80A78EC79E146B38BA17527C9588FE35 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = CC49FF2A84C0E0E9349747D94036B728 /* PromiseKit.xcconfig */; buildSettings = { @@ -1275,35 +1291,7 @@ }; name = Debug; }; - B11D8789540F26AC42B990A7825BC01A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DADAB10704E49D6B9E18F59F995BB88F /* PetstoreClient.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/PetstoreClient/PetstoreClient-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PetstoreClient/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/PetstoreClient/PetstoreClient.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = PetstoreClient; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - BBB0CFD9A19744A94202BA4ADC92A507 /* Debug */ = { + AE41315F8FBD1AB94C4250498DEAAFE5 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = CC49FF2A84C0E0E9349747D94036B728 /* PromiseKit.xcconfig */; buildSettings = { @@ -1331,6 +1319,34 @@ }; name = Debug; }; + BA9437D357EA08C2BE7C3B5F7555E7E7 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DADAB10704E49D6B9E18F59F995BB88F /* PetstoreClient.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/PetstoreClient/PetstoreClient-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/PetstoreClient/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/PetstoreClient/PetstoreClient.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = PetstoreClient; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; C5A18280E9321A9268D1C80B7DA43967 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1416,24 +1432,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 715B91C131A5E33AED9768BD75742013 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B11D8789540F26AC42B990A7825BC01A /* Debug */, - 3BDAD538EAD1230A7FDC1A3BD8F3005E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 8567709BC3BD98E81A0E9B5AD85D011F /* Build configuration list for PBXNativeTarget "PromiseKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BBB0CFD9A19744A94202BA4ADC92A507 /* Debug */, - 79AE81D89452EFFAB0143A9C7CD108DC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 8B2B2DA2F7F80D41B1FDB5FACFA4B3DE /* Build configuration list for PBXNativeTarget "Alamofire" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -1452,6 +1450,24 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + C36F9DFB9BBE472AD46194868C8F885B /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BA9437D357EA08C2BE7C3B5F7555E7E7 /* Debug */, + 6FD241CD58AB51A79661DD6FAEA92DBD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + FCAE2E57B1A9453B9D35EF9071C4C581 /* Build configuration list for PBXNativeTarget "PromiseKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AE41315F8FBD1AB94C4250498DEAAFE5 /* Debug */, + 80A78EC79E146B38BA17527C9588FE35 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; diff --git a/samples/client/petstore/typescript-node/api.ts b/samples/client/petstore/typescript-node/api.ts index 3020e77491cb..c7449aeb5ec4 100644 --- a/samples/client/petstore/typescript-node/api.ts +++ b/samples/client/petstore/typescript-node/api.ts @@ -8,11 +8,37 @@ import http = require('http'); /* tslint:disable:no-unused-variable */ +export class Animal { + "className": string; +} + +export class Cat extends Animal { + "declawed": boolean; +} + export class Category { "id": number; "name": string; } +export class Dog extends Animal { + "breed": string; +} + +export class FormatTest { + "integer": number; + "int32": number; + "int64": number; + "number": number; + "float": number; + "double": number; + "string": string; + "byte": string; + "binary": string; + "date": Date; + "dateTime": string; +} + export class InlineResponse200 { "tags": Array; "id": number; @@ -32,16 +58,26 @@ export namespace InlineResponse200 { sold = 'sold' } } +/** +* Model for testing model name starting with number +*/ export class Model200Response { "name": number; } +/** +* Model for testing reserved words +*/ export class ModelReturn { "return": number; } +/** +* Model for testing model name same as property name +*/ export class Name { "name": number; + "snakeCase": number; } export class Order { @@ -154,13 +190,19 @@ class VoidAuth implements Authentication { } } +export enum PetApiApiKeys { + test_api_key_header, + api_key, + test_api_client_secret, + test_api_client_id, + test_api_key_query, +} + export class PetApi { protected basePath = 'http://petstore.swagger.io/v2'; protected defaultHeaders : any = {}; - - - public authentications = { + protected authentications = { 'default': new VoidAuth(), 'test_api_key_header': new ApiKeyAuth('header', 'test_api_key_header'), 'api_key': new ApiKeyAuth('header', 'api_key'), @@ -187,12 +229,8 @@ export class PetApi { } } - set apiKey(key: string) { - this.authentications.test_api_key_header.apiKey = key; - } - - set apiKey(key: string) { - this.authentications.api_key.apiKey = key; + public setApiKey(key: PetApiApiKeys, value: string) { + this.authentications[PetApiApiKeys[key]].apiKey = value; } set username(username: string) { @@ -203,18 +241,6 @@ export class PetApi { this.authentications.test_http_basic.password = password; } - set apiKey(key: string) { - this.authentications.test_api_client_secret.apiKey = key; - } - - set apiKey(key: string) { - this.authentications.test_api_client_id.apiKey = key; - } - - set apiKey(key: string) { - this.authentications.test_api_key_query.apiKey = key; - } - set accessToken(token: string) { this.authentications.petstore_auth.accessToken = token; } @@ -283,7 +309,7 @@ export class PetApi { * @param body Pet object in the form of byte array */ public addPetUsingByteArray (body?: string) : Promise<{ response: http.ClientResponse; body?: any; }> { - const localVarPath = this.basePath + '/pet?testing_byte_array=true'; + const localVarPath = this.basePath + '/pet?testing_byte_array=true'; let queryParameters: any = {}; let headerParams: any = this.extendObj({}, this.defaultHeaders); let formParams: any = {}; @@ -559,7 +585,7 @@ export class PetApi { * @param petId ID of pet that needs to be fetched */ public getPetByIdInObject (petId: number) : Promise<{ response: http.ClientResponse; body: InlineResponse200; }> { - const localVarPath = this.basePath + '/pet/{petId}?response=inline_arbitrary_object' + const localVarPath = this.basePath + '/pet/{petId}?response=inline_arbitrary_object' .replace('{' + 'petId' + '}', String(petId)); let queryParameters: any = {}; let headerParams: any = this.extendObj({}, this.defaultHeaders); @@ -617,7 +643,7 @@ export class PetApi { * @param petId ID of pet that needs to be fetched */ public petPetIdtestingByteArraytrueGet (petId: number) : Promise<{ response: http.ClientResponse; body: string; }> { - const localVarPath = this.basePath + '/pet/{petId}?testing_byte_array=true' + const localVarPath = this.basePath + '/pet/{petId}?testing_byte_array=true' .replace('{' + 'petId' + '}', String(petId)); let queryParameters: any = {}; let headerParams: any = this.extendObj({}, this.defaultHeaders); @@ -854,13 +880,19 @@ export class PetApi { return localVarDeferred.promise; } } +export enum StoreApiApiKeys { + test_api_key_header, + api_key, + test_api_client_secret, + test_api_client_id, + test_api_key_query, +} + export class StoreApi { protected basePath = 'http://petstore.swagger.io/v2'; protected defaultHeaders : any = {}; - - - public authentications = { + protected authentications = { 'default': new VoidAuth(), 'test_api_key_header': new ApiKeyAuth('header', 'test_api_key_header'), 'api_key': new ApiKeyAuth('header', 'api_key'), @@ -887,12 +919,8 @@ export class StoreApi { } } - set apiKey(key: string) { - this.authentications.test_api_key_header.apiKey = key; - } - - set apiKey(key: string) { - this.authentications.api_key.apiKey = key; + public setApiKey(key: StoreApiApiKeys, value: string) { + this.authentications[StoreApiApiKeys[key]].apiKey = value; } set username(username: string) { @@ -903,18 +931,6 @@ export class StoreApi { this.authentications.test_http_basic.password = password; } - set apiKey(key: string) { - this.authentications.test_api_client_secret.apiKey = key; - } - - set apiKey(key: string) { - this.authentications.test_api_client_id.apiKey = key; - } - - set apiKey(key: string) { - this.authentications.test_api_key_query.apiKey = key; - } - set accessToken(token: string) { this.authentications.petstore_auth.accessToken = token; } @@ -1090,7 +1106,7 @@ export class StoreApi { * Returns an arbitrary object which is actually a map of status codes to quantities */ public getInventoryInObject () : Promise<{ response: http.ClientResponse; body: any; }> { - const localVarPath = this.basePath + '/store/inventory?response=arbitrary_object'; + const localVarPath = this.basePath + '/store/inventory?response=arbitrary_object'; let queryParameters: any = {}; let headerParams: any = this.extendObj({}, this.defaultHeaders); let formParams: any = {}; @@ -1136,7 +1152,7 @@ export class StoreApi { } /** * 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 */ public getOrderById (orderId: string) : Promise<{ response: http.ClientResponse; body: Order; }> { @@ -1246,13 +1262,19 @@ export class StoreApi { return localVarDeferred.promise; } } +export enum UserApiApiKeys { + test_api_key_header, + api_key, + test_api_client_secret, + test_api_client_id, + test_api_key_query, +} + export class UserApi { protected basePath = 'http://petstore.swagger.io/v2'; protected defaultHeaders : any = {}; - - - public authentications = { + protected authentications = { 'default': new VoidAuth(), 'test_api_key_header': new ApiKeyAuth('header', 'test_api_key_header'), 'api_key': new ApiKeyAuth('header', 'api_key'), @@ -1279,12 +1301,8 @@ export class UserApi { } } - set apiKey(key: string) { - this.authentications.test_api_key_header.apiKey = key; - } - - set apiKey(key: string) { - this.authentications.api_key.apiKey = key; + public setApiKey(key: UserApiApiKeys, value: string) { + this.authentications[UserApiApiKeys[key]].apiKey = value; } set username(username: string) { @@ -1295,18 +1313,6 @@ export class UserApi { this.authentications.test_http_basic.password = password; } - set apiKey(key: string) { - this.authentications.test_api_client_secret.apiKey = key; - } - - set apiKey(key: string) { - this.authentications.test_api_client_id.apiKey = key; - } - - set apiKey(key: string) { - this.authentications.test_api_key_query.apiKey = key; - } - set accessToken(token: string) { this.authentications.petstore_auth.accessToken = token; } @@ -1524,7 +1530,7 @@ export class UserApi { /** * Get user by user name * - * @param username The name that needs to be fetched. Use user1 for testing. + * @param username The name that needs to be fetched. Use user1 for testing. */ public getUserByName (username: string) : Promise<{ response: http.ClientResponse; body: User; }> { const localVarPath = this.basePath + '/user/{username}' diff --git a/samples/client/petstore/typescript-node/client.ts b/samples/client/petstore/typescript-node/client.ts index 891feef39021..51a7f687e09f 100644 --- a/samples/client/petstore/typescript-node/client.ts +++ b/samples/client/petstore/typescript-node/client.ts @@ -2,7 +2,8 @@ import api = require('./api'); import fs = require('fs'); var petApi = new api.PetApi(); -petApi.apiKey = 'special-key'; +petApi.setApiKey(api.PetApiApiKeys.api_key, 'special-key'); +petApi.setApiKey(api.PetApiApiKeys.test_api_key_header, 'query-key'); var tag1 = new api.Tag(); tag1.id = 18291; diff --git a/samples/html/index.html b/samples/html/index.html index cae7e02c9e07..e86c9833a194 100644 --- a/samples/html/index.html +++ b/samples/html/index.html @@ -194,450 +194,446 @@ font-style: italic;

Methods

[ Jump to Models ] -

Table of Contents

-
    - - - -
  1. put /pet
  2. -
  3. post /pet
  4. - -
  5. get /pet/findByStatus
  6. - -
  7. get /pet/findByTags
  8. - -
  9. get /pet/{petId}
  10. - -
  11. post /pet/{petId}
  12. - +
  13. post /pet?testing_byte_array=true
  14. delete /pet/{petId}
  15. - +
  16. get /pet/findByStatus
  17. +
  18. get /pet/findByTags
  19. +
  20. get /pet/{petId}
  21. +
  22. get /pet/{petId}?response=inline_arbitrary_object
  23. +
  24. get /pet/{petId}?testing_byte_array=true
  25. +
  26. put /pet
  27. +
  28. post /pet/{petId}
  29. post /pet/{petId}/uploadImage
  30. - -
  31. get /store/inventory
  32. - -
  33. post /store/order
  34. - -
  35. get /store/order/{orderId}
  36. -
  37. delete /store/order/{orderId}
  38. - +
  39. get /store/findByStatus
  40. +
  41. get /store/inventory
  42. +
  43. get /store/inventory?response=arbitrary_object
  44. +
  45. get /store/order/{orderId}
  46. +
  47. post /store/order
  48. post /user
  49. -
  50. post /user/createWithArray
  51. -
  52. post /user/createWithList
  53. - -
  54. get /user/login
  55. - -
  56. get /user/logout
  57. - -
  58. get /user/{username}
  59. - -
  60. put /user/{username}
  61. -
  62. delete /user/{username}
  63. - - - +
  64. get /user/{username}
  65. +
  66. get /user/login
  67. +
  68. get /user/logout
  69. +
  70. put /user/{username}
- - - - - -
-
- Up -
put /pet
-
Update an existing pet (updatePet)
- -
- - - - -

Consumes

- This API call consumes the following media types via the Content-Type request header: -
    - -
  • application/json
  • - -
  • application/xml
  • - -
- - - -

Request body

-
-
body (optional)
- -
Body Parameter — Pet object that needs to be added to the store
-
- - - - - - - - - - - - - -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    - -
  • application/json
  • - -
  • application/xml
  • - -
- - -

Responses

- -

400

- Invalid ID supplied - - -

404

- Pet not found - - -

405

- Validation exception - - -
-
-
Up
post /pet
Add a new pet to the store (addPet)
-
- -

Consumes

This API call consumes the following media types via the Content-Type request header:
    -
  • application/json
  • -
  • application/xml
  • -
- -

Request body

body (optional)
Body Parameter — Pet object that needs to be added to the store
- - - - - - Todo: process Response Object and its headers, schema, examples - --> - - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

405

Invalid input - -

- +
+
+ Up +
post /pet?testing_byte_array=true
+
Fake endpoint to test byte array in body parameter for adding a new pet to the store (addPetUsingByteArray)
+
+ + +

Consumes

+ This API call consumes the following media types via the Content-Type request header: +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Request body

+
+
body (optional)
+ +
Body Parameter — Pet object in the form of byte array
+
+ + + + + + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

405

+ Invalid input +
+
+
+
+ Up +
delete /pet/{petId}
+
Deletes a pet (deletePet)
+
+ +

Path parameters

+
+
petId (required)
+ +
Path Parameter — Pet id to delete
+
+ + + + + + + + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

400

+ Invalid pet value +
+
Up
get /pet/findByStatus
Finds Pets by status (findPetsByStatus)
- -
Multiple status values can be provided with comma seperated strings
+
Multiple status values can be provided with comma separated strings
- - - - -

Query parameters

status (optional)
-
Query Parameter — Status values that need to be considered for filter default: available
+
Query Parameter — Status values that need to be considered for query default: available
- - - + - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

200

successful operation - -

400

Invalid status value - -

-
Up
get /pet/findByTags
Finds Pets by tags (findPetsByTags)
-
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
- - - - -

Query parameters

tags (optional)
Query Parameter — Tags to filter by
- - - + - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

200

successful operation - -

400

Invalid tag value - -

-
Up
get /pet/{petId}
Find pet by ID (getPetById)
-
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
-

Path parameters

petId (required)
Path Parameter — ID of pet that needs to be fetched
- - - - - - - + - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

200

successful operation - -

400

Invalid ID supplied - -

404

Pet not found - -

- +
+
+ Up +
get /pet/{petId}?response=inline_arbitrary_object
+
Fake endpoint to test inline arbitrary object return by 'Find pet by ID' (getPetByIdInObject)
+
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
+ +

Path parameters

+
+
petId (required)
+ +
Path Parameter — ID of pet that needs to be fetched
+
+ + + + + + +

Return type

+ + + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

200

+ successful operation +

400

+ Invalid ID supplied +

404

+ Pet not found +
+
+
+
+ Up +
get /pet/{petId}?testing_byte_array=true
+
Fake endpoint to test byte array return by 'Find pet by ID' (petPetIdtestingByteArraytrueGet)
+
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
+ +

Path parameters

+
+
petId (required)
+ +
Path Parameter — ID of pet that needs to be fetched
+
+ + + + + + +

Return type

+
+ + byte[] +
+ + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

200

+ successful operation +

400

+ Invalid ID supplied +

404

+ Pet not found +
+
+
+
+ Up +
put /pet
+
Update an existing pet (updatePet)
+
+ + +

Consumes

+ This API call consumes the following media types via the Content-Type request header: +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Request body

+
+
body (optional)
+ +
Body Parameter — Pet object that needs to be added to the store
+
+ + + + + + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

400

+ Invalid ID supplied +

404

+ Pet not found +

405

+ Validation exception +
+
Up
post /pet/{petId}
Updates a pet in the store with form data (updatePetWithForm)
-
-

Path parameters

petId (required)
Path Parameter — ID of pet that needs to be updated
- -

Consumes

This API call consumes the following media types via the Content-Type request header:
    -
  • application/x-www-form-urlencoded
  • -
- - - - -

Form parameters

name (optional)
@@ -646,135 +642,47 @@ font-style: italic;
Form Parameter — Updated status of the pet
- - - Todo: process Response Object and its headers, schema, examples - --> - - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

405

Invalid input - -

- -
-
- Up -
delete /pet/{petId}
-
Deletes a pet (deletePet)
- -
- - -

Path parameters

-
-
petId (required)
- -
Path Parameter — Pet id to delete
-
- - - - - - - - - - - - - - - - - -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    - -
  • application/json
  • - -
  • application/xml
  • - -
- - -

Responses

- -

400

- Invalid pet value - - -
-
-
Up
post /pet/{petId}/uploadImage
uploads an image (uploadFile)
-
-

Path parameters

petId (required)
Path Parameter — ID of pet to update
- -

Consumes

This API call consumes the following media types via the Content-Type request header:
    -
  • multipart/form-data
  • -
- - - - -

Form parameters

additionalMetadata (optional)
@@ -783,496 +691,468 @@ font-style: italic;
Form Parameter — file to upload
- - - Todo: process Response Object and its headers, schema, examples - --> - - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

0

successful operation - -

- -
-
- Up -
get /store/inventory
-
Returns pet inventories by status (getInventory)
- -
Returns a map of status codes to quantities
- - - - - - - - - - - - - - - - - - -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    - -
  • application/json
  • - -
  • application/xml
  • - -
- - -

Responses

- -

200

- successful operation - - -
-
- -
-
- Up -
post /store/order
-
Place an order for a pet (placeOrder)
- -
- - - - - - -

Request body

-
-
body (optional)
- -
Body Parameter — order placed for purchasing the pet
-
- - - - - - - - - - - - - -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    - -
  • application/json
  • - -
  • application/xml
  • - -
- - -

Responses

- -

200

- successful operation - - -

400

- Invalid Order - - -
-
- -
-
- Up -
get /store/order/{orderId}
-
Find purchase order by ID (getOrderById)
- -
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
- - -

Path parameters

-
-
orderId (required)
- -
Path Parameter — ID of pet that needs to be fetched
-
- - - - - - - - - - - - - - - - - -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    - -
  • application/json
  • - -
  • application/xml
  • - -
- - -

Responses

- -

200

- successful operation - - -

400

- Invalid ID supplied - - -

404

- Order not found - - -
-
-
Up
delete /store/order/{orderId}
Delete purchase order by ID (deleteOrder)
-
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
-

Path parameters

orderId (required)
Path Parameter — ID of the order that needs to be deleted
- - - - - - - - Todo: process Response Object and its headers, schema, examples - --> - - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

400

Invalid ID supplied - -

404

Order not found - -

- +
+
+ Up +
get /store/findByStatus
+
Finds orders by status (findOrdersByStatus)
+
A single status value can be provided as a string
+ + + + + +

Query parameters

+
+
status (optional)
+ +
Query Parameter — Status value that needs to be considered for query default: placed
+
+ + +

Return type

+
+ array[Order] + +
+ + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

200

+ successful operation +

400

+ Invalid status value +
+
+
+
+ Up +
get /store/inventory
+
Returns pet inventories by status (getInventory)
+
Returns a map of status codes to quantities
+ + + + + + + +

Return type

+
+ + map[String, Integer] +
+ + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

200

+ successful operation +
+
+
+
+ Up +
get /store/inventory?response=arbitrary_object
+
Fake endpoint to test arbitrary object return by 'Get inventory' (getInventoryInObject)
+
Returns an arbitrary object which is actually a map of status codes to quantities
+ + + + + + + +

Return type

+
+ + Object +
+ + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

200

+ successful operation +
+
+
+
+ Up +
get /store/order/{orderId}
+
Find purchase order by ID (getOrderById)
+
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ +

Path parameters

+
+
orderId (required)
+ +
Path Parameter — ID of pet that needs to be fetched
+
+ + + + + + +

Return type

+
+ Order + +
+ + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

200

+ successful operation +

400

+ Invalid ID supplied +

404

+ Order not found +
+
+
+
+ Up +
post /store/order
+
Place an order for a pet (placeOrder)
+
+ + + +

Request body

+
+
body (optional)
+ +
Body Parameter — order placed for purchasing the pet
+
+ + + + +

Return type

+
+ Order + +
+ + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

200

+ successful operation +

400

+ Invalid Order +
+
Up
post /user
Create user (createUser)
-
This can only be done by the logged in user.
- - -

Request body

body (optional)
Body Parameter — Created user object
- - - - - - Todo: process Response Object and its headers, schema, examples - --> - - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

0

successful operation - -

-
Up
post /user/createWithArray
Creates list of users with given input array (createUsersWithArrayInput)
-
- - -

Request body

body (optional)
Body Parameter — List of user object
- - - - - - Todo: process Response Object and its headers, schema, examples - --> - - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

0

successful operation - -

-
Up
post /user/createWithList
Creates list of users with given input array (createUsersWithListInput)
-
- - -

Request body

body (optional)
Body Parameter — List of user object
- - - - - - Todo: process Response Object and its headers, schema, examples - --> - - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

0

successful operation - -

- +
+
+ Up +
delete /user/{username}
+
Delete user (deleteUser)
+
This can only be done by the logged in user.
+ +

Path parameters

+
+
username (required)
+ +
Path Parameter — The name that needs to be deleted
+
+ + + + + + + + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

400

+ Invalid username supplied +

404

+ User not found +
+
+
+
+ Up +
get /user/{username}
+
Get user by user name (getUserByName)
+
+ +

Path parameters

+
+
username (required)
+ +
Path Parameter — The name that needs to be fetched. Use user1 for testing.
+
+ + + + + + +

Return type

+
+ User + +
+ + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

200

+ successful operation +

Example data

+
Content-Type: application/json
+
{id=1, username=johnp, firstName=John, lastName=Public, email=johnp@swagger.io, password=-secret-, phone=0123456789, userStatus=0}
+

400

+ Invalid username supplied +

404

+ User not found +
+
Up
get /user/login
Logs user into the system (loginUser)
-
- - - - -

Query parameters

username (optional)
@@ -1281,316 +1161,106 @@ font-style: italic;
Query Parameter — The password for login in clear text
- - - + - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

200

successful operation - -

400

Invalid username/password supplied - -

-
Up
get /user/logout
Logs out current logged in user session (logoutUser)
-
- - - - - - - - Todo: process Response Object and its headers, schema, examples - --> - - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

0

successful operation - -

- -
-
- Up -
get /user/{username}
-
Get user by user name (getUserByName)
- -
- - -

Path parameters

-
-
username (required)
- -
Path Parameter — The name that needs to be fetched. Use user1 for testing.
-
- - - - - - - - - - - - - - - - - -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    - -
  • application/json
  • - -
  • application/xml
  • - -
- - -

Responses

- -

200

- successful operation - -

Example data

-
Content-Type: application/json
-
{id=1, username=johnp, firstName=John, lastName=Public, email=johnp@swagger.io, password=-secret-, phone=0123456789, userStatus=0}
- - -

400

- Invalid username supplied - - -

404

- User not found - - -
-
-
Up
put /user/{username}
Updated user (updateUser)
-
This can only be done by the logged in user.
-

Path parameters

username (required)
Path Parameter — name that need to be deleted
- - -

Request body

body (optional)
Body Parameter — Updated user object
- - - - - - Todo: process Response Object and its headers, schema, examples - --> - - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

400

Invalid user supplied - -

404

User not found - -

- -
-
- Up -
delete /user/{username}
-
Delete user (deleteUser)
- -
This can only be done by the logged in user.
- - -

Path parameters

-
-
username (required)
- -
Path Parameter — The name that needs to be deleted
-
- - - - - - - - - - - - - - - - - -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    - -
  • application/json
  • - -
  • application/xml
  • - -
- - -

Responses

- -

400

- Invalid username supplied - - -

404

- User not found - - -
-
- - - -

Models

@@ -1598,128 +1268,148 @@ font-style: italic;

Table of Contents

    - - -
  1. User
  2. - - - +
  3. $special[model.name]
  4. +
  5. 200_response
  6. +
  7. Animal
  8. +
  9. Cat
  10. Category
  11. - - - -
  12. Pet
  13. - - - -
  14. Tag
  15. - - - +
  16. Dog
  17. +
  18. Format_test
  19. +
  20. Inline_response_200
  21. +
  22. Name
  23. Order
  24. - - +
  25. Pet
  26. +
  27. Return
  28. +
  29. Tag
  30. +
  31. User
- -
-

User Up

+

$special[model.name] Up

-
id
Long
- -
username
String
- -
firstName
String
- -
lastName
String
- -
email
String
- -
password
String
- -
phone
String
- -
userStatus
Integer User Status
- - +
$special[property.name]
Long
+
+
+
+

200_response Up

+
+
name
Integer
+
+
+
+

Animal Up

+
+
className
String
+
+
+
+

Cat Up

+
+
className
String
+
declawed
Boolean
- - -

Category Up

id
Long
- -
name
String
- - +
name
String
- - -
-

Pet Up

+

Dog Up

+
+
className
String
+
breed
String
+
+
+
+

Format_test Up

+
+
integer
Integer
+
int32
Integer
+
int64
Long
+
number
BigDecimal
+
float
Float
+
double
Double
+
string
String
+
byte
byte[]
+
binary
byte[]
+
date
date
+
dateTime
String
+
+
+
+

Inline_response_200 Up

-
id
Long
- -
category
Category
- -
name
String
- -
photoUrls
array[String]
-
tags
array[Tag]
- -
status
String pet status in the store
- +
id
Long
+
category
Object
+
status
String pet status in the store
Enum:
available
pending
sold
- - +
name
String
+
photoUrls
array[String]
- - -
-

Tag Up

+

Name Up

-
id
Long
- -
name
String
- - +
name
Integer
+
snake_case
Integer
- - -

Order Up

id
Long
- -
petId
Long
- -
quantity
Integer
- -
shipDate
Date
- -
status
String Order Status
- +
petId
Long
+
quantity
Integer
+
shipDate
Date
+
status
String Order Status
Enum:
placed
approved
delivered
- -
complete
Boolean
- - +
complete
Boolean
+
+
+
+

Pet Up

+
+
id
Long
+
category
Category
+
name
String
+
photoUrls
array[String]
+
tags
array[Tag]
+
status
String pet status in the store
+
Enum:
+
available
pending
sold
+
+
+
+

Return Up

+
+
return
Integer
+
+
+
+

Tag Up

+
+
id
Long
+
name
String
+
+
+
+

User Up

+
+
id
Long
+
username
String
+
firstName
String
+
lastName
String
+
email
String
+
password
String
+
phone
String
+
userStatus
Integer User Status
- -