forked from loafle/openapi-generator-original
rebuilt
This commit is contained in:
parent
aaa0603e29
commit
64ea3f8177
@ -7,133 +7,214 @@ using IO.Swagger.Model;
|
|||||||
|
|
||||||
namespace IO.Swagger.Api {
|
namespace IO.Swagger.Api {
|
||||||
|
|
||||||
|
|
||||||
public interface IPetApi {
|
public interface IPetApi {
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Update an existing pet
|
/// Update an existing pet
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">Pet object that needs to be added to the store</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">Pet object that needs to be added to the store</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
void UpdatePet (Pet Body);
|
void UpdatePet (Pet Body);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Update an existing pet
|
/// Update an existing pet
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">Pet object that needs to be added to the store</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">Pet object that needs to be added to the store</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
Task UpdatePetAsync (Pet Body);
|
Task UpdatePetAsync (Pet Body);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Add a new pet to the store
|
/// Add a new pet to the store
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">Pet object that needs to be added to the store</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">Pet object that needs to be added to the store</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
void AddPet (Pet Body);
|
void AddPet (Pet Body);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Add a new pet to the store
|
/// Add a new pet to the store
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">Pet object that needs to be added to the store</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">Pet object that needs to be added to the store</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
Task AddPetAsync (Pet Body);
|
Task AddPetAsync (Pet Body);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Finds Pets by status Multiple status values can be provided with comma seperated strings
|
/// Finds Pets by status Multiple status values can be provided with comma seperated strings
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Status">Status values that need to be considered for filter</param>
|
</summary>
|
||||||
/// <returns>List<Pet></returns>
|
///
|
||||||
|
<param name="Status">Status values that need to be considered for filter</param>
|
||||||
|
///
|
||||||
|
<returns>List<Pet></returns>
|
||||||
List<Pet> FindPetsByStatus (List<string> Status);
|
List<Pet> FindPetsByStatus (List<string> Status);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Finds Pets by status Multiple status values can be provided with comma seperated strings
|
/// Finds Pets by status Multiple status values can be provided with comma seperated strings
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Status">Status values that need to be considered for filter</param>
|
</summary>
|
||||||
/// <returns>List<Pet></returns>
|
///
|
||||||
|
<param name="Status">Status values that need to be considered for filter</param>
|
||||||
|
///
|
||||||
|
<returns>List<Pet></returns>
|
||||||
Task<List<Pet>> FindPetsByStatusAsync (List<string> Status);
|
Task<List<Pet>> FindPetsByStatusAsync (List<string> Status);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
/// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Tags">Tags to filter by</param>
|
</summary>
|
||||||
/// <returns>List<Pet></returns>
|
///
|
||||||
|
<param name="Tags">Tags to filter by</param>
|
||||||
|
///
|
||||||
|
<returns>List<Pet></returns>
|
||||||
List<Pet> FindPetsByTags (List<string> Tags);
|
List<Pet> FindPetsByTags (List<string> Tags);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
/// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Tags">Tags to filter by</param>
|
</summary>
|
||||||
/// <returns>List<Pet></returns>
|
///
|
||||||
|
<param name="Tags">Tags to filter by</param>
|
||||||
|
///
|
||||||
|
<returns>List<Pet></returns>
|
||||||
Task<List<Pet>> FindPetsByTagsAsync (List<string> Tags);
|
Task<List<Pet>> FindPetsByTagsAsync (List<string> Tags);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
/// Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="PetId">ID of pet that needs to be fetched</param>
|
</summary>
|
||||||
/// <returns>Pet</returns>
|
///
|
||||||
|
<param name="PetId">ID of pet that needs to be fetched</param>
|
||||||
|
///
|
||||||
|
<returns>Pet</returns>
|
||||||
Pet GetPetById (long? PetId);
|
Pet GetPetById (long? PetId);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
/// Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="PetId">ID of pet that needs to be fetched</param>
|
</summary>
|
||||||
/// <returns>Pet</returns>
|
///
|
||||||
|
<param name="PetId">ID of pet that needs to be fetched</param>
|
||||||
|
///
|
||||||
|
<returns>Pet</returns>
|
||||||
Task<Pet> GetPetByIdAsync (long? PetId);
|
Task<Pet> GetPetByIdAsync (long? PetId);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Updates a pet in the store with form data
|
/// Updates a pet in the store with form data
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="PetId">ID of pet that needs to be updated</param>/// <param name="Name">Updated name of the pet</param>/// <param name="Status">Updated status of the pet</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="PetId">ID of pet that needs to be updated</param>///
|
||||||
|
<param name="Name">Updated name of the pet</param>///
|
||||||
|
<param name="Status">Updated status of the pet</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
void UpdatePetWithForm (string PetId, string Name, string Status);
|
void UpdatePetWithForm (string PetId, string Name, string Status);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Updates a pet in the store with form data
|
/// Updates a pet in the store with form data
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="PetId">ID of pet that needs to be updated</param>/// <param name="Name">Updated name of the pet</param>/// <param name="Status">Updated status of the pet</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="PetId">ID of pet that needs to be updated</param>///
|
||||||
|
<param name="Name">Updated name of the pet</param>///
|
||||||
|
<param name="Status">Updated status of the pet</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
Task UpdatePetWithFormAsync (string PetId, string Name, string Status);
|
Task UpdatePetWithFormAsync (string PetId, string Name, string Status);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Deletes a pet
|
/// Deletes a pet
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="ApiKey"></param>/// <param name="PetId">Pet id to delete</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="ApiKey"></param>///
|
||||||
|
<param name="PetId">Pet id to delete</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
void DeletePet (string ApiKey, long? PetId);
|
void DeletePet (string ApiKey, long? PetId);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Deletes a pet
|
/// Deletes a pet
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="ApiKey"></param>/// <param name="PetId">Pet id to delete</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="ApiKey"></param>///
|
||||||
|
<param name="PetId">Pet id to delete</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
Task DeletePetAsync (string ApiKey, long? PetId);
|
Task DeletePetAsync (string ApiKey, long? PetId);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// uploads an image
|
/// uploads an image
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="PetId">ID of pet to update</param>/// <param name="AdditionalMetadata">Additional data to pass to server</param>/// <param name="File">file to upload</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="PetId">ID of pet to update</param>///
|
||||||
|
<param name="AdditionalMetadata">Additional data to pass to server</param>///
|
||||||
|
<param name="File">file to upload</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
void UploadFile (long? PetId, string AdditionalMetadata, string File);
|
void UploadFile (long? PetId, string AdditionalMetadata, string File);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// uploads an image
|
/// uploads an image
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="PetId">ID of pet to update</param>/// <param name="AdditionalMetadata">Additional data to pass to server</param>/// <param name="File">file to upload</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="PetId">ID of pet to update</param>///
|
||||||
|
<param name="AdditionalMetadata">Additional data to pass to server</param>///
|
||||||
|
<param name="File">file to upload</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
Task UploadFileAsync (long? PetId, string AdditionalMetadata, string File);
|
Task UploadFileAsync (long? PetId, string AdditionalMetadata, string File);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Represents a collection of functions to interact with the API endpoints
|
/// Represents a collection of functions to interact with the API endpoints
|
||||||
/// </summary>
|
///
|
||||||
|
</summary>
|
||||||
public class PetApi : IPetApi {
|
public class PetApi : IPetApi {
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
/// Initializes a new instance of the <see cref="PetApi"/> class.
|
<summary>
|
||||||
/// </summary>
|
/// Initializes a new instance of the
|
||||||
/// <param name="apiClient"> an instance of ApiClient (optional)
|
<see cref="PetApi"/>
|
||||||
/// <returns></returns>
|
class.
|
||||||
|
///
|
||||||
|
</summary>
|
||||||
|
///
|
||||||
|
<param name="apiClient"> an instance of ApiClient (optional)
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public PetApi(ApiClient apiClient = null) {
|
public PetApi(ApiClient apiClient = null) {
|
||||||
if (apiClient == null) { // use the default one in Configuration
|
if (apiClient == null) { // use the default one in Configuration
|
||||||
this.apiClient = Configuration.apiClient;
|
this.apiClient = Configuration.apiClient;
|
||||||
@ -142,44 +223,62 @@ namespace IO.Swagger.Api {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
/// Initializes a new instance of the <see cref="PetApi"/> class.
|
<summary>
|
||||||
/// </summary>
|
/// Initializes a new instance of the
|
||||||
/// <returns></returns>
|
<see cref="PetApi"/>
|
||||||
|
class.
|
||||||
|
///
|
||||||
|
</summary>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public PetApi(String basePath)
|
public PetApi(String basePath)
|
||||||
{
|
{
|
||||||
this.apiClient = new ApiClient(basePath);
|
this.apiClient = new ApiClient(basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Sets the base path of the API client.
|
/// Sets the base path of the API client.
|
||||||
/// </summary>
|
///
|
||||||
/// <value>The base path</value>
|
</summary>
|
||||||
|
///
|
||||||
|
<value>The base path</value>
|
||||||
public void SetBasePath(String basePath) {
|
public void SetBasePath(String basePath) {
|
||||||
this.apiClient.basePath = basePath;
|
this.apiClient.basePath = basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Gets the base path of the API client.
|
/// Gets the base path of the API client.
|
||||||
/// </summary>
|
///
|
||||||
/// <value>The base path</value>
|
</summary>
|
||||||
|
///
|
||||||
|
<value>The base path</value>
|
||||||
public String GetBasePath(String basePath) {
|
public String GetBasePath(String basePath) {
|
||||||
return this.apiClient.basePath;
|
return this.apiClient.basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Gets or sets the API client.
|
/// Gets or sets the API client.
|
||||||
/// </summary>
|
///
|
||||||
/// <value>The API client</value>
|
</summary>
|
||||||
|
///
|
||||||
|
<value>The API client</value>
|
||||||
public ApiClient apiClient {get; set;}
|
public ApiClient apiClient {get; set;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Update an existing pet
|
/// Update an existing pet
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">Pet object that needs to be added to the store</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">Pet object that needs to be added to the store</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public void UpdatePet (Pet Body) {
|
public void UpdatePet (Pet Body) {
|
||||||
|
|
||||||
|
|
||||||
@ -188,10 +287,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -213,11 +316,15 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Update an existing pet
|
/// Update an existing pet
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">Pet object that needs to be added to the store</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">Pet object that needs to be added to the store</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public async Task UpdatePetAsync (Pet Body) {
|
public async Task UpdatePetAsync (Pet Body) {
|
||||||
|
|
||||||
|
|
||||||
@ -226,10 +333,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -250,11 +361,15 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Add a new pet to the store
|
/// Add a new pet to the store
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">Pet object that needs to be added to the store</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">Pet object that needs to be added to the store</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public void AddPet (Pet Body) {
|
public void AddPet (Pet Body) {
|
||||||
|
|
||||||
|
|
||||||
@ -263,10 +378,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -288,11 +407,15 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Add a new pet to the store
|
/// Add a new pet to the store
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">Pet object that needs to be added to the store</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">Pet object that needs to be added to the store</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public async Task AddPetAsync (Pet Body) {
|
public async Task AddPetAsync (Pet Body) {
|
||||||
|
|
||||||
|
|
||||||
@ -301,10 +424,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -325,11 +452,15 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Finds Pets by status Multiple status values can be provided with comma seperated strings
|
/// Finds Pets by status Multiple status values can be provided with comma seperated strings
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Status">Status values that need to be considered for filter</param>
|
</summary>
|
||||||
/// <returns>List<Pet></returns>
|
///
|
||||||
|
<param name="Status">Status values that need to be considered for filter</param>
|
||||||
|
///
|
||||||
|
<returns>List<Pet></returns>
|
||||||
public List<Pet> FindPetsByStatus (List<string> Status) {
|
public List<Pet> FindPetsByStatus (List<string> Status) {
|
||||||
|
|
||||||
|
|
||||||
@ -338,10 +469,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
if (Status != null) queryParams.Add("status", apiClient.ParameterToString(Status)); // query parameter
|
if (Status != null) queryParams.Add("status", apiClient.ParameterToString(Status)); // query parameter
|
||||||
@ -362,11 +497,15 @@ namespace IO.Swagger.Api {
|
|||||||
return (List<Pet>) apiClient.Deserialize(response.Content, typeof(List<Pet>));
|
return (List<Pet>) apiClient.Deserialize(response.Content, typeof(List<Pet>));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Finds Pets by status Multiple status values can be provided with comma seperated strings
|
/// Finds Pets by status Multiple status values can be provided with comma seperated strings
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Status">Status values that need to be considered for filter</param>
|
</summary>
|
||||||
/// <returns>List<Pet></returns>
|
///
|
||||||
|
<param name="Status">Status values that need to be considered for filter</param>
|
||||||
|
///
|
||||||
|
<returns>List<Pet></returns>
|
||||||
public async Task<List<Pet>> FindPetsByStatusAsync (List<string> Status) {
|
public async Task<List<Pet>> FindPetsByStatusAsync (List<string> Status) {
|
||||||
|
|
||||||
|
|
||||||
@ -375,10 +514,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
if (Status != null) queryParams.Add("status", apiClient.ParameterToString(Status)); // query parameter
|
if (Status != null) queryParams.Add("status", apiClient.ParameterToString(Status)); // query parameter
|
||||||
@ -398,11 +541,15 @@ namespace IO.Swagger.Api {
|
|||||||
return (List<Pet>) ApiInvoker.Deserialize(response.Content, typeof(List<Pet>));
|
return (List<Pet>) ApiInvoker.Deserialize(response.Content, typeof(List<Pet>));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
/// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Tags">Tags to filter by</param>
|
</summary>
|
||||||
/// <returns>List<Pet></returns>
|
///
|
||||||
|
<param name="Tags">Tags to filter by</param>
|
||||||
|
///
|
||||||
|
<returns>List<Pet></returns>
|
||||||
public List<Pet> FindPetsByTags (List<string> Tags) {
|
public List<Pet> FindPetsByTags (List<string> Tags) {
|
||||||
|
|
||||||
|
|
||||||
@ -411,10 +558,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
if (Tags != null) queryParams.Add("tags", apiClient.ParameterToString(Tags)); // query parameter
|
if (Tags != null) queryParams.Add("tags", apiClient.ParameterToString(Tags)); // query parameter
|
||||||
@ -435,11 +586,15 @@ namespace IO.Swagger.Api {
|
|||||||
return (List<Pet>) apiClient.Deserialize(response.Content, typeof(List<Pet>));
|
return (List<Pet>) apiClient.Deserialize(response.Content, typeof(List<Pet>));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
/// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Tags">Tags to filter by</param>
|
</summary>
|
||||||
/// <returns>List<Pet></returns>
|
///
|
||||||
|
<param name="Tags">Tags to filter by</param>
|
||||||
|
///
|
||||||
|
<returns>List<Pet></returns>
|
||||||
public async Task<List<Pet>> FindPetsByTagsAsync (List<string> Tags) {
|
public async Task<List<Pet>> FindPetsByTagsAsync (List<string> Tags) {
|
||||||
|
|
||||||
|
|
||||||
@ -448,10 +603,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
if (Tags != null) queryParams.Add("tags", apiClient.ParameterToString(Tags)); // query parameter
|
if (Tags != null) queryParams.Add("tags", apiClient.ParameterToString(Tags)); // query parameter
|
||||||
@ -471,11 +630,15 @@ namespace IO.Swagger.Api {
|
|||||||
return (List<Pet>) ApiInvoker.Deserialize(response.Content, typeof(List<Pet>));
|
return (List<Pet>) ApiInvoker.Deserialize(response.Content, typeof(List<Pet>));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
/// Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="PetId">ID of pet that needs to be fetched</param>
|
</summary>
|
||||||
/// <returns>Pet</returns>
|
///
|
||||||
|
<param name="PetId">ID of pet that needs to be fetched</param>
|
||||||
|
///
|
||||||
|
<returns>Pet</returns>
|
||||||
public Pet GetPetById (long? PetId) {
|
public Pet GetPetById (long? PetId) {
|
||||||
|
|
||||||
|
|
||||||
@ -488,10 +651,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -511,11 +678,15 @@ namespace IO.Swagger.Api {
|
|||||||
return (Pet) apiClient.Deserialize(response.Content, typeof(Pet));
|
return (Pet) apiClient.Deserialize(response.Content, typeof(Pet));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
/// Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="PetId">ID of pet that needs to be fetched</param>
|
</summary>
|
||||||
/// <returns>Pet</returns>
|
///
|
||||||
|
<param name="PetId">ID of pet that needs to be fetched</param>
|
||||||
|
///
|
||||||
|
<returns>Pet</returns>
|
||||||
public async Task<Pet> GetPetByIdAsync (long? PetId) {
|
public async Task<Pet> GetPetByIdAsync (long? PetId) {
|
||||||
|
|
||||||
|
|
||||||
@ -528,10 +699,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -550,11 +725,17 @@ namespace IO.Swagger.Api {
|
|||||||
return (Pet) ApiInvoker.Deserialize(response.Content, typeof(Pet));
|
return (Pet) ApiInvoker.Deserialize(response.Content, typeof(Pet));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Updates a pet in the store with form data
|
/// Updates a pet in the store with form data
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="PetId">ID of pet that needs to be updated</param>/// <param name="Name">Updated name of the pet</param>/// <param name="Status">Updated status of the pet</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="PetId">ID of pet that needs to be updated</param>///
|
||||||
|
<param name="Name">Updated name of the pet</param>///
|
||||||
|
<param name="Status">Updated status of the pet</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public void UpdatePetWithForm (string PetId, string Name, string Status) {
|
public void UpdatePetWithForm (string PetId, string Name, string Status) {
|
||||||
|
|
||||||
|
|
||||||
@ -567,10 +748,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -593,11 +778,17 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Updates a pet in the store with form data
|
/// Updates a pet in the store with form data
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="PetId">ID of pet that needs to be updated</param>/// <param name="Name">Updated name of the pet</param>/// <param name="Status">Updated status of the pet</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="PetId">ID of pet that needs to be updated</param>///
|
||||||
|
<param name="Name">Updated name of the pet</param>///
|
||||||
|
<param name="Status">Updated status of the pet</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public async Task UpdatePetWithFormAsync (string PetId, string Name, string Status) {
|
public async Task UpdatePetWithFormAsync (string PetId, string Name, string Status) {
|
||||||
|
|
||||||
|
|
||||||
@ -610,10 +801,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -635,11 +830,16 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Deletes a pet
|
/// Deletes a pet
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="ApiKey"></param>/// <param name="PetId">Pet id to delete</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="ApiKey"></param>///
|
||||||
|
<param name="PetId">Pet id to delete</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public void DeletePet (string ApiKey, long? PetId) {
|
public void DeletePet (string ApiKey, long? PetId) {
|
||||||
|
|
||||||
|
|
||||||
@ -652,10 +852,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -677,11 +881,16 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Deletes a pet
|
/// Deletes a pet
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="ApiKey"></param>/// <param name="PetId">Pet id to delete</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="ApiKey"></param>///
|
||||||
|
<param name="PetId">Pet id to delete</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public async Task DeletePetAsync (string ApiKey, long? PetId) {
|
public async Task DeletePetAsync (string ApiKey, long? PetId) {
|
||||||
|
|
||||||
|
|
||||||
@ -694,10 +903,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -718,11 +931,17 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// uploads an image
|
/// uploads an image
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="PetId">ID of pet to update</param>/// <param name="AdditionalMetadata">Additional data to pass to server</param>/// <param name="File">file to upload</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="PetId">ID of pet to update</param>///
|
||||||
|
<param name="AdditionalMetadata">Additional data to pass to server</param>///
|
||||||
|
<param name="File">file to upload</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public void UploadFile (long? PetId, string AdditionalMetadata, string File) {
|
public void UploadFile (long? PetId, string AdditionalMetadata, string File) {
|
||||||
|
|
||||||
|
|
||||||
@ -735,10 +954,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -761,11 +984,17 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// uploads an image
|
/// uploads an image
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="PetId">ID of pet to update</param>/// <param name="AdditionalMetadata">Additional data to pass to server</param>/// <param name="File">file to upload</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="PetId">ID of pet to update</param>///
|
||||||
|
<param name="AdditionalMetadata">Additional data to pass to server</param>///
|
||||||
|
<param name="File">file to upload</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public async Task UploadFileAsync (long? PetId, string AdditionalMetadata, string File) {
|
public async Task UploadFileAsync (long? PetId, string AdditionalMetadata, string File) {
|
||||||
|
|
||||||
|
|
||||||
@ -778,10 +1007,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -804,5 +1037,4 @@ namespace IO.Swagger.Api {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,77 +7,114 @@ using IO.Swagger.Model;
|
|||||||
|
|
||||||
namespace IO.Swagger.Api {
|
namespace IO.Swagger.Api {
|
||||||
|
|
||||||
|
|
||||||
public interface IStoreApi {
|
public interface IStoreApi {
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||||
/// </summary>
|
///
|
||||||
|
</summary>
|
||||||
|
|
||||||
/// <returns>Dictionary<String, int?></returns>
|
///
|
||||||
|
<returns>Dictionary<String, int?></returns>
|
||||||
Dictionary<String, int?> GetInventory ();
|
Dictionary<String, int?> GetInventory ();
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||||
/// </summary>
|
///
|
||||||
|
</summary>
|
||||||
|
|
||||||
/// <returns>Dictionary<String, int?></returns>
|
///
|
||||||
|
<returns>Dictionary<String, int?></returns>
|
||||||
Task<Dictionary<String, int?>> GetInventoryAsync ();
|
Task<Dictionary<String, int?>> GetInventoryAsync ();
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Place an order for a pet
|
/// Place an order for a pet
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">order placed for purchasing the pet</param>
|
</summary>
|
||||||
/// <returns>Order</returns>
|
///
|
||||||
|
<param name="Body">order placed for purchasing the pet</param>
|
||||||
|
///
|
||||||
|
<returns>Order</returns>
|
||||||
Order PlaceOrder (Order Body);
|
Order PlaceOrder (Order Body);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Place an order for a pet
|
/// Place an order for a pet
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">order placed for purchasing the pet</param>
|
</summary>
|
||||||
/// <returns>Order</returns>
|
///
|
||||||
|
<param name="Body">order placed for purchasing the pet</param>
|
||||||
|
///
|
||||||
|
<returns>Order</returns>
|
||||||
Task<Order> PlaceOrderAsync (Order Body);
|
Task<Order> PlaceOrderAsync (Order Body);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="OrderId">ID of pet that needs to be fetched</param>
|
</summary>
|
||||||
/// <returns>Order</returns>
|
///
|
||||||
|
<param name="OrderId">ID of pet that needs to be fetched</param>
|
||||||
|
///
|
||||||
|
<returns>Order</returns>
|
||||||
Order GetOrderById (string OrderId);
|
Order GetOrderById (string OrderId);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="OrderId">ID of pet that needs to be fetched</param>
|
</summary>
|
||||||
/// <returns>Order</returns>
|
///
|
||||||
|
<param name="OrderId">ID of pet that needs to be fetched</param>
|
||||||
|
///
|
||||||
|
<returns>Order</returns>
|
||||||
Task<Order> GetOrderByIdAsync (string OrderId);
|
Task<Order> GetOrderByIdAsync (string OrderId);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="OrderId">ID of the order that needs to be deleted</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="OrderId">ID of the order that needs to be deleted</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
void DeleteOrder (string OrderId);
|
void DeleteOrder (string OrderId);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="OrderId">ID of the order that needs to be deleted</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="OrderId">ID of the order that needs to be deleted</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
Task DeleteOrderAsync (string OrderId);
|
Task DeleteOrderAsync (string OrderId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Represents a collection of functions to interact with the API endpoints
|
/// Represents a collection of functions to interact with the API endpoints
|
||||||
/// </summary>
|
///
|
||||||
|
</summary>
|
||||||
public class StoreApi : IStoreApi {
|
public class StoreApi : IStoreApi {
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
/// Initializes a new instance of the <see cref="StoreApi"/> class.
|
<summary>
|
||||||
/// </summary>
|
/// Initializes a new instance of the
|
||||||
/// <param name="apiClient"> an instance of ApiClient (optional)
|
<see cref="StoreApi"/>
|
||||||
/// <returns></returns>
|
class.
|
||||||
|
///
|
||||||
|
</summary>
|
||||||
|
///
|
||||||
|
<param name="apiClient"> an instance of ApiClient (optional)
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public StoreApi(ApiClient apiClient = null) {
|
public StoreApi(ApiClient apiClient = null) {
|
||||||
if (apiClient == null) { // use the default one in Configuration
|
if (apiClient == null) { // use the default one in Configuration
|
||||||
this.apiClient = Configuration.apiClient;
|
this.apiClient = Configuration.apiClient;
|
||||||
@ -86,44 +123,61 @@ namespace IO.Swagger.Api {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
/// Initializes a new instance of the <see cref="StoreApi"/> class.
|
<summary>
|
||||||
/// </summary>
|
/// Initializes a new instance of the
|
||||||
/// <returns></returns>
|
<see cref="StoreApi"/>
|
||||||
|
class.
|
||||||
|
///
|
||||||
|
</summary>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public StoreApi(String basePath)
|
public StoreApi(String basePath)
|
||||||
{
|
{
|
||||||
this.apiClient = new ApiClient(basePath);
|
this.apiClient = new ApiClient(basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Sets the base path of the API client.
|
/// Sets the base path of the API client.
|
||||||
/// </summary>
|
///
|
||||||
/// <value>The base path</value>
|
</summary>
|
||||||
|
///
|
||||||
|
<value>The base path</value>
|
||||||
public void SetBasePath(String basePath) {
|
public void SetBasePath(String basePath) {
|
||||||
this.apiClient.basePath = basePath;
|
this.apiClient.basePath = basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Gets the base path of the API client.
|
/// Gets the base path of the API client.
|
||||||
/// </summary>
|
///
|
||||||
/// <value>The base path</value>
|
</summary>
|
||||||
|
///
|
||||||
|
<value>The base path</value>
|
||||||
public String GetBasePath(String basePath) {
|
public String GetBasePath(String basePath) {
|
||||||
return this.apiClient.basePath;
|
return this.apiClient.basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Gets or sets the API client.
|
/// Gets or sets the API client.
|
||||||
/// </summary>
|
///
|
||||||
/// <value>The API client</value>
|
</summary>
|
||||||
|
///
|
||||||
|
<value>The API client</value>
|
||||||
public ApiClient apiClient {get; set;}
|
public ApiClient apiClient {get; set;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||||
/// </summary>
|
///
|
||||||
|
</summary>
|
||||||
|
|
||||||
/// <returns>Dictionary<String, int?></returns>
|
///
|
||||||
|
<returns>Dictionary<String, int?></returns>
|
||||||
public Dictionary<String, int?> GetInventory () {
|
public Dictionary<String, int?> GetInventory () {
|
||||||
|
|
||||||
|
|
||||||
@ -132,10 +186,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -155,11 +213,14 @@ namespace IO.Swagger.Api {
|
|||||||
return (Dictionary<String, int?>) apiClient.Deserialize(response.Content, typeof(Dictionary<String, int?>));
|
return (Dictionary<String, int?>) apiClient.Deserialize(response.Content, typeof(Dictionary<String, int?>));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||||
/// </summary>
|
///
|
||||||
|
</summary>
|
||||||
|
|
||||||
/// <returns>Dictionary<String, int?></returns>
|
///
|
||||||
|
<returns>Dictionary<String, int?></returns>
|
||||||
public async Task<Dictionary<String, int?>> GetInventoryAsync () {
|
public async Task<Dictionary<String, int?>> GetInventoryAsync () {
|
||||||
|
|
||||||
|
|
||||||
@ -168,10 +229,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -190,11 +255,15 @@ namespace IO.Swagger.Api {
|
|||||||
return (Dictionary<String, int?>) ApiInvoker.Deserialize(response.Content, typeof(Dictionary<String, int?>));
|
return (Dictionary<String, int?>) ApiInvoker.Deserialize(response.Content, typeof(Dictionary<String, int?>));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Place an order for a pet
|
/// Place an order for a pet
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">order placed for purchasing the pet</param>
|
</summary>
|
||||||
/// <returns>Order</returns>
|
///
|
||||||
|
<param name="Body">order placed for purchasing the pet</param>
|
||||||
|
///
|
||||||
|
<returns>Order</returns>
|
||||||
public Order PlaceOrder (Order Body) {
|
public Order PlaceOrder (Order Body) {
|
||||||
|
|
||||||
|
|
||||||
@ -203,10 +272,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -227,11 +300,15 @@ namespace IO.Swagger.Api {
|
|||||||
return (Order) apiClient.Deserialize(response.Content, typeof(Order));
|
return (Order) apiClient.Deserialize(response.Content, typeof(Order));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Place an order for a pet
|
/// Place an order for a pet
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">order placed for purchasing the pet</param>
|
</summary>
|
||||||
/// <returns>Order</returns>
|
///
|
||||||
|
<param name="Body">order placed for purchasing the pet</param>
|
||||||
|
///
|
||||||
|
<returns>Order</returns>
|
||||||
public async Task<Order> PlaceOrderAsync (Order Body) {
|
public async Task<Order> PlaceOrderAsync (Order Body) {
|
||||||
|
|
||||||
|
|
||||||
@ -240,10 +317,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -263,11 +344,15 @@ namespace IO.Swagger.Api {
|
|||||||
return (Order) ApiInvoker.Deserialize(response.Content, typeof(Order));
|
return (Order) ApiInvoker.Deserialize(response.Content, typeof(Order));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="OrderId">ID of pet that needs to be fetched</param>
|
</summary>
|
||||||
/// <returns>Order</returns>
|
///
|
||||||
|
<param name="OrderId">ID of pet that needs to be fetched</param>
|
||||||
|
///
|
||||||
|
<returns>Order</returns>
|
||||||
public Order GetOrderById (string OrderId) {
|
public Order GetOrderById (string OrderId) {
|
||||||
|
|
||||||
|
|
||||||
@ -280,10 +365,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{" + "orderId" + "}", apiClient.ParameterToString(OrderId));
|
path = path.Replace("{" + "orderId" + "}", apiClient.ParameterToString(OrderId));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -303,11 +392,15 @@ namespace IO.Swagger.Api {
|
|||||||
return (Order) apiClient.Deserialize(response.Content, typeof(Order));
|
return (Order) apiClient.Deserialize(response.Content, typeof(Order));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="OrderId">ID of pet that needs to be fetched</param>
|
</summary>
|
||||||
/// <returns>Order</returns>
|
///
|
||||||
|
<param name="OrderId">ID of pet that needs to be fetched</param>
|
||||||
|
///
|
||||||
|
<returns>Order</returns>
|
||||||
public async Task<Order> GetOrderByIdAsync (string OrderId) {
|
public async Task<Order> GetOrderByIdAsync (string OrderId) {
|
||||||
|
|
||||||
|
|
||||||
@ -320,10 +413,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{" + "orderId" + "}", apiClient.ParameterToString(OrderId));
|
path = path.Replace("{" + "orderId" + "}", apiClient.ParameterToString(OrderId));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -342,11 +439,15 @@ namespace IO.Swagger.Api {
|
|||||||
return (Order) ApiInvoker.Deserialize(response.Content, typeof(Order));
|
return (Order) ApiInvoker.Deserialize(response.Content, typeof(Order));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="OrderId">ID of the order that needs to be deleted</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="OrderId">ID of the order that needs to be deleted</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public void DeleteOrder (string OrderId) {
|
public void DeleteOrder (string OrderId) {
|
||||||
|
|
||||||
|
|
||||||
@ -359,10 +460,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{" + "orderId" + "}", apiClient.ParameterToString(OrderId));
|
path = path.Replace("{" + "orderId" + "}", apiClient.ParameterToString(OrderId));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -383,11 +488,15 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="OrderId">ID of the order that needs to be deleted</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="OrderId">ID of the order that needs to be deleted</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public async Task DeleteOrderAsync (string OrderId) {
|
public async Task DeleteOrderAsync (string OrderId) {
|
||||||
|
|
||||||
|
|
||||||
@ -400,10 +509,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{" + "orderId" + "}", apiClient.ParameterToString(OrderId));
|
path = path.Replace("{" + "orderId" + "}", apiClient.ParameterToString(OrderId));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -424,5 +537,4 @@ namespace IO.Swagger.Api {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,133 +7,206 @@ using IO.Swagger.Model;
|
|||||||
|
|
||||||
namespace IO.Swagger.Api {
|
namespace IO.Swagger.Api {
|
||||||
|
|
||||||
|
|
||||||
public interface IUserApi {
|
public interface IUserApi {
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Create user This can only be done by the logged in user.
|
/// Create user This can only be done by the logged in user.
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">Created user object</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">Created user object</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
void CreateUser (User Body);
|
void CreateUser (User Body);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Create user This can only be done by the logged in user.
|
/// Create user This can only be done by the logged in user.
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">Created user object</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">Created user object</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
Task CreateUserAsync (User Body);
|
Task CreateUserAsync (User Body);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">List of user object</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">List of user object</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
void CreateUsersWithArrayInput (List<User> Body);
|
void CreateUsersWithArrayInput (List<User> Body);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">List of user object</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">List of user object</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
Task CreateUsersWithArrayInputAsync (List<User> Body);
|
Task CreateUsersWithArrayInputAsync (List<User> Body);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">List of user object</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">List of user object</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
void CreateUsersWithListInput (List<User> Body);
|
void CreateUsersWithListInput (List<User> Body);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">List of user object</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">List of user object</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
Task CreateUsersWithListInputAsync (List<User> Body);
|
Task CreateUsersWithListInputAsync (List<User> Body);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Logs user into the system
|
/// Logs user into the system
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Username">The user name for login</param>/// <param name="Password">The password for login in clear text</param>
|
</summary>
|
||||||
/// <returns>string</returns>
|
///
|
||||||
|
<param name="Username">The user name for login</param>///
|
||||||
|
<param name="Password">The password for login in clear text</param>
|
||||||
|
///
|
||||||
|
<returns>string</returns>
|
||||||
string LoginUser (string Username, string Password);
|
string LoginUser (string Username, string Password);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Logs user into the system
|
/// Logs user into the system
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Username">The user name for login</param>/// <param name="Password">The password for login in clear text</param>
|
</summary>
|
||||||
/// <returns>string</returns>
|
///
|
||||||
|
<param name="Username">The user name for login</param>///
|
||||||
|
<param name="Password">The password for login in clear text</param>
|
||||||
|
///
|
||||||
|
<returns>string</returns>
|
||||||
Task<string> LoginUserAsync (string Username, string Password);
|
Task<string> LoginUserAsync (string Username, string Password);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Logs out current logged in user session
|
/// Logs out current logged in user session
|
||||||
/// </summary>
|
///
|
||||||
|
</summary>
|
||||||
|
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<returns></returns>
|
||||||
void LogoutUser ();
|
void LogoutUser ();
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Logs out current logged in user session
|
/// Logs out current logged in user session
|
||||||
/// </summary>
|
///
|
||||||
|
</summary>
|
||||||
|
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<returns></returns>
|
||||||
Task LogoutUserAsync ();
|
Task LogoutUserAsync ();
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Get user by user name
|
/// Get user by user name
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Username">The name that needs to be fetched. Use user1 for testing. </param>
|
</summary>
|
||||||
/// <returns>User</returns>
|
///
|
||||||
|
<param name="Username">The name that needs to be fetched. Use user1 for testing. </param>
|
||||||
|
///
|
||||||
|
<returns>User</returns>
|
||||||
User GetUserByName (string Username);
|
User GetUserByName (string Username);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Get user by user name
|
/// Get user by user name
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Username">The name that needs to be fetched. Use user1 for testing. </param>
|
</summary>
|
||||||
/// <returns>User</returns>
|
///
|
||||||
|
<param name="Username">The name that needs to be fetched. Use user1 for testing. </param>
|
||||||
|
///
|
||||||
|
<returns>User</returns>
|
||||||
Task<User> GetUserByNameAsync (string Username);
|
Task<User> GetUserByNameAsync (string Username);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Updated user This can only be done by the logged in user.
|
/// Updated user This can only be done by the logged in user.
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Username">name that need to be deleted</param>/// <param name="Body">Updated user object</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Username">name that need to be deleted</param>///
|
||||||
|
<param name="Body">Updated user object</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
void UpdateUser (string Username, User Body);
|
void UpdateUser (string Username, User Body);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Updated user This can only be done by the logged in user.
|
/// Updated user This can only be done by the logged in user.
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Username">name that need to be deleted</param>/// <param name="Body">Updated user object</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Username">name that need to be deleted</param>///
|
||||||
|
<param name="Body">Updated user object</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
Task UpdateUserAsync (string Username, User Body);
|
Task UpdateUserAsync (string Username, User Body);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Delete user This can only be done by the logged in user.
|
/// Delete user This can only be done by the logged in user.
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Username">The name that needs to be deleted</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Username">The name that needs to be deleted</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
void DeleteUser (string Username);
|
void DeleteUser (string Username);
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Delete user This can only be done by the logged in user.
|
/// Delete user This can only be done by the logged in user.
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Username">The name that needs to be deleted</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Username">The name that needs to be deleted</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
Task DeleteUserAsync (string Username);
|
Task DeleteUserAsync (string Username);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Represents a collection of functions to interact with the API endpoints
|
/// Represents a collection of functions to interact with the API endpoints
|
||||||
/// </summary>
|
///
|
||||||
|
</summary>
|
||||||
public class UserApi : IUserApi {
|
public class UserApi : IUserApi {
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
/// Initializes a new instance of the <see cref="UserApi"/> class.
|
<summary>
|
||||||
/// </summary>
|
/// Initializes a new instance of the
|
||||||
/// <param name="apiClient"> an instance of ApiClient (optional)
|
<see cref="UserApi"/>
|
||||||
/// <returns></returns>
|
class.
|
||||||
|
///
|
||||||
|
</summary>
|
||||||
|
///
|
||||||
|
<param name="apiClient"> an instance of ApiClient (optional)
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public UserApi(ApiClient apiClient = null) {
|
public UserApi(ApiClient apiClient = null) {
|
||||||
if (apiClient == null) { // use the default one in Configuration
|
if (apiClient == null) { // use the default one in Configuration
|
||||||
this.apiClient = Configuration.apiClient;
|
this.apiClient = Configuration.apiClient;
|
||||||
@ -142,44 +215,62 @@ namespace IO.Swagger.Api {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
/// Initializes a new instance of the <see cref="UserApi"/> class.
|
<summary>
|
||||||
/// </summary>
|
/// Initializes a new instance of the
|
||||||
/// <returns></returns>
|
<see cref="UserApi"/>
|
||||||
|
class.
|
||||||
|
///
|
||||||
|
</summary>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public UserApi(String basePath)
|
public UserApi(String basePath)
|
||||||
{
|
{
|
||||||
this.apiClient = new ApiClient(basePath);
|
this.apiClient = new ApiClient(basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Sets the base path of the API client.
|
/// Sets the base path of the API client.
|
||||||
/// </summary>
|
///
|
||||||
/// <value>The base path</value>
|
</summary>
|
||||||
|
///
|
||||||
|
<value>The base path</value>
|
||||||
public void SetBasePath(String basePath) {
|
public void SetBasePath(String basePath) {
|
||||||
this.apiClient.basePath = basePath;
|
this.apiClient.basePath = basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Gets the base path of the API client.
|
/// Gets the base path of the API client.
|
||||||
/// </summary>
|
///
|
||||||
/// <value>The base path</value>
|
</summary>
|
||||||
|
///
|
||||||
|
<value>The base path</value>
|
||||||
public String GetBasePath(String basePath) {
|
public String GetBasePath(String basePath) {
|
||||||
return this.apiClient.basePath;
|
return this.apiClient.basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Gets or sets the API client.
|
/// Gets or sets the API client.
|
||||||
/// </summary>
|
///
|
||||||
/// <value>The API client</value>
|
</summary>
|
||||||
|
///
|
||||||
|
<value>The API client</value>
|
||||||
public ApiClient apiClient {get; set;}
|
public ApiClient apiClient {get; set;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Create user This can only be done by the logged in user.
|
/// Create user This can only be done by the logged in user.
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">Created user object</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">Created user object</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public void CreateUser (User Body) {
|
public void CreateUser (User Body) {
|
||||||
|
|
||||||
|
|
||||||
@ -188,10 +279,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -213,11 +308,15 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Create user This can only be done by the logged in user.
|
/// Create user This can only be done by the logged in user.
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">Created user object</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">Created user object</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public async Task CreateUserAsync (User Body) {
|
public async Task CreateUserAsync (User Body) {
|
||||||
|
|
||||||
|
|
||||||
@ -226,10 +325,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -250,11 +353,15 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">List of user object</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">List of user object</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public void CreateUsersWithArrayInput (List<User> Body) {
|
public void CreateUsersWithArrayInput (List<User> Body) {
|
||||||
|
|
||||||
|
|
||||||
@ -263,10 +370,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -288,11 +399,15 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">List of user object</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">List of user object</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public async Task CreateUsersWithArrayInputAsync (List<User> Body) {
|
public async Task CreateUsersWithArrayInputAsync (List<User> Body) {
|
||||||
|
|
||||||
|
|
||||||
@ -301,10 +416,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -325,11 +444,15 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">List of user object</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">List of user object</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public void CreateUsersWithListInput (List<User> Body) {
|
public void CreateUsersWithListInput (List<User> Body) {
|
||||||
|
|
||||||
|
|
||||||
@ -338,10 +461,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -363,11 +490,15 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Body">List of user object</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Body">List of user object</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public async Task CreateUsersWithListInputAsync (List<User> Body) {
|
public async Task CreateUsersWithListInputAsync (List<User> Body) {
|
||||||
|
|
||||||
|
|
||||||
@ -376,10 +507,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -400,11 +535,16 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Logs user into the system
|
/// Logs user into the system
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Username">The user name for login</param>/// <param name="Password">The password for login in clear text</param>
|
</summary>
|
||||||
/// <returns>string</returns>
|
///
|
||||||
|
<param name="Username">The user name for login</param>///
|
||||||
|
<param name="Password">The password for login in clear text</param>
|
||||||
|
///
|
||||||
|
<returns>string</returns>
|
||||||
public string LoginUser (string Username, string Password) {
|
public string LoginUser (string Username, string Password) {
|
||||||
|
|
||||||
|
|
||||||
@ -413,10 +553,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
if (Username != null) queryParams.Add("username", apiClient.ParameterToString(Username)); // query parameter
|
if (Username != null) queryParams.Add("username", apiClient.ParameterToString(Username)); // query parameter
|
||||||
@ -438,11 +582,16 @@ namespace IO.Swagger.Api {
|
|||||||
return (string) apiClient.Deserialize(response.Content, typeof(string));
|
return (string) apiClient.Deserialize(response.Content, typeof(string));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Logs user into the system
|
/// Logs user into the system
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Username">The user name for login</param>/// <param name="Password">The password for login in clear text</param>
|
</summary>
|
||||||
/// <returns>string</returns>
|
///
|
||||||
|
<param name="Username">The user name for login</param>///
|
||||||
|
<param name="Password">The password for login in clear text</param>
|
||||||
|
///
|
||||||
|
<returns>string</returns>
|
||||||
public async Task<string> LoginUserAsync (string Username, string Password) {
|
public async Task<string> LoginUserAsync (string Username, string Password) {
|
||||||
|
|
||||||
|
|
||||||
@ -451,10 +600,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
if (Username != null) queryParams.Add("username", apiClient.ParameterToString(Username)); // query parameter
|
if (Username != null) queryParams.Add("username", apiClient.ParameterToString(Username)); // query parameter
|
||||||
@ -475,11 +628,14 @@ namespace IO.Swagger.Api {
|
|||||||
return (string) ApiInvoker.Deserialize(response.Content, typeof(string));
|
return (string) ApiInvoker.Deserialize(response.Content, typeof(string));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Logs out current logged in user session
|
/// Logs out current logged in user session
|
||||||
/// </summary>
|
///
|
||||||
|
</summary>
|
||||||
|
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<returns></returns>
|
||||||
public void LogoutUser () {
|
public void LogoutUser () {
|
||||||
|
|
||||||
|
|
||||||
@ -488,10 +644,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -512,11 +672,14 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Logs out current logged in user session
|
/// Logs out current logged in user session
|
||||||
/// </summary>
|
///
|
||||||
|
</summary>
|
||||||
|
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<returns></returns>
|
||||||
public async Task LogoutUserAsync () {
|
public async Task LogoutUserAsync () {
|
||||||
|
|
||||||
|
|
||||||
@ -525,10 +688,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{format}", "json");
|
path = path.Replace("{format}", "json");
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -548,11 +715,15 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Get user by user name
|
/// Get user by user name
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Username">The name that needs to be fetched. Use user1 for testing. </param>
|
</summary>
|
||||||
/// <returns>User</returns>
|
///
|
||||||
|
<param name="Username">The name that needs to be fetched. Use user1 for testing. </param>
|
||||||
|
///
|
||||||
|
<returns>User</returns>
|
||||||
public User GetUserByName (string Username) {
|
public User GetUserByName (string Username) {
|
||||||
|
|
||||||
|
|
||||||
@ -565,10 +736,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{" + "username" + "}", apiClient.ParameterToString(Username));
|
path = path.Replace("{" + "username" + "}", apiClient.ParameterToString(Username));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -588,11 +763,15 @@ namespace IO.Swagger.Api {
|
|||||||
return (User) apiClient.Deserialize(response.Content, typeof(User));
|
return (User) apiClient.Deserialize(response.Content, typeof(User));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Get user by user name
|
/// Get user by user name
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Username">The name that needs to be fetched. Use user1 for testing. </param>
|
</summary>
|
||||||
/// <returns>User</returns>
|
///
|
||||||
|
<param name="Username">The name that needs to be fetched. Use user1 for testing. </param>
|
||||||
|
///
|
||||||
|
<returns>User</returns>
|
||||||
public async Task<User> GetUserByNameAsync (string Username) {
|
public async Task<User> GetUserByNameAsync (string Username) {
|
||||||
|
|
||||||
|
|
||||||
@ -605,10 +784,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{" + "username" + "}", apiClient.ParameterToString(Username));
|
path = path.Replace("{" + "username" + "}", apiClient.ParameterToString(Username));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -627,11 +810,16 @@ namespace IO.Swagger.Api {
|
|||||||
return (User) ApiInvoker.Deserialize(response.Content, typeof(User));
|
return (User) ApiInvoker.Deserialize(response.Content, typeof(User));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Updated user This can only be done by the logged in user.
|
/// Updated user This can only be done by the logged in user.
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Username">name that need to be deleted</param>/// <param name="Body">Updated user object</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Username">name that need to be deleted</param>///
|
||||||
|
<param name="Body">Updated user object</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public void UpdateUser (string Username, User Body) {
|
public void UpdateUser (string Username, User Body) {
|
||||||
|
|
||||||
|
|
||||||
@ -644,10 +832,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{" + "username" + "}", apiClient.ParameterToString(Username));
|
path = path.Replace("{" + "username" + "}", apiClient.ParameterToString(Username));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -669,11 +861,16 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Updated user This can only be done by the logged in user.
|
/// Updated user This can only be done by the logged in user.
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Username">name that need to be deleted</param>/// <param name="Body">Updated user object</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Username">name that need to be deleted</param>///
|
||||||
|
<param name="Body">Updated user object</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public async Task UpdateUserAsync (string Username, User Body) {
|
public async Task UpdateUserAsync (string Username, User Body) {
|
||||||
|
|
||||||
|
|
||||||
@ -686,10 +883,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{" + "username" + "}", apiClient.ParameterToString(Username));
|
path = path.Replace("{" + "username" + "}", apiClient.ParameterToString(Username));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -710,11 +911,15 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Delete user This can only be done by the logged in user.
|
/// Delete user This can only be done by the logged in user.
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Username">The name that needs to be deleted</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Username">The name that needs to be deleted</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public void DeleteUser (string Username) {
|
public void DeleteUser (string Username) {
|
||||||
|
|
||||||
|
|
||||||
@ -727,10 +932,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{" + "username" + "}", apiClient.ParameterToString(Username));
|
path = path.Replace("{" + "username" + "}", apiClient.ParameterToString(Username));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -751,11 +960,15 @@ namespace IO.Swagger.Api {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Delete user This can only be done by the logged in user.
|
/// Delete user This can only be done by the logged in user.
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="Username">The name that needs to be deleted</param>
|
</summary>
|
||||||
/// <returns></returns>
|
///
|
||||||
|
<param name="Username">The name that needs to be deleted</param>
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public async Task DeleteUserAsync (string Username) {
|
public async Task DeleteUserAsync (string Username) {
|
||||||
|
|
||||||
|
|
||||||
@ -768,10 +981,14 @@ namespace IO.Swagger.Api {
|
|||||||
path = path.Replace("{" + "username" + "}", apiClient.ParameterToString(Username));
|
path = path.Replace("{" + "username" + "}", apiClient.ParameterToString(Username));
|
||||||
|
|
||||||
|
|
||||||
var queryParams = new Dictionary<String, String>();
|
var queryParams = new Dictionary
|
||||||
var headerParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
var formParams = new Dictionary<String, String>();
|
var headerParams = new Dictionary
|
||||||
var fileParams = new Dictionary<String, String>();
|
<String, String>();
|
||||||
|
var formParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
var fileParams = new Dictionary
|
||||||
|
<String, String>();
|
||||||
String postBody = null;
|
String postBody = null;
|
||||||
|
|
||||||
|
|
||||||
@ -792,5 +1009,4 @@ namespace IO.Swagger.Api {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,11 +5,14 @@ using System.Collections.Generic;
|
|||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
|
||||||
namespace IO.Swagger.Model {
|
namespace IO.Swagger.Model {
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
///
|
||||||
/// </summary>
|
<summary>
|
||||||
|
///
|
||||||
|
///
|
||||||
|
</summary>
|
||||||
[DataContract]
|
[DataContract]
|
||||||
public class Category {
|
public class Category {
|
||||||
|
|
||||||
@ -24,10 +27,13 @@ namespace IO.Swagger.Model {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Get the string presentation of the object
|
/// Get the string presentation of the object
|
||||||
/// </summary>
|
///
|
||||||
/// <returns>String presentation of the object</returns>
|
</summary>
|
||||||
|
///
|
||||||
|
<returns>String presentation of the object</returns>
|
||||||
public override string ToString() {
|
public override string ToString() {
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
sb.Append("class Category {\n");
|
sb.Append("class Category {\n");
|
||||||
@ -40,15 +46,17 @@ namespace IO.Swagger.Model {
|
|||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Get the JSON string presentation of the object
|
/// Get the JSON string presentation of the object
|
||||||
/// </summary>
|
///
|
||||||
/// <returns>JSON string presentation of the object</returns>
|
</summary>
|
||||||
|
///
|
||||||
|
<returns>JSON string presentation of the object</returns>
|
||||||
public string ToJson() {
|
public string ToJson() {
|
||||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,11 +5,14 @@ using System.Collections.Generic;
|
|||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
|
||||||
namespace IO.Swagger.Model {
|
namespace IO.Swagger.Model {
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
///
|
||||||
/// </summary>
|
<summary>
|
||||||
|
///
|
||||||
|
///
|
||||||
|
</summary>
|
||||||
[DataContract]
|
[DataContract]
|
||||||
public class Order {
|
public class Order {
|
||||||
|
|
||||||
@ -44,10 +47,13 @@ namespace IO.Swagger.Model {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Get the string presentation of the object
|
/// Get the string presentation of the object
|
||||||
/// </summary>
|
///
|
||||||
/// <returns>String presentation of the object</returns>
|
</summary>
|
||||||
|
///
|
||||||
|
<returns>String presentation of the object</returns>
|
||||||
public override string ToString() {
|
public override string ToString() {
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
sb.Append("class Order {\n");
|
sb.Append("class Order {\n");
|
||||||
@ -68,15 +74,17 @@ namespace IO.Swagger.Model {
|
|||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Get the JSON string presentation of the object
|
/// Get the JSON string presentation of the object
|
||||||
/// </summary>
|
///
|
||||||
/// <returns>JSON string presentation of the object</returns>
|
</summary>
|
||||||
|
///
|
||||||
|
<returns>JSON string presentation of the object</returns>
|
||||||
public string ToJson() {
|
public string ToJson() {
|
||||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,11 +5,14 @@ using System.Collections.Generic;
|
|||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
|
||||||
namespace IO.Swagger.Model {
|
namespace IO.Swagger.Model {
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
///
|
||||||
/// </summary>
|
<summary>
|
||||||
|
///
|
||||||
|
///
|
||||||
|
</summary>
|
||||||
[DataContract]
|
[DataContract]
|
||||||
public class Pet {
|
public class Pet {
|
||||||
|
|
||||||
@ -44,10 +47,13 @@ namespace IO.Swagger.Model {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Get the string presentation of the object
|
/// Get the string presentation of the object
|
||||||
/// </summary>
|
///
|
||||||
/// <returns>String presentation of the object</returns>
|
</summary>
|
||||||
|
///
|
||||||
|
<returns>String presentation of the object</returns>
|
||||||
public override string ToString() {
|
public override string ToString() {
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
sb.Append("class Pet {\n");
|
sb.Append("class Pet {\n");
|
||||||
@ -68,15 +74,17 @@ namespace IO.Swagger.Model {
|
|||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Get the JSON string presentation of the object
|
/// Get the JSON string presentation of the object
|
||||||
/// </summary>
|
///
|
||||||
/// <returns>JSON string presentation of the object</returns>
|
</summary>
|
||||||
|
///
|
||||||
|
<returns>JSON string presentation of the object</returns>
|
||||||
public string ToJson() {
|
public string ToJson() {
|
||||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,11 +5,14 @@ using System.Collections.Generic;
|
|||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
|
||||||
namespace IO.Swagger.Model {
|
namespace IO.Swagger.Model {
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
///
|
||||||
/// </summary>
|
<summary>
|
||||||
|
///
|
||||||
|
///
|
||||||
|
</summary>
|
||||||
[DataContract]
|
[DataContract]
|
||||||
public class Tag {
|
public class Tag {
|
||||||
|
|
||||||
@ -24,10 +27,13 @@ namespace IO.Swagger.Model {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Get the string presentation of the object
|
/// Get the string presentation of the object
|
||||||
/// </summary>
|
///
|
||||||
/// <returns>String presentation of the object</returns>
|
</summary>
|
||||||
|
///
|
||||||
|
<returns>String presentation of the object</returns>
|
||||||
public override string ToString() {
|
public override string ToString() {
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
sb.Append("class Tag {\n");
|
sb.Append("class Tag {\n");
|
||||||
@ -40,15 +46,17 @@ namespace IO.Swagger.Model {
|
|||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Get the JSON string presentation of the object
|
/// Get the JSON string presentation of the object
|
||||||
/// </summary>
|
///
|
||||||
/// <returns>JSON string presentation of the object</returns>
|
</summary>
|
||||||
|
///
|
||||||
|
<returns>JSON string presentation of the object</returns>
|
||||||
public string ToJson() {
|
public string ToJson() {
|
||||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,11 +5,14 @@ using System.Collections.Generic;
|
|||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
|
||||||
namespace IO.Swagger.Model {
|
namespace IO.Swagger.Model {
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
///
|
||||||
/// </summary>
|
<summary>
|
||||||
|
///
|
||||||
|
///
|
||||||
|
</summary>
|
||||||
[DataContract]
|
[DataContract]
|
||||||
public class User {
|
public class User {
|
||||||
|
|
||||||
@ -54,10 +57,13 @@ namespace IO.Swagger.Model {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Get the string presentation of the object
|
/// Get the string presentation of the object
|
||||||
/// </summary>
|
///
|
||||||
/// <returns>String presentation of the object</returns>
|
</summary>
|
||||||
|
///
|
||||||
|
<returns>String presentation of the object</returns>
|
||||||
public override string ToString() {
|
public override string ToString() {
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
sb.Append("class User {\n");
|
sb.Append("class User {\n");
|
||||||
@ -82,15 +88,17 @@ namespace IO.Swagger.Model {
|
|||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Get the JSON string presentation of the object
|
/// Get the JSON string presentation of the object
|
||||||
/// </summary>
|
///
|
||||||
/// <returns>JSON string presentation of the object</returns>
|
</summary>
|
||||||
|
///
|
||||||
|
<returns>JSON string presentation of the object</returns>
|
||||||
public string ToJson() {
|
public string ToJson() {
|
||||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,36 +9,55 @@ using Newtonsoft.Json;
|
|||||||
using RestSharp;
|
using RestSharp;
|
||||||
|
|
||||||
namespace IO.Swagger.Client {
|
namespace IO.Swagger.Client {
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// API client is mainly responible for making the HTTP call to the API backend
|
/// API client is mainly responible for making the HTTP call to the API backend
|
||||||
/// </summary>
|
///
|
||||||
|
</summary>
|
||||||
public class ApiClient {
|
public class ApiClient {
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
/// Initializes a new instance of the <see cref="ApiClient"/> class.
|
<summary>
|
||||||
/// </summary>
|
/// Initializes a new instance of the
|
||||||
/// <param name="basePath">The base path.</param>
|
<see cref="ApiClient"/>
|
||||||
|
class.
|
||||||
|
///
|
||||||
|
</summary>
|
||||||
|
///
|
||||||
|
<param name="basePath">The base path.</param>
|
||||||
public ApiClient(String basePath="http://petstore.swagger.io/v2") {
|
public ApiClient(String basePath="http://petstore.swagger.io/v2") {
|
||||||
this.basePath = basePath;
|
this.basePath = basePath;
|
||||||
this.restClient = new RestClient(this.basePath);
|
this.restClient = new RestClient(this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Gets or sets the base path.
|
/// Gets or sets the base path.
|
||||||
/// </summary>
|
///
|
||||||
/// <value>The base path.</value>
|
</summary>
|
||||||
|
///
|
||||||
|
<value>The base path.</value>
|
||||||
public string basePath { get; set; }
|
public string basePath { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Gets or sets the RestClient
|
/// Gets or sets the RestClient
|
||||||
/// </summary>
|
///
|
||||||
/// <value>The RestClient.</value>
|
</summary>
|
||||||
|
///
|
||||||
|
<value>The RestClient.</value>
|
||||||
public RestClient restClient { get; set; }
|
public RestClient restClient { get; set; }
|
||||||
|
|
||||||
private Dictionary<String, String> defaultHeaderMap = new Dictionary<String, String>();
|
private Dictionary
|
||||||
|
<String, String> defaultHeaderMap = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
|
||||||
public Object CallApi(String Path, RestSharp.Method Method, Dictionary<String, String> QueryParams, String PostBody,
|
public Object CallApi(String Path, RestSharp.Method Method, Dictionary
|
||||||
Dictionary<String, String> HeaderParams, Dictionary<String, String> FormParams, Dictionary<String, String> FileParams, String[] AuthSettings) {
|
<String, String> QueryParams, String PostBody,
|
||||||
|
Dictionary
|
||||||
|
<String, String> HeaderParams, Dictionary
|
||||||
|
<String, String> FormParams, Dictionary
|
||||||
|
<String, String> FileParams, String[] AuthSettings) {
|
||||||
var response = Task.Run(async () => {
|
var response = Task.Run(async () => {
|
||||||
var resp = await CallApiAsync(Path, Method, QueryParams, PostBody, HeaderParams, FormParams, FileParams, AuthSettings);
|
var resp = await CallApiAsync(Path, Method, QueryParams, PostBody, HeaderParams, FormParams, FileParams, AuthSettings);
|
||||||
return resp;
|
return resp;
|
||||||
@ -46,31 +65,50 @@ namespace IO.Swagger.Client {
|
|||||||
return response.Result;
|
return response.Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Object> CallApiAsync(String Path, RestSharp.Method Method, Dictionary<String, String> QueryParams, String PostBody,
|
public async Task
|
||||||
Dictionary<String, String> HeaderParams, Dictionary<String, String> FormParams, Dictionary<String, String> FileParams, String[] AuthSettings) {
|
<Object> CallApiAsync(String Path, RestSharp.Method Method, Dictionary
|
||||||
|
<String
|
||||||
|
, String> QueryParams, String PostBody,
|
||||||
|
Dictionary
|
||||||
|
<String
|
||||||
|
, String> HeaderParams, Dictionary
|
||||||
|
<String
|
||||||
|
, String> FormParams, Dictionary
|
||||||
|
<String
|
||||||
|
, String> FileParams, String[] AuthSettings) {
|
||||||
|
|
||||||
var request = new RestRequest(Path, Method);
|
var request = new RestRequest(Path, Method);
|
||||||
|
|
||||||
UpdateParamsForAuth(QueryParams, HeaderParams, AuthSettings);
|
UpdateParamsForAuth(QueryParams, HeaderParams, AuthSettings);
|
||||||
|
|
||||||
// add default header, if any
|
// add default header, if any
|
||||||
foreach(KeyValuePair<string, string> defaultHeader in this.defaultHeaderMap)
|
foreach(KeyValuePair
|
||||||
|
<string
|
||||||
|
, string> defaultHeader in this.defaultHeaderMap)
|
||||||
request.AddHeader(defaultHeader.Key, defaultHeader.Value);
|
request.AddHeader(defaultHeader.Key, defaultHeader.Value);
|
||||||
|
|
||||||
// add header parameter, if any
|
// add header parameter, if any
|
||||||
foreach(KeyValuePair<string, string> param in HeaderParams)
|
foreach(KeyValuePair
|
||||||
|
<string
|
||||||
|
, string> param in HeaderParams)
|
||||||
request.AddHeader(param.Key, param.Value);
|
request.AddHeader(param.Key, param.Value);
|
||||||
|
|
||||||
// add query parameter, if any
|
// add query parameter, if any
|
||||||
foreach(KeyValuePair<string, string> param in QueryParams)
|
foreach(KeyValuePair
|
||||||
|
<string
|
||||||
|
, string> param in QueryParams)
|
||||||
request.AddQueryParameter(param.Key, param.Value);
|
request.AddQueryParameter(param.Key, param.Value);
|
||||||
|
|
||||||
// add form parameter, if any
|
// add form parameter, if any
|
||||||
foreach(KeyValuePair<string, string> param in FormParams)
|
foreach(KeyValuePair
|
||||||
|
<string
|
||||||
|
, string> param in FormParams)
|
||||||
request.AddParameter(param.Key, param.Value);
|
request.AddParameter(param.Key, param.Value);
|
||||||
|
|
||||||
// add file parameter, if any
|
// add file parameter, if any
|
||||||
foreach(KeyValuePair<string, string> param in FileParams)
|
foreach(KeyValuePair
|
||||||
|
<string
|
||||||
|
, string> param in FileParams)
|
||||||
request.AddFile(param.Key, param.Value);
|
request.AddFile(param.Key, param.Value);
|
||||||
|
|
||||||
if (PostBody != null) {
|
if (PostBody != null) {
|
||||||
@ -81,57 +119,88 @@ namespace IO.Swagger.Client {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Add default header
|
/// Add default header
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="key"> Header field name
|
</summary>
|
||||||
/// <param name="value"> Header field value
|
///
|
||||||
/// <returns></returns>
|
<param name="key">
|
||||||
|
Header field name
|
||||||
|
///
|
||||||
|
<param name="value">
|
||||||
|
Header field value
|
||||||
|
///
|
||||||
|
<returns></returns>
|
||||||
public void AddDefaultHeader(string key, string value) {
|
public void AddDefaultHeader(string key, string value) {
|
||||||
defaultHeaderMap.Add(key, value);
|
defaultHeaderMap.Add(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Get default header
|
/// Get default header
|
||||||
/// </summary>
|
///
|
||||||
/// <returns>Dictionary of default header</returns>
|
</summary>
|
||||||
public Dictionary<String, String> GetDefaultHeader() {
|
///
|
||||||
|
<returns>Dictionary of default header</returns>
|
||||||
|
public Dictionary
|
||||||
|
<String
|
||||||
|
, String> GetDefaultHeader() {
|
||||||
return defaultHeaderMap;
|
return defaultHeaderMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// escape string (url-encoded)
|
/// escape string (url-encoded)
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="str"> String to be escaped
|
</summary>
|
||||||
/// <returns>Escaped string</returns>
|
///
|
||||||
|
<param name="str">
|
||||||
|
String to be escaped
|
||||||
|
///
|
||||||
|
<returns>Escaped string</returns>
|
||||||
public string EscapeString(string str) {
|
public string EscapeString(string str) {
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// if parameter is DateTime, output in ISO8601 format
|
/// if parameter is DateTime, output in ISO8601 format
|
||||||
/// if parameter is a list of string, join the list with ","
|
/// if parameter is a list of string, join the list with ","
|
||||||
/// otherwise just return the string
|
/// otherwise just return the string
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="obj"> The parameter (header, path, query, form)
|
</summary>
|
||||||
/// <returns>Formatted string</returns>
|
///
|
||||||
|
<param name="obj">
|
||||||
|
The parameter (header, path, query, form)
|
||||||
|
///
|
||||||
|
<returns>Formatted string</returns>
|
||||||
public string ParameterToString(object obj)
|
public string ParameterToString(object obj)
|
||||||
{
|
{
|
||||||
if (obj is DateTime) {
|
if (obj is DateTime) {
|
||||||
return ((DateTime)obj).ToString ("u");
|
return ((DateTime)obj).ToString ("u");
|
||||||
} else if (obj is List<string>) {
|
} else if (obj is List
|
||||||
return String.Join(",", obj as List<string>);
|
<string>) {
|
||||||
|
return String.Join(",", obj as List
|
||||||
|
<string>);
|
||||||
} else {
|
} else {
|
||||||
return Convert.ToString (obj);
|
return Convert.ToString (obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Deserialize the JSON string into a proper object
|
/// Deserialize the JSON string into a proper object
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="json"> JSON string
|
</summary>
|
||||||
/// <param name="type"> Object type
|
///
|
||||||
/// <returns>Object representation of the JSON string</returns>
|
<param name="json">
|
||||||
|
JSON string
|
||||||
|
///
|
||||||
|
<param name="type">
|
||||||
|
Object type
|
||||||
|
///
|
||||||
|
<returns>Object representation of the JSON string</returns>
|
||||||
public object Deserialize(string content, Type type) {
|
public object Deserialize(string content, Type type) {
|
||||||
if (type.GetType() == typeof(Object))
|
if (type.GetType() == typeof(Object))
|
||||||
return (Object)content;
|
return (Object)content;
|
||||||
@ -145,11 +214,16 @@ namespace IO.Swagger.Client {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Serialize an object into JSON string
|
/// Serialize an object into JSON string
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="obj"> Object
|
</summary>
|
||||||
/// <returns>JSON string</returns>
|
///
|
||||||
|
<param name="obj">
|
||||||
|
Object
|
||||||
|
///
|
||||||
|
<returns>JSON string</returns>
|
||||||
public string Serialize(object obj) {
|
public string Serialize(object obj) {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -160,11 +234,16 @@ namespace IO.Swagger.Client {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Get the API key with prefix
|
/// Get the API key with prefix
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="obj"> Object
|
</summary>
|
||||||
/// <returns>API key with prefix</returns>
|
///
|
||||||
|
<param name="obj">
|
||||||
|
Object
|
||||||
|
///
|
||||||
|
<returns>API key with prefix</returns>
|
||||||
public string GetApiKeyWithPrefix (string apiKey)
|
public string GetApiKeyWithPrefix (string apiKey)
|
||||||
{
|
{
|
||||||
var apiKeyValue = "";
|
var apiKeyValue = "";
|
||||||
@ -177,13 +256,25 @@ namespace IO.Swagger.Client {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Update parameters based on authentication
|
/// Update parameters based on authentication
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="QueryParams">Query parameters</param>
|
</summary>
|
||||||
/// <param name="HeaderParams">Header parameters</param>
|
///
|
||||||
/// <param name="AuthSettings">Authentication settings</param>
|
<param name="QueryParams">
|
||||||
public void UpdateParamsForAuth(Dictionary<String, String> QueryParams, Dictionary<String, String> HeaderParams, string[] AuthSettings) {
|
Query parameters</param>
|
||||||
|
///
|
||||||
|
<param name="HeaderParams">
|
||||||
|
Header parameters</param>
|
||||||
|
///
|
||||||
|
<param name="AuthSettings">
|
||||||
|
Authentication settings</param>
|
||||||
|
public void UpdateParamsForAuth(Dictionary
|
||||||
|
<String
|
||||||
|
, String> QueryParams, Dictionary
|
||||||
|
<String
|
||||||
|
, String> HeaderParams, string[] AuthSettings) {
|
||||||
if (AuthSettings == null || AuthSettings.Length == 0)
|
if (AuthSettings == null || AuthSettings.Length == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -192,7 +283,8 @@ namespace IO.Swagger.Client {
|
|||||||
switch(auth) {
|
switch(auth) {
|
||||||
|
|
||||||
case "api_key":
|
case "api_key":
|
||||||
HeaderParams["api_key"] = GetApiKeyWithPrefix("api_key");
|
HeaderParams["api_key"] = GetApiKeyWithPrefix("api_key
|
||||||
|
");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -209,10 +301,14 @@ namespace IO.Swagger.Client {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Encode string in base64 format
|
/// Encode string in base64 format
|
||||||
/// </summary>
|
///
|
||||||
/// <param name="text">String to be encoded</param>
|
</summary>
|
||||||
|
///
|
||||||
|
<param name="text">
|
||||||
|
String to be encoded</param>
|
||||||
public static string Base64Encode(string text) {
|
public static string Base64Encode(string text) {
|
||||||
var textByte = System.Text.Encoding.UTF8.GetBytes(text);
|
var textByte = System.Text.Encoding.UTF8.GetBytes(text);
|
||||||
return System.Convert.ToBase64String(textByte);
|
return System.Convert.ToBase64String(textByte);
|
||||||
|
@ -1,33 +1,52 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace IO.Swagger.Client {
|
namespace IO.Swagger.Client {
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// API Exception
|
/// API Exception
|
||||||
/// </summary>
|
///
|
||||||
|
</summary>
|
||||||
public class ApiException : Exception {
|
public class ApiException : Exception {
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Gets or sets the error code (HTTP status code)
|
/// Gets or sets the error code (HTTP status code)
|
||||||
/// </summary>
|
///
|
||||||
/// <value>The error code (HTTP status code).</value>
|
</summary>
|
||||||
|
///
|
||||||
|
<value>The error code (HTTP status code).</value>
|
||||||
public int ErrorCode { get; set; }
|
public int ErrorCode { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Gets or sets the error content (body json object)
|
/// Gets or sets the error content (body json object)
|
||||||
/// </summary>
|
///
|
||||||
/// <value>The error content (Http response body).</value>
|
</summary>
|
||||||
|
///
|
||||||
|
<value>The error content (Http response body).</value>
|
||||||
public dynamic ErrorContent { get; private set; }
|
public dynamic ErrorContent { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
/// Initializes a new instance of the <see cref="ApiException"/> class.
|
<summary>
|
||||||
/// </summary>
|
/// Initializes a new instance of the
|
||||||
/// <param name="basePath">The base path.</param>
|
<see cref="ApiException"/>
|
||||||
|
class.
|
||||||
|
///
|
||||||
|
</summary>
|
||||||
|
///
|
||||||
|
<param name="basePath">The base path.</param>
|
||||||
public ApiException() {}
|
public ApiException() {}
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
/// Initializes a new instance of the <see cref="ApiException"/> class.
|
<summary>
|
||||||
/// </summary>
|
/// Initializes a new instance of the
|
||||||
/// <param name="errorCode">HTTP status code.</param>
|
<see cref="ApiException"/>
|
||||||
/// <param name="message">Error message.</param>
|
class.
|
||||||
|
///
|
||||||
|
</summary>
|
||||||
|
///
|
||||||
|
<param name="errorCode">HTTP status code.</param>
|
||||||
|
///
|
||||||
|
<param name="message">Error message.</param>
|
||||||
public ApiException(int errorCode, string message) : base(message) {
|
public ApiException(int errorCode, string message) : base(message) {
|
||||||
this.ErrorCode = errorCode;
|
this.ErrorCode = errorCode;
|
||||||
}
|
}
|
||||||
|
@ -7,40 +7,61 @@ using System.Text;
|
|||||||
using IO.Swagger.Client;
|
using IO.Swagger.Client;
|
||||||
|
|
||||||
namespace IO.Swagger.Client {
|
namespace IO.Swagger.Client {
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Represents a set of configuration settings
|
/// Represents a set of configuration settings
|
||||||
/// </summary>
|
///
|
||||||
|
</summary>
|
||||||
public class Configuration{
|
public class Configuration{
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Gets or sets the API client. This is the default API client for making HTTP calls.
|
/// Gets or sets the API client. This is the default API client for making HTTP calls.
|
||||||
/// </summary>
|
///
|
||||||
/// <value>The API client.</value>
|
</summary>
|
||||||
|
///
|
||||||
|
<value>The API client.</value>
|
||||||
public static ApiClient apiClient = new ApiClient();
|
public static ApiClient apiClient = new ApiClient();
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Gets or sets the username (HTTP basic authentication)
|
/// Gets or sets the username (HTTP basic authentication)
|
||||||
/// </summary>
|
///
|
||||||
/// <value>The username.</value>
|
</summary>
|
||||||
|
///
|
||||||
|
<value>The username.</value>
|
||||||
public static String username { get; set; }
|
public static String username { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Gets or sets the password (HTTP basic authentication)
|
/// Gets or sets the password (HTTP basic authentication)
|
||||||
/// </summary>
|
///
|
||||||
/// <value>The password.</value>
|
</summary>
|
||||||
|
///
|
||||||
|
<value>The password.</value>
|
||||||
public static String password { get; set; }
|
public static String password { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Gets or sets the API key based on the authentication name
|
/// Gets or sets the API key based on the authentication name
|
||||||
/// </summary>
|
///
|
||||||
/// <value>The API key.</value>
|
</summary>
|
||||||
public static Dictionary<String, String> apiKey = new Dictionary<String, String>();
|
///
|
||||||
|
<value>The API key.</value>
|
||||||
|
public static Dictionary
|
||||||
|
<String, String> apiKey = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
|
||||||
/// <summary>
|
///
|
||||||
|
<summary>
|
||||||
/// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name
|
/// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name
|
||||||
/// </summary>
|
///
|
||||||
/// <value>The prefix of the API key.</value>
|
</summary>
|
||||||
public static Dictionary<String, String> apiKeyPrefix = new Dictionary<String, String>();
|
///
|
||||||
|
<value>The prefix of the API key.</value>
|
||||||
|
public static Dictionary
|
||||||
|
<String, String> apiKeyPrefix = new Dictionary
|
||||||
|
<String, String>();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,21 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import
|
||||||
|
<Foundation/Foundation.h>
|
||||||
#import "SWGObject.h"
|
#import "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@protocol SWGCategory
|
@protocol SWGCategory
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface SWGCategory : SWGObject
|
@interface SWGCategory : SWGObject
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSNumber* _id;
|
@property(nonatomic) NSNumber* _id;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSString* name;
|
@property(nonatomic) NSString* name;
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
#import "SWGCategory.h"
|
#import "SWGCategory.h"
|
||||||
|
|
||||||
@implementation SWGCategory
|
@implementation SWGCategory
|
||||||
@ -19,4 +20,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import
|
||||||
|
<Foundation/Foundation.h>
|
||||||
|
|
||||||
@interface SWGConfiguration : NSObject
|
@interface SWGConfiguration : NSObject
|
||||||
|
|
||||||
|
@ -1,24 +1,34 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import
|
||||||
|
<Foundation/Foundation.h>
|
||||||
#import "SWGObject.h"
|
#import "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@protocol SWGOrder
|
@protocol SWGOrder
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface SWGOrder : SWGObject
|
@interface SWGOrder : SWGObject
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSNumber* _id;
|
@property(nonatomic) NSNumber* _id;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSNumber* petId;
|
@property(nonatomic) NSNumber* petId;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSNumber* quantity;
|
@property(nonatomic) NSNumber* quantity;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSDate* shipDate;
|
@property(nonatomic) NSDate* shipDate;
|
||||||
|
|
||||||
/* Order Status [optional]
|
/* Order Status [optional]
|
||||||
*/
|
*/
|
||||||
@property(nonatomic) NSString* status;
|
@property(nonatomic) NSString* status;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) BOOL complete;
|
@property(nonatomic) BOOL complete;
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
#import "SWGOrder.h"
|
#import "SWGOrder.h"
|
||||||
|
|
||||||
@implementation SWGOrder
|
@implementation SWGOrder
|
||||||
@ -19,4 +20,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -1,26 +1,36 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import
|
||||||
|
<Foundation/Foundation.h>
|
||||||
#import "SWGObject.h"
|
#import "SWGObject.h"
|
||||||
#import "SWGTag.h"
|
#import "SWGTag.h"
|
||||||
#import "SWGCategory.h"
|
#import "SWGCategory.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@protocol SWGPet
|
@protocol SWGPet
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface SWGPet : SWGObject
|
@interface SWGPet : SWGObject
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSNumber* _id;
|
@property(nonatomic) NSNumber* _id;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) SWGCategory* category;
|
@property(nonatomic) SWGCategory* category;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSString* name;
|
@property(nonatomic) NSString* name;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSArray* photoUrls;
|
@property(nonatomic) NSArray* photoUrls;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSArray<SWGTag>* tags;
|
@property(nonatomic) NSArray<SWGTag>* tags;
|
||||||
|
|
||||||
/* pet status in the store [optional]
|
/* pet status in the store [optional]
|
||||||
*/
|
*/
|
||||||
@property(nonatomic) NSString* status;
|
@property(nonatomic) NSString* status;
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
#import "SWGPet.h"
|
#import "SWGPet.h"
|
||||||
|
|
||||||
@implementation SWGPet
|
@implementation SWGPet
|
||||||
@ -19,4 +20,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import
|
||||||
|
<Foundation/Foundation.h>
|
||||||
#import "SWGPet.h"
|
#import "SWGPet.h"
|
||||||
#import "SWGFile.h"
|
#import "SWGFile.h"
|
||||||
#import "SWGObject.h"
|
#import "SWGObject.h"
|
||||||
@ -15,6 +16,7 @@
|
|||||||
+(SWGPetApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
|
+(SWGPetApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
|
||||||
+(void) setBasePath:(NSString*)basePath;
|
+(void) setBasePath:(NSString*)basePath;
|
||||||
+(NSString*) getBasePath;
|
+(NSString*) getBasePath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Update an existing pet
|
Update an existing pet
|
||||||
@ -31,6 +33,7 @@
|
|||||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Add a new pet to the store
|
Add a new pet to the store
|
||||||
@ -47,6 +50,7 @@
|
|||||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Finds Pets by status
|
Finds Pets by status
|
||||||
@ -63,6 +67,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Finds Pets by tags
|
Finds Pets by tags
|
||||||
@ -79,6 +84,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Find pet by ID
|
Find pet by ID
|
||||||
@ -95,6 +101,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Updates a pet in the store with form data
|
Updates a pet in the store with form data
|
||||||
@ -115,6 +122,7 @@
|
|||||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Deletes a pet
|
Deletes a pet
|
||||||
@ -133,6 +141,7 @@
|
|||||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
uploads an image
|
uploads an image
|
||||||
@ -154,4 +163,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#import "SWGFile.h"
|
#import "SWGFile.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@interface SWGPetApi ()
|
@interface SWGPetApi ()
|
||||||
@property (readwrite, nonatomic, strong) NSMutableDictionary *defaultHeaders;
|
@property (readwrite, nonatomic, strong) NSMutableDictionary *defaultHeaders;
|
||||||
@end
|
@end
|
||||||
@ -72,6 +73,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Update an existing pet
|
* Update an existing pet
|
||||||
*
|
*
|
||||||
@ -179,6 +181,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Add a new pet to the store
|
* Add a new pet to the store
|
||||||
*
|
*
|
||||||
@ -286,6 +289,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Finds Pets by status
|
* Finds Pets by status
|
||||||
* Multiple status values can be provided with comma seperated strings
|
* Multiple status values can be provided with comma seperated strings
|
||||||
@ -380,7 +384,6 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
completionBlock((NSArray<SWGPet>*)objs, nil);
|
completionBlock((NSArray<SWGPet>*)objs, nil);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
|
||||||
@ -390,6 +393,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Finds Pets by tags
|
* Finds Pets by tags
|
||||||
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||||
@ -484,7 +488,6 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
completionBlock((NSArray<SWGPet>*)objs, nil);
|
completionBlock((NSArray<SWGPet>*)objs, nil);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
|
||||||
@ -494,6 +497,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Find pet by ID
|
* Find pet by ID
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
@ -566,7 +570,6 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
|
|
||||||
// complex response
|
// complex response
|
||||||
|
|
||||||
// comples response type
|
// comples response type
|
||||||
return [self.apiClient dictionary: requestUrl
|
return [self.apiClient dictionary: requestUrl
|
||||||
method: @"GET"
|
method: @"GET"
|
||||||
@ -593,9 +596,9 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Updates a pet in the store with form data
|
* Updates a pet in the store with form data
|
||||||
*
|
*
|
||||||
@ -704,6 +707,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Deletes a pet
|
* Deletes a pet
|
||||||
*
|
*
|
||||||
@ -796,6 +800,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* uploads an image
|
* uploads an image
|
||||||
*
|
*
|
||||||
@ -913,6 +918,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import
|
||||||
|
<Foundation/Foundation.h>
|
||||||
#import "SWGOrder.h"
|
#import "SWGOrder.h"
|
||||||
#import "SWGObject.h"
|
#import "SWGObject.h"
|
||||||
#import "SWGApiClient.h"
|
#import "SWGApiClient.h"
|
||||||
@ -14,6 +15,7 @@
|
|||||||
+(SWGStoreApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
|
+(SWGStoreApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
|
||||||
+(void) setBasePath:(NSString*)basePath;
|
+(void) setBasePath:(NSString*)basePath;
|
||||||
+(NSString*) getBasePath;
|
+(NSString*) getBasePath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Returns pet inventories by status
|
Returns pet inventories by status
|
||||||
@ -28,6 +30,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
@ -44,6 +47,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Find purchase order by ID
|
Find purchase order by ID
|
||||||
@ -60,6 +64,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Delete purchase order by ID
|
Delete purchase order by ID
|
||||||
@ -77,4 +82,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#import "SWGOrder.h"
|
#import "SWGOrder.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@interface SWGStoreApi ()
|
@interface SWGStoreApi ()
|
||||||
@property (readwrite, nonatomic, strong) NSMutableDictionary *defaultHeaders;
|
@property (readwrite, nonatomic, strong) NSMutableDictionary *defaultHeaders;
|
||||||
@end
|
@end
|
||||||
@ -71,6 +72,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Returns pet inventories by status
|
* Returns pet inventories by status
|
||||||
* Returns a map of status codes to quantities
|
* Returns a map of status codes to quantities
|
||||||
@ -144,13 +146,11 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
completionBlock(nil, error);
|
completionBlock(nil, error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSDictionary *result = nil;
|
NSDictionary *result = nil;
|
||||||
if (data) {
|
if (data) {
|
||||||
result = [[NSDictionary alloc]initWithDictionary: data];
|
result = [[NSDictionary alloc]initWithDictionary: data];
|
||||||
}
|
}
|
||||||
completionBlock(data, nil);
|
completionBlock(data, nil);
|
||||||
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
|
||||||
@ -160,6 +160,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Place an order for a pet
|
* Place an order for a pet
|
||||||
*
|
*
|
||||||
@ -251,7 +252,6 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
|
|
||||||
// complex response
|
// complex response
|
||||||
|
|
||||||
// comples response type
|
// comples response type
|
||||||
return [self.apiClient dictionary: requestUrl
|
return [self.apiClient dictionary: requestUrl
|
||||||
method: @"POST"
|
method: @"POST"
|
||||||
@ -278,9 +278,9 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Find purchase order by ID
|
* 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
|
||||||
@ -353,7 +353,6 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
|
|
||||||
// complex response
|
// complex response
|
||||||
|
|
||||||
// comples response type
|
// comples response type
|
||||||
return [self.apiClient dictionary: requestUrl
|
return [self.apiClient dictionary: requestUrl
|
||||||
method: @"GET"
|
method: @"GET"
|
||||||
@ -380,9 +379,9 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Delete purchase order by ID
|
* Delete purchase order by ID
|
||||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
@ -473,6 +472,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,15 +1,21 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import
|
||||||
|
<Foundation/Foundation.h>
|
||||||
#import "SWGObject.h"
|
#import "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@protocol SWGTag
|
@protocol SWGTag
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface SWGTag : SWGObject
|
@interface SWGTag : SWGObject
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSNumber* _id;
|
@property(nonatomic) NSNumber* _id;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSString* name;
|
@property(nonatomic) NSString* name;
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
#import "SWGTag.h"
|
#import "SWGTag.h"
|
||||||
|
|
||||||
@implementation SWGTag
|
@implementation SWGTag
|
||||||
@ -19,4 +20,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -1,28 +1,40 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import
|
||||||
|
<Foundation/Foundation.h>
|
||||||
#import "SWGObject.h"
|
#import "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@protocol SWGUser
|
@protocol SWGUser
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface SWGUser : SWGObject
|
@interface SWGUser : SWGObject
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSNumber* _id;
|
@property(nonatomic) NSNumber* _id;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSString* username;
|
@property(nonatomic) NSString* username;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSString* firstName;
|
@property(nonatomic) NSString* firstName;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSString* lastName;
|
@property(nonatomic) NSString* lastName;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSString* email;
|
@property(nonatomic) NSString* email;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSString* password;
|
@property(nonatomic) NSString* password;
|
||||||
|
|
||||||
|
|
||||||
@property(nonatomic) NSString* phone;
|
@property(nonatomic) NSString* phone;
|
||||||
|
|
||||||
/* User Status [optional]
|
/* User Status [optional]
|
||||||
*/
|
*/
|
||||||
@property(nonatomic) NSNumber* userStatus;
|
@property(nonatomic) NSNumber* userStatus;
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
#import "SWGUser.h"
|
#import "SWGUser.h"
|
||||||
|
|
||||||
@implementation SWGUser
|
@implementation SWGUser
|
||||||
@ -19,4 +20,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import
|
||||||
|
<Foundation/Foundation.h>
|
||||||
#import "SWGUser.h"
|
#import "SWGUser.h"
|
||||||
#import "SWGObject.h"
|
#import "SWGObject.h"
|
||||||
#import "SWGApiClient.h"
|
#import "SWGApiClient.h"
|
||||||
@ -14,6 +15,7 @@
|
|||||||
+(SWGUserApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
|
+(SWGUserApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
|
||||||
+(void) setBasePath:(NSString*)basePath;
|
+(void) setBasePath:(NSString*)basePath;
|
||||||
+(NSString*) getBasePath;
|
+(NSString*) getBasePath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Create user
|
Create user
|
||||||
@ -30,6 +32,7 @@
|
|||||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
@ -46,6 +49,7 @@
|
|||||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
@ -62,6 +66,7 @@
|
|||||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Logs user into the system
|
Logs user into the system
|
||||||
@ -80,6 +85,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Logs out current logged in user session
|
Logs out current logged in user session
|
||||||
@ -94,6 +100,7 @@
|
|||||||
(void (^)(NSError* error))completionBlock;
|
(void (^)(NSError* error))completionBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Get user by user name
|
Get user by user name
|
||||||
@ -110,6 +117,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Updated user
|
Updated user
|
||||||
@ -128,6 +136,7 @@
|
|||||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Delete user
|
Delete user
|
||||||
@ -145,4 +154,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#import "SWGUser.h"
|
#import "SWGUser.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@interface SWGUserApi ()
|
@interface SWGUserApi ()
|
||||||
@property (readwrite, nonatomic, strong) NSMutableDictionary *defaultHeaders;
|
@property (readwrite, nonatomic, strong) NSMutableDictionary *defaultHeaders;
|
||||||
@end
|
@end
|
||||||
@ -71,6 +72,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Create user
|
* Create user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -178,6 +180,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
@ -285,6 +288,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
@ -392,6 +396,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Logs user into the system
|
* Logs user into the system
|
||||||
*
|
*
|
||||||
@ -489,16 +494,14 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// complex response
|
// complex response
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Logs out current logged in user session
|
* Logs out current logged in user session
|
||||||
*
|
*
|
||||||
@ -581,6 +584,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
*
|
*
|
||||||
@ -653,7 +657,6 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
|
|
||||||
// complex response
|
// complex response
|
||||||
|
|
||||||
// comples response type
|
// comples response type
|
||||||
return [self.apiClient dictionary: requestUrl
|
return [self.apiClient dictionary: requestUrl
|
||||||
method: @"GET"
|
method: @"GET"
|
||||||
@ -680,9 +683,9 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Updated user
|
* Updated user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -796,6 +799,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Delete user
|
* Delete user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -886,6 +890,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,8 +27,6 @@
|
|||||||
"squizlabs/php_codesniffer": "~2.0"
|
"squizlabs/php_codesniffer": "~2.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": { "SwaggerClient\\" : "lib/" }
|
||||||
"SwaggerClient\\": "lib/"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -153,17 +153,14 @@ class ApiClient {
|
|||||||
foreach($authSettings as $auth) {
|
foreach($authSettings as $auth) {
|
||||||
// determine which one to use
|
// determine which one to use
|
||||||
switch($auth) {
|
switch($auth) {
|
||||||
|
|
||||||
case 'api_key':
|
case 'api_key':
|
||||||
$headerParams['api_key'] = $this->getApiKeyWithPrefix('api_key');
|
$headerParams['api_key'] = $this->getApiKeyWithPrefix('api_key');
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'petstore_auth':
|
case 'petstore_auth':
|
||||||
|
|
||||||
//TODO support oauth
|
//TODO support oauth
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
//TODO show warning about security definition not found
|
//TODO show warning about security definition not found
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,6 @@ class PetApi {
|
|||||||
$this->apiClient = $apiClient;
|
$this->apiClient = $apiClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* updatePet
|
* updatePet
|
||||||
*
|
*
|
||||||
@ -107,7 +106,6 @@ class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* addPet
|
* addPet
|
||||||
*
|
*
|
||||||
@ -161,7 +159,6 @@ class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* findPetsByStatus
|
* findPetsByStatus
|
||||||
*
|
*
|
||||||
@ -219,7 +216,6 @@ class PetApi {
|
|||||||
$responseObject = $this->apiClient->deserialize($response,'array[Pet]');
|
$responseObject = $this->apiClient->deserialize($response,'array[Pet]');
|
||||||
return $responseObject;
|
return $responseObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* findPetsByTags
|
* findPetsByTags
|
||||||
*
|
*
|
||||||
@ -277,7 +273,6 @@ class PetApi {
|
|||||||
$responseObject = $this->apiClient->deserialize($response,'array[Pet]');
|
$responseObject = $this->apiClient->deserialize($response,'array[Pet]');
|
||||||
return $responseObject;
|
return $responseObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getPetById
|
* getPetById
|
||||||
*
|
*
|
||||||
@ -341,7 +336,6 @@ class PetApi {
|
|||||||
$responseObject = $this->apiClient->deserialize($response,'Pet');
|
$responseObject = $this->apiClient->deserialize($response,'Pet');
|
||||||
return $responseObject;
|
return $responseObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* updatePetWithForm
|
* updatePetWithForm
|
||||||
*
|
*
|
||||||
@ -408,7 +402,6 @@ class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* deletePet
|
* deletePet
|
||||||
*
|
*
|
||||||
@ -471,7 +464,6 @@ class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* uploadFile
|
* uploadFile
|
||||||
*
|
*
|
||||||
@ -539,5 +531,4 @@ class PetApi {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,6 @@ class StoreApi {
|
|||||||
$this->apiClient = $apiClient;
|
$this->apiClient = $apiClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getInventory
|
* getInventory
|
||||||
*
|
*
|
||||||
@ -107,7 +106,6 @@ class StoreApi {
|
|||||||
$responseObject = $this->apiClient->deserialize($response,'map[string,int]');
|
$responseObject = $this->apiClient->deserialize($response,'map[string,int]');
|
||||||
return $responseObject;
|
return $responseObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* placeOrder
|
* placeOrder
|
||||||
*
|
*
|
||||||
@ -166,7 +164,6 @@ class StoreApi {
|
|||||||
$responseObject = $this->apiClient->deserialize($response,'Order');
|
$responseObject = $this->apiClient->deserialize($response,'Order');
|
||||||
return $responseObject;
|
return $responseObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOrderById
|
* getOrderById
|
||||||
*
|
*
|
||||||
@ -230,7 +227,6 @@ class StoreApi {
|
|||||||
$responseObject = $this->apiClient->deserialize($response,'Order');
|
$responseObject = $this->apiClient->deserialize($response,'Order');
|
||||||
return $responseObject;
|
return $responseObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* deleteOrder
|
* deleteOrder
|
||||||
*
|
*
|
||||||
@ -290,5 +286,4 @@ class StoreApi {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,6 @@ class UserApi {
|
|||||||
$this->apiClient = $apiClient;
|
$this->apiClient = $apiClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* createUser
|
* createUser
|
||||||
*
|
*
|
||||||
@ -107,7 +106,6 @@ class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* createUsersWithArrayInput
|
* createUsersWithArrayInput
|
||||||
*
|
*
|
||||||
@ -161,7 +159,6 @@ class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* createUsersWithListInput
|
* createUsersWithListInput
|
||||||
*
|
*
|
||||||
@ -215,7 +212,6 @@ class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* loginUser
|
* loginUser
|
||||||
*
|
*
|
||||||
@ -277,7 +273,6 @@ class UserApi {
|
|||||||
$responseObject = $this->apiClient->deserialize($response,'string');
|
$responseObject = $this->apiClient->deserialize($response,'string');
|
||||||
return $responseObject;
|
return $responseObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* logoutUser
|
* logoutUser
|
||||||
*
|
*
|
||||||
@ -326,7 +321,6 @@ class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getUserByName
|
* getUserByName
|
||||||
*
|
*
|
||||||
@ -390,7 +384,6 @@ class UserApi {
|
|||||||
$responseObject = $this->apiClient->deserialize($response,'User');
|
$responseObject = $this->apiClient->deserialize($response,'User');
|
||||||
return $responseObject;
|
return $responseObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* updateUser
|
* updateUser
|
||||||
*
|
*
|
||||||
@ -454,7 +447,6 @@ class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* deleteUser
|
* deleteUser
|
||||||
*
|
*
|
||||||
@ -514,5 +506,4 @@ class UserApi {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@ -62,3 +63,4 @@ class Category implements ArrayAccess {
|
|||||||
unset($this->$offset);
|
unset($this->$offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@ -81,3 +82,4 @@ class Order implements ArrayAccess {
|
|||||||
unset($this->$offset);
|
unset($this->$offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@ -81,3 +82,4 @@ class Pet implements ArrayAccess {
|
|||||||
unset($this->$offset);
|
unset($this->$offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@ -62,3 +63,4 @@ class Tag implements ArrayAccess {
|
|||||||
unset($this->$offset);
|
unset($this->$offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@ -89,3 +90,4 @@ class User implements ArrayAccess {
|
|||||||
unset($this->$offset);
|
unset($this->$offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ Copyright 2015 SmartBear Software
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
class Category(object):
|
class Category(object):
|
||||||
"""
|
"""
|
||||||
NOTE: This class is auto generated by the swagger code generator program.
|
NOTE: This class is auto generated by the swagger code generator program.
|
||||||
@ -56,3 +57,4 @@ class Category(object):
|
|||||||
return '<{name} {props}>'.format(name=__name__, props=' '.join(properties))
|
return '<{name} {props}>'.format(name=__name__, props=' '.join(properties))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ Copyright 2015 SmartBear Software
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
class Order(object):
|
class Order(object):
|
||||||
"""
|
"""
|
||||||
NOTE: This class is auto generated by the swagger code generator program.
|
NOTE: This class is auto generated by the swagger code generator program.
|
||||||
@ -76,3 +77,4 @@ class Order(object):
|
|||||||
return '<{name} {props}>'.format(name=__name__, props=' '.join(properties))
|
return '<{name} {props}>'.format(name=__name__, props=' '.join(properties))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ Copyright 2015 SmartBear Software
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
class Pet(object):
|
class Pet(object):
|
||||||
"""
|
"""
|
||||||
NOTE: This class is auto generated by the swagger code generator program.
|
NOTE: This class is auto generated by the swagger code generator program.
|
||||||
@ -76,3 +77,4 @@ class Pet(object):
|
|||||||
return '<{name} {props}>'.format(name=__name__, props=' '.join(properties))
|
return '<{name} {props}>'.format(name=__name__, props=' '.join(properties))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ Copyright 2015 SmartBear Software
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
class Tag(object):
|
class Tag(object):
|
||||||
"""
|
"""
|
||||||
NOTE: This class is auto generated by the swagger code generator program.
|
NOTE: This class is auto generated by the swagger code generator program.
|
||||||
@ -56,3 +57,4 @@ class Tag(object):
|
|||||||
return '<{name} {props}>'.format(name=__name__, props=' '.join(properties))
|
return '<{name} {props}>'.format(name=__name__, props=' '.join(properties))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ Copyright 2015 SmartBear Software
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
class User(object):
|
class User(object):
|
||||||
"""
|
"""
|
||||||
NOTE: This class is auto generated by the swagger code generator program.
|
NOTE: This class is auto generated by the swagger code generator program.
|
||||||
@ -86,3 +87,4 @@ class User(object):
|
|||||||
return '<{name} {props}>'.format(name=__name__, props=' '.join(properties))
|
return '<{name} {props}>'.format(name=__name__, props=' '.join(properties))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,10 +3,14 @@
|
|||||||
|
|
||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
|
|
||||||
#include <QJsonDocument>
|
#include
|
||||||
#include <QJsonArray>
|
<QJsonDocument>
|
||||||
#include <QObject>
|
#include
|
||||||
#include <QDebug>
|
<QJsonArray>
|
||||||
|
#include
|
||||||
|
<QObject>
|
||||||
|
#include
|
||||||
|
<QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
@ -81,6 +85,7 @@ SWGCategory::asJsonObject() {
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
qint64
|
qint64
|
||||||
SWGCategory::getId() {
|
SWGCategory::getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -90,6 +95,7 @@ SWGCategory::setId(qint64 id) {
|
|||||||
this->id = id;
|
this->id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGCategory::getName() {
|
SWGCategory::getName() {
|
||||||
return name;
|
return name;
|
||||||
@ -101,5 +107,6 @@ SWGCategory::setName(QString* name) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
#ifndef SWGCategory_H_
|
#ifndef SWGCategory_H_
|
||||||
#define SWGCategory_H_
|
#define SWGCategory_H_
|
||||||
|
|
||||||
#include <QJsonObject>
|
#include
|
||||||
|
<QJsonObject>
|
||||||
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
#include "SWGModelFactory.h"
|
#include "SWGModelFactory.h"
|
||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
#import <QDebug>
|
#import
|
||||||
#import <QJsonArray>
|
<QDebug>
|
||||||
#import <QJsonValue>
|
#import
|
||||||
|
<QJsonArray>
|
||||||
|
#import
|
||||||
|
<QJsonValue>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
@ -14,19 +17,27 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(QStringLiteral("bool").compare(type) == 0) {
|
if(QStringLiteral("bool").compare(type) == 0) {
|
||||||
bool * val = static_cast<bool*>(value);
|
bool * val = static_cast
|
||||||
|
<bool
|
||||||
|
*>(value);
|
||||||
*val = obj.toBool();
|
*val = obj.toBool();
|
||||||
}
|
}
|
||||||
else if(QStringLiteral("qint32").compare(type) == 0) {
|
else if(QStringLiteral("qint32").compare(type) == 0) {
|
||||||
qint32 *val = static_cast<qint32*>(value);
|
qint32 *val = static_cast
|
||||||
|
<qint32
|
||||||
|
*>(value);
|
||||||
*val = obj.toInt();
|
*val = obj.toInt();
|
||||||
}
|
}
|
||||||
else if(QStringLiteral("qint64").compare(type) == 0) {
|
else if(QStringLiteral("qint64").compare(type) == 0) {
|
||||||
qint64 *val = static_cast<qint64*>(value);
|
qint64 *val = static_cast
|
||||||
|
<qint64
|
||||||
|
*>(value);
|
||||||
*val = obj.toVariant().toLongLong();
|
*val = obj.toVariant().toLongLong();
|
||||||
}
|
}
|
||||||
else if (QStringLiteral("QString").compare(type) == 0) {
|
else if (QStringLiteral("QString").compare(type) == 0) {
|
||||||
QString **val = static_cast<QString**>(value);
|
QString **val = static_cast
|
||||||
|
<QString
|
||||||
|
**>(value);
|
||||||
|
|
||||||
if(val != NULL) {
|
if(val != NULL) {
|
||||||
if(!obj.isNull()) {
|
if(!obj.isNull()) {
|
||||||
@ -51,14 +62,20 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
|
|||||||
SWGObject * so = (SWGObject*)Swagger::create(type);
|
SWGObject * so = (SWGObject*)Swagger::create(type);
|
||||||
if(so != NULL) {
|
if(so != NULL) {
|
||||||
so->fromJsonObject(jsonObj);
|
so->fromJsonObject(jsonObj);
|
||||||
SWGObject **val = static_cast<SWGObject**>(value);
|
SWGObject **val = static_cast
|
||||||
|
<SWGObject
|
||||||
|
**>(value);
|
||||||
delete *val;
|
delete *val;
|
||||||
*val = so;
|
*val = so;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(type.startsWith("QList") && QString("").compare(complexType) != 0 && obj.isArray()) {
|
else if(type.startsWith("QList") && QString("").compare(complexType) != 0 && obj.isArray()) {
|
||||||
// list of values
|
// list of values
|
||||||
QList<void*>* output = new QList<void*>();
|
QList
|
||||||
|
<void
|
||||||
|
*>* output = new QList
|
||||||
|
<void
|
||||||
|
*>();
|
||||||
QJsonArray arr = obj.toArray();
|
QJsonArray arr = obj.toArray();
|
||||||
foreach (const QJsonValue & jval, arr) {
|
foreach (const QJsonValue & jval, arr) {
|
||||||
if(complexType.startsWith("SWG")) {
|
if(complexType.startsWith("SWG")) {
|
||||||
@ -88,7 +105,12 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QList<void*> **val = static_cast<QList<void*>**>(value);
|
QList
|
||||||
|
<void
|
||||||
|
*> **val = static_cast
|
||||||
|
<QList
|
||||||
|
<void
|
||||||
|
*>**>(value);
|
||||||
delete *val;
|
delete *val;
|
||||||
*val = output;
|
*val = output;
|
||||||
}
|
}
|
||||||
@ -100,7 +122,8 @@ toJsonValue(QString name, void* value, QJsonObject* output, QString type) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(type.startsWith("SWG")) {
|
if(type.startsWith("SWG")) {
|
||||||
SWGObject *swgObject = reinterpret_cast<SWGObject *>(value);
|
SWGObject *swgObject = reinterpret_cast
|
||||||
|
<SWGObject *>(value);
|
||||||
if(swgObject != NULL) {
|
if(swgObject != NULL) {
|
||||||
QJsonObject* o = (*swgObject).asJsonObject();
|
QJsonObject* o = (*swgObject).asJsonObject();
|
||||||
if(name != NULL) {
|
if(name != NULL) {
|
||||||
@ -116,25 +139,35 @@ toJsonValue(QString name, void* value, QJsonObject* output, QString type) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(QStringLiteral("QString").compare(type) == 0) {
|
else if(QStringLiteral("QString").compare(type) == 0) {
|
||||||
QString* str = static_cast<QString*>(value);
|
QString* str = static_cast
|
||||||
|
<QString
|
||||||
|
*>(value);
|
||||||
output->insert(name, QJsonValue(*str));
|
output->insert(name, QJsonValue(*str));
|
||||||
}
|
}
|
||||||
else if(QStringLiteral("qint32").compare(type) == 0) {
|
else if(QStringLiteral("qint32").compare(type) == 0) {
|
||||||
qint32* str = static_cast<qint32*>(value);
|
qint32* str = static_cast
|
||||||
|
<qint32
|
||||||
|
*>(value);
|
||||||
output->insert(name, QJsonValue(*str));
|
output->insert(name, QJsonValue(*str));
|
||||||
}
|
}
|
||||||
else if(QStringLiteral("qint64").compare(type) == 0) {
|
else if(QStringLiteral("qint64").compare(type) == 0) {
|
||||||
qint64* str = static_cast<qint64*>(value);
|
qint64* str = static_cast
|
||||||
|
<qint64
|
||||||
|
*>(value);
|
||||||
output->insert(name, QJsonValue(*str));
|
output->insert(name, QJsonValue(*str));
|
||||||
}
|
}
|
||||||
else if(QStringLiteral("bool").compare(type) == 0) {
|
else if(QStringLiteral("bool").compare(type) == 0) {
|
||||||
bool* str = static_cast<bool*>(value);
|
bool* str = static_cast
|
||||||
|
<bool
|
||||||
|
*>(value);
|
||||||
output->insert(name, QJsonValue(*str));
|
output->insert(name, QJsonValue(*str));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
toJsonArray(QList<void*>* value, QJsonArray* output, QString innerName, QString innerType) {
|
toJsonArray(QList
|
||||||
|
<void
|
||||||
|
*>* value, QJsonArray* output, QString innerName, QString innerType) {
|
||||||
foreach(void* obj, *value) {
|
foreach(void* obj, *value) {
|
||||||
QJsonObject element;
|
QJsonObject element;
|
||||||
|
|
||||||
@ -145,7 +178,9 @@ toJsonArray(QList<void*>* value, QJsonArray* output, QString innerName, QString
|
|||||||
|
|
||||||
QString
|
QString
|
||||||
stringValue(QString* value) {
|
stringValue(QString* value) {
|
||||||
QString* str = static_cast<QString*>(value);
|
QString* str = static_cast
|
||||||
|
<QString
|
||||||
|
*>(value);
|
||||||
return QString(*str);
|
return QString(*str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
#ifndef SWGHELPERS_H
|
#ifndef SWGHELPERS_H
|
||||||
#define SWGHELPERS_H
|
#define SWGHELPERS_H
|
||||||
|
|
||||||
#include <QJsonValue>
|
#include
|
||||||
|
<QJsonValue>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
void setValue(void* value, QJsonValue obj, QString type, QString complexType);
|
void setValue(void* value, QJsonValue obj, QString type, QString complexType);
|
||||||
void toJsonArray(QList<void*>* value, QJsonArray* output, QString innerName, QString innerType);
|
void toJsonArray(QList
|
||||||
|
<void
|
||||||
|
*>* value, QJsonArray* output, QString innerName, QString innerType);
|
||||||
void toJsonValue(QString name, void* value, QJsonObject* output, QString type);
|
void toJsonValue(QString name, void* value, QJsonObject* output, QString type);
|
||||||
bool isCompatibleJsonValue(QString type);
|
bool isCompatibleJsonValue(QString type);
|
||||||
QString stringValue(QString* value);
|
QString stringValue(QString* value);
|
||||||
|
@ -32,7 +32,8 @@ namespace Swagger {
|
|||||||
inline void* create(QString json, QString type) {
|
inline void* create(QString json, QString type) {
|
||||||
void* val = create(type);
|
void* val = create(type);
|
||||||
if(val != NULL) {
|
if(val != NULL) {
|
||||||
SWGObject* obj = static_cast<SWGObject*>(val);
|
SWGObject* obj = static_cast
|
||||||
|
<SWGObject*>(val);
|
||||||
return obj->fromJson(json);
|
return obj->fromJson(json);
|
||||||
}
|
}
|
||||||
if(type.startsWith("QString")) {
|
if(type.startsWith("QString")) {
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#ifndef _SWG_OBJECT_H_
|
#ifndef _SWG_OBJECT_H_
|
||||||
#define _SWG_OBJECT_H_
|
#define _SWG_OBJECT_H_
|
||||||
|
|
||||||
#include <QJsonValue>
|
#include
|
||||||
|
<QJsonValue>
|
||||||
|
|
||||||
class SWGObject {
|
class SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -3,10 +3,14 @@
|
|||||||
|
|
||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
|
|
||||||
#include <QJsonDocument>
|
#include
|
||||||
#include <QJsonArray>
|
<QJsonDocument>
|
||||||
#include <QObject>
|
#include
|
||||||
#include <QDebug>
|
<QJsonArray>
|
||||||
|
#include
|
||||||
|
<QObject>
|
||||||
|
#include
|
||||||
|
<QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
@ -104,6 +108,7 @@ SWGOrder::asJsonObject() {
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
qint64
|
qint64
|
||||||
SWGOrder::getId() {
|
SWGOrder::getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -113,6 +118,7 @@ SWGOrder::setId(qint64 id) {
|
|||||||
this->id = id;
|
this->id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
qint64
|
qint64
|
||||||
SWGOrder::getPetId() {
|
SWGOrder::getPetId() {
|
||||||
return petId;
|
return petId;
|
||||||
@ -122,6 +128,7 @@ SWGOrder::setPetId(qint64 petId) {
|
|||||||
this->petId = petId;
|
this->petId = petId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGOrder::getQuantity() {
|
SWGOrder::getQuantity() {
|
||||||
return quantity;
|
return quantity;
|
||||||
@ -131,6 +138,7 @@ SWGOrder::setQuantity(qint32 quantity) {
|
|||||||
this->quantity = quantity;
|
this->quantity = quantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QDateTime*
|
QDateTime*
|
||||||
SWGOrder::getShipDate() {
|
SWGOrder::getShipDate() {
|
||||||
return shipDate;
|
return shipDate;
|
||||||
@ -140,6 +148,7 @@ SWGOrder::setShipDate(QDateTime* shipDate) {
|
|||||||
this->shipDate = shipDate;
|
this->shipDate = shipDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGOrder::getStatus() {
|
SWGOrder::getStatus() {
|
||||||
return status;
|
return status;
|
||||||
@ -149,6 +158,7 @@ SWGOrder::setStatus(QString* status) {
|
|||||||
this->status = status;
|
this->status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
SWGOrder::getComplete() {
|
SWGOrder::getComplete() {
|
||||||
return complete;
|
return complete;
|
||||||
@ -160,5 +170,6 @@ SWGOrder::setComplete(bool complete) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
#ifndef SWGOrder_H_
|
#ifndef SWGOrder_H_
|
||||||
#define SWGOrder_H_
|
#define SWGOrder_H_
|
||||||
|
|
||||||
#include <QJsonObject>
|
#include
|
||||||
|
<QJsonObject>
|
||||||
|
|
||||||
|
|
||||||
#include "QDateTime.h"
|
#include "QDateTime.h"
|
||||||
|
@ -3,10 +3,14 @@
|
|||||||
|
|
||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
|
|
||||||
#include <QJsonDocument>
|
#include
|
||||||
#include <QJsonArray>
|
<QJsonDocument>
|
||||||
#include <QObject>
|
#include
|
||||||
#include <QDebug>
|
<QJsonArray>
|
||||||
|
#include
|
||||||
|
<QObject>
|
||||||
|
#include
|
||||||
|
<QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
@ -114,7 +118,8 @@ SWGPet::asJsonObject() {
|
|||||||
|
|
||||||
QList<QString*>* photoUrlsList = photoUrls;
|
QList<QString*>* photoUrlsList = photoUrls;
|
||||||
QJsonArray photoUrlsJsonArray;
|
QJsonArray photoUrlsJsonArray;
|
||||||
toJsonArray((QList<void*>*)photoUrls, &photoUrlsJsonArray, "photoUrls", "QString");
|
toJsonArray((QList
|
||||||
|
<void*>*)photoUrls, &photoUrlsJsonArray, "photoUrls", "QString");
|
||||||
|
|
||||||
obj->insert("photoUrls", photoUrlsJsonArray);
|
obj->insert("photoUrls", photoUrlsJsonArray);
|
||||||
|
|
||||||
@ -123,7 +128,8 @@ SWGPet::asJsonObject() {
|
|||||||
|
|
||||||
QList<SWGTag*>* tagsList = tags;
|
QList<SWGTag*>* tagsList = tags;
|
||||||
QJsonArray tagsJsonArray;
|
QJsonArray tagsJsonArray;
|
||||||
toJsonArray((QList<void*>*)tags, &tagsJsonArray, "tags", "SWGTag");
|
toJsonArray((QList
|
||||||
|
<void*>*)tags, &tagsJsonArray, "tags", "SWGTag");
|
||||||
|
|
||||||
obj->insert("tags", tagsJsonArray);
|
obj->insert("tags", tagsJsonArray);
|
||||||
|
|
||||||
@ -139,6 +145,7 @@ SWGPet::asJsonObject() {
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
qint64
|
qint64
|
||||||
SWGPet::getId() {
|
SWGPet::getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -148,6 +155,7 @@ SWGPet::setId(qint64 id) {
|
|||||||
this->id = id;
|
this->id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SWGCategory*
|
SWGCategory*
|
||||||
SWGPet::getCategory() {
|
SWGPet::getCategory() {
|
||||||
return category;
|
return category;
|
||||||
@ -157,6 +165,7 @@ SWGPet::setCategory(SWGCategory* category) {
|
|||||||
this->category = category;
|
this->category = category;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGPet::getName() {
|
SWGPet::getName() {
|
||||||
return name;
|
return name;
|
||||||
@ -166,6 +175,7 @@ SWGPet::setName(QString* name) {
|
|||||||
this->name = name;
|
this->name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QList<QString*>*
|
QList<QString*>*
|
||||||
SWGPet::getPhotoUrls() {
|
SWGPet::getPhotoUrls() {
|
||||||
return photoUrls;
|
return photoUrls;
|
||||||
@ -175,6 +185,7 @@ SWGPet::setPhotoUrls(QList<QString*>* photoUrls) {
|
|||||||
this->photoUrls = photoUrls;
|
this->photoUrls = photoUrls;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QList<SWGTag*>*
|
QList<SWGTag*>*
|
||||||
SWGPet::getTags() {
|
SWGPet::getTags() {
|
||||||
return tags;
|
return tags;
|
||||||
@ -184,6 +195,7 @@ SWGPet::setTags(QList<SWGTag*>* tags) {
|
|||||||
this->tags = tags;
|
this->tags = tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGPet::getStatus() {
|
SWGPet::getStatus() {
|
||||||
return status;
|
return status;
|
||||||
@ -195,5 +207,6 @@ SWGPet::setStatus(QString* status) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
#ifndef SWGPet_H_
|
#ifndef SWGPet_H_
|
||||||
#define SWGPet_H_
|
#define SWGPet_H_
|
||||||
|
|
||||||
#include <QJsonObject>
|
#include
|
||||||
|
<QJsonObject>
|
||||||
|
|
||||||
|
|
||||||
#include "SWGTag.h"
|
#include "SWGTag.h"
|
||||||
|
@ -2,8 +2,10 @@
|
|||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
#include "SWGModelFactory.h"
|
#include "SWGModelFactory.h"
|
||||||
|
|
||||||
#include <QJsonArray>
|
#include
|
||||||
#include <QJsonDocument>
|
<QJsonArray>
|
||||||
|
#include
|
||||||
|
<QJsonDocument>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
SWGPetApi::SWGPetApi() {}
|
SWGPetApi::SWGPetApi() {}
|
||||||
@ -15,6 +17,8 @@ SWGPetApi::SWGPetApi(QString host, QString basePath) {
|
|||||||
this->basePath = basePath;
|
this->basePath = basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGPetApi::updatePet(SWGPet body) {
|
SWGPetApi::updatePet(SWGPet body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -63,6 +67,7 @@ SWGPetApi::updatePetCallback(HttpRequestWorker * worker) {
|
|||||||
|
|
||||||
emit updatePetSignal();
|
emit updatePetSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGPetApi::addPet(SWGPet body) {
|
SWGPetApi::addPet(SWGPet body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -111,6 +116,7 @@ SWGPetApi::addPetCallback(HttpRequestWorker * worker) {
|
|||||||
|
|
||||||
emit addPetSignal();
|
emit addPetSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGPetApi::findPetsByStatus(QList<QString*>* status) {
|
SWGPetApi::findPetsByStatus(QList<QString*>* status) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -216,6 +222,7 @@ SWGPetApi::findPetsByStatusCallback(HttpRequestWorker * worker) {
|
|||||||
emit findPetsByStatusSignal(output);
|
emit findPetsByStatusSignal(output);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGPetApi::findPetsByTags(QList<QString*>* tags) {
|
SWGPetApi::findPetsByTags(QList<QString*>* tags) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -321,6 +328,7 @@ SWGPetApi::findPetsByTagsCallback(HttpRequestWorker * worker) {
|
|||||||
emit findPetsByTagsSignal(output);
|
emit findPetsByTagsSignal(output);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGPetApi::getPetById(qint64 petId) {
|
SWGPetApi::getPetById(qint64 petId) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -366,7 +374,8 @@ SWGPetApi::getPetByIdCallback(HttpRequestWorker * worker) {
|
|||||||
|
|
||||||
|
|
||||||
QString json(worker->response);
|
QString json(worker->response);
|
||||||
SWGPet* output = static_cast<SWGPet*>(create(json, QString("SWGPet")));
|
SWGPet* output = static_cast<SWGPet*>(create(json,
|
||||||
|
QString("SWGPet")));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -376,8 +385,11 @@ SWGPetApi::getPetByIdCallback(HttpRequestWorker * worker) {
|
|||||||
emit getPetByIdSignal(output);
|
emit getPetByIdSignal(output);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGPetApi::updatePetWithForm(QString* petId, QString* name, QString* status) {
|
SWGPetApi::updatePetWithForm(QString* petId
|
||||||
|
, QString* name
|
||||||
|
, QString* status) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}");
|
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}");
|
||||||
|
|
||||||
@ -430,8 +442,10 @@ SWGPetApi::updatePetWithFormCallback(HttpRequestWorker * worker) {
|
|||||||
|
|
||||||
emit updatePetWithFormSignal();
|
emit updatePetWithFormSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGPetApi::deletePet(QString* apiKey, qint64 petId) {
|
SWGPetApi::deletePet(QString* apiKey
|
||||||
|
, qint64 petId) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}");
|
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}");
|
||||||
|
|
||||||
@ -478,8 +492,11 @@ SWGPetApi::deletePetCallback(HttpRequestWorker * worker) {
|
|||||||
|
|
||||||
emit deletePetSignal();
|
emit deletePetSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGPetApi::uploadFile(qint64 petId, QString* additionalMetadata, SWGHttpRequestInputFileElement* file) {
|
SWGPetApi::uploadFile(qint64 petId
|
||||||
|
, QString* additionalMetadata
|
||||||
|
, SWGHttpRequestInputFileElement* file) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}/uploadImage");
|
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}/uploadImage");
|
||||||
|
|
||||||
@ -528,4 +545,6 @@ SWGPetApi::uploadFileCallback(HttpRequestWorker * worker) {
|
|||||||
|
|
||||||
emit uploadFileSignal();
|
emit uploadFileSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include "SWGHttpRequest.h"
|
#include "SWGHttpRequest.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include
|
||||||
|
<QObject>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
@ -27,9 +28,14 @@ public:
|
|||||||
void findPetsByStatus(QList<QString*>* status);
|
void findPetsByStatus(QList<QString*>* status);
|
||||||
void findPetsByTags(QList<QString*>* tags);
|
void findPetsByTags(QList<QString*>* tags);
|
||||||
void getPetById(qint64 petId);
|
void getPetById(qint64 petId);
|
||||||
void updatePetWithForm(QString* petId, QString* name, QString* status);
|
void updatePetWithForm(QString* petId
|
||||||
void deletePet(QString* apiKey, qint64 petId);
|
, QString* name
|
||||||
void uploadFile(qint64 petId, QString* additionalMetadata, SWGHttpRequestInputFileElement* file);
|
, QString* status);
|
||||||
|
void deletePet(QString* apiKey
|
||||||
|
, qint64 petId);
|
||||||
|
void uploadFile(qint64 petId
|
||||||
|
, QString* additionalMetadata
|
||||||
|
, SWGHttpRequestInputFileElement* file);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updatePetCallback (HttpRequestWorker * worker);
|
void updatePetCallback (HttpRequestWorker * worker);
|
||||||
|
@ -2,8 +2,10 @@
|
|||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
#include "SWGModelFactory.h"
|
#include "SWGModelFactory.h"
|
||||||
|
|
||||||
#include <QJsonArray>
|
#include
|
||||||
#include <QJsonDocument>
|
<QJsonArray>
|
||||||
|
#include
|
||||||
|
<QJsonDocument>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
SWGStoreApi::SWGStoreApi() {}
|
SWGStoreApi::SWGStoreApi() {}
|
||||||
@ -15,6 +17,8 @@ SWGStoreApi::SWGStoreApi(QString host, QString basePath) {
|
|||||||
this->basePath = basePath;
|
this->basePath = basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGStoreApi::getInventory() {
|
SWGStoreApi::getInventory() {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -78,6 +82,7 @@ SWGStoreApi::getInventoryCallback(HttpRequestWorker * worker) {
|
|||||||
emit getInventorySignal(output);
|
emit getInventorySignal(output);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGStoreApi::placeOrder(SWGOrder body) {
|
SWGStoreApi::placeOrder(SWGOrder body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -125,7 +130,8 @@ SWGStoreApi::placeOrderCallback(HttpRequestWorker * worker) {
|
|||||||
|
|
||||||
|
|
||||||
QString json(worker->response);
|
QString json(worker->response);
|
||||||
SWGOrder* output = static_cast<SWGOrder*>(create(json, QString("SWGOrder")));
|
SWGOrder* output = static_cast<SWGOrder*>(create(json,
|
||||||
|
QString("SWGOrder")));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -135,6 +141,7 @@ SWGStoreApi::placeOrderCallback(HttpRequestWorker * worker) {
|
|||||||
emit placeOrderSignal(output);
|
emit placeOrderSignal(output);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGStoreApi::getOrderById(QString* orderId) {
|
SWGStoreApi::getOrderById(QString* orderId) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -180,7 +187,8 @@ SWGStoreApi::getOrderByIdCallback(HttpRequestWorker * worker) {
|
|||||||
|
|
||||||
|
|
||||||
QString json(worker->response);
|
QString json(worker->response);
|
||||||
SWGOrder* output = static_cast<SWGOrder*>(create(json, QString("SWGOrder")));
|
SWGOrder* output = static_cast<SWGOrder*>(create(json,
|
||||||
|
QString("SWGOrder")));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -190,6 +198,7 @@ SWGStoreApi::getOrderByIdCallback(HttpRequestWorker * worker) {
|
|||||||
emit getOrderByIdSignal(output);
|
emit getOrderByIdSignal(output);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGStoreApi::deleteOrder(QString* orderId) {
|
SWGStoreApi::deleteOrder(QString* orderId) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -236,4 +245,6 @@ SWGStoreApi::deleteOrderCallback(HttpRequestWorker * worker) {
|
|||||||
|
|
||||||
emit deleteOrderSignal();
|
emit deleteOrderSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
#include "SWGOrder.h"
|
#include "SWGOrder.h"
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#include <QObject>
|
#include
|
||||||
|
<QObject>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
|
@ -3,10 +3,14 @@
|
|||||||
|
|
||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
|
|
||||||
#include <QJsonDocument>
|
#include
|
||||||
#include <QJsonArray>
|
<QJsonDocument>
|
||||||
#include <QObject>
|
#include
|
||||||
#include <QDebug>
|
<QJsonArray>
|
||||||
|
#include
|
||||||
|
<QObject>
|
||||||
|
#include
|
||||||
|
<QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
@ -81,6 +85,7 @@ SWGTag::asJsonObject() {
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
qint64
|
qint64
|
||||||
SWGTag::getId() {
|
SWGTag::getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -90,6 +95,7 @@ SWGTag::setId(qint64 id) {
|
|||||||
this->id = id;
|
this->id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGTag::getName() {
|
SWGTag::getName() {
|
||||||
return name;
|
return name;
|
||||||
@ -101,5 +107,6 @@ SWGTag::setName(QString* name) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
#ifndef SWGTag_H_
|
#ifndef SWGTag_H_
|
||||||
#define SWGTag_H_
|
#define SWGTag_H_
|
||||||
|
|
||||||
#include <QJsonObject>
|
#include
|
||||||
|
<QJsonObject>
|
||||||
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
@ -3,10 +3,14 @@
|
|||||||
|
|
||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
|
|
||||||
#include <QJsonDocument>
|
#include
|
||||||
#include <QJsonArray>
|
<QJsonDocument>
|
||||||
#include <QObject>
|
#include
|
||||||
#include <QDebug>
|
<QJsonArray>
|
||||||
|
#include
|
||||||
|
<QObject>
|
||||||
|
#include
|
||||||
|
<QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
@ -140,6 +144,7 @@ SWGUser::asJsonObject() {
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
qint64
|
qint64
|
||||||
SWGUser::getId() {
|
SWGUser::getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -149,6 +154,7 @@ SWGUser::setId(qint64 id) {
|
|||||||
this->id = id;
|
this->id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGUser::getUsername() {
|
SWGUser::getUsername() {
|
||||||
return username;
|
return username;
|
||||||
@ -158,6 +164,7 @@ SWGUser::setUsername(QString* username) {
|
|||||||
this->username = username;
|
this->username = username;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGUser::getFirstName() {
|
SWGUser::getFirstName() {
|
||||||
return firstName;
|
return firstName;
|
||||||
@ -167,6 +174,7 @@ SWGUser::setFirstName(QString* firstName) {
|
|||||||
this->firstName = firstName;
|
this->firstName = firstName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGUser::getLastName() {
|
SWGUser::getLastName() {
|
||||||
return lastName;
|
return lastName;
|
||||||
@ -176,6 +184,7 @@ SWGUser::setLastName(QString* lastName) {
|
|||||||
this->lastName = lastName;
|
this->lastName = lastName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGUser::getEmail() {
|
SWGUser::getEmail() {
|
||||||
return email;
|
return email;
|
||||||
@ -185,6 +194,7 @@ SWGUser::setEmail(QString* email) {
|
|||||||
this->email = email;
|
this->email = email;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGUser::getPassword() {
|
SWGUser::getPassword() {
|
||||||
return password;
|
return password;
|
||||||
@ -194,6 +204,7 @@ SWGUser::setPassword(QString* password) {
|
|||||||
this->password = password;
|
this->password = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGUser::getPhone() {
|
SWGUser::getPhone() {
|
||||||
return phone;
|
return phone;
|
||||||
@ -203,6 +214,7 @@ SWGUser::setPhone(QString* phone) {
|
|||||||
this->phone = phone;
|
this->phone = phone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGUser::getUserStatus() {
|
SWGUser::getUserStatus() {
|
||||||
return userStatus;
|
return userStatus;
|
||||||
@ -214,5 +226,6 @@ SWGUser::setUserStatus(qint32 userStatus) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
#ifndef SWGUser_H_
|
#ifndef SWGUser_H_
|
||||||
#define SWGUser_H_
|
#define SWGUser_H_
|
||||||
|
|
||||||
#include <QJsonObject>
|
#include
|
||||||
|
<QJsonObject>
|
||||||
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
@ -2,8 +2,10 @@
|
|||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
#include "SWGModelFactory.h"
|
#include "SWGModelFactory.h"
|
||||||
|
|
||||||
#include <QJsonArray>
|
#include
|
||||||
#include <QJsonDocument>
|
<QJsonArray>
|
||||||
|
#include
|
||||||
|
<QJsonDocument>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
SWGUserApi::SWGUserApi() {}
|
SWGUserApi::SWGUserApi() {}
|
||||||
@ -15,6 +17,8 @@ SWGUserApi::SWGUserApi(QString host, QString basePath) {
|
|||||||
this->basePath = basePath;
|
this->basePath = basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGUserApi::createUser(SWGUser body) {
|
SWGUserApi::createUser(SWGUser body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -63,6 +67,7 @@ SWGUserApi::createUserCallback(HttpRequestWorker * worker) {
|
|||||||
|
|
||||||
emit createUserSignal();
|
emit createUserSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGUserApi::createUsersWithArrayInput(QList<SWGUser*>* body) {
|
SWGUserApi::createUsersWithArrayInput(QList<SWGUser*>* body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -80,7 +85,9 @@ SWGUserApi::createUsersWithArrayInput(QList<SWGUser*>* body) {
|
|||||||
|
|
||||||
|
|
||||||
QJsonArray* bodyArray = new QJsonArray();
|
QJsonArray* bodyArray = new QJsonArray();
|
||||||
toJsonArray((QList<void*>*)body, bodyArray, QString("body"), QString("SWGUser*"));
|
toJsonArray((QList
|
||||||
|
<void
|
||||||
|
*>*)body, bodyArray, QString("body"), QString("SWGUser*"));
|
||||||
|
|
||||||
QJsonDocument doc(*bodyArray);
|
QJsonDocument doc(*bodyArray);
|
||||||
QByteArray bytes = doc.toJson();
|
QByteArray bytes = doc.toJson();
|
||||||
@ -116,6 +123,7 @@ SWGUserApi::createUsersWithArrayInputCallback(HttpRequestWorker * worker) {
|
|||||||
|
|
||||||
emit createUsersWithArrayInputSignal();
|
emit createUsersWithArrayInputSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGUserApi::createUsersWithListInput(QList<SWGUser*>* body) {
|
SWGUserApi::createUsersWithListInput(QList<SWGUser*>* body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -133,7 +141,9 @@ SWGUserApi::createUsersWithListInput(QList<SWGUser*>* body) {
|
|||||||
|
|
||||||
|
|
||||||
QJsonArray* bodyArray = new QJsonArray();
|
QJsonArray* bodyArray = new QJsonArray();
|
||||||
toJsonArray((QList<void*>*)body, bodyArray, QString("body"), QString("SWGUser*"));
|
toJsonArray((QList
|
||||||
|
<void
|
||||||
|
*>*)body, bodyArray, QString("body"), QString("SWGUser*"));
|
||||||
|
|
||||||
QJsonDocument doc(*bodyArray);
|
QJsonDocument doc(*bodyArray);
|
||||||
QByteArray bytes = doc.toJson();
|
QByteArray bytes = doc.toJson();
|
||||||
@ -169,8 +179,10 @@ SWGUserApi::createUsersWithListInputCallback(HttpRequestWorker * worker) {
|
|||||||
|
|
||||||
emit createUsersWithListInputSignal();
|
emit createUsersWithListInputSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGUserApi::loginUser(QString* username, QString* password) {
|
SWGUserApi::loginUser(QString* username
|
||||||
|
, QString* password) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/user/login");
|
fullPath.append(this->host).append(this->basePath).append("/user/login");
|
||||||
|
|
||||||
@ -235,7 +247,8 @@ SWGUserApi::loginUserCallback(HttpRequestWorker * worker) {
|
|||||||
|
|
||||||
|
|
||||||
QString json(worker->response);
|
QString json(worker->response);
|
||||||
QString* output = static_cast<QString*>(create(json, QString("QString")));
|
QString* output = static_cast<QString*>(create(json,
|
||||||
|
QString("QString")));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -245,6 +258,7 @@ SWGUserApi::loginUserCallback(HttpRequestWorker * worker) {
|
|||||||
emit loginUserSignal(output);
|
emit loginUserSignal(output);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGUserApi::logoutUser() {
|
SWGUserApi::logoutUser() {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -288,6 +302,7 @@ SWGUserApi::logoutUserCallback(HttpRequestWorker * worker) {
|
|||||||
|
|
||||||
emit logoutUserSignal();
|
emit logoutUserSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGUserApi::getUserByName(QString* username) {
|
SWGUserApi::getUserByName(QString* username) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -333,7 +348,8 @@ SWGUserApi::getUserByNameCallback(HttpRequestWorker * worker) {
|
|||||||
|
|
||||||
|
|
||||||
QString json(worker->response);
|
QString json(worker->response);
|
||||||
SWGUser* output = static_cast<SWGUser*>(create(json, QString("SWGUser")));
|
SWGUser* output = static_cast<SWGUser*>(create(json,
|
||||||
|
QString("SWGUser")));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -343,8 +359,10 @@ SWGUserApi::getUserByNameCallback(HttpRequestWorker * worker) {
|
|||||||
emit getUserByNameSignal(output);
|
emit getUserByNameSignal(output);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGUserApi::updateUser(QString* username, SWGUser body) {
|
SWGUserApi::updateUser(QString* username
|
||||||
|
, SWGUser body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/user/{username}");
|
fullPath.append(this->host).append(this->basePath).append("/user/{username}");
|
||||||
|
|
||||||
@ -394,6 +412,7 @@ SWGUserApi::updateUserCallback(HttpRequestWorker * worker) {
|
|||||||
|
|
||||||
emit updateUserSignal();
|
emit updateUserSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGUserApi::deleteUser(QString* username) {
|
SWGUserApi::deleteUser(QString* username) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
@ -440,4 +459,6 @@ SWGUserApi::deleteUserCallback(HttpRequestWorker * worker) {
|
|||||||
|
|
||||||
emit deleteUserSignal();
|
emit deleteUserSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#include <QObject>
|
#include
|
||||||
|
<QObject>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
@ -25,10 +26,12 @@ public:
|
|||||||
void createUser(SWGUser body);
|
void createUser(SWGUser body);
|
||||||
void createUsersWithArrayInput(QList<SWGUser*>* body);
|
void createUsersWithArrayInput(QList<SWGUser*>* body);
|
||||||
void createUsersWithListInput(QList<SWGUser*>* body);
|
void createUsersWithListInput(QList<SWGUser*>* body);
|
||||||
void loginUser(QString* username, QString* password);
|
void loginUser(QString* username
|
||||||
|
, QString* password);
|
||||||
void logoutUser();
|
void logoutUser();
|
||||||
void getUserByName(QString* username);
|
void getUserByName(QString* username);
|
||||||
void updateUser(QString* username, SWGUser body);
|
void updateUser(QString* username
|
||||||
|
, SWGUser body);
|
||||||
void deleteUser(QString* username);
|
void deleteUser(QString* username);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
@ -77,7 +77,8 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<sources>
|
<sources>
|
||||||
<source>src/main/java</source>
|
<source>
|
||||||
|
src/main/java</source>
|
||||||
</sources>
|
</sources>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
@ -89,7 +90,8 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<sources>
|
<sources>
|
||||||
<source>src/test/java</source>
|
<source>
|
||||||
|
src/test/java</source>
|
||||||
</sources>
|
</sources>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
@ -100,7 +102,8 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>2.3.2</version>
|
<version>2.3.2</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.6</source>
|
<source>
|
||||||
|
1.6</source>
|
||||||
<target>1.6</target>
|
<target>1.6</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
@ -7,8 +7,7 @@ import retrofit.converter.GsonConverter;
|
|||||||
|
|
||||||
public class ServiceGenerator {
|
public class ServiceGenerator {
|
||||||
// No need to instantiate this class.
|
// No need to instantiate this class.
|
||||||
private ServiceGenerator() {
|
private ServiceGenerator() { }
|
||||||
}
|
|
||||||
|
|
||||||
public static <S> S createService(Class<S> serviceClass) {
|
public static <S> S createService(Class<S> serviceClass) {
|
||||||
Gson gson = new GsonBuilder()
|
Gson gson = new GsonBuilder()
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
package io.swagger.client.api;
|
package io.swagger.client.api;
|
||||||
|
|
||||||
import io.swagger.client.model.Pet;
|
import io.swagger.client.model.*;
|
||||||
|
|
||||||
import retrofit.http.*;
|
import retrofit.http.*;
|
||||||
import retrofit.mime.*;
|
import retrofit.mime.*;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
import java.util.List;
|
import io.swagger.client.model.Pet;
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
public interface PetApi {
|
public interface PetApi {
|
||||||
|
|
||||||
@ -35,7 +38,6 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Finds Pets by status
|
* Finds Pets by status
|
||||||
* Multiple status values can be provided with comma seperated strings
|
* Multiple status values can be provided with comma seperated strings
|
||||||
*
|
|
||||||
* @param status Status values that need to be considered for filter
|
* @param status Status values that need to be considered for filter
|
||||||
* @return List<Pet>
|
* @return List<Pet>
|
||||||
*/
|
*/
|
||||||
@ -48,7 +50,6 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Finds Pets by tags
|
* Finds Pets by tags
|
||||||
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||||
*
|
|
||||||
* @param tags Tags to filter by
|
* @param tags Tags to filter by
|
||||||
* @return List<Pet>
|
* @return List<Pet>
|
||||||
*/
|
*/
|
||||||
@ -61,7 +62,6 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Find pet by ID
|
* Find pet by ID
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
*
|
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet that needs to be fetched
|
||||||
* @return Pet
|
* @return Pet
|
||||||
*/
|
*/
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
package io.swagger.client.api;
|
package io.swagger.client.api;
|
||||||
|
|
||||||
import io.swagger.client.model.Order;
|
import io.swagger.client.model.*;
|
||||||
|
|
||||||
import retrofit.http.*;
|
import retrofit.http.*;
|
||||||
import retrofit.mime.*;
|
import retrofit.mime.*;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import io.swagger.client.model.Order;
|
||||||
|
|
||||||
public interface StoreApi {
|
public interface StoreApi {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns pet inventories by status
|
* Returns pet inventories by status
|
||||||
* Returns a map of status codes to quantities
|
* Returns a map of status codes to quantities
|
||||||
*
|
|
||||||
* @return Map<String, Integer>
|
* @return Map<String, Integer>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -34,7 +36,6 @@ public interface StoreApi {
|
|||||||
/**
|
/**
|
||||||
* Find purchase order by ID
|
* 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
|
* @param orderId ID of pet that needs to be fetched
|
||||||
* @return Order
|
* @return Order
|
||||||
*/
|
*/
|
||||||
@ -47,7 +48,6 @@ public interface StoreApi {
|
|||||||
/**
|
/**
|
||||||
* Delete purchase order by ID
|
* Delete purchase order by ID
|
||||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
*
|
|
||||||
* @param orderId ID of the order that needs to be deleted
|
* @param orderId ID of the order that needs to be deleted
|
||||||
* @return Void
|
* @return Void
|
||||||
*/
|
*/
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
package io.swagger.client.api;
|
package io.swagger.client.api;
|
||||||
|
|
||||||
import io.swagger.client.model.User;
|
import io.swagger.client.model.*;
|
||||||
|
|
||||||
import retrofit.http.*;
|
import retrofit.http.*;
|
||||||
import retrofit.mime.*;
|
import retrofit.mime.*;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
import java.util.List;
|
import io.swagger.client.model.User;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
public interface UserApi {
|
public interface UserApi {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create user
|
* Create user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
*
|
|
||||||
* @param body Created user object
|
* @param body Created user object
|
||||||
* @return Void
|
* @return Void
|
||||||
*/
|
*/
|
||||||
@ -83,7 +85,6 @@ public interface UserApi {
|
|||||||
/**
|
/**
|
||||||
* Updated user
|
* Updated user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
*
|
|
||||||
* @param username name that need to be deleted
|
* @param username name that need to be deleted
|
||||||
* @param body Updated user object
|
* @param body Updated user object
|
||||||
* @return Void
|
* @return Void
|
||||||
@ -97,7 +98,6 @@ public interface UserApi {
|
|||||||
/**
|
/**
|
||||||
* Delete user
|
* Delete user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
*
|
|
||||||
* @param username The name that needs to be deleted
|
* @param username The name that needs to be deleted
|
||||||
* @return Void
|
* @return Void
|
||||||
*/
|
*/
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package io.swagger.client.model;
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
@ -24,7 +25,6 @@ public class Category {
|
|||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(Long id) {
|
public void setId(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
@ -32,7 +32,6 @@ public class Category {
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
@ -48,3 +47,4 @@ public class Category {
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
package io.swagger.client.model;
|
package io.swagger.client.model;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
@ApiModel(description = "")
|
||||||
public class Order {
|
public class Order {
|
||||||
@ -32,6 +33,10 @@ public class Order {
|
|||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@SerializedName("shipDate")
|
@SerializedName("shipDate")
|
||||||
private Date shipDate = null;
|
private Date shipDate = null;
|
||||||
|
public enum StatusEnum {
|
||||||
|
placed, approved, delivered,
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order Status
|
* Order Status
|
||||||
**/
|
**/
|
||||||
@ -39,17 +44,16 @@ public class Order {
|
|||||||
@SerializedName("status")
|
@SerializedName("status")
|
||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
|
|
||||||
;
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@SerializedName("complete")
|
@SerializedName("complete")
|
||||||
private Boolean complete = null;
|
private Boolean complete = null;
|
||||||
|
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(Long id) {
|
public void setId(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
@ -57,7 +61,6 @@ public class Order {
|
|||||||
public Long getPetId() {
|
public Long getPetId() {
|
||||||
return petId;
|
return petId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPetId(Long petId) {
|
public void setPetId(Long petId) {
|
||||||
this.petId = petId;
|
this.petId = petId;
|
||||||
}
|
}
|
||||||
@ -65,7 +68,6 @@ public class Order {
|
|||||||
public Integer getQuantity() {
|
public Integer getQuantity() {
|
||||||
return quantity;
|
return quantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setQuantity(Integer quantity) {
|
public void setQuantity(Integer quantity) {
|
||||||
this.quantity = quantity;
|
this.quantity = quantity;
|
||||||
}
|
}
|
||||||
@ -73,7 +75,6 @@ public class Order {
|
|||||||
public Date getShipDate() {
|
public Date getShipDate() {
|
||||||
return shipDate;
|
return shipDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setShipDate(Date shipDate) {
|
public void setShipDate(Date shipDate) {
|
||||||
this.shipDate = shipDate;
|
this.shipDate = shipDate;
|
||||||
}
|
}
|
||||||
@ -81,7 +82,6 @@ public class Order {
|
|||||||
public StatusEnum getStatus() {
|
public StatusEnum getStatus() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStatus(StatusEnum status) {
|
public void setStatus(StatusEnum status) {
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
@ -89,7 +89,6 @@ public class Order {
|
|||||||
public Boolean getComplete() {
|
public Boolean getComplete() {
|
||||||
return complete;
|
return complete;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setComplete(Boolean complete) {
|
public void setComplete(Boolean complete) {
|
||||||
this.complete = complete;
|
this.complete = complete;
|
||||||
}
|
}
|
||||||
@ -108,8 +107,5 @@ public class Order {
|
|||||||
sb.append("}\n");
|
sb.append("}\n");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public enum StatusEnum {
|
|
||||||
placed, approved, delivered,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package io.swagger.client.model;
|
package io.swagger.client.model;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
import io.swagger.client.model.Category;
|
import io.swagger.client.model.Category;
|
||||||
import io.swagger.client.model.Tag;
|
import io.swagger.client.model.Tag;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import io.swagger.annotations.*;
|
||||||
import java.util.List;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
@ApiModel(description = "")
|
||||||
@ -41,6 +41,10 @@ public class Pet {
|
|||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@SerializedName("tags")
|
@SerializedName("tags")
|
||||||
private List<Tag> tags = new ArrayList<Tag>() ;
|
private List<Tag> tags = new ArrayList<Tag>() ;
|
||||||
|
public enum StatusEnum {
|
||||||
|
available, pending, sold,
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pet status in the store
|
* pet status in the store
|
||||||
**/
|
**/
|
||||||
@ -48,12 +52,10 @@ public class Pet {
|
|||||||
@SerializedName("status")
|
@SerializedName("status")
|
||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(Long id) {
|
public void setId(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
@ -61,7 +63,6 @@ public class Pet {
|
|||||||
public Category getCategory() {
|
public Category getCategory() {
|
||||||
return category;
|
return category;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCategory(Category category) {
|
public void setCategory(Category category) {
|
||||||
this.category = category;
|
this.category = category;
|
||||||
}
|
}
|
||||||
@ -69,7 +70,6 @@ public class Pet {
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
@ -77,7 +77,6 @@ public class Pet {
|
|||||||
public List<String> getPhotoUrls() {
|
public List<String> getPhotoUrls() {
|
||||||
return photoUrls;
|
return photoUrls;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPhotoUrls(List<String> photoUrls) {
|
public void setPhotoUrls(List<String> photoUrls) {
|
||||||
this.photoUrls = photoUrls;
|
this.photoUrls = photoUrls;
|
||||||
}
|
}
|
||||||
@ -85,7 +84,6 @@ public class Pet {
|
|||||||
public List<Tag> getTags() {
|
public List<Tag> getTags() {
|
||||||
return tags;
|
return tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTags(List<Tag> tags) {
|
public void setTags(List<Tag> tags) {
|
||||||
this.tags = tags;
|
this.tags = tags;
|
||||||
}
|
}
|
||||||
@ -93,7 +91,6 @@ public class Pet {
|
|||||||
public StatusEnum getStatus() {
|
public StatusEnum getStatus() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStatus(StatusEnum status) {
|
public void setStatus(StatusEnum status) {
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
@ -112,8 +109,5 @@ public class Pet {
|
|||||||
sb.append("}\n");
|
sb.append("}\n");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public enum StatusEnum {
|
|
||||||
available, pending, sold,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package io.swagger.client.model;
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
@ -24,7 +25,6 @@ public class Tag {
|
|||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(Long id) {
|
public void setId(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
@ -32,7 +32,6 @@ public class Tag {
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
@ -48,3 +47,4 @@ public class Tag {
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package io.swagger.client.model;
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
@ -61,7 +62,6 @@ public class User {
|
|||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(Long id) {
|
public void setId(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
@ -69,7 +69,6 @@ public class User {
|
|||||||
public String getUsername() {
|
public String getUsername() {
|
||||||
return username;
|
return username;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUsername(String username) {
|
public void setUsername(String username) {
|
||||||
this.username = username;
|
this.username = username;
|
||||||
}
|
}
|
||||||
@ -77,7 +76,6 @@ public class User {
|
|||||||
public String getFirstName() {
|
public String getFirstName() {
|
||||||
return firstName;
|
return firstName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFirstName(String firstName) {
|
public void setFirstName(String firstName) {
|
||||||
this.firstName = firstName;
|
this.firstName = firstName;
|
||||||
}
|
}
|
||||||
@ -85,7 +83,6 @@ public class User {
|
|||||||
public String getLastName() {
|
public String getLastName() {
|
||||||
return lastName;
|
return lastName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLastName(String lastName) {
|
public void setLastName(String lastName) {
|
||||||
this.lastName = lastName;
|
this.lastName = lastName;
|
||||||
}
|
}
|
||||||
@ -93,7 +90,6 @@ public class User {
|
|||||||
public String getEmail() {
|
public String getEmail() {
|
||||||
return email;
|
return email;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEmail(String email) {
|
public void setEmail(String email) {
|
||||||
this.email = email;
|
this.email = email;
|
||||||
}
|
}
|
||||||
@ -101,7 +97,6 @@ public class User {
|
|||||||
public String getPassword() {
|
public String getPassword() {
|
||||||
return password;
|
return password;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPassword(String password) {
|
public void setPassword(String password) {
|
||||||
this.password = password;
|
this.password = password;
|
||||||
}
|
}
|
||||||
@ -109,7 +104,6 @@ public class User {
|
|||||||
public String getPhone() {
|
public String getPhone() {
|
||||||
return phone;
|
return phone;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPhone(String phone) {
|
public void setPhone(String phone) {
|
||||||
this.phone = phone;
|
this.phone = phone;
|
||||||
}
|
}
|
||||||
@ -117,7 +111,6 @@ public class User {
|
|||||||
public Integer getUserStatus() {
|
public Integer getUserStatus() {
|
||||||
return userStatus;
|
return userStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUserStatus(Integer userStatus) {
|
public void setUserStatus(Integer userStatus) {
|
||||||
this.userStatus = userStatus;
|
this.userStatus = userStatus;
|
||||||
}
|
}
|
||||||
@ -139,3 +132,4 @@ public class User {
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,10 +15,14 @@ require 'swagger_client/models/tag'
|
|||||||
require 'swagger_client/models/order'
|
require 'swagger_client/models/order'
|
||||||
|
|
||||||
# APIs
|
# APIs
|
||||||
|
|
||||||
require 'swagger_client/api/user_api'
|
require 'swagger_client/api/user_api'
|
||||||
|
|
||||||
require 'swagger_client/api/pet_api'
|
require 'swagger_client/api/pet_api'
|
||||||
|
|
||||||
require 'swagger_client/api/store_api'
|
require 'swagger_client/api/store_api'
|
||||||
|
|
||||||
|
|
||||||
module SwaggerClient
|
module SwaggerClient
|
||||||
# Initialize the default configuration
|
# Initialize the default configuration
|
||||||
Swagger.configuration ||= Swagger::Configuration.new
|
Swagger.configuration ||= Swagger::Configuration.new
|
||||||
|
@ -5,6 +5,7 @@ module SwaggerClient
|
|||||||
basePath = "http://petstore.swagger.io/v2"
|
basePath = "http://petstore.swagger.io/v2"
|
||||||
# apiInvoker = APIInvoker
|
# apiInvoker = APIInvoker
|
||||||
|
|
||||||
|
|
||||||
# Update an existing pet
|
# Update an existing pet
|
||||||
#
|
#
|
||||||
# @param [Hash] opts the optional parameters
|
# @param [Hash] opts the optional parameters
|
||||||
@ -42,6 +43,7 @@ module SwaggerClient
|
|||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Add a new pet to the store
|
# Add a new pet to the store
|
||||||
#
|
#
|
||||||
# @param [Hash] opts the optional parameters
|
# @param [Hash] opts the optional parameters
|
||||||
@ -79,6 +81,7 @@ module SwaggerClient
|
|||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Finds Pets by status
|
# Finds Pets by status
|
||||||
# Multiple status values can be provided with comma seperated strings
|
# Multiple status values can be provided with comma seperated strings
|
||||||
# @param [Hash] opts the optional parameters
|
# @param [Hash] opts the optional parameters
|
||||||
@ -117,6 +120,7 @@ module SwaggerClient
|
|||||||
response.map {|response| obj = Pet.new() and obj.build_from_hash(response) }
|
response.map {|response| obj = Pet.new() and obj.build_from_hash(response) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Finds Pets by tags
|
# Finds Pets by tags
|
||||||
# Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
# Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||||
# @param [Hash] opts the optional parameters
|
# @param [Hash] opts the optional parameters
|
||||||
@ -155,6 +159,7 @@ module SwaggerClient
|
|||||||
response.map {|response| obj = Pet.new() and obj.build_from_hash(response) }
|
response.map {|response| obj = Pet.new() and obj.build_from_hash(response) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Find pet by ID
|
# Find pet by ID
|
||||||
# Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
# Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
# @param pet_id ID of pet that needs to be fetched
|
# @param pet_id ID of pet that needs to be fetched
|
||||||
@ -195,6 +200,7 @@ module SwaggerClient
|
|||||||
obj = Pet.new() and obj.build_from_hash(response)
|
obj = Pet.new() and obj.build_from_hash(response)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Updates a pet in the store with form data
|
# Updates a pet in the store with form data
|
||||||
#
|
#
|
||||||
# @param pet_id ID of pet that needs to be updated
|
# @param pet_id ID of pet that needs to be updated
|
||||||
@ -239,6 +245,7 @@ module SwaggerClient
|
|||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Deletes a pet
|
# Deletes a pet
|
||||||
#
|
#
|
||||||
# @param pet_id Pet id to delete
|
# @param pet_id Pet id to delete
|
||||||
@ -281,6 +288,7 @@ module SwaggerClient
|
|||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# uploads an image
|
# uploads an image
|
||||||
#
|
#
|
||||||
# @param pet_id ID of pet to update
|
# @param pet_id ID of pet to update
|
||||||
@ -324,5 +332,6 @@ module SwaggerClient
|
|||||||
Swagger::Request.new(:POST, path, {:params => query_params,:headers => header_params, :form_params => form_params, :body => post_body, :auth_names => auth_names}).make
|
Swagger::Request.new(:POST, path, {:params => query_params,:headers => header_params, :form_params => form_params, :body => post_body, :auth_names => auth_names}).make
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,6 +5,7 @@ module SwaggerClient
|
|||||||
basePath = "http://petstore.swagger.io/v2"
|
basePath = "http://petstore.swagger.io/v2"
|
||||||
# apiInvoker = APIInvoker
|
# apiInvoker = APIInvoker
|
||||||
|
|
||||||
|
|
||||||
# Returns pet inventories by status
|
# Returns pet inventories by status
|
||||||
# Returns a map of status codes to quantities
|
# Returns a map of status codes to quantities
|
||||||
# @param [Hash] opts the optional parameters
|
# @param [Hash] opts the optional parameters
|
||||||
@ -41,6 +42,7 @@ module SwaggerClient
|
|||||||
response.map {|response| obj = map.new() and obj.build_from_hash(response) }
|
response.map {|response| obj = map.new() and obj.build_from_hash(response) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Place an order for a pet
|
# Place an order for a pet
|
||||||
#
|
#
|
||||||
# @param [Hash] opts the optional parameters
|
# @param [Hash] opts the optional parameters
|
||||||
@ -78,6 +80,7 @@ module SwaggerClient
|
|||||||
obj = Order.new() and obj.build_from_hash(response)
|
obj = Order.new() and obj.build_from_hash(response)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Find purchase order by ID
|
# 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 order_id ID of pet that needs to be fetched
|
# @param order_id ID of pet that needs to be fetched
|
||||||
@ -118,6 +121,7 @@ module SwaggerClient
|
|||||||
obj = Order.new() and obj.build_from_hash(response)
|
obj = Order.new() and obj.build_from_hash(response)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Delete purchase order by ID
|
# Delete purchase order by ID
|
||||||
# For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
# For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
# @param order_id ID of the order that needs to be deleted
|
# @param order_id ID of the order that needs to be deleted
|
||||||
@ -157,5 +161,6 @@ module SwaggerClient
|
|||||||
Swagger::Request.new(:DELETE, path, {:params => query_params,:headers => header_params, :form_params => form_params, :body => post_body, :auth_names => auth_names}).make
|
Swagger::Request.new(:DELETE, path, {:params => query_params,:headers => header_params, :form_params => form_params, :body => post_body, :auth_names => auth_names}).make
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,6 +5,7 @@ module SwaggerClient
|
|||||||
basePath = "http://petstore.swagger.io/v2"
|
basePath = "http://petstore.swagger.io/v2"
|
||||||
# apiInvoker = APIInvoker
|
# apiInvoker = APIInvoker
|
||||||
|
|
||||||
|
|
||||||
# Create user
|
# Create user
|
||||||
# This can only be done by the logged in user.
|
# This can only be done by the logged in user.
|
||||||
# @param [Hash] opts the optional parameters
|
# @param [Hash] opts the optional parameters
|
||||||
@ -42,6 +43,7 @@ module SwaggerClient
|
|||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Creates list of users with given input array
|
# Creates list of users with given input array
|
||||||
#
|
#
|
||||||
# @param [Hash] opts the optional parameters
|
# @param [Hash] opts the optional parameters
|
||||||
@ -79,6 +81,7 @@ module SwaggerClient
|
|||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Creates list of users with given input array
|
# Creates list of users with given input array
|
||||||
#
|
#
|
||||||
# @param [Hash] opts the optional parameters
|
# @param [Hash] opts the optional parameters
|
||||||
@ -116,6 +119,7 @@ module SwaggerClient
|
|||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Logs user into the system
|
# Logs user into the system
|
||||||
#
|
#
|
||||||
# @param [Hash] opts the optional parameters
|
# @param [Hash] opts the optional parameters
|
||||||
@ -156,6 +160,7 @@ module SwaggerClient
|
|||||||
obj = string.new() and obj.build_from_hash(response)
|
obj = string.new() and obj.build_from_hash(response)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Logs out current logged in user session
|
# Logs out current logged in user session
|
||||||
#
|
#
|
||||||
# @param [Hash] opts the optional parameters
|
# @param [Hash] opts the optional parameters
|
||||||
@ -192,6 +197,7 @@ module SwaggerClient
|
|||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Get user by user name
|
# Get user by user name
|
||||||
#
|
#
|
||||||
# @param username The name that needs to be fetched. Use user1 for testing.
|
# @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
@ -232,6 +238,7 @@ module SwaggerClient
|
|||||||
obj = User.new() and obj.build_from_hash(response)
|
obj = User.new() and obj.build_from_hash(response)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Updated user
|
# Updated user
|
||||||
# This can only be done by the logged in user.
|
# This can only be done by the logged in user.
|
||||||
# @param username name that need to be deleted
|
# @param username name that need to be deleted
|
||||||
@ -273,6 +280,7 @@ module SwaggerClient
|
|||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Delete user
|
# Delete user
|
||||||
# This can only be done by the logged in user.
|
# This can only be done by the logged in user.
|
||||||
# @param username The name that needs to be deleted
|
# @param username The name that needs to be deleted
|
||||||
@ -312,5 +320,6 @@ module SwaggerClient
|
|||||||
Swagger::Request.new(:DELETE, path, {:params => query_params,:headers => header_params, :form_params => form_params, :body => post_body, :auth_names => auth_names}).make
|
Swagger::Request.new(:DELETE, path, {:params => query_params,:headers => header_params, :form_params => form_params, :body => post_body, :auth_names => auth_names}).make
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,13 +5,10 @@ module SwaggerClient
|
|||||||
# attribute mapping from ruby-style variable name to JSON key
|
# attribute mapping from ruby-style variable name to JSON key
|
||||||
def self.attribute_map
|
def self.attribute_map
|
||||||
{
|
{
|
||||||
|
|
||||||
#
|
#
|
||||||
:'id' => :'id',
|
:'id' => :'id',
|
||||||
|
|
||||||
#
|
#
|
||||||
:'name' => :'name'
|
:'name' => :'name'
|
||||||
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -20,7 +17,6 @@ module SwaggerClient
|
|||||||
{
|
{
|
||||||
:'id' => :'int',
|
:'id' => :'int',
|
||||||
:'name' => :'string'
|
:'name' => :'string'
|
||||||
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -30,15 +26,12 @@ module SwaggerClient
|
|||||||
# convert string to symbol for hash key
|
# convert string to symbol for hash key
|
||||||
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
||||||
|
|
||||||
|
|
||||||
if attributes[:'id']
|
if attributes[:'id']
|
||||||
@id = attributes[:'id']
|
@id = attributes[:'id']
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'name']
|
if attributes[:'name']
|
||||||
@name = attributes[:'name']
|
@name = attributes[:'name']
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,25 +5,18 @@ module SwaggerClient
|
|||||||
# attribute mapping from ruby-style variable name to JSON key
|
# attribute mapping from ruby-style variable name to JSON key
|
||||||
def self.attribute_map
|
def self.attribute_map
|
||||||
{
|
{
|
||||||
|
|
||||||
#
|
#
|
||||||
:'id' => :'id',
|
:'id' => :'id',
|
||||||
|
|
||||||
#
|
#
|
||||||
:'pet_id' => :'petId',
|
:'pet_id' => :'petId',
|
||||||
|
|
||||||
#
|
#
|
||||||
:'quantity' => :'quantity',
|
:'quantity' => :'quantity',
|
||||||
|
|
||||||
#
|
#
|
||||||
:'ship_date' => :'shipDate',
|
:'ship_date' => :'shipDate',
|
||||||
|
|
||||||
# Order Status
|
# Order Status
|
||||||
:'status' => :'status',
|
:'status' => :'status',
|
||||||
|
|
||||||
#
|
#
|
||||||
:'complete' => :'complete'
|
:'complete' => :'complete'
|
||||||
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -36,7 +29,6 @@ module SwaggerClient
|
|||||||
:'ship_date' => :'DateTime',
|
:'ship_date' => :'DateTime',
|
||||||
:'status' => :'string',
|
:'status' => :'string',
|
||||||
:'complete' => :'boolean'
|
:'complete' => :'boolean'
|
||||||
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -46,31 +38,24 @@ module SwaggerClient
|
|||||||
# convert string to symbol for hash key
|
# convert string to symbol for hash key
|
||||||
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
||||||
|
|
||||||
|
|
||||||
if attributes[:'id']
|
if attributes[:'id']
|
||||||
@id = attributes[:'id']
|
@id = attributes[:'id']
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'petId']
|
if attributes[:'petId']
|
||||||
@pet_id = attributes[:'petId']
|
@pet_id = attributes[:'petId']
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'quantity']
|
if attributes[:'quantity']
|
||||||
@quantity = attributes[:'quantity']
|
@quantity = attributes[:'quantity']
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'shipDate']
|
if attributes[:'shipDate']
|
||||||
@ship_date = attributes[:'shipDate']
|
@ship_date = attributes[:'shipDate']
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'status']
|
if attributes[:'status']
|
||||||
@status = attributes[:'status']
|
@status = attributes[:'status']
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'complete']
|
if attributes[:'complete']
|
||||||
@complete = attributes[:'complete']
|
@complete = attributes[:'complete']
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,25 +5,18 @@ module SwaggerClient
|
|||||||
# attribute mapping from ruby-style variable name to JSON key
|
# attribute mapping from ruby-style variable name to JSON key
|
||||||
def self.attribute_map
|
def self.attribute_map
|
||||||
{
|
{
|
||||||
|
|
||||||
#
|
#
|
||||||
:'id' => :'id',
|
:'id' => :'id',
|
||||||
|
|
||||||
#
|
#
|
||||||
:'category' => :'category',
|
:'category' => :'category',
|
||||||
|
|
||||||
#
|
#
|
||||||
:'name' => :'name',
|
:'name' => :'name',
|
||||||
|
|
||||||
#
|
#
|
||||||
:'photo_urls' => :'photoUrls',
|
:'photo_urls' => :'photoUrls',
|
||||||
|
|
||||||
#
|
#
|
||||||
:'tags' => :'tags',
|
:'tags' => :'tags',
|
||||||
|
|
||||||
# pet status in the store
|
# pet status in the store
|
||||||
:'status' => :'status'
|
:'status' => :'status'
|
||||||
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -36,7 +29,6 @@ module SwaggerClient
|
|||||||
:'photo_urls' => :'array[string]',
|
:'photo_urls' => :'array[string]',
|
||||||
:'tags' => :'array[Tag]',
|
:'tags' => :'array[Tag]',
|
||||||
:'status' => :'string'
|
:'status' => :'string'
|
||||||
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -46,35 +38,28 @@ module SwaggerClient
|
|||||||
# convert string to symbol for hash key
|
# convert string to symbol for hash key
|
||||||
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
||||||
|
|
||||||
|
|
||||||
if attributes[:'id']
|
if attributes[:'id']
|
||||||
@id = attributes[:'id']
|
@id = attributes[:'id']
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'category']
|
if attributes[:'category']
|
||||||
@category = attributes[:'category']
|
@category = attributes[:'category']
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'name']
|
if attributes[:'name']
|
||||||
@name = attributes[:'name']
|
@name = attributes[:'name']
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'photoUrls']
|
if attributes[:'photoUrls']
|
||||||
if (value = attributes[:'photoUrls']).is_a?(Array)
|
if (value = attributes[:'photoUrls']).is_a?(Array)
|
||||||
@photo_urls = value
|
@photo_urls = value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'tags']
|
if attributes[:'tags']
|
||||||
if (value = attributes[:'tags']).is_a?(Array)
|
if (value = attributes[:'tags']).is_a?(Array)
|
||||||
@tags = value
|
@tags = value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'status']
|
if attributes[:'status']
|
||||||
@status = attributes[:'status']
|
@status = attributes[:'status']
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,13 +5,10 @@ module SwaggerClient
|
|||||||
# attribute mapping from ruby-style variable name to JSON key
|
# attribute mapping from ruby-style variable name to JSON key
|
||||||
def self.attribute_map
|
def self.attribute_map
|
||||||
{
|
{
|
||||||
|
|
||||||
#
|
#
|
||||||
:'id' => :'id',
|
:'id' => :'id',
|
||||||
|
|
||||||
#
|
#
|
||||||
:'name' => :'name'
|
:'name' => :'name'
|
||||||
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -20,7 +17,6 @@ module SwaggerClient
|
|||||||
{
|
{
|
||||||
:'id' => :'int',
|
:'id' => :'int',
|
||||||
:'name' => :'string'
|
:'name' => :'string'
|
||||||
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -30,15 +26,12 @@ module SwaggerClient
|
|||||||
# convert string to symbol for hash key
|
# convert string to symbol for hash key
|
||||||
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
||||||
|
|
||||||
|
|
||||||
if attributes[:'id']
|
if attributes[:'id']
|
||||||
@id = attributes[:'id']
|
@id = attributes[:'id']
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'name']
|
if attributes[:'name']
|
||||||
@name = attributes[:'name']
|
@name = attributes[:'name']
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,31 +5,22 @@ module SwaggerClient
|
|||||||
# attribute mapping from ruby-style variable name to JSON key
|
# attribute mapping from ruby-style variable name to JSON key
|
||||||
def self.attribute_map
|
def self.attribute_map
|
||||||
{
|
{
|
||||||
|
|
||||||
#
|
#
|
||||||
:'id' => :'id',
|
:'id' => :'id',
|
||||||
|
|
||||||
#
|
#
|
||||||
:'username' => :'username',
|
:'username' => :'username',
|
||||||
|
|
||||||
#
|
#
|
||||||
:'first_name' => :'firstName',
|
:'first_name' => :'firstName',
|
||||||
|
|
||||||
#
|
#
|
||||||
:'last_name' => :'lastName',
|
:'last_name' => :'lastName',
|
||||||
|
|
||||||
#
|
#
|
||||||
:'email' => :'email',
|
:'email' => :'email',
|
||||||
|
|
||||||
#
|
#
|
||||||
:'password' => :'password',
|
:'password' => :'password',
|
||||||
|
|
||||||
#
|
#
|
||||||
:'phone' => :'phone',
|
:'phone' => :'phone',
|
||||||
|
|
||||||
# User Status
|
# User Status
|
||||||
:'user_status' => :'userStatus'
|
:'user_status' => :'userStatus'
|
||||||
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -44,7 +35,6 @@ module SwaggerClient
|
|||||||
:'password' => :'string',
|
:'password' => :'string',
|
||||||
:'phone' => :'string',
|
:'phone' => :'string',
|
||||||
:'user_status' => :'int'
|
:'user_status' => :'int'
|
||||||
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -54,39 +44,30 @@ module SwaggerClient
|
|||||||
# convert string to symbol for hash key
|
# convert string to symbol for hash key
|
||||||
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
||||||
|
|
||||||
|
|
||||||
if attributes[:'id']
|
if attributes[:'id']
|
||||||
@id = attributes[:'id']
|
@id = attributes[:'id']
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'username']
|
if attributes[:'username']
|
||||||
@username = attributes[:'username']
|
@username = attributes[:'username']
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'firstName']
|
if attributes[:'firstName']
|
||||||
@first_name = attributes[:'firstName']
|
@first_name = attributes[:'firstName']
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'lastName']
|
if attributes[:'lastName']
|
||||||
@last_name = attributes[:'lastName']
|
@last_name = attributes[:'lastName']
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'email']
|
if attributes[:'email']
|
||||||
@email = attributes[:'email']
|
@email = attributes[:'email']
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'password']
|
if attributes[:'password']
|
||||||
@password = attributes[:'password']
|
@password = attributes[:'password']
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'phone']
|
if attributes[:'phone']
|
||||||
@phone = attributes[:'phone']
|
@phone = attributes[:'phone']
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes[:'userStatus']
|
if attributes[:'userStatus']
|
||||||
@user_status = attributes[:'userStatus']
|
@user_status = attributes[:'userStatus']
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -45,7 +45,6 @@ module SwaggerClient
|
|||||||
@headers['api_key'] = get_api_key_with_prefix('api_key')
|
@headers['api_key'] = get_api_key_with_prefix('api_key')
|
||||||
when 'petstore_auth'
|
when 'petstore_auth'
|
||||||
# TODO: support oauth
|
# TODO: support oauth
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <FNet.h>
|
#include
|
||||||
|
<FNet.h>
|
||||||
|
|
||||||
#include "SamiHelpers.h"
|
#include "SamiHelpers.h"
|
||||||
#include "SamiError.h"
|
#include "SamiError.h"
|
||||||
@ -19,7 +20,8 @@ public:
|
|||||||
virtual ~SamiApiClient();
|
virtual ~SamiApiClient();
|
||||||
|
|
||||||
result
|
result
|
||||||
execute(String host, String path, String method, IMap* queryParams, String* body, IMap* headerParams, IMap* formParams, String contentType);
|
execute(String host, String path, String method, IMap* queryParams, String* body, IMap* headerParams, IMap*
|
||||||
|
formParams, String contentType);
|
||||||
|
|
||||||
void success(void (*res) (HttpResponse*, void (*cb)(void*, SamiError*)), void (*cb)(void*, SamiError*));
|
void success(void (*res) (HttpResponse*, void (*cb)(void*, SamiError*)), void (*cb)(void*, SamiError*));
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
#include "SamiCategory.h"
|
#include "SamiCategory.h"
|
||||||
#include <FLocales.h>
|
#include
|
||||||
|
<FLocales.h>
|
||||||
|
|
||||||
using namespace Tizen::Base;
|
using namespace Tizen::Base;
|
||||||
using namespace Tizen::System;
|
using namespace Tizen::System;
|
||||||
@ -158,6 +159,7 @@ SamiCategory::asJsonObject() {
|
|||||||
return pJsonObject;
|
return pJsonObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Long*
|
Long*
|
||||||
SamiCategory::getPId() {
|
SamiCategory::getPId() {
|
||||||
return pId;
|
return pId;
|
||||||
@ -167,6 +169,7 @@ SamiCategory::setPId(Long* pId) {
|
|||||||
this->pId = pId;
|
this->pId = pId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String*
|
String*
|
||||||
SamiCategory::getPName() {
|
SamiCategory::getPName() {
|
||||||
return pName;
|
return pName;
|
||||||
@ -178,5 +181,6 @@ SamiCategory::setPName(String* pName) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
|
@ -7,10 +7,14 @@
|
|||||||
#ifndef SamiCategory_H_
|
#ifndef SamiCategory_H_
|
||||||
#define SamiCategory_H_
|
#define SamiCategory_H_
|
||||||
|
|
||||||
#include <FApp.h>
|
#include
|
||||||
#include <FBase.h>
|
<FApp.h>
|
||||||
#include <FSystem.h>
|
#include
|
||||||
#include <FWebJson.h>
|
<FBase.h>
|
||||||
|
#include
|
||||||
|
<FSystem.h>
|
||||||
|
#include
|
||||||
|
<FWebJson.h>
|
||||||
#include "SamiHelpers.h"
|
#include "SamiHelpers.h"
|
||||||
#include "SamiObject.h"
|
#include "SamiObject.h"
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#ifndef SamiError_H_
|
#ifndef SamiError_H_
|
||||||
#define SamiError_H_
|
#define SamiError_H_
|
||||||
|
|
||||||
#include <FBase.h>
|
#include
|
||||||
|
<FBase.h>
|
||||||
|
|
||||||
using namespace Tizen::Base;
|
using namespace Tizen::Base;
|
||||||
|
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
#ifndef HELPERS_H_
|
#ifndef HELPERS_H_
|
||||||
#define HELPERS_H_
|
#define HELPERS_H_
|
||||||
|
|
||||||
#include <FApp.h>
|
#include
|
||||||
#include <FBase.h>
|
<FApp.h>
|
||||||
#include <FSystem.h>
|
#include
|
||||||
#include <FWebJson.h>
|
<FBase.h>
|
||||||
#include <FLocales.h>
|
#include
|
||||||
|
<FSystem.h>
|
||||||
|
#include
|
||||||
|
<FWebJson.h>
|
||||||
|
#include
|
||||||
|
<FLocales.h>
|
||||||
#include "SamiHelpers.h"
|
#include "SamiHelpers.h"
|
||||||
#include "SamiObject.h"
|
#include "SamiObject.h"
|
||||||
|
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
#ifndef _Sami_OBJECT_H_
|
#ifndef _Sami_OBJECT_H_
|
||||||
#define _Sami_OBJECT_H_
|
#define _Sami_OBJECT_H_
|
||||||
|
|
||||||
#include <FNet.h>
|
#include
|
||||||
#include <FWebJson.h>
|
<FNet.h>
|
||||||
#include <FBase.h>
|
#include
|
||||||
|
<FWebJson.h>
|
||||||
|
#include
|
||||||
|
<FBase.h>
|
||||||
|
|
||||||
using Tizen::Base::String;
|
using Tizen::Base::String;
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
#include "SamiOrder.h"
|
#include "SamiOrder.h"
|
||||||
#include <FLocales.h>
|
#include
|
||||||
|
<FLocales.h>
|
||||||
|
|
||||||
using namespace Tizen::Base;
|
using namespace Tizen::Base;
|
||||||
using namespace Tizen::System;
|
using namespace Tizen::System;
|
||||||
@ -234,6 +235,7 @@ SamiOrder::asJsonObject() {
|
|||||||
return pJsonObject;
|
return pJsonObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Long*
|
Long*
|
||||||
SamiOrder::getPId() {
|
SamiOrder::getPId() {
|
||||||
return pId;
|
return pId;
|
||||||
@ -243,6 +245,7 @@ SamiOrder::setPId(Long* pId) {
|
|||||||
this->pId = pId;
|
this->pId = pId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Long*
|
Long*
|
||||||
SamiOrder::getPPetId() {
|
SamiOrder::getPPetId() {
|
||||||
return pPetId;
|
return pPetId;
|
||||||
@ -252,6 +255,7 @@ SamiOrder::setPPetId(Long* pPetId) {
|
|||||||
this->pPetId = pPetId;
|
this->pPetId = pPetId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Integer*
|
Integer*
|
||||||
SamiOrder::getPQuantity() {
|
SamiOrder::getPQuantity() {
|
||||||
return pQuantity;
|
return pQuantity;
|
||||||
@ -261,6 +265,7 @@ SamiOrder::setPQuantity(Integer* pQuantity) {
|
|||||||
this->pQuantity = pQuantity;
|
this->pQuantity = pQuantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DateTime*
|
DateTime*
|
||||||
SamiOrder::getPShipDate() {
|
SamiOrder::getPShipDate() {
|
||||||
return pShipDate;
|
return pShipDate;
|
||||||
@ -270,6 +275,7 @@ SamiOrder::setPShipDate(DateTime* pShipDate) {
|
|||||||
this->pShipDate = pShipDate;
|
this->pShipDate = pShipDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String*
|
String*
|
||||||
SamiOrder::getPStatus() {
|
SamiOrder::getPStatus() {
|
||||||
return pStatus;
|
return pStatus;
|
||||||
@ -279,6 +285,7 @@ SamiOrder::setPStatus(String* pStatus) {
|
|||||||
this->pStatus = pStatus;
|
this->pStatus = pStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Boolean*
|
Boolean*
|
||||||
SamiOrder::getPComplete() {
|
SamiOrder::getPComplete() {
|
||||||
return pComplete;
|
return pComplete;
|
||||||
@ -290,5 +297,6 @@ SamiOrder::setPComplete(Boolean* pComplete) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
|
@ -7,10 +7,14 @@
|
|||||||
#ifndef SamiOrder_H_
|
#ifndef SamiOrder_H_
|
||||||
#define SamiOrder_H_
|
#define SamiOrder_H_
|
||||||
|
|
||||||
#include <FApp.h>
|
#include
|
||||||
#include <FBase.h>
|
<FApp.h>
|
||||||
#include <FSystem.h>
|
#include
|
||||||
#include <FWebJson.h>
|
<FBase.h>
|
||||||
|
#include
|
||||||
|
<FSystem.h>
|
||||||
|
#include
|
||||||
|
<FWebJson.h>
|
||||||
#include "SamiHelpers.h"
|
#include "SamiHelpers.h"
|
||||||
#include "SamiObject.h"
|
#include "SamiObject.h"
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
#include "SamiPet.h"
|
#include "SamiPet.h"
|
||||||
#include <FLocales.h>
|
#include
|
||||||
|
<FLocales.h>
|
||||||
|
|
||||||
using namespace Tizen::Base;
|
using namespace Tizen::Base;
|
||||||
using namespace Tizen::System;
|
using namespace Tizen::System;
|
||||||
@ -234,6 +235,7 @@ SamiPet::asJsonObject() {
|
|||||||
return pJsonObject;
|
return pJsonObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Long*
|
Long*
|
||||||
SamiPet::getPId() {
|
SamiPet::getPId() {
|
||||||
return pId;
|
return pId;
|
||||||
@ -243,6 +245,7 @@ SamiPet::setPId(Long* pId) {
|
|||||||
this->pId = pId;
|
this->pId = pId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SamiCategory*
|
SamiCategory*
|
||||||
SamiPet::getPCategory() {
|
SamiPet::getPCategory() {
|
||||||
return pCategory;
|
return pCategory;
|
||||||
@ -252,6 +255,7 @@ SamiPet::setPCategory(SamiCategory* pCategory) {
|
|||||||
this->pCategory = pCategory;
|
this->pCategory = pCategory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String*
|
String*
|
||||||
SamiPet::getPName() {
|
SamiPet::getPName() {
|
||||||
return pName;
|
return pName;
|
||||||
@ -261,6 +265,7 @@ SamiPet::setPName(String* pName) {
|
|||||||
this->pName = pName;
|
this->pName = pName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IList*
|
IList*
|
||||||
SamiPet::getPPhotoUrls() {
|
SamiPet::getPPhotoUrls() {
|
||||||
return pPhotoUrls;
|
return pPhotoUrls;
|
||||||
@ -270,6 +275,7 @@ SamiPet::setPPhotoUrls(IList* pPhotoUrls) {
|
|||||||
this->pPhotoUrls = pPhotoUrls;
|
this->pPhotoUrls = pPhotoUrls;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IList*
|
IList*
|
||||||
SamiPet::getPTags() {
|
SamiPet::getPTags() {
|
||||||
return pTags;
|
return pTags;
|
||||||
@ -279,6 +285,7 @@ SamiPet::setPTags(IList* pTags) {
|
|||||||
this->pTags = pTags;
|
this->pTags = pTags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String*
|
String*
|
||||||
SamiPet::getPStatus() {
|
SamiPet::getPStatus() {
|
||||||
return pStatus;
|
return pStatus;
|
||||||
@ -290,5 +297,6 @@ SamiPet::setPStatus(String* pStatus) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
|
@ -7,10 +7,14 @@
|
|||||||
#ifndef SamiPet_H_
|
#ifndef SamiPet_H_
|
||||||
#define SamiPet_H_
|
#define SamiPet_H_
|
||||||
|
|
||||||
#include <FApp.h>
|
#include
|
||||||
#include <FBase.h>
|
<FApp.h>
|
||||||
#include <FSystem.h>
|
#include
|
||||||
#include <FWebJson.h>
|
<FBase.h>
|
||||||
|
#include
|
||||||
|
<FSystem.h>
|
||||||
|
#include
|
||||||
|
<FWebJson.h>
|
||||||
#include "SamiHelpers.h"
|
#include "SamiHelpers.h"
|
||||||
#include "SamiObject.h"
|
#include "SamiObject.h"
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ SamiPetApi::~SamiPetApi() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
updatePetProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
updatePetProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -65,6 +66,7 @@ SamiPetApi::updatePetWithCompletion(SamiPet* body, void(*success)(SamiError*)) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
addPetProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
addPetProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -114,6 +116,7 @@ SamiPetApi::addPetWithCompletion(SamiPet* body, void(*success)(SamiError*)) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
findPetsByStatusProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
findPetsByStatusProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -183,6 +186,7 @@ SamiPetApi::findPetsByStatusWithCompletion(IList* status, void (* success)(IList
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
findPetsByTagsProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
findPetsByTagsProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -252,6 +256,7 @@ SamiPetApi::findPetsByTagsWithCompletion(IList* tags, void (* success)(IList*, S
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
getPetByIdProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
getPetByIdProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -319,6 +324,7 @@ SamiPetApi::getPetByIdWithCompletion(Long* petId, void (* success)(SamiPet*, Sam
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
updatePetWithFormProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
updatePetWithFormProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -365,6 +371,7 @@ SamiPetApi::updatePetWithFormWithCompletion(String* petId, String* name, String*
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
deletePetProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
deletePetProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -414,6 +421,7 @@ SamiPetApi::deletePetWithCompletion(String* apiKey, Long* petId, void(*success)(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
uploadFileProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
uploadFileProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -461,4 +469,5 @@ SamiPetApi::uploadFileWithCompletion(Long* petId, String* additionalMetadata, Sa
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#ifndef SamiPetApi_H_
|
#ifndef SamiPetApi_H_
|
||||||
#define SamiPetApi_H_
|
#define SamiPetApi_H_
|
||||||
|
|
||||||
#include <FNet.h>
|
#include
|
||||||
|
<FNet.h>
|
||||||
#include "SamiApiClient.h"
|
#include "SamiApiClient.h"
|
||||||
#include "SamiError.h"
|
#include "SamiError.h"
|
||||||
|
|
||||||
@ -10,10 +11,12 @@ using Tizen::Base::String;
|
|||||||
using Tizen::Base::Long;
|
using Tizen::Base::Long;
|
||||||
#include "SamiFile.h"
|
#include "SamiFile.h"
|
||||||
|
|
||||||
|
|
||||||
using namespace Tizen::Net::Http;
|
using namespace Tizen::Net::Http;
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
|
|
||||||
class SamiPetApi {
|
class SamiPetApi {
|
||||||
public:
|
public:
|
||||||
SamiPetApi();
|
SamiPetApi();
|
||||||
@ -27,22 +30,30 @@ public:
|
|||||||
addPetWithCompletion(SamiPet* body, void(* handler)(SamiError*));
|
addPetWithCompletion(SamiPet* body, void(* handler)(SamiError*));
|
||||||
|
|
||||||
IList*
|
IList*
|
||||||
findPetsByStatusWithCompletion(IList* status, void (* handler)(IList*, SamiError*));
|
findPetsByStatusWithCompletion(IList* status, void (* handler)(IList*
|
||||||
|
, SamiError*));
|
||||||
|
|
||||||
IList*
|
IList*
|
||||||
findPetsByTagsWithCompletion(IList* tags, void (* handler)(IList*, SamiError*));
|
findPetsByTagsWithCompletion(IList* tags, void (* handler)(IList*
|
||||||
|
, SamiError*));
|
||||||
|
|
||||||
SamiPet*
|
SamiPet*
|
||||||
getPetByIdWithCompletion(Long* petId, void (* handler)(SamiPet*, SamiError*));
|
getPetByIdWithCompletion(Long* petId, void (* handler)(SamiPet*
|
||||||
|
, SamiError*));
|
||||||
|
|
||||||
void
|
void
|
||||||
updatePetWithFormWithCompletion(String* petId, String* name, String* status, void(* handler)(SamiError*));
|
updatePetWithFormWithCompletion(String* petId
|
||||||
|
, String* name
|
||||||
|
, String* status, void(* handler)(SamiError*));
|
||||||
|
|
||||||
void
|
void
|
||||||
deletePetWithCompletion(String* apiKey, Long* petId, void(* handler)(SamiError*));
|
deletePetWithCompletion(String* apiKey
|
||||||
|
, Long* petId, void(* handler)(SamiError*));
|
||||||
|
|
||||||
void
|
void
|
||||||
uploadFileWithCompletion(Long* petId, String* additionalMetadata, SamiFile* file, void(* handler)(SamiError*));
|
uploadFileWithCompletion(Long* petId
|
||||||
|
, String* additionalMetadata
|
||||||
|
, SamiFile* file, void(* handler)(SamiError*));
|
||||||
|
|
||||||
static String getBasePath() {
|
static String getBasePath() {
|
||||||
return L"http://petstore.swagger.io/v2";
|
return L"http://petstore.swagger.io/v2";
|
||||||
@ -53,6 +64,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
#endif /* SamiPetApi_H_ */
|
#endif /* SamiPetApi_H_ */
|
||||||
|
@ -16,6 +16,7 @@ SamiStoreApi::~SamiStoreApi() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
getInventoryProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
getInventoryProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -78,6 +79,7 @@ SamiStoreApi::getInventoryWithCompletion( void (* success)(HashMap*, SamiError*)
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
placeOrderProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
placeOrderProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -148,6 +150,7 @@ SamiStoreApi::placeOrderWithCompletion(SamiOrder* body, void (* success)(SamiOrd
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
getOrderByIdProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
getOrderByIdProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -215,6 +218,7 @@ SamiStoreApi::getOrderByIdWithCompletion(String* orderId, void (* success)(SamiO
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
deleteOrderProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
deleteOrderProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||||
int code = pHttpResponse->GetHttpStatusCode();
|
int code = pHttpResponse->GetHttpStatusCode();
|
||||||
@ -262,4 +266,5 @@ SamiStoreApi::deleteOrderWithCompletion(String* orderId, void(*success)(SamiErro
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#ifndef SamiStoreApi_H_
|
#ifndef SamiStoreApi_H_
|
||||||
#define SamiStoreApi_H_
|
#define SamiStoreApi_H_
|
||||||
|
|
||||||
#include <FNet.h>
|
#include
|
||||||
|
<FNet.h>
|
||||||
#include "SamiApiClient.h"
|
#include "SamiApiClient.h"
|
||||||
#include "SamiError.h"
|
#include "SamiError.h"
|
||||||
|
|
||||||
@ -9,10 +10,12 @@ using Tizen::Base::Integer;
|
|||||||
#include "SamiOrder.h"
|
#include "SamiOrder.h"
|
||||||
using Tizen::Base::String;
|
using Tizen::Base::String;
|
||||||
|
|
||||||
|
|
||||||
using namespace Tizen::Net::Http;
|
using namespace Tizen::Net::Http;
|
||||||
|
|
||||||
namespace Swagger {
|
namespace Swagger {
|
||||||
|
|
||||||
|
|
||||||
class SamiStoreApi {
|
class SamiStoreApi {
|
||||||
public:
|
public:
|
||||||
SamiStoreApi();
|
SamiStoreApi();
|
||||||
@ -20,13 +23,16 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
HashMap*
|
HashMap*
|
||||||
getInventoryWithCompletion( void (* handler)(HashMap*, SamiError*));
|
getInventoryWithCompletion( void (* handler)(HashMap*
|
||||||
|
, SamiError*));
|
||||||
|
|
||||||
SamiOrder*
|
SamiOrder*
|
||||||
placeOrderWithCompletion(SamiOrder* body, void (* handler)(SamiOrder*, SamiError*));
|
placeOrderWithCompletion(SamiOrder* body, void (* handler)(SamiOrder*
|
||||||
|
, SamiError*));
|
||||||
|
|
||||||
SamiOrder*
|
SamiOrder*
|
||||||
getOrderByIdWithCompletion(String* orderId, void (* handler)(SamiOrder*, SamiError*));
|
getOrderByIdWithCompletion(String* orderId, void (* handler)(SamiOrder*
|
||||||
|
, SamiError*));
|
||||||
|
|
||||||
void
|
void
|
||||||
deleteOrderWithCompletion(String* orderId, void(* handler)(SamiError*));
|
deleteOrderWithCompletion(String* orderId, void(* handler)(SamiError*));
|
||||||
@ -40,6 +46,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
#endif /* SamiStoreApi_H_ */
|
#endif /* SamiStoreApi_H_ */
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
#include "SamiTag.h"
|
#include "SamiTag.h"
|
||||||
#include <FLocales.h>
|
#include
|
||||||
|
<FLocales.h>
|
||||||
|
|
||||||
using namespace Tizen::Base;
|
using namespace Tizen::Base;
|
||||||
using namespace Tizen::System;
|
using namespace Tizen::System;
|
||||||
@ -158,6 +159,7 @@ SamiTag::asJsonObject() {
|
|||||||
return pJsonObject;
|
return pJsonObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Long*
|
Long*
|
||||||
SamiTag::getPId() {
|
SamiTag::getPId() {
|
||||||
return pId;
|
return pId;
|
||||||
@ -167,6 +169,7 @@ SamiTag::setPId(Long* pId) {
|
|||||||
this->pId = pId;
|
this->pId = pId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String*
|
String*
|
||||||
SamiTag::getPName() {
|
SamiTag::getPName() {
|
||||||
return pName;
|
return pName;
|
||||||
@ -178,5 +181,6 @@ SamiTag::setPName(String* pName) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
|
@ -7,10 +7,14 @@
|
|||||||
#ifndef SamiTag_H_
|
#ifndef SamiTag_H_
|
||||||
#define SamiTag_H_
|
#define SamiTag_H_
|
||||||
|
|
||||||
#include <FApp.h>
|
#include
|
||||||
#include <FBase.h>
|
<FApp.h>
|
||||||
#include <FSystem.h>
|
#include
|
||||||
#include <FWebJson.h>
|
<FBase.h>
|
||||||
|
#include
|
||||||
|
<FSystem.h>
|
||||||
|
#include
|
||||||
|
<FWebJson.h>
|
||||||
#include "SamiHelpers.h"
|
#include "SamiHelpers.h"
|
||||||
#include "SamiObject.h"
|
#include "SamiObject.h"
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
#include "SamiUser.h"
|
#include "SamiUser.h"
|
||||||
#include <FLocales.h>
|
#include
|
||||||
|
<FLocales.h>
|
||||||
|
|
||||||
using namespace Tizen::Base;
|
using namespace Tizen::Base;
|
||||||
using namespace Tizen::System;
|
using namespace Tizen::System;
|
||||||
@ -272,6 +273,7 @@ SamiUser::asJsonObject() {
|
|||||||
return pJsonObject;
|
return pJsonObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Long*
|
Long*
|
||||||
SamiUser::getPId() {
|
SamiUser::getPId() {
|
||||||
return pId;
|
return pId;
|
||||||
@ -281,6 +283,7 @@ SamiUser::setPId(Long* pId) {
|
|||||||
this->pId = pId;
|
this->pId = pId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String*
|
String*
|
||||||
SamiUser::getPUsername() {
|
SamiUser::getPUsername() {
|
||||||
return pUsername;
|
return pUsername;
|
||||||
@ -290,6 +293,7 @@ SamiUser::setPUsername(String* pUsername) {
|
|||||||
this->pUsername = pUsername;
|
this->pUsername = pUsername;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String*
|
String*
|
||||||
SamiUser::getPFirstName() {
|
SamiUser::getPFirstName() {
|
||||||
return pFirstName;
|
return pFirstName;
|
||||||
@ -299,6 +303,7 @@ SamiUser::setPFirstName(String* pFirstName) {
|
|||||||
this->pFirstName = pFirstName;
|
this->pFirstName = pFirstName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String*
|
String*
|
||||||
SamiUser::getPLastName() {
|
SamiUser::getPLastName() {
|
||||||
return pLastName;
|
return pLastName;
|
||||||
@ -308,6 +313,7 @@ SamiUser::setPLastName(String* pLastName) {
|
|||||||
this->pLastName = pLastName;
|
this->pLastName = pLastName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String*
|
String*
|
||||||
SamiUser::getPEmail() {
|
SamiUser::getPEmail() {
|
||||||
return pEmail;
|
return pEmail;
|
||||||
@ -317,6 +323,7 @@ SamiUser::setPEmail(String* pEmail) {
|
|||||||
this->pEmail = pEmail;
|
this->pEmail = pEmail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String*
|
String*
|
||||||
SamiUser::getPPassword() {
|
SamiUser::getPPassword() {
|
||||||
return pPassword;
|
return pPassword;
|
||||||
@ -326,6 +333,7 @@ SamiUser::setPPassword(String* pPassword) {
|
|||||||
this->pPassword = pPassword;
|
this->pPassword = pPassword;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String*
|
String*
|
||||||
SamiUser::getPPhone() {
|
SamiUser::getPPhone() {
|
||||||
return pPhone;
|
return pPhone;
|
||||||
@ -335,6 +343,7 @@ SamiUser::setPPhone(String* pPhone) {
|
|||||||
this->pPhone = pPhone;
|
this->pPhone = pPhone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Integer*
|
Integer*
|
||||||
SamiUser::getPUserStatus() {
|
SamiUser::getPUserStatus() {
|
||||||
return pUserStatus;
|
return pUserStatus;
|
||||||
@ -346,5 +355,6 @@ SamiUser::setPUserStatus(Integer* pUserStatus) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Swagger */
|
} /* namespace Swagger */
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user