-
-
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 request header;
- the media type will be conveyed by the
Content-Type response header.
-
- application/json
- application/xml
Responses
@@ -892,8 +680,8 @@ font-style: italic;
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
- application/json
application/xml
+ application/json
Responses
@@ -916,7 +704,7 @@ font-style: italic;
Request body
-
body (optional)
+
body (required)
Body Parameter — order placed for purchasing the pet
@@ -937,8 +725,8 @@ font-style: italic;
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
- application/json
application/xml
+ application/json
Responses
@@ -959,7 +747,7 @@ font-style: italic;
Request body
-
body (optional)
+
body (required)
Body Parameter — Created user object
@@ -975,8 +763,8 @@ font-style: italic;
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
- application/json
application/xml
+ application/json
Responses
@@ -995,7 +783,7 @@ font-style: italic;
Request body
-
body (optional)
+
body (required)
Body Parameter — List of user object
@@ -1011,8 +799,8 @@ font-style: italic;
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
- application/json
application/xml
+ application/json
Responses
@@ -1031,7 +819,7 @@ font-style: italic;
Request body
-
body (optional)
+
body (required)
Body Parameter — List of user object
@@ -1047,8 +835,8 @@ font-style: italic;
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
- application/json
application/xml
+ application/json
Responses
@@ -1083,8 +871,8 @@ font-style: italic;
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
- application/json
application/xml
+ application/json
Responses
@@ -1126,16 +914,13 @@ font-style: italic;
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
- application/json
application/xml
+ application/json
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
@@ -1155,9 +940,9 @@ font-style: italic;
Query parameters
-
username (optional)
+
username (required)
-
Query Parameter — The user name for login
password (optional)
+
Query Parameter — The user name for login
password (required)
Query Parameter — The password for login in clear text
@@ -1176,8 +961,8 @@ font-style: italic;
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
- application/json
application/xml
+ application/json
Responses
@@ -1208,8 +993,8 @@ font-style: italic;
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
- application/json
application/xml
+ application/json
Responses
@@ -1234,7 +1019,7 @@ font-style: italic;
Request body
-
body (optional)
+
body (required)
Body Parameter — Updated user object
@@ -1250,8 +1035,8 @@ font-style: italic;
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
- application/json
application/xml
+ application/json
Responses
@@ -1268,147 +1053,73 @@ font-style: italic;
Table of Contents
- $special[model.name]
- 200_response
- Animal
- Cat
+ ApiResponse
Category
- Dog
- Format_test
- Inline_response_200
- Name
Order
Pet
- Return
Tag
User
-
+
-
$special[property.name]
Long
-
-
-
-
-
-
-
-
className
String
-
declawed
Boolean
+
code (optional)
Integer
+
type (optional)
String
+
message (optional)
String
-
-
-
-
className
String
-
breed
String
-
-
-
-
-
-
integer
Integer
-
int32
Integer
-
int64
Long
-
number
BigDecimal
-
float
Float
-
double
Double
-
string
String
-
byte
byte[]
-
binary
byte[]
-
date
date
-
dateTime
String
-
-
-
-
-
-
tags
array[Tag]
-
id
Long
-
category
Object
-
status
String pet status in the store
-
-
available
pending
sold
-
name
String
-
photoUrls
array[String]
-
-
-
-
-
-
name
Integer
-
snake_case
Integer
+
id (optional)
Long
+
name (optional)
String
-
id
Long
-
petId
Long
-
quantity
Integer
-
shipDate
Date
-
status
String Order Status
+
id (optional)
Long
+
petId (optional)
Long
+
quantity (optional)
Integer
+
shipDate (optional)
Date
+
status (optional)
String Order Status
placed
approved
delivered
-
complete
Boolean
+
complete (optional)
Boolean
-
id
Long
-
category
Category
+
id (optional)
Long
+
category (optional)
Category
name
String
photoUrls
array[String]
-
tags
array[Tag]
-
status
String pet status in the store
+
tags (optional)
array[Tag]
+
status (optional)
String pet status in the store
available
pending
sold
-
-
id
Long
-
name
String
+
id (optional)
Long
+
name (optional)
String
-
id
Long
-
username
String
-
firstName
String
-
lastName
String
-
email
String
-
password
String
-
phone
String
-
userStatus
Integer User Status
+
id (optional)
Long
+
username (optional)
String
+
firstName (optional)
String
+
lastName (optional)
String
+
email (optional)
String
+
password (optional)
String
+
phone (optional)
String
+
userStatus (optional)
Integer User Status
diff --git a/samples/server/petstore/aspnet5/src/IO.Swagger/Models/ApiResponse.cs b/samples/server/petstore/aspnet5/src/IO.Swagger/Models/ApiResponse.cs
new file mode 100644
index 00000000000..886f22c21bf
--- /dev/null
+++ b/samples/server/petstore/aspnet5/src/IO.Swagger/Models/ApiResponse.cs
@@ -0,0 +1,150 @@
+using System;
+using System.Linq;
+using System.IO;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Runtime.Serialization;
+using Newtonsoft.Json;
+
+namespace IO.Swagger.Models
+{
+ ///
+ ///
+ ///
+ public partial class ApiResponse : IEquatable
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Code.
+ /// Type.
+ /// Message.
+ public ApiResponse(int? Code = null, string Type = null, string Message = null)
+ {
+ this.Code = Code;
+ this.Type = Type;
+ this.Message = Message;
+
+ }
+
+ ///
+ /// Gets or Sets Code
+ ///
+ public int? Code { get; set; }
+
+ ///
+ /// Gets or Sets Type
+ ///
+ public string Type { get; set; }
+
+ ///
+ /// Gets or Sets Message
+ ///
+ public string Message { get; set; }
+
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ var sb = new StringBuilder();
+ sb.Append("class ApiResponse {\n");
+ sb.Append(" Code: ").Append(Code).Append("\n");
+sb.Append(" Type: ").Append(Type).Append("\n");
+sb.Append(" Message: ").Append(Message).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public string ToJson()
+ {
+ return JsonConvert.SerializeObject(this, Formatting.Indented);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (ReferenceEquals(null, obj)) return false;
+ if (ReferenceEquals(this, obj)) return true;
+ if (obj.GetType() != GetType()) return false;
+ return Equals((ApiResponse)obj);
+ }
+
+ ///
+ /// Returns true if ApiResponse instances are equal
+ ///
+ /// Instance of ApiResponse to be compared
+ /// Boolean
+ public bool Equals(ApiResponse other)
+ {
+
+ if (ReferenceEquals(null, other)) return false;
+ if (ReferenceEquals(this, other)) return true;
+
+ return
+ (
+ this.Code == other.Code ||
+ this.Code != null &&
+ this.Code.Equals(other.Code)
+ ) &&
+ (
+ this.Type == other.Type ||
+ this.Type != null &&
+ this.Type.Equals(other.Type)
+ ) &&
+ (
+ this.Message == other.Message ||
+ this.Message != null &&
+ this.Message.Equals(other.Message)
+ );
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ // credit: http://stackoverflow.com/a/263416/677735
+ unchecked // Overflow is fine, just wrap
+ {
+ int hash = 41;
+ // Suitable nullity checks etc, of course :)
+ if (this.Code != null)
+ hash = hash * 59 + this.Code.GetHashCode();
+ if (this.Type != null)
+ hash = hash * 59 + this.Type.GetHashCode();
+ if (this.Message != null)
+ hash = hash * 59 + this.Message.GetHashCode();
+ return hash;
+ }
+ }
+
+ #region Operators
+
+ public static bool operator ==(ApiResponse left, ApiResponse right)
+ {
+ return Equals(left, right);
+ }
+
+ public static bool operator !=(ApiResponse left, ApiResponse right)
+ {
+ return !Equals(left, right);
+ }
+
+ #endregion Operators
+
+ }
+}
diff --git a/samples/server/petstore/flaskConnexion/__init__.py b/samples/server/petstore/flaskConnexion/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/samples/server/petstore/flaskConnexion/controllers/__init__.py b/samples/server/petstore/flaskConnexion/controllers/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/samples/server/petstore/flaskConnexion/controllers/init.py b/samples/server/petstore/flaskConnexion/controllers/init.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/samples/server/petstore/flaskConnexion/init.py b/samples/server/petstore/flaskConnexion/init.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/samples/server/petstore/scalatra/src/main/scala/com/wordnik/client/model/ApiResponse.scala b/samples/server/petstore/scalatra/src/main/scala/com/wordnik/client/model/ApiResponse.scala
new file mode 100644
index 00000000000..9020d9e3d50
--- /dev/null
+++ b/samples/server/petstore/scalatra/src/main/scala/com/wordnik/client/model/ApiResponse.scala
@@ -0,0 +1,9 @@
+package com.wordnik.client.model
+
+
+
+case class ApiResponse (
+ code: Option[Int],
+type: Option[String],
+message: Option[String]
+)