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 {
|
||||
|
||||
|
||||
public interface IPetApi {
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Update an existing pet
|
||||
/// </summary>
|
||||
/// <param name="Body">Pet object that needs to be added to the store</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">Pet object that needs to be added to the store</param>
|
||||
///
|
||||
<returns></returns>
|
||||
void UpdatePet (Pet Body);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Update an existing pet
|
||||
/// </summary>
|
||||
/// <param name="Body">Pet object that needs to be added to the store</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">Pet object that needs to be added to the store</param>
|
||||
///
|
||||
<returns></returns>
|
||||
Task UpdatePetAsync (Pet Body);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Add a new pet to the store
|
||||
/// </summary>
|
||||
/// <param name="Body">Pet object that needs to be added to the store</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">Pet object that needs to be added to the store</param>
|
||||
///
|
||||
<returns></returns>
|
||||
void AddPet (Pet Body);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Add a new pet to the store
|
||||
/// </summary>
|
||||
/// <param name="Body">Pet object that needs to be added to the store</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">Pet object that needs to be added to the store</param>
|
||||
///
|
||||
<returns></returns>
|
||||
Task AddPetAsync (Pet Body);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns>List<Pet></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Status">Status values that need to be considered for filter</param>
|
||||
///
|
||||
<returns>List<Pet></returns>
|
||||
List<Pet> FindPetsByStatus (List<string> Status);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns>List<Pet></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Status">Status values that need to be considered for filter</param>
|
||||
///
|
||||
<returns>List<Pet></returns>
|
||||
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.
|
||||
/// </summary>
|
||||
/// <param name="Tags">Tags to filter by</param>
|
||||
/// <returns>List<Pet></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Tags">Tags to filter by</param>
|
||||
///
|
||||
<returns>List<Pet></returns>
|
||||
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.
|
||||
/// </summary>
|
||||
/// <param name="Tags">Tags to filter by</param>
|
||||
/// <returns>List<Pet></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Tags">Tags to filter by</param>
|
||||
///
|
||||
<returns>List<Pet></returns>
|
||||
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
|
||||
/// </summary>
|
||||
/// <param name="PetId">ID of pet that needs to be fetched</param>
|
||||
/// <returns>Pet</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="PetId">ID of pet that needs to be fetched</param>
|
||||
///
|
||||
<returns>Pet</returns>
|
||||
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
|
||||
/// </summary>
|
||||
/// <param name="PetId">ID of pet that needs to be fetched</param>
|
||||
/// <returns>Pet</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="PetId">ID of pet that needs to be fetched</param>
|
||||
///
|
||||
<returns>Pet</returns>
|
||||
Task<Pet> GetPetByIdAsync (long? PetId);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</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>
|
||||
///
|
||||
<returns></returns>
|
||||
void UpdatePetWithForm (string PetId, string Name, string Status);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</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>
|
||||
///
|
||||
<returns></returns>
|
||||
Task UpdatePetWithFormAsync (string PetId, string Name, string Status);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Deletes a pet
|
||||
/// </summary>
|
||||
/// <param name="ApiKey"></param>/// <param name="PetId">Pet id to delete</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="ApiKey"></param>///
|
||||
<param name="PetId">Pet id to delete</param>
|
||||
///
|
||||
<returns></returns>
|
||||
void DeletePet (string ApiKey, long? PetId);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Deletes a pet
|
||||
/// </summary>
|
||||
/// <param name="ApiKey"></param>/// <param name="PetId">Pet id to delete</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="ApiKey"></param>///
|
||||
<param name="PetId">Pet id to delete</param>
|
||||
///
|
||||
<returns></returns>
|
||||
Task DeletePetAsync (string ApiKey, long? PetId);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</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>
|
||||
///
|
||||
<returns></returns>
|
||||
void UploadFile (long? PetId, string AdditionalMetadata, string File);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</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>
|
||||
///
|
||||
<returns></returns>
|
||||
Task UploadFileAsync (long? PetId, string AdditionalMetadata, string File);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
///
|
||||
</summary>
|
||||
public class PetApi : IPetApi {
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PetApi"/> class.
|
||||
/// </summary>
|
||||
/// <param name="apiClient"> an instance of ApiClient (optional)
|
||||
/// <returns></returns>
|
||||
///
|
||||
<summary>
|
||||
/// Initializes a new instance of the
|
||||
<see cref="PetApi"/>
|
||||
class.
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="apiClient"> an instance of ApiClient (optional)
|
||||
///
|
||||
<returns></returns>
|
||||
public PetApi(ApiClient apiClient = null) {
|
||||
if (apiClient == null) { // use the default one in Configuration
|
||||
this.apiClient = Configuration.apiClient;
|
||||
@ -142,44 +223,62 @@ namespace IO.Swagger.Api {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PetApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
///
|
||||
<summary>
|
||||
/// Initializes a new instance of the
|
||||
<see cref="PetApi"/>
|
||||
class.
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<returns></returns>
|
||||
public PetApi(String basePath)
|
||||
{
|
||||
this.apiClient = new ApiClient(basePath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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) {
|
||||
this.apiClient.basePath = basePath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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) {
|
||||
return this.apiClient.basePath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Gets or sets the API client.
|
||||
/// </summary>
|
||||
/// <value>The API client</value>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<value>The API client</value>
|
||||
public ApiClient apiClient {get; set;}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Update an existing pet
|
||||
/// </summary>
|
||||
/// <param name="Body">Pet object that needs to be added to the store</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">Pet object that needs to be added to the store</param>
|
||||
///
|
||||
<returns></returns>
|
||||
public void UpdatePet (Pet Body) {
|
||||
|
||||
|
||||
@ -188,10 +287,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -213,11 +316,15 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Update an existing pet
|
||||
/// </summary>
|
||||
/// <param name="Body">Pet object that needs to be added to the store</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">Pet object that needs to be added to the store</param>
|
||||
///
|
||||
<returns></returns>
|
||||
public async Task UpdatePetAsync (Pet Body) {
|
||||
|
||||
|
||||
@ -226,10 +333,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -250,11 +361,15 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Add a new pet to the store
|
||||
/// </summary>
|
||||
/// <param name="Body">Pet object that needs to be added to the store</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">Pet object that needs to be added to the store</param>
|
||||
///
|
||||
<returns></returns>
|
||||
public void AddPet (Pet Body) {
|
||||
|
||||
|
||||
@ -263,10 +378,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -288,11 +407,15 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Add a new pet to the store
|
||||
/// </summary>
|
||||
/// <param name="Body">Pet object that needs to be added to the store</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">Pet object that needs to be added to the store</param>
|
||||
///
|
||||
<returns></returns>
|
||||
public async Task AddPetAsync (Pet Body) {
|
||||
|
||||
|
||||
@ -301,10 +424,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -325,11 +452,15 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns>List<Pet></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Status">Status values that need to be considered for filter</param>
|
||||
///
|
||||
<returns>List<Pet></returns>
|
||||
public List<Pet> FindPetsByStatus (List<string> Status) {
|
||||
|
||||
|
||||
@ -338,10 +469,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
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>));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns>List<Pet></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<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) {
|
||||
|
||||
|
||||
@ -375,10 +514,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
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>));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns>List<Pet></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Tags">Tags to filter by</param>
|
||||
///
|
||||
<returns>List<Pet></returns>
|
||||
public List<Pet> FindPetsByTags (List<string> Tags) {
|
||||
|
||||
|
||||
@ -411,10 +558,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
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>));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns>List<Pet></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Tags">Tags to filter by</param>
|
||||
///
|
||||
<returns>List<Pet></returns>
|
||||
public async Task<List<Pet>> FindPetsByTagsAsync (List<string> Tags) {
|
||||
|
||||
|
||||
@ -448,10 +603,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
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>));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns>Pet</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="PetId">ID of pet that needs to be fetched</param>
|
||||
///
|
||||
<returns>Pet</returns>
|
||||
public Pet GetPetById (long? PetId) {
|
||||
|
||||
|
||||
@ -488,10 +651,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -511,11 +678,15 @@ namespace IO.Swagger.Api {
|
||||
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
|
||||
/// </summary>
|
||||
/// <param name="PetId">ID of pet that needs to be fetched</param>
|
||||
/// <returns>Pet</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="PetId">ID of pet that needs to be fetched</param>
|
||||
///
|
||||
<returns>Pet</returns>
|
||||
public async Task<Pet> GetPetByIdAsync (long? PetId) {
|
||||
|
||||
|
||||
@ -528,10 +699,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -550,11 +725,17 @@ namespace IO.Swagger.Api {
|
||||
return (Pet) ApiInvoker.Deserialize(response.Content, typeof(Pet));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</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>
|
||||
///
|
||||
<returns></returns>
|
||||
public void UpdatePetWithForm (string PetId, string Name, string Status) {
|
||||
|
||||
|
||||
@ -567,10 +748,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -593,11 +778,17 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</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>
|
||||
///
|
||||
<returns></returns>
|
||||
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));
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -635,11 +830,16 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Deletes a pet
|
||||
/// </summary>
|
||||
/// <param name="ApiKey"></param>/// <param name="PetId">Pet id to delete</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="ApiKey"></param>///
|
||||
<param name="PetId">Pet id to delete</param>
|
||||
///
|
||||
<returns></returns>
|
||||
public void DeletePet (string ApiKey, long? PetId) {
|
||||
|
||||
|
||||
@ -652,10 +852,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -677,11 +881,16 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Deletes a pet
|
||||
/// </summary>
|
||||
/// <param name="ApiKey"></param>/// <param name="PetId">Pet id to delete</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="ApiKey"></param>///
|
||||
<param name="PetId">Pet id to delete</param>
|
||||
///
|
||||
<returns></returns>
|
||||
public async Task DeletePetAsync (string ApiKey, long? PetId) {
|
||||
|
||||
|
||||
@ -694,10 +903,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -718,11 +931,17 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</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>
|
||||
///
|
||||
<returns></returns>
|
||||
public void UploadFile (long? PetId, string AdditionalMetadata, string File) {
|
||||
|
||||
|
||||
@ -735,10 +954,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{" + "petId" + "}", apiClient.ParameterToString(PetId));
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -761,11 +984,17 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</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>
|
||||
///
|
||||
<returns></returns>
|
||||
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));
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -804,5 +1037,4 @@ namespace IO.Swagger.Api {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,77 +7,114 @@ using IO.Swagger.Model;
|
||||
|
||||
namespace IO.Swagger.Api {
|
||||
|
||||
|
||||
public interface IStoreApi {
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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 ();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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 ();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Place an order for a pet
|
||||
/// </summary>
|
||||
/// <param name="Body">order placed for purchasing the pet</param>
|
||||
/// <returns>Order</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">order placed for purchasing the pet</param>
|
||||
///
|
||||
<returns>Order</returns>
|
||||
Order PlaceOrder (Order Body);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Place an order for a pet
|
||||
/// </summary>
|
||||
/// <param name="Body">order placed for purchasing the pet</param>
|
||||
/// <returns>Order</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">order placed for purchasing the pet</param>
|
||||
///
|
||||
<returns>Order</returns>
|
||||
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
|
||||
/// </summary>
|
||||
/// <param name="OrderId">ID of pet that needs to be fetched</param>
|
||||
/// <returns>Order</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="OrderId">ID of pet that needs to be fetched</param>
|
||||
///
|
||||
<returns>Order</returns>
|
||||
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
|
||||
/// </summary>
|
||||
/// <param name="OrderId">ID of pet that needs to be fetched</param>
|
||||
/// <returns>Order</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="OrderId">ID of pet that needs to be fetched</param>
|
||||
///
|
||||
<returns>Order</returns>
|
||||
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
|
||||
/// </summary>
|
||||
/// <param name="OrderId">ID of the order that needs to be deleted</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="OrderId">ID of the order that needs to be deleted</param>
|
||||
///
|
||||
<returns></returns>
|
||||
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
|
||||
/// </summary>
|
||||
/// <param name="OrderId">ID of the order that needs to be deleted</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="OrderId">ID of the order that needs to be deleted</param>
|
||||
///
|
||||
<returns></returns>
|
||||
Task DeleteOrderAsync (string OrderId);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
///
|
||||
</summary>
|
||||
public class StoreApi : IStoreApi {
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StoreApi"/> class.
|
||||
/// </summary>
|
||||
/// <param name="apiClient"> an instance of ApiClient (optional)
|
||||
/// <returns></returns>
|
||||
///
|
||||
<summary>
|
||||
/// Initializes a new instance of the
|
||||
<see cref="StoreApi"/>
|
||||
class.
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="apiClient"> an instance of ApiClient (optional)
|
||||
///
|
||||
<returns></returns>
|
||||
public StoreApi(ApiClient apiClient = null) {
|
||||
if (apiClient == null) { // use the default one in Configuration
|
||||
this.apiClient = Configuration.apiClient;
|
||||
@ -86,44 +123,61 @@ namespace IO.Swagger.Api {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StoreApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
///
|
||||
<summary>
|
||||
/// Initializes a new instance of the
|
||||
<see cref="StoreApi"/>
|
||||
class.
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<returns></returns>
|
||||
public StoreApi(String basePath)
|
||||
{
|
||||
this.apiClient = new ApiClient(basePath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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) {
|
||||
this.apiClient.basePath = basePath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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) {
|
||||
return this.apiClient.basePath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Gets or sets the API client.
|
||||
/// </summary>
|
||||
/// <value>The API client</value>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<value>The API client</value>
|
||||
public ApiClient apiClient {get; set;}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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 () {
|
||||
|
||||
|
||||
@ -132,10 +186,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -155,11 +213,14 @@ namespace IO.Swagger.Api {
|
||||
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
|
||||
/// </summary>
|
||||
///
|
||||
</summary>
|
||||
|
||||
/// <returns>Dictionary<String, int?></returns>
|
||||
///
|
||||
<returns>Dictionary<String, int?></returns>
|
||||
public async Task<Dictionary<String, int?>> GetInventoryAsync () {
|
||||
|
||||
|
||||
@ -168,10 +229,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -190,11 +255,15 @@ namespace IO.Swagger.Api {
|
||||
return (Dictionary<String, int?>) ApiInvoker.Deserialize(response.Content, typeof(Dictionary<String, int?>));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Place an order for a pet
|
||||
/// </summary>
|
||||
/// <param name="Body">order placed for purchasing the pet</param>
|
||||
/// <returns>Order</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">order placed for purchasing the pet</param>
|
||||
///
|
||||
<returns>Order</returns>
|
||||
public Order PlaceOrder (Order Body) {
|
||||
|
||||
|
||||
@ -203,10 +272,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -227,11 +300,15 @@ namespace IO.Swagger.Api {
|
||||
return (Order) apiClient.Deserialize(response.Content, typeof(Order));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Place an order for a pet
|
||||
/// </summary>
|
||||
/// <param name="Body">order placed for purchasing the pet</param>
|
||||
/// <returns>Order</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">order placed for purchasing the pet</param>
|
||||
///
|
||||
<returns>Order</returns>
|
||||
public async Task<Order> PlaceOrderAsync (Order Body) {
|
||||
|
||||
|
||||
@ -240,10 +317,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -263,11 +344,15 @@ namespace IO.Swagger.Api {
|
||||
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
|
||||
/// </summary>
|
||||
/// <param name="OrderId">ID of pet that needs to be fetched</param>
|
||||
/// <returns>Order</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="OrderId">ID of pet that needs to be fetched</param>
|
||||
///
|
||||
<returns>Order</returns>
|
||||
public Order GetOrderById (string OrderId) {
|
||||
|
||||
|
||||
@ -280,10 +365,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{" + "orderId" + "}", apiClient.ParameterToString(OrderId));
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -303,11 +392,15 @@ namespace IO.Swagger.Api {
|
||||
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
|
||||
/// </summary>
|
||||
/// <param name="OrderId">ID of pet that needs to be fetched</param>
|
||||
/// <returns>Order</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="OrderId">ID of pet that needs to be fetched</param>
|
||||
///
|
||||
<returns>Order</returns>
|
||||
public async Task<Order> GetOrderByIdAsync (string OrderId) {
|
||||
|
||||
|
||||
@ -320,10 +413,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{" + "orderId" + "}", apiClient.ParameterToString(OrderId));
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -342,11 +439,15 @@ namespace IO.Swagger.Api {
|
||||
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
|
||||
/// </summary>
|
||||
/// <param name="OrderId">ID of the order that needs to be deleted</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="OrderId">ID of the order that needs to be deleted</param>
|
||||
///
|
||||
<returns></returns>
|
||||
public void DeleteOrder (string OrderId) {
|
||||
|
||||
|
||||
@ -359,10 +460,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{" + "orderId" + "}", apiClient.ParameterToString(OrderId));
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -383,11 +488,15 @@ namespace IO.Swagger.Api {
|
||||
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
|
||||
/// </summary>
|
||||
/// <param name="OrderId">ID of the order that needs to be deleted</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="OrderId">ID of the order that needs to be deleted</param>
|
||||
///
|
||||
<returns></returns>
|
||||
public async Task DeleteOrderAsync (string OrderId) {
|
||||
|
||||
|
||||
@ -400,10 +509,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{" + "orderId" + "}", apiClient.ParameterToString(OrderId));
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -424,5 +537,4 @@ namespace IO.Swagger.Api {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,133 +7,206 @@ using IO.Swagger.Model;
|
||||
|
||||
namespace IO.Swagger.Api {
|
||||
|
||||
|
||||
public interface IUserApi {
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Create user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="Body">Created user object</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">Created user object</param>
|
||||
///
|
||||
<returns></returns>
|
||||
void CreateUser (User Body);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Create user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="Body">Created user object</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">Created user object</param>
|
||||
///
|
||||
<returns></returns>
|
||||
Task CreateUserAsync (User Body);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <param name="Body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">List of user object</param>
|
||||
///
|
||||
<returns></returns>
|
||||
void CreateUsersWithArrayInput (List<User> Body);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <param name="Body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">List of user object</param>
|
||||
///
|
||||
<returns></returns>
|
||||
Task CreateUsersWithArrayInputAsync (List<User> Body);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <param name="Body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">List of user object</param>
|
||||
///
|
||||
<returns></returns>
|
||||
void CreateUsersWithListInput (List<User> Body);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <param name="Body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">List of user object</param>
|
||||
///
|
||||
<returns></returns>
|
||||
Task CreateUsersWithListInputAsync (List<User> Body);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns>string</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<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);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns>string</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<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);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Logs out current logged in user session
|
||||
/// </summary>
|
||||
///
|
||||
</summary>
|
||||
|
||||
/// <returns></returns>
|
||||
///
|
||||
<returns></returns>
|
||||
void LogoutUser ();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Logs out current logged in user session
|
||||
/// </summary>
|
||||
///
|
||||
</summary>
|
||||
|
||||
/// <returns></returns>
|
||||
///
|
||||
<returns></returns>
|
||||
Task LogoutUserAsync ();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Get user by user name
|
||||
/// </summary>
|
||||
/// <param name="Username">The name that needs to be fetched. Use user1 for testing. </param>
|
||||
/// <returns>User</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Username">The name that needs to be fetched. Use user1 for testing. </param>
|
||||
///
|
||||
<returns>User</returns>
|
||||
User GetUserByName (string Username);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Get user by user name
|
||||
/// </summary>
|
||||
/// <param name="Username">The name that needs to be fetched. Use user1 for testing. </param>
|
||||
/// <returns>User</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Username">The name that needs to be fetched. Use user1 for testing. </param>
|
||||
///
|
||||
<returns>User</returns>
|
||||
Task<User> GetUserByNameAsync (string Username);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<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);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<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);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Delete user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="Username">The name that needs to be deleted</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Username">The name that needs to be deleted</param>
|
||||
///
|
||||
<returns></returns>
|
||||
void DeleteUser (string Username);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Delete user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="Username">The name that needs to be deleted</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Username">The name that needs to be deleted</param>
|
||||
///
|
||||
<returns></returns>
|
||||
Task DeleteUserAsync (string Username);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
///
|
||||
</summary>
|
||||
public class UserApi : IUserApi {
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UserApi"/> class.
|
||||
/// </summary>
|
||||
/// <param name="apiClient"> an instance of ApiClient (optional)
|
||||
/// <returns></returns>
|
||||
///
|
||||
<summary>
|
||||
/// Initializes a new instance of the
|
||||
<see cref="UserApi"/>
|
||||
class.
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="apiClient"> an instance of ApiClient (optional)
|
||||
///
|
||||
<returns></returns>
|
||||
public UserApi(ApiClient apiClient = null) {
|
||||
if (apiClient == null) { // use the default one in Configuration
|
||||
this.apiClient = Configuration.apiClient;
|
||||
@ -142,44 +215,62 @@ namespace IO.Swagger.Api {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UserApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
///
|
||||
<summary>
|
||||
/// Initializes a new instance of the
|
||||
<see cref="UserApi"/>
|
||||
class.
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<returns></returns>
|
||||
public UserApi(String basePath)
|
||||
{
|
||||
this.apiClient = new ApiClient(basePath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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) {
|
||||
this.apiClient.basePath = basePath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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) {
|
||||
return this.apiClient.basePath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Gets or sets the API client.
|
||||
/// </summary>
|
||||
/// <value>The API client</value>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<value>The API client</value>
|
||||
public ApiClient apiClient {get; set;}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Create user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="Body">Created user object</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">Created user object</param>
|
||||
///
|
||||
<returns></returns>
|
||||
public void CreateUser (User Body) {
|
||||
|
||||
|
||||
@ -188,10 +279,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -213,11 +308,15 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Create user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="Body">Created user object</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">Created user object</param>
|
||||
///
|
||||
<returns></returns>
|
||||
public async Task CreateUserAsync (User Body) {
|
||||
|
||||
|
||||
@ -226,10 +325,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -250,11 +353,15 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <param name="Body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">List of user object</param>
|
||||
///
|
||||
<returns></returns>
|
||||
public void CreateUsersWithArrayInput (List<User> Body) {
|
||||
|
||||
|
||||
@ -263,10 +370,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -288,11 +399,15 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <param name="Body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">List of user object</param>
|
||||
///
|
||||
<returns></returns>
|
||||
public async Task CreateUsersWithArrayInputAsync (List<User> Body) {
|
||||
|
||||
|
||||
@ -301,10 +416,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -325,11 +444,15 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <param name="Body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">List of user object</param>
|
||||
///
|
||||
<returns></returns>
|
||||
public void CreateUsersWithListInput (List<User> Body) {
|
||||
|
||||
|
||||
@ -338,10 +461,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -363,11 +490,15 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <param name="Body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Body">List of user object</param>
|
||||
///
|
||||
<returns></returns>
|
||||
public async Task CreateUsersWithListInputAsync (List<User> Body) {
|
||||
|
||||
|
||||
@ -376,10 +507,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -400,11 +535,16 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns>string</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<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) {
|
||||
|
||||
|
||||
@ -413,10 +553,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns>string</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<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) {
|
||||
|
||||
|
||||
@ -451,10 +600,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Logs out current logged in user session
|
||||
/// </summary>
|
||||
///
|
||||
</summary>
|
||||
|
||||
/// <returns></returns>
|
||||
///
|
||||
<returns></returns>
|
||||
public void LogoutUser () {
|
||||
|
||||
|
||||
@ -488,10 +644,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -512,11 +672,14 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Logs out current logged in user session
|
||||
/// </summary>
|
||||
///
|
||||
</summary>
|
||||
|
||||
/// <returns></returns>
|
||||
///
|
||||
<returns></returns>
|
||||
public async Task LogoutUserAsync () {
|
||||
|
||||
|
||||
@ -525,10 +688,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{format}", "json");
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -548,11 +715,15 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Get user by user name
|
||||
/// </summary>
|
||||
/// <param name="Username">The name that needs to be fetched. Use user1 for testing. </param>
|
||||
/// <returns>User</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Username">The name that needs to be fetched. Use user1 for testing. </param>
|
||||
///
|
||||
<returns>User</returns>
|
||||
public User GetUserByName (string Username) {
|
||||
|
||||
|
||||
@ -565,10 +736,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{" + "username" + "}", apiClient.ParameterToString(Username));
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -588,11 +763,15 @@ namespace IO.Swagger.Api {
|
||||
return (User) apiClient.Deserialize(response.Content, typeof(User));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Get user by user name
|
||||
/// </summary>
|
||||
/// <param name="Username">The name that needs to be fetched. Use user1 for testing. </param>
|
||||
/// <returns>User</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<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) {
|
||||
|
||||
|
||||
@ -605,10 +784,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{" + "username" + "}", apiClient.ParameterToString(Username));
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -627,11 +810,16 @@ namespace IO.Swagger.Api {
|
||||
return (User) ApiInvoker.Deserialize(response.Content, typeof(User));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<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) {
|
||||
|
||||
|
||||
@ -644,10 +832,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{" + "username" + "}", apiClient.ParameterToString(Username));
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -669,11 +861,16 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<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) {
|
||||
|
||||
|
||||
@ -686,10 +883,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{" + "username" + "}", apiClient.ParameterToString(Username));
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -710,11 +911,15 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Delete user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="Username">The name that needs to be deleted</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Username">The name that needs to be deleted</param>
|
||||
///
|
||||
<returns></returns>
|
||||
public void DeleteUser (string Username) {
|
||||
|
||||
|
||||
@ -727,10 +932,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{" + "username" + "}", apiClient.ParameterToString(Username));
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -751,11 +960,15 @@ namespace IO.Swagger.Api {
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Delete user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="Username">The name that needs to be deleted</param>
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="Username">The name that needs to be deleted</param>
|
||||
///
|
||||
<returns></returns>
|
||||
public async Task DeleteUserAsync (string Username) {
|
||||
|
||||
|
||||
@ -768,10 +981,14 @@ namespace IO.Swagger.Api {
|
||||
path = path.Replace("{" + "username" + "}", apiClient.ParameterToString(Username));
|
||||
|
||||
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary
|
||||
<String, String>();
|
||||
var headerParams = new Dictionary
|
||||
<String, String>();
|
||||
var formParams = new Dictionary
|
||||
<String, String>();
|
||||
var fileParams = new Dictionary
|
||||
<String, String>();
|
||||
String postBody = null;
|
||||
|
||||
|
||||
@ -792,5 +1009,4 @@ namespace IO.Swagger.Api {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,11 +5,14 @@ using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
namespace IO.Swagger.Model {
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
<summary>
|
||||
///
|
||||
///
|
||||
</summary>
|
||||
[DataContract]
|
||||
public class Category {
|
||||
|
||||
@ -24,10 +27,13 @@ namespace IO.Swagger.Model {
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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() {
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Category {\n");
|
||||
@ -40,15 +46,17 @@ namespace IO.Swagger.Model {
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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() {
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -5,11 +5,14 @@ using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
namespace IO.Swagger.Model {
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
<summary>
|
||||
///
|
||||
///
|
||||
</summary>
|
||||
[DataContract]
|
||||
public class Order {
|
||||
|
||||
@ -44,10 +47,13 @@ namespace IO.Swagger.Model {
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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() {
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Order {\n");
|
||||
@ -68,15 +74,17 @@ namespace IO.Swagger.Model {
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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() {
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -5,11 +5,14 @@ using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
namespace IO.Swagger.Model {
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
<summary>
|
||||
///
|
||||
///
|
||||
</summary>
|
||||
[DataContract]
|
||||
public class Pet {
|
||||
|
||||
@ -44,10 +47,13 @@ namespace IO.Swagger.Model {
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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() {
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Pet {\n");
|
||||
@ -68,15 +74,17 @@ namespace IO.Swagger.Model {
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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() {
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -5,11 +5,14 @@ using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
namespace IO.Swagger.Model {
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
<summary>
|
||||
///
|
||||
///
|
||||
</summary>
|
||||
[DataContract]
|
||||
public class Tag {
|
||||
|
||||
@ -24,10 +27,13 @@ namespace IO.Swagger.Model {
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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() {
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Tag {\n");
|
||||
@ -40,15 +46,17 @@ namespace IO.Swagger.Model {
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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() {
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -5,11 +5,14 @@ using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
namespace IO.Swagger.Model {
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
<summary>
|
||||
///
|
||||
///
|
||||
</summary>
|
||||
[DataContract]
|
||||
public class User {
|
||||
|
||||
@ -54,10 +57,13 @@ namespace IO.Swagger.Model {
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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() {
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class User {\n");
|
||||
@ -82,15 +88,17 @@ namespace IO.Swagger.Model {
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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() {
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -9,36 +9,55 @@ using Newtonsoft.Json;
|
||||
using RestSharp;
|
||||
|
||||
namespace IO.Swagger.Client {
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// API client is mainly responible for making the HTTP call to the API backend
|
||||
/// </summary>
|
||||
///
|
||||
</summary>
|
||||
public class ApiClient {
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApiClient"/> class.
|
||||
/// </summary>
|
||||
/// <param name="basePath">The base path.</param>
|
||||
///
|
||||
<summary>
|
||||
/// Initializes a new instance of the
|
||||
<see cref="ApiClient"/>
|
||||
class.
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="basePath">The base path.</param>
|
||||
public ApiClient(String basePath="http://petstore.swagger.io/v2") {
|
||||
this.basePath = basePath;
|
||||
this.restClient = new RestClient(this.basePath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Gets or sets the base path.
|
||||
/// </summary>
|
||||
/// <value>The base path.</value>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<value>The base path.</value>
|
||||
public string basePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Gets or sets the RestClient
|
||||
/// </summary>
|
||||
/// <value>The RestClient.</value>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<value>The RestClient.</value>
|
||||
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,
|
||||
Dictionary<String, String> HeaderParams, Dictionary<String, String> FormParams, Dictionary<String, String> FileParams, String[] AuthSettings) {
|
||||
public Object CallApi(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 response = Task.Run(async () => {
|
||||
var resp = await CallApiAsync(Path, Method, QueryParams, PostBody, HeaderParams, FormParams, FileParams, AuthSettings);
|
||||
return resp;
|
||||
@ -46,31 +65,50 @@ namespace IO.Swagger.Client {
|
||||
return response.Result;
|
||||
}
|
||||
|
||||
public async Task<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) {
|
||||
public async Task
|
||||
<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);
|
||||
|
||||
UpdateParamsForAuth(QueryParams, HeaderParams, AuthSettings);
|
||||
|
||||
// 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);
|
||||
|
||||
// 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);
|
||||
|
||||
// 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);
|
||||
|
||||
// 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);
|
||||
|
||||
// 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);
|
||||
|
||||
if (PostBody != null) {
|
||||
@ -81,57 +119,88 @@ namespace IO.Swagger.Client {
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Add default header
|
||||
/// </summary>
|
||||
/// <param name="key"> Header field name
|
||||
/// <param name="value"> Header field value
|
||||
/// <returns></returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="key">
|
||||
Header field name
|
||||
///
|
||||
<param name="value">
|
||||
Header field value
|
||||
///
|
||||
<returns></returns>
|
||||
public void AddDefaultHeader(string key, string value) {
|
||||
defaultHeaderMap.Add(key, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Get default header
|
||||
/// </summary>
|
||||
/// <returns>Dictionary of default header</returns>
|
||||
public Dictionary<String, String> GetDefaultHeader() {
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<returns>Dictionary of default header</returns>
|
||||
public Dictionary
|
||||
<String
|
||||
, String> GetDefaultHeader() {
|
||||
return defaultHeaderMap;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// escape string (url-encoded)
|
||||
/// </summary>
|
||||
/// <param name="str"> String to be escaped
|
||||
/// <returns>Escaped string</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="str">
|
||||
String to be escaped
|
||||
///
|
||||
<returns>Escaped string</returns>
|
||||
public string EscapeString(string str) {
|
||||
return str;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// if parameter is DateTime, output in ISO8601 format
|
||||
/// if parameter is a list of string, join the list with ","
|
||||
/// otherwise just return the string
|
||||
/// </summary>
|
||||
/// <param name="obj"> The parameter (header, path, query, form)
|
||||
/// <returns>Formatted string</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="obj">
|
||||
The parameter (header, path, query, form)
|
||||
///
|
||||
<returns>Formatted string</returns>
|
||||
public string ParameterToString(object obj)
|
||||
{
|
||||
if (obj is DateTime) {
|
||||
return ((DateTime)obj).ToString ("u");
|
||||
} else if (obj is List<string>) {
|
||||
return String.Join(",", obj as List<string>);
|
||||
} else if (obj is List
|
||||
<string>) {
|
||||
return String.Join(",", obj as List
|
||||
<string>);
|
||||
} else {
|
||||
return Convert.ToString (obj);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Deserialize the JSON string into a proper object
|
||||
/// </summary>
|
||||
/// <param name="json"> JSON string
|
||||
/// <param name="type"> Object type
|
||||
/// <returns>Object representation of the JSON string</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<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) {
|
||||
if (type.GetType() == typeof(Object))
|
||||
return (Object)content;
|
||||
@ -145,11 +214,16 @@ namespace IO.Swagger.Client {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Serialize an object into JSON string
|
||||
/// </summary>
|
||||
/// <param name="obj"> Object
|
||||
/// <returns>JSON string</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="obj">
|
||||
Object
|
||||
///
|
||||
<returns>JSON string</returns>
|
||||
public string Serialize(object obj) {
|
||||
try
|
||||
{
|
||||
@ -160,11 +234,16 @@ namespace IO.Swagger.Client {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Get the API key with prefix
|
||||
/// </summary>
|
||||
/// <param name="obj"> Object
|
||||
/// <returns>API key with prefix</returns>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="obj">
|
||||
Object
|
||||
///
|
||||
<returns>API key with prefix</returns>
|
||||
public string GetApiKeyWithPrefix (string apiKey)
|
||||
{
|
||||
var apiKeyValue = "";
|
||||
@ -177,13 +256,25 @@ namespace IO.Swagger.Client {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Update parameters based on authentication
|
||||
/// </summary>
|
||||
/// <param name="QueryParams">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) {
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="QueryParams">
|
||||
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)
|
||||
return;
|
||||
|
||||
@ -192,7 +283,8 @@ namespace IO.Swagger.Client {
|
||||
switch(auth) {
|
||||
|
||||
case "api_key":
|
||||
HeaderParams["api_key"] = GetApiKeyWithPrefix("api_key");
|
||||
HeaderParams["api_key"] = GetApiKeyWithPrefix("api_key
|
||||
");
|
||||
|
||||
break;
|
||||
|
||||
@ -209,10 +301,14 @@ namespace IO.Swagger.Client {
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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) {
|
||||
var textByte = System.Text.Encoding.UTF8.GetBytes(text);
|
||||
return System.Convert.ToBase64String(textByte);
|
||||
|
@ -1,33 +1,52 @@
|
||||
using System;
|
||||
|
||||
namespace IO.Swagger.Client {
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// API Exception
|
||||
/// </summary>
|
||||
///
|
||||
</summary>
|
||||
public class ApiException : Exception {
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApiException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="basePath">The base path.</param>
|
||||
///
|
||||
<summary>
|
||||
/// Initializes a new instance of the
|
||||
<see cref="ApiException"/>
|
||||
class.
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="basePath">The base path.</param>
|
||||
public ApiException() {}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApiException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="errorCode">HTTP status code.</param>
|
||||
/// <param name="message">Error message.</param>
|
||||
///
|
||||
<summary>
|
||||
/// Initializes a new instance of the
|
||||
<see cref="ApiException"/>
|
||||
class.
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<param name="errorCode">HTTP status code.</param>
|
||||
///
|
||||
<param name="message">Error message.</param>
|
||||
public ApiException(int errorCode, string message) : base(message) {
|
||||
this.ErrorCode = errorCode;
|
||||
}
|
||||
|
@ -7,40 +7,61 @@ using System.Text;
|
||||
using IO.Swagger.Client;
|
||||
|
||||
namespace IO.Swagger.Client {
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Represents a set of configuration settings
|
||||
/// </summary>
|
||||
///
|
||||
</summary>
|
||||
public class Configuration{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// 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();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Gets or sets the username (HTTP basic authentication)
|
||||
/// </summary>
|
||||
/// <value>The username.</value>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<value>The username.</value>
|
||||
public static String username { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Gets or sets the password (HTTP basic authentication)
|
||||
/// </summary>
|
||||
/// <value>The password.</value>
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<value>The password.</value>
|
||||
public static String password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
<summary>
|
||||
/// Gets or sets the API key based on the authentication name
|
||||
/// </summary>
|
||||
/// <value>The API key.</value>
|
||||
public static Dictionary<String, String> apiKey = new Dictionary<String, String>();
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<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
|
||||
/// </summary>
|
||||
/// <value>The prefix of the API key.</value>
|
||||
public static Dictionary<String, String> apiKeyPrefix = new Dictionary<String, String>();
|
||||
///
|
||||
</summary>
|
||||
///
|
||||
<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"
|
||||
|
||||
|
||||
|
||||
@protocol SWGCategory
|
||||
@end
|
||||
|
||||
@interface SWGCategory : SWGObject
|
||||
|
||||
|
||||
|
||||
@property(nonatomic) NSNumber* _id;
|
||||
|
||||
|
||||
@property(nonatomic) NSString* name;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
#import "SWGCategory.h"
|
||||
|
||||
@implementation SWGCategory
|
||||
@ -19,4 +20,5 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
@ -1,4 +1,5 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import
|
||||
<Foundation/Foundation.h>
|
||||
|
||||
@interface SWGConfiguration : NSObject
|
||||
|
||||
|
@ -1,24 +1,34 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import
|
||||
<Foundation/Foundation.h>
|
||||
#import "SWGObject.h"
|
||||
|
||||
|
||||
|
||||
@protocol SWGOrder
|
||||
@end
|
||||
|
||||
@interface SWGOrder : SWGObject
|
||||
|
||||
|
||||
|
||||
@property(nonatomic) NSNumber* _id;
|
||||
|
||||
|
||||
@property(nonatomic) NSNumber* petId;
|
||||
|
||||
|
||||
@property(nonatomic) NSNumber* quantity;
|
||||
|
||||
|
||||
@property(nonatomic) NSDate* shipDate;
|
||||
|
||||
/* Order Status [optional]
|
||||
*/
|
||||
@property(nonatomic) NSString* status;
|
||||
|
||||
|
||||
@property(nonatomic) BOOL complete;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
#import "SWGOrder.h"
|
||||
|
||||
@implementation SWGOrder
|
||||
@ -19,4 +20,5 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
@ -1,26 +1,36 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import
|
||||
<Foundation/Foundation.h>
|
||||
#import "SWGObject.h"
|
||||
#import "SWGTag.h"
|
||||
#import "SWGCategory.h"
|
||||
|
||||
|
||||
|
||||
@protocol SWGPet
|
||||
@end
|
||||
|
||||
@interface SWGPet : SWGObject
|
||||
|
||||
|
||||
|
||||
@property(nonatomic) NSNumber* _id;
|
||||
|
||||
|
||||
@property(nonatomic) SWGCategory* category;
|
||||
|
||||
|
||||
@property(nonatomic) NSString* name;
|
||||
|
||||
|
||||
@property(nonatomic) NSArray* photoUrls;
|
||||
|
||||
|
||||
@property(nonatomic) NSArray<SWGTag>* tags;
|
||||
|
||||
/* pet status in the store [optional]
|
||||
*/
|
||||
@property(nonatomic) NSString* status;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
#import "SWGPet.h"
|
||||
|
||||
@implementation SWGPet
|
||||
@ -19,4 +20,5 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
@ -1,4 +1,5 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import
|
||||
<Foundation/Foundation.h>
|
||||
#import "SWGPet.h"
|
||||
#import "SWGFile.h"
|
||||
#import "SWGObject.h"
|
||||
@ -15,6 +16,7 @@
|
||||
+(SWGPetApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
|
||||
+(void) setBasePath:(NSString*)basePath;
|
||||
+(NSString*) getBasePath;
|
||||
|
||||
/**
|
||||
|
||||
Update an existing pet
|
||||
@ -31,6 +33,7 @@
|
||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Add a new pet to the store
|
||||
@ -47,6 +50,7 @@
|
||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Finds Pets by status
|
||||
@ -63,6 +67,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Finds Pets by tags
|
||||
@ -79,6 +84,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Find pet by ID
|
||||
@ -95,6 +101,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Updates a pet in the store with form data
|
||||
@ -115,6 +122,7 @@
|
||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Deletes a pet
|
||||
@ -133,6 +141,7 @@
|
||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
uploads an image
|
||||
@ -154,4 +163,5 @@
|
||||
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
@ -5,6 +5,7 @@
|
||||
#import "SWGFile.h"
|
||||
|
||||
|
||||
|
||||
@interface SWGPetApi ()
|
||||
@property (readwrite, nonatomic, strong) NSMutableDictionary *defaultHeaders;
|
||||
@end
|
||||
@ -72,6 +73,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
* Update an existing pet
|
||||
*
|
||||
@ -179,6 +181,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Add a new pet to the store
|
||||
*
|
||||
@ -286,6 +289,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Finds Pets by status
|
||||
* 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);
|
||||
}
|
||||
|
||||
|
||||
}];
|
||||
|
||||
|
||||
@ -390,6 +393,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Finds Pets by tags
|
||||
* 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);
|
||||
}
|
||||
|
||||
|
||||
}];
|
||||
|
||||
|
||||
@ -494,6 +497,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Find pet by ID
|
||||
* 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
|
||||
|
||||
// comples response type
|
||||
return [self.apiClient dictionary: requestUrl
|
||||
method: @"GET"
|
||||
@ -593,9 +596,9 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
@ -704,6 +707,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Deletes a pet
|
||||
*
|
||||
@ -796,6 +800,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* uploads an image
|
||||
*
|
||||
@ -913,6 +918,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import
|
||||
<Foundation/Foundation.h>
|
||||
#import "SWGOrder.h"
|
||||
#import "SWGObject.h"
|
||||
#import "SWGApiClient.h"
|
||||
@ -14,6 +15,7 @@
|
||||
+(SWGStoreApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
|
||||
+(void) setBasePath:(NSString*)basePath;
|
||||
+(NSString*) getBasePath;
|
||||
|
||||
/**
|
||||
|
||||
Returns pet inventories by status
|
||||
@ -28,6 +30,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Place an order for a pet
|
||||
@ -44,6 +47,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Find purchase order by ID
|
||||
@ -60,6 +64,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Delete purchase order by ID
|
||||
@ -77,4 +82,5 @@
|
||||
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
@ -4,6 +4,7 @@
|
||||
#import "SWGOrder.h"
|
||||
|
||||
|
||||
|
||||
@interface SWGStoreApi ()
|
||||
@property (readwrite, nonatomic, strong) NSMutableDictionary *defaultHeaders;
|
||||
@end
|
||||
@ -71,6 +72,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
@ -144,13 +146,11 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
completionBlock(nil, error);
|
||||
return;
|
||||
}
|
||||
|
||||
NSDictionary *result = nil;
|
||||
if (data) {
|
||||
result = [[NSDictionary alloc]initWithDictionary: data];
|
||||
}
|
||||
completionBlock(data, nil);
|
||||
|
||||
}];
|
||||
|
||||
|
||||
@ -160,6 +160,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Place an order for a pet
|
||||
*
|
||||
@ -251,7 +252,6 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
|
||||
// complex response
|
||||
|
||||
// comples response type
|
||||
return [self.apiClient dictionary: requestUrl
|
||||
method: @"POST"
|
||||
@ -278,9 +278,9 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Find purchase order by ID
|
||||
* 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
|
||||
|
||||
// comples response type
|
||||
return [self.apiClient dictionary: requestUrl
|
||||
method: @"GET"
|
||||
@ -380,9 +379,9 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Delete purchase order by ID
|
||||
* 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
|
||||
|
||||
|
||||
|
@ -1,15 +1,21 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import
|
||||
<Foundation/Foundation.h>
|
||||
#import "SWGObject.h"
|
||||
|
||||
|
||||
|
||||
@protocol SWGTag
|
||||
@end
|
||||
|
||||
@interface SWGTag : SWGObject
|
||||
|
||||
|
||||
|
||||
@property(nonatomic) NSNumber* _id;
|
||||
|
||||
|
||||
@property(nonatomic) NSString* name;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
#import "SWGTag.h"
|
||||
|
||||
@implementation SWGTag
|
||||
@ -19,4 +20,5 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
@ -1,28 +1,40 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import
|
||||
<Foundation/Foundation.h>
|
||||
#import "SWGObject.h"
|
||||
|
||||
|
||||
|
||||
@protocol SWGUser
|
||||
@end
|
||||
|
||||
@interface SWGUser : SWGObject
|
||||
|
||||
|
||||
|
||||
@property(nonatomic) NSNumber* _id;
|
||||
|
||||
|
||||
@property(nonatomic) NSString* username;
|
||||
|
||||
|
||||
@property(nonatomic) NSString* firstName;
|
||||
|
||||
|
||||
@property(nonatomic) NSString* lastName;
|
||||
|
||||
|
||||
@property(nonatomic) NSString* email;
|
||||
|
||||
|
||||
@property(nonatomic) NSString* password;
|
||||
|
||||
|
||||
@property(nonatomic) NSString* phone;
|
||||
|
||||
/* User Status [optional]
|
||||
*/
|
||||
@property(nonatomic) NSNumber* userStatus;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
#import "SWGUser.h"
|
||||
|
||||
@implementation SWGUser
|
||||
@ -19,4 +20,5 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
@ -1,4 +1,5 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import
|
||||
<Foundation/Foundation.h>
|
||||
#import "SWGUser.h"
|
||||
#import "SWGObject.h"
|
||||
#import "SWGApiClient.h"
|
||||
@ -14,6 +15,7 @@
|
||||
+(SWGUserApi*) apiWithHeader:(NSString*)headerValue key:(NSString*)key;
|
||||
+(void) setBasePath:(NSString*)basePath;
|
||||
+(NSString*) getBasePath;
|
||||
|
||||
/**
|
||||
|
||||
Create user
|
||||
@ -30,6 +32,7 @@
|
||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Creates list of users with given input array
|
||||
@ -46,6 +49,7 @@
|
||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Creates list of users with given input array
|
||||
@ -62,6 +66,7 @@
|
||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Logs user into the system
|
||||
@ -80,6 +85,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Logs out current logged in user session
|
||||
@ -94,6 +100,7 @@
|
||||
(void (^)(NSError* error))completionBlock;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Get user by user name
|
||||
@ -110,6 +117,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Updated user
|
||||
@ -128,6 +136,7 @@
|
||||
completionHandler: (void (^)(NSError* error))completionBlock;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Delete user
|
||||
@ -145,4 +154,5 @@
|
||||
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
@ -4,6 +4,7 @@
|
||||
#import "SWGUser.h"
|
||||
|
||||
|
||||
|
||||
@interface SWGUserApi ()
|
||||
@property (readwrite, nonatomic, strong) NSMutableDictionary *defaultHeaders;
|
||||
@end
|
||||
@ -71,6 +72,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
* Create 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
|
||||
*
|
||||
@ -285,6 +288,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* 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
|
||||
*
|
||||
@ -489,16 +494,14 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// complex response
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
@ -581,6 +584,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Get user by user name
|
||||
*
|
||||
@ -653,7 +657,6 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
|
||||
// complex response
|
||||
|
||||
// comples response type
|
||||
return [self.apiClient dictionary: requestUrl
|
||||
method: @"GET"
|
||||
@ -680,9 +683,9 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Updated 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
|
||||
* This can only be done by the logged in user.
|
||||
@ -886,6 +890,7 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
@ -27,8 +27,6 @@
|
||||
"squizlabs/php_codesniffer": "~2.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"SwaggerClient\\": "lib/"
|
||||
}
|
||||
"psr-4": { "SwaggerClient\\" : "lib/" }
|
||||
}
|
||||
}
|
||||
|
@ -153,17 +153,14 @@ class ApiClient {
|
||||
foreach($authSettings as $auth) {
|
||||
// determine which one to use
|
||||
switch($auth) {
|
||||
|
||||
case 'api_key':
|
||||
$headerParams['api_key'] = $this->getApiKeyWithPrefix('api_key');
|
||||
|
||||
break;
|
||||
|
||||
case 'petstore_auth':
|
||||
|
||||
//TODO support oauth
|
||||
break;
|
||||
|
||||
default:
|
||||
//TODO show warning about security definition not found
|
||||
}
|
||||
|
@ -53,7 +53,6 @@ class PetApi {
|
||||
$this->apiClient = $apiClient;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* updatePet
|
||||
*
|
||||
@ -107,7 +106,6 @@ class PetApi {
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* addPet
|
||||
*
|
||||
@ -161,7 +159,6 @@ class PetApi {
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* findPetsByStatus
|
||||
*
|
||||
@ -219,7 +216,6 @@ class PetApi {
|
||||
$responseObject = $this->apiClient->deserialize($response,'array[Pet]');
|
||||
return $responseObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* findPetsByTags
|
||||
*
|
||||
@ -277,7 +273,6 @@ class PetApi {
|
||||
$responseObject = $this->apiClient->deserialize($response,'array[Pet]');
|
||||
return $responseObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* getPetById
|
||||
*
|
||||
@ -341,7 +336,6 @@ class PetApi {
|
||||
$responseObject = $this->apiClient->deserialize($response,'Pet');
|
||||
return $responseObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* updatePetWithForm
|
||||
*
|
||||
@ -408,7 +402,6 @@ class PetApi {
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* deletePet
|
||||
*
|
||||
@ -471,7 +464,6 @@ class PetApi {
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* uploadFile
|
||||
*
|
||||
@ -539,5 +531,4 @@ class PetApi {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -53,7 +53,6 @@ class StoreApi {
|
||||
$this->apiClient = $apiClient;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getInventory
|
||||
*
|
||||
@ -107,7 +106,6 @@ class StoreApi {
|
||||
$responseObject = $this->apiClient->deserialize($response,'map[string,int]');
|
||||
return $responseObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* placeOrder
|
||||
*
|
||||
@ -166,7 +164,6 @@ class StoreApi {
|
||||
$responseObject = $this->apiClient->deserialize($response,'Order');
|
||||
return $responseObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* getOrderById
|
||||
*
|
||||
@ -230,7 +227,6 @@ class StoreApi {
|
||||
$responseObject = $this->apiClient->deserialize($response,'Order');
|
||||
return $responseObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* deleteOrder
|
||||
*
|
||||
@ -290,5 +286,4 @@ class StoreApi {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -53,7 +53,6 @@ class UserApi {
|
||||
$this->apiClient = $apiClient;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* createUser
|
||||
*
|
||||
@ -107,7 +106,6 @@ class UserApi {
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* createUsersWithArrayInput
|
||||
*
|
||||
@ -161,7 +159,6 @@ class UserApi {
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* createUsersWithListInput
|
||||
*
|
||||
@ -215,7 +212,6 @@ class UserApi {
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* loginUser
|
||||
*
|
||||
@ -277,7 +273,6 @@ class UserApi {
|
||||
$responseObject = $this->apiClient->deserialize($response,'string');
|
||||
return $responseObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* logoutUser
|
||||
*
|
||||
@ -326,7 +321,6 @@ class UserApi {
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* getUserByName
|
||||
*
|
||||
@ -390,7 +384,6 @@ class UserApi {
|
||||
$responseObject = $this->apiClient->deserialize($response,'User');
|
||||
return $responseObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* updateUser
|
||||
*
|
||||
@ -454,7 +447,6 @@ class UserApi {
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* deleteUser
|
||||
*
|
||||
@ -514,5 +506,4 @@ class UserApi {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
@ -62,3 +63,4 @@ class Category implements ArrayAccess {
|
||||
unset($this->$offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
@ -81,3 +82,4 @@ class Order implements ArrayAccess {
|
||||
unset($this->$offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
@ -81,3 +82,4 @@ class Pet implements ArrayAccess {
|
||||
unset($this->$offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
@ -62,3 +63,4 @@ class Tag implements ArrayAccess {
|
||||
unset($this->$offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
@ -89,3 +90,4 @@ class User implements ArrayAccess {
|
||||
unset($this->$offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@ Copyright 2015 SmartBear Software
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
|
||||
class Category(object):
|
||||
"""
|
||||
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))
|
||||
|
||||
|
||||
|
||||
|
@ -17,6 +17,7 @@ Copyright 2015 SmartBear Software
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
|
||||
class Order(object):
|
||||
"""
|
||||
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))
|
||||
|
||||
|
||||
|
||||
|
@ -17,6 +17,7 @@ Copyright 2015 SmartBear Software
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
|
||||
class Pet(object):
|
||||
"""
|
||||
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))
|
||||
|
||||
|
||||
|
||||
|
@ -17,6 +17,7 @@ Copyright 2015 SmartBear Software
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
|
||||
class Tag(object):
|
||||
"""
|
||||
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))
|
||||
|
||||
|
||||
|
||||
|
@ -17,6 +17,7 @@ Copyright 2015 SmartBear Software
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
|
||||
class User(object):
|
||||
"""
|
||||
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))
|
||||
|
||||
|
||||
|
||||
|
@ -3,10 +3,14 @@
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
#include
|
||||
<QJsonDocument>
|
||||
#include
|
||||
<QJsonArray>
|
||||
#include
|
||||
<QObject>
|
||||
#include
|
||||
<QDebug>
|
||||
|
||||
namespace Swagger {
|
||||
|
||||
@ -81,6 +85,7 @@ SWGCategory::asJsonObject() {
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
qint64
|
||||
SWGCategory::getId() {
|
||||
return id;
|
||||
@ -90,6 +95,7 @@ SWGCategory::setId(qint64 id) {
|
||||
this->id = id;
|
||||
}
|
||||
|
||||
|
||||
QString*
|
||||
SWGCategory::getName() {
|
||||
return name;
|
||||
@ -101,5 +107,6 @@ SWGCategory::setName(QString* name) {
|
||||
|
||||
|
||||
|
||||
|
||||
} /* namespace Swagger */
|
||||
|
||||
|
@ -7,7 +7,8 @@
|
||||
#ifndef SWGCategory_H_
|
||||
#define SWGCategory_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
#include
|
||||
<QJsonObject>
|
||||
|
||||
|
||||
#include <QString>
|
||||
|
@ -1,9 +1,12 @@
|
||||
#include "SWGHelpers.h"
|
||||
#include "SWGModelFactory.h"
|
||||
#include "SWGObject.h"
|
||||
#import <QDebug>
|
||||
#import <QJsonArray>
|
||||
#import <QJsonValue>
|
||||
#import
|
||||
<QDebug>
|
||||
#import
|
||||
<QJsonArray>
|
||||
#import
|
||||
<QJsonValue>
|
||||
|
||||
namespace Swagger {
|
||||
|
||||
@ -14,19 +17,27 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
|
||||
return;
|
||||
}
|
||||
if(QStringLiteral("bool").compare(type) == 0) {
|
||||
bool * val = static_cast<bool*>(value);
|
||||
bool * val = static_cast
|
||||
<bool
|
||||
*>(value);
|
||||
*val = obj.toBool();
|
||||
}
|
||||
else if(QStringLiteral("qint32").compare(type) == 0) {
|
||||
qint32 *val = static_cast<qint32*>(value);
|
||||
qint32 *val = static_cast
|
||||
<qint32
|
||||
*>(value);
|
||||
*val = obj.toInt();
|
||||
}
|
||||
else if(QStringLiteral("qint64").compare(type) == 0) {
|
||||
qint64 *val = static_cast<qint64*>(value);
|
||||
qint64 *val = static_cast
|
||||
<qint64
|
||||
*>(value);
|
||||
*val = obj.toVariant().toLongLong();
|
||||
}
|
||||
else if (QStringLiteral("QString").compare(type) == 0) {
|
||||
QString **val = static_cast<QString**>(value);
|
||||
QString **val = static_cast
|
||||
<QString
|
||||
**>(value);
|
||||
|
||||
if(val != NULL) {
|
||||
if(!obj.isNull()) {
|
||||
@ -51,14 +62,20 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
|
||||
SWGObject * so = (SWGObject*)Swagger::create(type);
|
||||
if(so != NULL) {
|
||||
so->fromJsonObject(jsonObj);
|
||||
SWGObject **val = static_cast<SWGObject**>(value);
|
||||
SWGObject **val = static_cast
|
||||
<SWGObject
|
||||
**>(value);
|
||||
delete *val;
|
||||
*val = so;
|
||||
}
|
||||
}
|
||||
else if(type.startsWith("QList") && QString("").compare(complexType) != 0 && obj.isArray()) {
|
||||
// list of values
|
||||
QList<void*>* output = new QList<void*>();
|
||||
QList
|
||||
<void
|
||||
*>* output = new QList
|
||||
<void
|
||||
*>();
|
||||
QJsonArray arr = obj.toArray();
|
||||
foreach (const QJsonValue & jval, arr) {
|
||||
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;
|
||||
*val = output;
|
||||
}
|
||||
@ -100,7 +122,8 @@ toJsonValue(QString name, void* value, QJsonObject* output, QString type) {
|
||||
return;
|
||||
}
|
||||
if(type.startsWith("SWG")) {
|
||||
SWGObject *swgObject = reinterpret_cast<SWGObject *>(value);
|
||||
SWGObject *swgObject = reinterpret_cast
|
||||
<SWGObject *>(value);
|
||||
if(swgObject != NULL) {
|
||||
QJsonObject* o = (*swgObject).asJsonObject();
|
||||
if(name != NULL) {
|
||||
@ -116,25 +139,35 @@ toJsonValue(QString name, void* value, QJsonObject* output, QString type) {
|
||||
}
|
||||
}
|
||||
else if(QStringLiteral("QString").compare(type) == 0) {
|
||||
QString* str = static_cast<QString*>(value);
|
||||
QString* str = static_cast
|
||||
<QString
|
||||
*>(value);
|
||||
output->insert(name, QJsonValue(*str));
|
||||
}
|
||||
else if(QStringLiteral("qint32").compare(type) == 0) {
|
||||
qint32* str = static_cast<qint32*>(value);
|
||||
qint32* str = static_cast
|
||||
<qint32
|
||||
*>(value);
|
||||
output->insert(name, QJsonValue(*str));
|
||||
}
|
||||
else if(QStringLiteral("qint64").compare(type) == 0) {
|
||||
qint64* str = static_cast<qint64*>(value);
|
||||
qint64* str = static_cast
|
||||
<qint64
|
||||
*>(value);
|
||||
output->insert(name, QJsonValue(*str));
|
||||
}
|
||||
else if(QStringLiteral("bool").compare(type) == 0) {
|
||||
bool* str = static_cast<bool*>(value);
|
||||
bool* str = static_cast
|
||||
<bool
|
||||
*>(value);
|
||||
output->insert(name, QJsonValue(*str));
|
||||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
QJsonObject element;
|
||||
|
||||
@ -145,7 +178,9 @@ toJsonArray(QList<void*>* value, QJsonArray* output, QString innerName, QString
|
||||
|
||||
QString
|
||||
stringValue(QString* value) {
|
||||
QString* str = static_cast<QString*>(value);
|
||||
QString* str = static_cast
|
||||
<QString
|
||||
*>(value);
|
||||
return QString(*str);
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,14 @@
|
||||
#ifndef SWGHELPERS_H
|
||||
#define SWGHELPERS_H
|
||||
|
||||
#include <QJsonValue>
|
||||
#include
|
||||
<QJsonValue>
|
||||
|
||||
namespace Swagger {
|
||||
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);
|
||||
bool isCompatibleJsonValue(QString type);
|
||||
QString stringValue(QString* value);
|
||||
|
@ -32,7 +32,8 @@ namespace Swagger {
|
||||
inline void* create(QString json, QString type) {
|
||||
void* val = create(type);
|
||||
if(val != NULL) {
|
||||
SWGObject* obj = static_cast<SWGObject*>(val);
|
||||
SWGObject* obj = static_cast
|
||||
<SWGObject*>(val);
|
||||
return obj->fromJson(json);
|
||||
}
|
||||
if(type.startsWith("QString")) {
|
||||
|
@ -1,7 +1,8 @@
|
||||
#ifndef _SWG_OBJECT_H_
|
||||
#define _SWG_OBJECT_H_
|
||||
|
||||
#include <QJsonValue>
|
||||
#include
|
||||
<QJsonValue>
|
||||
|
||||
class SWGObject {
|
||||
public:
|
||||
|
@ -3,10 +3,14 @@
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
#include
|
||||
<QJsonDocument>
|
||||
#include
|
||||
<QJsonArray>
|
||||
#include
|
||||
<QObject>
|
||||
#include
|
||||
<QDebug>
|
||||
|
||||
namespace Swagger {
|
||||
|
||||
@ -104,6 +108,7 @@ SWGOrder::asJsonObject() {
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
qint64
|
||||
SWGOrder::getId() {
|
||||
return id;
|
||||
@ -113,6 +118,7 @@ SWGOrder::setId(qint64 id) {
|
||||
this->id = id;
|
||||
}
|
||||
|
||||
|
||||
qint64
|
||||
SWGOrder::getPetId() {
|
||||
return petId;
|
||||
@ -122,6 +128,7 @@ SWGOrder::setPetId(qint64 petId) {
|
||||
this->petId = petId;
|
||||
}
|
||||
|
||||
|
||||
qint32
|
||||
SWGOrder::getQuantity() {
|
||||
return quantity;
|
||||
@ -131,6 +138,7 @@ SWGOrder::setQuantity(qint32 quantity) {
|
||||
this->quantity = quantity;
|
||||
}
|
||||
|
||||
|
||||
QDateTime*
|
||||
SWGOrder::getShipDate() {
|
||||
return shipDate;
|
||||
@ -140,6 +148,7 @@ SWGOrder::setShipDate(QDateTime* shipDate) {
|
||||
this->shipDate = shipDate;
|
||||
}
|
||||
|
||||
|
||||
QString*
|
||||
SWGOrder::getStatus() {
|
||||
return status;
|
||||
@ -149,6 +158,7 @@ SWGOrder::setStatus(QString* status) {
|
||||
this->status = status;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGOrder::getComplete() {
|
||||
return complete;
|
||||
@ -160,5 +170,6 @@ SWGOrder::setComplete(bool complete) {
|
||||
|
||||
|
||||
|
||||
|
||||
} /* namespace Swagger */
|
||||
|
||||
|
@ -7,7 +7,8 @@
|
||||
#ifndef SWGOrder_H_
|
||||
#define SWGOrder_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
#include
|
||||
<QJsonObject>
|
||||
|
||||
|
||||
#include "QDateTime.h"
|
||||
|
@ -3,10 +3,14 @@
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
#include
|
||||
<QJsonDocument>
|
||||
#include
|
||||
<QJsonArray>
|
||||
#include
|
||||
<QObject>
|
||||
#include
|
||||
<QDebug>
|
||||
|
||||
namespace Swagger {
|
||||
|
||||
@ -114,7 +118,8 @@ SWGPet::asJsonObject() {
|
||||
|
||||
QList<QString*>* photoUrlsList = photoUrls;
|
||||
QJsonArray photoUrlsJsonArray;
|
||||
toJsonArray((QList<void*>*)photoUrls, &photoUrlsJsonArray, "photoUrls", "QString");
|
||||
toJsonArray((QList
|
||||
<void*>*)photoUrls, &photoUrlsJsonArray, "photoUrls", "QString");
|
||||
|
||||
obj->insert("photoUrls", photoUrlsJsonArray);
|
||||
|
||||
@ -123,7 +128,8 @@ SWGPet::asJsonObject() {
|
||||
|
||||
QList<SWGTag*>* tagsList = tags;
|
||||
QJsonArray tagsJsonArray;
|
||||
toJsonArray((QList<void*>*)tags, &tagsJsonArray, "tags", "SWGTag");
|
||||
toJsonArray((QList
|
||||
<void*>*)tags, &tagsJsonArray, "tags", "SWGTag");
|
||||
|
||||
obj->insert("tags", tagsJsonArray);
|
||||
|
||||
@ -139,6 +145,7 @@ SWGPet::asJsonObject() {
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
qint64
|
||||
SWGPet::getId() {
|
||||
return id;
|
||||
@ -148,6 +155,7 @@ SWGPet::setId(qint64 id) {
|
||||
this->id = id;
|
||||
}
|
||||
|
||||
|
||||
SWGCategory*
|
||||
SWGPet::getCategory() {
|
||||
return category;
|
||||
@ -157,6 +165,7 @@ SWGPet::setCategory(SWGCategory* category) {
|
||||
this->category = category;
|
||||
}
|
||||
|
||||
|
||||
QString*
|
||||
SWGPet::getName() {
|
||||
return name;
|
||||
@ -166,6 +175,7 @@ SWGPet::setName(QString* name) {
|
||||
this->name = name;
|
||||
}
|
||||
|
||||
|
||||
QList<QString*>*
|
||||
SWGPet::getPhotoUrls() {
|
||||
return photoUrls;
|
||||
@ -175,6 +185,7 @@ SWGPet::setPhotoUrls(QList<QString*>* photoUrls) {
|
||||
this->photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
|
||||
QList<SWGTag*>*
|
||||
SWGPet::getTags() {
|
||||
return tags;
|
||||
@ -184,6 +195,7 @@ SWGPet::setTags(QList<SWGTag*>* tags) {
|
||||
this->tags = tags;
|
||||
}
|
||||
|
||||
|
||||
QString*
|
||||
SWGPet::getStatus() {
|
||||
return status;
|
||||
@ -195,5 +207,6 @@ SWGPet::setStatus(QString* status) {
|
||||
|
||||
|
||||
|
||||
|
||||
} /* namespace Swagger */
|
||||
|
||||
|
@ -7,7 +7,8 @@
|
||||
#ifndef SWGPet_H_
|
||||
#define SWGPet_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
#include
|
||||
<QJsonObject>
|
||||
|
||||
|
||||
#include "SWGTag.h"
|
||||
|
@ -2,8 +2,10 @@
|
||||
#include "SWGHelpers.h"
|
||||
#include "SWGModelFactory.h"
|
||||
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include
|
||||
<QJsonArray>
|
||||
#include
|
||||
<QJsonDocument>
|
||||
|
||||
namespace Swagger {
|
||||
SWGPetApi::SWGPetApi() {}
|
||||
@ -15,6 +17,8 @@ SWGPetApi::SWGPetApi(QString host, QString basePath) {
|
||||
this->basePath = basePath;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
SWGPetApi::updatePet(SWGPet body) {
|
||||
QString fullPath;
|
||||
@ -63,6 +67,7 @@ SWGPetApi::updatePetCallback(HttpRequestWorker * worker) {
|
||||
|
||||
emit updatePetSignal();
|
||||
}
|
||||
|
||||
void
|
||||
SWGPetApi::addPet(SWGPet body) {
|
||||
QString fullPath;
|
||||
@ -111,6 +116,7 @@ SWGPetApi::addPetCallback(HttpRequestWorker * worker) {
|
||||
|
||||
emit addPetSignal();
|
||||
}
|
||||
|
||||
void
|
||||
SWGPetApi::findPetsByStatus(QList<QString*>* status) {
|
||||
QString fullPath;
|
||||
@ -216,6 +222,7 @@ SWGPetApi::findPetsByStatusCallback(HttpRequestWorker * worker) {
|
||||
emit findPetsByStatusSignal(output);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
SWGPetApi::findPetsByTags(QList<QString*>* tags) {
|
||||
QString fullPath;
|
||||
@ -321,6 +328,7 @@ SWGPetApi::findPetsByTagsCallback(HttpRequestWorker * worker) {
|
||||
emit findPetsByTagsSignal(output);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
SWGPetApi::getPetById(qint64 petId) {
|
||||
QString fullPath;
|
||||
@ -366,7 +374,8 @@ SWGPetApi::getPetByIdCallback(HttpRequestWorker * worker) {
|
||||
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
SWGPetApi::updatePetWithForm(QString* petId, QString* name, QString* status) {
|
||||
SWGPetApi::updatePetWithForm(QString* petId
|
||||
, QString* name
|
||||
, QString* status) {
|
||||
QString fullPath;
|
||||
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}");
|
||||
|
||||
@ -430,8 +442,10 @@ SWGPetApi::updatePetWithFormCallback(HttpRequestWorker * worker) {
|
||||
|
||||
emit updatePetWithFormSignal();
|
||||
}
|
||||
|
||||
void
|
||||
SWGPetApi::deletePet(QString* apiKey, qint64 petId) {
|
||||
SWGPetApi::deletePet(QString* apiKey
|
||||
, qint64 petId) {
|
||||
QString fullPath;
|
||||
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}");
|
||||
|
||||
@ -478,8 +492,11 @@ SWGPetApi::deletePetCallback(HttpRequestWorker * worker) {
|
||||
|
||||
emit deletePetSignal();
|
||||
}
|
||||
|
||||
void
|
||||
SWGPetApi::uploadFile(qint64 petId, QString* additionalMetadata, SWGHttpRequestInputFileElement* file) {
|
||||
SWGPetApi::uploadFile(qint64 petId
|
||||
, QString* additionalMetadata
|
||||
, SWGHttpRequestInputFileElement* file) {
|
||||
QString fullPath;
|
||||
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}/uploadImage");
|
||||
|
||||
@ -528,4 +545,6 @@ SWGPetApi::uploadFileCallback(HttpRequestWorker * worker) {
|
||||
|
||||
emit uploadFileSignal();
|
||||
}
|
||||
|
||||
|
||||
} /* namespace Swagger */
|
||||
|
@ -7,7 +7,8 @@
|
||||
#include <QString>
|
||||
#include "SWGHttpRequest.h"
|
||||
|
||||
#include <QObject>
|
||||
#include
|
||||
<QObject>
|
||||
|
||||
namespace Swagger {
|
||||
|
||||
@ -27,9 +28,14 @@ public:
|
||||
void findPetsByStatus(QList<QString*>* status);
|
||||
void findPetsByTags(QList<QString*>* tags);
|
||||
void getPetById(qint64 petId);
|
||||
void updatePetWithForm(QString* petId, QString* name, QString* status);
|
||||
void deletePet(QString* apiKey, qint64 petId);
|
||||
void uploadFile(qint64 petId, QString* additionalMetadata, SWGHttpRequestInputFileElement* file);
|
||||
void updatePetWithForm(QString* petId
|
||||
, QString* name
|
||||
, QString* status);
|
||||
void deletePet(QString* apiKey
|
||||
, qint64 petId);
|
||||
void uploadFile(qint64 petId
|
||||
, QString* additionalMetadata
|
||||
, SWGHttpRequestInputFileElement* file);
|
||||
|
||||
private:
|
||||
void updatePetCallback (HttpRequestWorker * worker);
|
||||
|
@ -2,8 +2,10 @@
|
||||
#include "SWGHelpers.h"
|
||||
#include "SWGModelFactory.h"
|
||||
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include
|
||||
<QJsonArray>
|
||||
#include
|
||||
<QJsonDocument>
|
||||
|
||||
namespace Swagger {
|
||||
SWGStoreApi::SWGStoreApi() {}
|
||||
@ -15,6 +17,8 @@ SWGStoreApi::SWGStoreApi(QString host, QString basePath) {
|
||||
this->basePath = basePath;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
SWGStoreApi::getInventory() {
|
||||
QString fullPath;
|
||||
@ -78,6 +82,7 @@ SWGStoreApi::getInventoryCallback(HttpRequestWorker * worker) {
|
||||
emit getInventorySignal(output);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
SWGStoreApi::placeOrder(SWGOrder body) {
|
||||
QString fullPath;
|
||||
@ -125,7 +130,8 @@ SWGStoreApi::placeOrderCallback(HttpRequestWorker * worker) {
|
||||
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
SWGStoreApi::getOrderById(QString* orderId) {
|
||||
QString fullPath;
|
||||
@ -180,7 +187,8 @@ SWGStoreApi::getOrderByIdCallback(HttpRequestWorker * worker) {
|
||||
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
SWGStoreApi::deleteOrder(QString* orderId) {
|
||||
QString fullPath;
|
||||
@ -236,4 +245,6 @@ SWGStoreApi::deleteOrderCallback(HttpRequestWorker * worker) {
|
||||
|
||||
emit deleteOrderSignal();
|
||||
}
|
||||
|
||||
|
||||
} /* namespace Swagger */
|
||||
|
@ -7,7 +7,8 @@
|
||||
#include "SWGOrder.h"
|
||||
#include <QString>
|
||||
|
||||
#include <QObject>
|
||||
#include
|
||||
<QObject>
|
||||
|
||||
namespace Swagger {
|
||||
|
||||
|
@ -3,10 +3,14 @@
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
#include
|
||||
<QJsonDocument>
|
||||
#include
|
||||
<QJsonArray>
|
||||
#include
|
||||
<QObject>
|
||||
#include
|
||||
<QDebug>
|
||||
|
||||
namespace Swagger {
|
||||
|
||||
@ -81,6 +85,7 @@ SWGTag::asJsonObject() {
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
qint64
|
||||
SWGTag::getId() {
|
||||
return id;
|
||||
@ -90,6 +95,7 @@ SWGTag::setId(qint64 id) {
|
||||
this->id = id;
|
||||
}
|
||||
|
||||
|
||||
QString*
|
||||
SWGTag::getName() {
|
||||
return name;
|
||||
@ -101,5 +107,6 @@ SWGTag::setName(QString* name) {
|
||||
|
||||
|
||||
|
||||
|
||||
} /* namespace Swagger */
|
||||
|
||||
|
@ -7,7 +7,8 @@
|
||||
#ifndef SWGTag_H_
|
||||
#define SWGTag_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
#include
|
||||
<QJsonObject>
|
||||
|
||||
|
||||
#include <QString>
|
||||
|
@ -3,10 +3,14 @@
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
#include
|
||||
<QJsonDocument>
|
||||
#include
|
||||
<QJsonArray>
|
||||
#include
|
||||
<QObject>
|
||||
#include
|
||||
<QDebug>
|
||||
|
||||
namespace Swagger {
|
||||
|
||||
@ -140,6 +144,7 @@ SWGUser::asJsonObject() {
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
qint64
|
||||
SWGUser::getId() {
|
||||
return id;
|
||||
@ -149,6 +154,7 @@ SWGUser::setId(qint64 id) {
|
||||
this->id = id;
|
||||
}
|
||||
|
||||
|
||||
QString*
|
||||
SWGUser::getUsername() {
|
||||
return username;
|
||||
@ -158,6 +164,7 @@ SWGUser::setUsername(QString* username) {
|
||||
this->username = username;
|
||||
}
|
||||
|
||||
|
||||
QString*
|
||||
SWGUser::getFirstName() {
|
||||
return firstName;
|
||||
@ -167,6 +174,7 @@ SWGUser::setFirstName(QString* firstName) {
|
||||
this->firstName = firstName;
|
||||
}
|
||||
|
||||
|
||||
QString*
|
||||
SWGUser::getLastName() {
|
||||
return lastName;
|
||||
@ -176,6 +184,7 @@ SWGUser::setLastName(QString* lastName) {
|
||||
this->lastName = lastName;
|
||||
}
|
||||
|
||||
|
||||
QString*
|
||||
SWGUser::getEmail() {
|
||||
return email;
|
||||
@ -185,6 +194,7 @@ SWGUser::setEmail(QString* email) {
|
||||
this->email = email;
|
||||
}
|
||||
|
||||
|
||||
QString*
|
||||
SWGUser::getPassword() {
|
||||
return password;
|
||||
@ -194,6 +204,7 @@ SWGUser::setPassword(QString* password) {
|
||||
this->password = password;
|
||||
}
|
||||
|
||||
|
||||
QString*
|
||||
SWGUser::getPhone() {
|
||||
return phone;
|
||||
@ -203,6 +214,7 @@ SWGUser::setPhone(QString* phone) {
|
||||
this->phone = phone;
|
||||
}
|
||||
|
||||
|
||||
qint32
|
||||
SWGUser::getUserStatus() {
|
||||
return userStatus;
|
||||
@ -214,5 +226,6 @@ SWGUser::setUserStatus(qint32 userStatus) {
|
||||
|
||||
|
||||
|
||||
|
||||
} /* namespace Swagger */
|
||||
|
||||
|
@ -7,7 +7,8 @@
|
||||
#ifndef SWGUser_H_
|
||||
#define SWGUser_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
#include
|
||||
<QJsonObject>
|
||||
|
||||
|
||||
#include <QString>
|
||||
|
@ -2,8 +2,10 @@
|
||||
#include "SWGHelpers.h"
|
||||
#include "SWGModelFactory.h"
|
||||
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include
|
||||
<QJsonArray>
|
||||
#include
|
||||
<QJsonDocument>
|
||||
|
||||
namespace Swagger {
|
||||
SWGUserApi::SWGUserApi() {}
|
||||
@ -15,6 +17,8 @@ SWGUserApi::SWGUserApi(QString host, QString basePath) {
|
||||
this->basePath = basePath;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
SWGUserApi::createUser(SWGUser body) {
|
||||
QString fullPath;
|
||||
@ -63,6 +67,7 @@ SWGUserApi::createUserCallback(HttpRequestWorker * worker) {
|
||||
|
||||
emit createUserSignal();
|
||||
}
|
||||
|
||||
void
|
||||
SWGUserApi::createUsersWithArrayInput(QList<SWGUser*>* body) {
|
||||
QString fullPath;
|
||||
@ -80,7 +85,9 @@ SWGUserApi::createUsersWithArrayInput(QList<SWGUser*>* body) {
|
||||
|
||||
|
||||
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);
|
||||
QByteArray bytes = doc.toJson();
|
||||
@ -116,6 +123,7 @@ SWGUserApi::createUsersWithArrayInputCallback(HttpRequestWorker * worker) {
|
||||
|
||||
emit createUsersWithArrayInputSignal();
|
||||
}
|
||||
|
||||
void
|
||||
SWGUserApi::createUsersWithListInput(QList<SWGUser*>* body) {
|
||||
QString fullPath;
|
||||
@ -133,7 +141,9 @@ SWGUserApi::createUsersWithListInput(QList<SWGUser*>* body) {
|
||||
|
||||
|
||||
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);
|
||||
QByteArray bytes = doc.toJson();
|
||||
@ -169,8 +179,10 @@ SWGUserApi::createUsersWithListInputCallback(HttpRequestWorker * worker) {
|
||||
|
||||
emit createUsersWithListInputSignal();
|
||||
}
|
||||
|
||||
void
|
||||
SWGUserApi::loginUser(QString* username, QString* password) {
|
||||
SWGUserApi::loginUser(QString* username
|
||||
, QString* password) {
|
||||
QString fullPath;
|
||||
fullPath.append(this->host).append(this->basePath).append("/user/login");
|
||||
|
||||
@ -235,7 +247,8 @@ SWGUserApi::loginUserCallback(HttpRequestWorker * worker) {
|
||||
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
SWGUserApi::logoutUser() {
|
||||
QString fullPath;
|
||||
@ -288,6 +302,7 @@ SWGUserApi::logoutUserCallback(HttpRequestWorker * worker) {
|
||||
|
||||
emit logoutUserSignal();
|
||||
}
|
||||
|
||||
void
|
||||
SWGUserApi::getUserByName(QString* username) {
|
||||
QString fullPath;
|
||||
@ -333,7 +348,8 @@ SWGUserApi::getUserByNameCallback(HttpRequestWorker * worker) {
|
||||
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
SWGUserApi::updateUser(QString* username, SWGUser body) {
|
||||
SWGUserApi::updateUser(QString* username
|
||||
, SWGUser body) {
|
||||
QString fullPath;
|
||||
fullPath.append(this->host).append(this->basePath).append("/user/{username}");
|
||||
|
||||
@ -394,6 +412,7 @@ SWGUserApi::updateUserCallback(HttpRequestWorker * worker) {
|
||||
|
||||
emit updateUserSignal();
|
||||
}
|
||||
|
||||
void
|
||||
SWGUserApi::deleteUser(QString* username) {
|
||||
QString fullPath;
|
||||
@ -440,4 +459,6 @@ SWGUserApi::deleteUserCallback(HttpRequestWorker * worker) {
|
||||
|
||||
emit deleteUserSignal();
|
||||
}
|
||||
|
||||
|
||||
} /* namespace Swagger */
|
||||
|
@ -7,7 +7,8 @@
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
#include <QObject>
|
||||
#include
|
||||
<QObject>
|
||||
|
||||
namespace Swagger {
|
||||
|
||||
@ -25,10 +26,12 @@ public:
|
||||
void createUser(SWGUser body);
|
||||
void createUsersWithArrayInput(QList<SWGUser*>* body);
|
||||
void createUsersWithListInput(QList<SWGUser*>* body);
|
||||
void loginUser(QString* username, QString* password);
|
||||
void loginUser(QString* username
|
||||
, QString* password);
|
||||
void logoutUser();
|
||||
void getUserByName(QString* username);
|
||||
void updateUser(QString* username, SWGUser body);
|
||||
void updateUser(QString* username
|
||||
, SWGUser body);
|
||||
void deleteUser(QString* username);
|
||||
|
||||
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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>io.swagger</groupId>
|
||||
@ -77,7 +77,8 @@
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>src/main/java</source>
|
||||
<source>
|
||||
src/main/java</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
@ -89,7 +90,8 @@
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>src/test/java</source>
|
||||
<source>
|
||||
src/test/java</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
@ -100,7 +102,8 @@
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<source>
|
||||
1.6</source>
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
@ -7,8 +7,7 @@ import retrofit.converter.GsonConverter;
|
||||
|
||||
public class ServiceGenerator {
|
||||
// No need to instantiate this class.
|
||||
private ServiceGenerator() {
|
||||
}
|
||||
private ServiceGenerator() { }
|
||||
|
||||
public static <S> S createService(Class<S> serviceClass) {
|
||||
Gson gson = new GsonBuilder()
|
||||
|
@ -1,10 +1,13 @@
|
||||
package io.swagger.client.api;
|
||||
|
||||
import io.swagger.client.model.Pet;
|
||||
import io.swagger.client.model.*;
|
||||
|
||||
import retrofit.http.*;
|
||||
import retrofit.mime.*;
|
||||
import java.util.*;
|
||||
|
||||
import java.util.List;
|
||||
import io.swagger.client.model.Pet;
|
||||
import java.io.File;
|
||||
|
||||
public interface PetApi {
|
||||
|
||||
@ -35,7 +38,6 @@ public interface PetApi {
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma seperated strings
|
||||
*
|
||||
* @param status Status values that need to be considered for filter
|
||||
* @return List<Pet>
|
||||
*/
|
||||
@ -48,7 +50,6 @@ public interface PetApi {
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
*
|
||||
* @param tags Tags to filter by
|
||||
* @return List<Pet>
|
||||
*/
|
||||
@ -61,7 +62,6 @@ public interface PetApi {
|
||||
/**
|
||||
* Find pet by ID
|
||||
* 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
|
||||
* @return Pet
|
||||
*/
|
||||
|
@ -1,17 +1,19 @@
|
||||
package io.swagger.client.api;
|
||||
|
||||
import io.swagger.client.model.Order;
|
||||
import io.swagger.client.model.*;
|
||||
|
||||
import retrofit.http.*;
|
||||
import retrofit.mime.*;
|
||||
import java.util.*;
|
||||
|
||||
import java.util.Map;
|
||||
import io.swagger.client.model.Order;
|
||||
|
||||
public interface StoreApi {
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
*
|
||||
* @return Map<String, Integer>
|
||||
*/
|
||||
|
||||
@ -34,7 +36,6 @@ public interface StoreApi {
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
*
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
* @return Order
|
||||
*/
|
||||
@ -47,7 +48,6 @@ public interface StoreApi {
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* 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
|
||||
* @return Void
|
||||
*/
|
||||
|
@ -1,17 +1,19 @@
|
||||
package io.swagger.client.api;
|
||||
|
||||
import io.swagger.client.model.User;
|
||||
import io.swagger.client.model.*;
|
||||
|
||||
import retrofit.http.*;
|
||||
import retrofit.mime.*;
|
||||
import java.util.*;
|
||||
|
||||
import java.util.List;
|
||||
import io.swagger.client.model.User;
|
||||
import java.util.*;
|
||||
|
||||
public interface UserApi {
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @param body Created user object
|
||||
* @return Void
|
||||
*/
|
||||
@ -83,7 +85,6 @@ public interface UserApi {
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @param username name that need to be deleted
|
||||
* @param body Updated user object
|
||||
* @return Void
|
||||
@ -97,7 +98,6 @@ public interface UserApi {
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @param username The name that needs to be deleted
|
||||
* @return Void
|
||||
*/
|
||||
|
@ -1,6 +1,7 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ -24,7 +25,6 @@ public class Category {
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
@ -32,7 +32,6 @@ public class Category {
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
@ -48,3 +47,4 @@ public class Category {
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
public class Order {
|
||||
@ -32,6 +33,10 @@ public class Order {
|
||||
@ApiModelProperty(value = "")
|
||||
@SerializedName("shipDate")
|
||||
private Date shipDate = null;
|
||||
public enum StatusEnum {
|
||||
placed, approved, delivered,
|
||||
};
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
**/
|
||||
@ -39,17 +44,16 @@ public class Order {
|
||||
@SerializedName("status")
|
||||
private StatusEnum status = null;
|
||||
|
||||
;
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@SerializedName("complete")
|
||||
private Boolean complete = null;
|
||||
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
@ -57,7 +61,6 @@ public class Order {
|
||||
public Long getPetId() {
|
||||
return petId;
|
||||
}
|
||||
|
||||
public void setPetId(Long petId) {
|
||||
this.petId = petId;
|
||||
}
|
||||
@ -65,7 +68,6 @@ public class Order {
|
||||
public Integer getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
@ -73,7 +75,6 @@ public class Order {
|
||||
public Date getShipDate() {
|
||||
return shipDate;
|
||||
}
|
||||
|
||||
public void setShipDate(Date shipDate) {
|
||||
this.shipDate = shipDate;
|
||||
}
|
||||
@ -81,7 +82,6 @@ public class Order {
|
||||
public StatusEnum getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(StatusEnum status) {
|
||||
this.status = status;
|
||||
}
|
||||
@ -89,7 +89,6 @@ public class Order {
|
||||
public Boolean getComplete() {
|
||||
return complete;
|
||||
}
|
||||
|
||||
public void setComplete(Boolean complete) {
|
||||
this.complete = complete;
|
||||
}
|
||||
@ -108,8 +107,5 @@ public class Order {
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
public enum StatusEnum {
|
||||
placed, approved, delivered,
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import io.swagger.client.model.Category;
|
||||
import io.swagger.client.model.Tag;
|
||||
import java.util.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@ -41,6 +41,10 @@ public class Pet {
|
||||
@ApiModelProperty(value = "")
|
||||
@SerializedName("tags")
|
||||
private List<Tag> tags = new ArrayList<Tag>() ;
|
||||
public enum StatusEnum {
|
||||
available, pending, sold,
|
||||
};
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
**/
|
||||
@ -48,12 +52,10 @@ public class Pet {
|
||||
@SerializedName("status")
|
||||
private StatusEnum status = null;
|
||||
|
||||
;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
@ -61,7 +63,6 @@ public class Pet {
|
||||
public Category getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(Category category) {
|
||||
this.category = category;
|
||||
}
|
||||
@ -69,7 +70,6 @@ public class Pet {
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
@ -77,7 +77,6 @@ public class Pet {
|
||||
public List<String> getPhotoUrls() {
|
||||
return photoUrls;
|
||||
}
|
||||
|
||||
public void setPhotoUrls(List<String> photoUrls) {
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
@ -85,7 +84,6 @@ public class Pet {
|
||||
public List<Tag> getTags() {
|
||||
return tags;
|
||||
}
|
||||
|
||||
public void setTags(List<Tag> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
@ -93,7 +91,6 @@ public class Pet {
|
||||
public StatusEnum getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(StatusEnum status) {
|
||||
this.status = status;
|
||||
}
|
||||
@ -112,8 +109,5 @@ public class Pet {
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
public enum StatusEnum {
|
||||
available, pending, sold,
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ -24,7 +25,6 @@ public class Tag {
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
@ -32,7 +32,6 @@ public class Tag {
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
@ -48,3 +47,4 @@ public class Tag {
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ -61,7 +62,6 @@ public class User {
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
@ -69,7 +69,6 @@ public class User {
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
@ -77,7 +76,6 @@ public class User {
|
||||
public String getFirstName() {
|
||||
return firstName;
|
||||
}
|
||||
|
||||
public void setFirstName(String firstName) {
|
||||
this.firstName = firstName;
|
||||
}
|
||||
@ -85,7 +83,6 @@ public class User {
|
||||
public String getLastName() {
|
||||
return lastName;
|
||||
}
|
||||
|
||||
public void setLastName(String lastName) {
|
||||
this.lastName = lastName;
|
||||
}
|
||||
@ -93,7 +90,6 @@ public class User {
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
@ -101,7 +97,6 @@ public class User {
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
@ -109,7 +104,6 @@ public class User {
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
@ -117,7 +111,6 @@ public class User {
|
||||
public Integer getUserStatus() {
|
||||
return userStatus;
|
||||
}
|
||||
|
||||
public void setUserStatus(Integer userStatus) {
|
||||
this.userStatus = userStatus;
|
||||
}
|
||||
@ -139,3 +132,4 @@ public class User {
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,10 +15,14 @@ require 'swagger_client/models/tag'
|
||||
require 'swagger_client/models/order'
|
||||
|
||||
# APIs
|
||||
|
||||
require 'swagger_client/api/user_api'
|
||||
|
||||
require 'swagger_client/api/pet_api'
|
||||
|
||||
require 'swagger_client/api/store_api'
|
||||
|
||||
|
||||
module SwaggerClient
|
||||
# Initialize the default configuration
|
||||
Swagger.configuration ||= Swagger::Configuration.new
|
||||
|
@ -5,6 +5,7 @@ module SwaggerClient
|
||||
basePath = "http://petstore.swagger.io/v2"
|
||||
# apiInvoker = APIInvoker
|
||||
|
||||
|
||||
# Update an existing pet
|
||||
#
|
||||
# @param [Hash] opts the optional parameters
|
||||
@ -42,6 +43,7 @@ module SwaggerClient
|
||||
nil
|
||||
end
|
||||
|
||||
|
||||
# Add a new pet to the store
|
||||
#
|
||||
# @param [Hash] opts the optional parameters
|
||||
@ -79,6 +81,7 @@ module SwaggerClient
|
||||
nil
|
||||
end
|
||||
|
||||
|
||||
# Finds Pets by status
|
||||
# Multiple status values can be provided with comma seperated strings
|
||||
# @param [Hash] opts the optional parameters
|
||||
@ -117,6 +120,7 @@ module SwaggerClient
|
||||
response.map {|response| obj = Pet.new() and obj.build_from_hash(response) }
|
||||
end
|
||||
|
||||
|
||||
# Finds Pets by tags
|
||||
# Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
# @param [Hash] opts the optional parameters
|
||||
@ -155,6 +159,7 @@ module SwaggerClient
|
||||
response.map {|response| obj = Pet.new() and obj.build_from_hash(response) }
|
||||
end
|
||||
|
||||
|
||||
# Find pet by ID
|
||||
# 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
|
||||
@ -195,6 +200,7 @@ module SwaggerClient
|
||||
obj = Pet.new() and obj.build_from_hash(response)
|
||||
end
|
||||
|
||||
|
||||
# Updates a pet in the store with form data
|
||||
#
|
||||
# @param pet_id ID of pet that needs to be updated
|
||||
@ -239,6 +245,7 @@ module SwaggerClient
|
||||
nil
|
||||
end
|
||||
|
||||
|
||||
# Deletes a pet
|
||||
#
|
||||
# @param pet_id Pet id to delete
|
||||
@ -281,6 +288,7 @@ module SwaggerClient
|
||||
nil
|
||||
end
|
||||
|
||||
|
||||
# uploads an image
|
||||
#
|
||||
# @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
|
||||
nil
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -5,6 +5,7 @@ module SwaggerClient
|
||||
basePath = "http://petstore.swagger.io/v2"
|
||||
# apiInvoker = APIInvoker
|
||||
|
||||
|
||||
# Returns pet inventories by status
|
||||
# Returns a map of status codes to quantities
|
||||
# @param [Hash] opts the optional parameters
|
||||
@ -41,6 +42,7 @@ module SwaggerClient
|
||||
response.map {|response| obj = map.new() and obj.build_from_hash(response) }
|
||||
end
|
||||
|
||||
|
||||
# Place an order for a pet
|
||||
#
|
||||
# @param [Hash] opts the optional parameters
|
||||
@ -78,6 +80,7 @@ module SwaggerClient
|
||||
obj = Order.new() and obj.build_from_hash(response)
|
||||
end
|
||||
|
||||
|
||||
# Find purchase order by ID
|
||||
# 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
|
||||
@ -118,6 +121,7 @@ module SwaggerClient
|
||||
obj = Order.new() and obj.build_from_hash(response)
|
||||
end
|
||||
|
||||
|
||||
# Delete purchase order by ID
|
||||
# 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
|
||||
@ -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
|
||||
nil
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -5,6 +5,7 @@ module SwaggerClient
|
||||
basePath = "http://petstore.swagger.io/v2"
|
||||
# apiInvoker = APIInvoker
|
||||
|
||||
|
||||
# Create user
|
||||
# This can only be done by the logged in user.
|
||||
# @param [Hash] opts the optional parameters
|
||||
@ -42,6 +43,7 @@ module SwaggerClient
|
||||
nil
|
||||
end
|
||||
|
||||
|
||||
# Creates list of users with given input array
|
||||
#
|
||||
# @param [Hash] opts the optional parameters
|
||||
@ -79,6 +81,7 @@ module SwaggerClient
|
||||
nil
|
||||
end
|
||||
|
||||
|
||||
# Creates list of users with given input array
|
||||
#
|
||||
# @param [Hash] opts the optional parameters
|
||||
@ -116,6 +119,7 @@ module SwaggerClient
|
||||
nil
|
||||
end
|
||||
|
||||
|
||||
# Logs user into the system
|
||||
#
|
||||
# @param [Hash] opts the optional parameters
|
||||
@ -156,6 +160,7 @@ module SwaggerClient
|
||||
obj = string.new() and obj.build_from_hash(response)
|
||||
end
|
||||
|
||||
|
||||
# Logs out current logged in user session
|
||||
#
|
||||
# @param [Hash] opts the optional parameters
|
||||
@ -192,6 +197,7 @@ module SwaggerClient
|
||||
nil
|
||||
end
|
||||
|
||||
|
||||
# Get user by user name
|
||||
#
|
||||
# @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)
|
||||
end
|
||||
|
||||
|
||||
# Updated user
|
||||
# This can only be done by the logged in user.
|
||||
# @param username name that need to be deleted
|
||||
@ -273,6 +280,7 @@ module SwaggerClient
|
||||
nil
|
||||
end
|
||||
|
||||
|
||||
# Delete user
|
||||
# This can only be done by the logged in user.
|
||||
# @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
|
||||
nil
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -5,13 +5,10 @@ module SwaggerClient
|
||||
# attribute mapping from ruby-style variable name to JSON key
|
||||
def self.attribute_map
|
||||
{
|
||||
|
||||
#
|
||||
:'id' => :'id',
|
||||
|
||||
#
|
||||
:'name' => :'name'
|
||||
|
||||
}
|
||||
end
|
||||
|
||||
@ -20,7 +17,6 @@ module SwaggerClient
|
||||
{
|
||||
:'id' => :'int',
|
||||
:'name' => :'string'
|
||||
|
||||
}
|
||||
end
|
||||
|
||||
@ -30,15 +26,12 @@ module SwaggerClient
|
||||
# convert string to symbol for hash key
|
||||
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
||||
|
||||
|
||||
if attributes[:'id']
|
||||
@id = attributes[:'id']
|
||||
end
|
||||
|
||||
if attributes[:'name']
|
||||
@name = attributes[:'name']
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -5,25 +5,18 @@ module SwaggerClient
|
||||
# attribute mapping from ruby-style variable name to JSON key
|
||||
def self.attribute_map
|
||||
{
|
||||
|
||||
#
|
||||
:'id' => :'id',
|
||||
|
||||
#
|
||||
:'pet_id' => :'petId',
|
||||
|
||||
#
|
||||
:'quantity' => :'quantity',
|
||||
|
||||
#
|
||||
:'ship_date' => :'shipDate',
|
||||
|
||||
# Order Status
|
||||
:'status' => :'status',
|
||||
|
||||
#
|
||||
:'complete' => :'complete'
|
||||
|
||||
}
|
||||
end
|
||||
|
||||
@ -36,7 +29,6 @@ module SwaggerClient
|
||||
:'ship_date' => :'DateTime',
|
||||
:'status' => :'string',
|
||||
:'complete' => :'boolean'
|
||||
|
||||
}
|
||||
end
|
||||
|
||||
@ -46,31 +38,24 @@ module SwaggerClient
|
||||
# convert string to symbol for hash key
|
||||
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
||||
|
||||
|
||||
if attributes[:'id']
|
||||
@id = attributes[:'id']
|
||||
end
|
||||
|
||||
if attributes[:'petId']
|
||||
@pet_id = attributes[:'petId']
|
||||
end
|
||||
|
||||
if attributes[:'quantity']
|
||||
@quantity = attributes[:'quantity']
|
||||
end
|
||||
|
||||
if attributes[:'shipDate']
|
||||
@ship_date = attributes[:'shipDate']
|
||||
end
|
||||
|
||||
if attributes[:'status']
|
||||
@status = attributes[:'status']
|
||||
end
|
||||
|
||||
if attributes[:'complete']
|
||||
@complete = attributes[:'complete']
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -5,25 +5,18 @@ module SwaggerClient
|
||||
# attribute mapping from ruby-style variable name to JSON key
|
||||
def self.attribute_map
|
||||
{
|
||||
|
||||
#
|
||||
:'id' => :'id',
|
||||
|
||||
#
|
||||
:'category' => :'category',
|
||||
|
||||
#
|
||||
:'name' => :'name',
|
||||
|
||||
#
|
||||
:'photo_urls' => :'photoUrls',
|
||||
|
||||
#
|
||||
:'tags' => :'tags',
|
||||
|
||||
# pet status in the store
|
||||
:'status' => :'status'
|
||||
|
||||
}
|
||||
end
|
||||
|
||||
@ -36,7 +29,6 @@ module SwaggerClient
|
||||
:'photo_urls' => :'array[string]',
|
||||
:'tags' => :'array[Tag]',
|
||||
:'status' => :'string'
|
||||
|
||||
}
|
||||
end
|
||||
|
||||
@ -46,35 +38,28 @@ module SwaggerClient
|
||||
# convert string to symbol for hash key
|
||||
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
||||
|
||||
|
||||
if attributes[:'id']
|
||||
@id = attributes[:'id']
|
||||
end
|
||||
|
||||
if attributes[:'category']
|
||||
@category = attributes[:'category']
|
||||
end
|
||||
|
||||
if attributes[:'name']
|
||||
@name = attributes[:'name']
|
||||
end
|
||||
|
||||
if attributes[:'photoUrls']
|
||||
if (value = attributes[:'photoUrls']).is_a?(Array)
|
||||
@photo_urls = value
|
||||
end
|
||||
end
|
||||
|
||||
if attributes[:'tags']
|
||||
if (value = attributes[:'tags']).is_a?(Array)
|
||||
@tags = value
|
||||
end
|
||||
end
|
||||
|
||||
if attributes[:'status']
|
||||
@status = attributes[:'status']
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -5,13 +5,10 @@ module SwaggerClient
|
||||
# attribute mapping from ruby-style variable name to JSON key
|
||||
def self.attribute_map
|
||||
{
|
||||
|
||||
#
|
||||
:'id' => :'id',
|
||||
|
||||
#
|
||||
:'name' => :'name'
|
||||
|
||||
}
|
||||
end
|
||||
|
||||
@ -20,7 +17,6 @@ module SwaggerClient
|
||||
{
|
||||
:'id' => :'int',
|
||||
:'name' => :'string'
|
||||
|
||||
}
|
||||
end
|
||||
|
||||
@ -30,15 +26,12 @@ module SwaggerClient
|
||||
# convert string to symbol for hash key
|
||||
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
||||
|
||||
|
||||
if attributes[:'id']
|
||||
@id = attributes[:'id']
|
||||
end
|
||||
|
||||
if attributes[:'name']
|
||||
@name = attributes[:'name']
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -5,31 +5,22 @@ module SwaggerClient
|
||||
# attribute mapping from ruby-style variable name to JSON key
|
||||
def self.attribute_map
|
||||
{
|
||||
|
||||
#
|
||||
:'id' => :'id',
|
||||
|
||||
#
|
||||
:'username' => :'username',
|
||||
|
||||
#
|
||||
:'first_name' => :'firstName',
|
||||
|
||||
#
|
||||
:'last_name' => :'lastName',
|
||||
|
||||
#
|
||||
:'email' => :'email',
|
||||
|
||||
#
|
||||
:'password' => :'password',
|
||||
|
||||
#
|
||||
:'phone' => :'phone',
|
||||
|
||||
# User Status
|
||||
:'user_status' => :'userStatus'
|
||||
|
||||
}
|
||||
end
|
||||
|
||||
@ -44,7 +35,6 @@ module SwaggerClient
|
||||
:'password' => :'string',
|
||||
:'phone' => :'string',
|
||||
:'user_status' => :'int'
|
||||
|
||||
}
|
||||
end
|
||||
|
||||
@ -54,39 +44,30 @@ module SwaggerClient
|
||||
# convert string to symbol for hash key
|
||||
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
||||
|
||||
|
||||
if attributes[:'id']
|
||||
@id = attributes[:'id']
|
||||
end
|
||||
|
||||
if attributes[:'username']
|
||||
@username = attributes[:'username']
|
||||
end
|
||||
|
||||
if attributes[:'firstName']
|
||||
@first_name = attributes[:'firstName']
|
||||
end
|
||||
|
||||
if attributes[:'lastName']
|
||||
@last_name = attributes[:'lastName']
|
||||
end
|
||||
|
||||
if attributes[:'email']
|
||||
@email = attributes[:'email']
|
||||
end
|
||||
|
||||
if attributes[:'password']
|
||||
@password = attributes[:'password']
|
||||
end
|
||||
|
||||
if attributes[:'phone']
|
||||
@phone = attributes[:'phone']
|
||||
end
|
||||
|
||||
if attributes[:'userStatus']
|
||||
@user_status = attributes[:'userStatus']
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -45,7 +45,6 @@ module SwaggerClient
|
||||
@headers['api_key'] = get_api_key_with_prefix('api_key')
|
||||
when 'petstore_auth'
|
||||
# TODO: support oauth
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include <FNet.h>
|
||||
#include
|
||||
<FNet.h>
|
||||
|
||||
#include "SamiHelpers.h"
|
||||
#include "SamiError.h"
|
||||
@ -19,7 +20,8 @@ public:
|
||||
virtual ~SamiApiClient();
|
||||
|
||||
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*));
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
#include "SamiCategory.h"
|
||||
#include <FLocales.h>
|
||||
#include
|
||||
<FLocales.h>
|
||||
|
||||
using namespace Tizen::Base;
|
||||
using namespace Tizen::System;
|
||||
@ -158,6 +159,7 @@ SamiCategory::asJsonObject() {
|
||||
return pJsonObject;
|
||||
}
|
||||
|
||||
|
||||
Long*
|
||||
SamiCategory::getPId() {
|
||||
return pId;
|
||||
@ -167,6 +169,7 @@ SamiCategory::setPId(Long* pId) {
|
||||
this->pId = pId;
|
||||
}
|
||||
|
||||
|
||||
String*
|
||||
SamiCategory::getPName() {
|
||||
return pName;
|
||||
@ -178,5 +181,6 @@ SamiCategory::setPName(String* pName) {
|
||||
|
||||
|
||||
|
||||
|
||||
} /* namespace Swagger */
|
||||
|
||||
|
@ -7,10 +7,14 @@
|
||||
#ifndef SamiCategory_H_
|
||||
#define SamiCategory_H_
|
||||
|
||||
#include <FApp.h>
|
||||
#include <FBase.h>
|
||||
#include <FSystem.h>
|
||||
#include <FWebJson.h>
|
||||
#include
|
||||
<FApp.h>
|
||||
#include
|
||||
<FBase.h>
|
||||
#include
|
||||
<FSystem.h>
|
||||
#include
|
||||
<FWebJson.h>
|
||||
#include "SamiHelpers.h"
|
||||
#include "SamiObject.h"
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
#ifndef SamiError_H_
|
||||
#define SamiError_H_
|
||||
|
||||
#include <FBase.h>
|
||||
#include
|
||||
<FBase.h>
|
||||
|
||||
using namespace Tizen::Base;
|
||||
|
||||
|
@ -1,11 +1,16 @@
|
||||
#ifndef HELPERS_H_
|
||||
#define HELPERS_H_
|
||||
|
||||
#include <FApp.h>
|
||||
#include <FBase.h>
|
||||
#include <FSystem.h>
|
||||
#include <FWebJson.h>
|
||||
#include <FLocales.h>
|
||||
#include
|
||||
<FApp.h>
|
||||
#include
|
||||
<FBase.h>
|
||||
#include
|
||||
<FSystem.h>
|
||||
#include
|
||||
<FWebJson.h>
|
||||
#include
|
||||
<FLocales.h>
|
||||
#include "SamiHelpers.h"
|
||||
#include "SamiObject.h"
|
||||
|
||||
|
@ -1,9 +1,12 @@
|
||||
#ifndef _Sami_OBJECT_H_
|
||||
#define _Sami_OBJECT_H_
|
||||
|
||||
#include <FNet.h>
|
||||
#include <FWebJson.h>
|
||||
#include <FBase.h>
|
||||
#include
|
||||
<FNet.h>
|
||||
#include
|
||||
<FWebJson.h>
|
||||
#include
|
||||
<FBase.h>
|
||||
|
||||
using Tizen::Base::String;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
#include "SamiOrder.h"
|
||||
#include <FLocales.h>
|
||||
#include
|
||||
<FLocales.h>
|
||||
|
||||
using namespace Tizen::Base;
|
||||
using namespace Tizen::System;
|
||||
@ -234,6 +235,7 @@ SamiOrder::asJsonObject() {
|
||||
return pJsonObject;
|
||||
}
|
||||
|
||||
|
||||
Long*
|
||||
SamiOrder::getPId() {
|
||||
return pId;
|
||||
@ -243,6 +245,7 @@ SamiOrder::setPId(Long* pId) {
|
||||
this->pId = pId;
|
||||
}
|
||||
|
||||
|
||||
Long*
|
||||
SamiOrder::getPPetId() {
|
||||
return pPetId;
|
||||
@ -252,6 +255,7 @@ SamiOrder::setPPetId(Long* pPetId) {
|
||||
this->pPetId = pPetId;
|
||||
}
|
||||
|
||||
|
||||
Integer*
|
||||
SamiOrder::getPQuantity() {
|
||||
return pQuantity;
|
||||
@ -261,6 +265,7 @@ SamiOrder::setPQuantity(Integer* pQuantity) {
|
||||
this->pQuantity = pQuantity;
|
||||
}
|
||||
|
||||
|
||||
DateTime*
|
||||
SamiOrder::getPShipDate() {
|
||||
return pShipDate;
|
||||
@ -270,6 +275,7 @@ SamiOrder::setPShipDate(DateTime* pShipDate) {
|
||||
this->pShipDate = pShipDate;
|
||||
}
|
||||
|
||||
|
||||
String*
|
||||
SamiOrder::getPStatus() {
|
||||
return pStatus;
|
||||
@ -279,6 +285,7 @@ SamiOrder::setPStatus(String* pStatus) {
|
||||
this->pStatus = pStatus;
|
||||
}
|
||||
|
||||
|
||||
Boolean*
|
||||
SamiOrder::getPComplete() {
|
||||
return pComplete;
|
||||
@ -290,5 +297,6 @@ SamiOrder::setPComplete(Boolean* pComplete) {
|
||||
|
||||
|
||||
|
||||
|
||||
} /* namespace Swagger */
|
||||
|
||||
|
@ -7,10 +7,14 @@
|
||||
#ifndef SamiOrder_H_
|
||||
#define SamiOrder_H_
|
||||
|
||||
#include <FApp.h>
|
||||
#include <FBase.h>
|
||||
#include <FSystem.h>
|
||||
#include <FWebJson.h>
|
||||
#include
|
||||
<FApp.h>
|
||||
#include
|
||||
<FBase.h>
|
||||
#include
|
||||
<FSystem.h>
|
||||
#include
|
||||
<FWebJson.h>
|
||||
#include "SamiHelpers.h"
|
||||
#include "SamiObject.h"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
#include "SamiPet.h"
|
||||
#include <FLocales.h>
|
||||
#include
|
||||
<FLocales.h>
|
||||
|
||||
using namespace Tizen::Base;
|
||||
using namespace Tizen::System;
|
||||
@ -234,6 +235,7 @@ SamiPet::asJsonObject() {
|
||||
return pJsonObject;
|
||||
}
|
||||
|
||||
|
||||
Long*
|
||||
SamiPet::getPId() {
|
||||
return pId;
|
||||
@ -243,6 +245,7 @@ SamiPet::setPId(Long* pId) {
|
||||
this->pId = pId;
|
||||
}
|
||||
|
||||
|
||||
SamiCategory*
|
||||
SamiPet::getPCategory() {
|
||||
return pCategory;
|
||||
@ -252,6 +255,7 @@ SamiPet::setPCategory(SamiCategory* pCategory) {
|
||||
this->pCategory = pCategory;
|
||||
}
|
||||
|
||||
|
||||
String*
|
||||
SamiPet::getPName() {
|
||||
return pName;
|
||||
@ -261,6 +265,7 @@ SamiPet::setPName(String* pName) {
|
||||
this->pName = pName;
|
||||
}
|
||||
|
||||
|
||||
IList*
|
||||
SamiPet::getPPhotoUrls() {
|
||||
return pPhotoUrls;
|
||||
@ -270,6 +275,7 @@ SamiPet::setPPhotoUrls(IList* pPhotoUrls) {
|
||||
this->pPhotoUrls = pPhotoUrls;
|
||||
}
|
||||
|
||||
|
||||
IList*
|
||||
SamiPet::getPTags() {
|
||||
return pTags;
|
||||
@ -279,6 +285,7 @@ SamiPet::setPTags(IList* pTags) {
|
||||
this->pTags = pTags;
|
||||
}
|
||||
|
||||
|
||||
String*
|
||||
SamiPet::getPStatus() {
|
||||
return pStatus;
|
||||
@ -290,5 +297,6 @@ SamiPet::setPStatus(String* pStatus) {
|
||||
|
||||
|
||||
|
||||
|
||||
} /* namespace Swagger */
|
||||
|
||||
|
@ -7,10 +7,14 @@
|
||||
#ifndef SamiPet_H_
|
||||
#define SamiPet_H_
|
||||
|
||||
#include <FApp.h>
|
||||
#include <FBase.h>
|
||||
#include <FSystem.h>
|
||||
#include <FWebJson.h>
|
||||
#include
|
||||
<FApp.h>
|
||||
#include
|
||||
<FBase.h>
|
||||
#include
|
||||
<FSystem.h>
|
||||
#include
|
||||
<FWebJson.h>
|
||||
#include "SamiHelpers.h"
|
||||
#include "SamiObject.h"
|
||||
|
||||
|
@ -16,6 +16,7 @@ SamiPetApi::~SamiPetApi() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
updatePetProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||
int code = pHttpResponse->GetHttpStatusCode();
|
||||
@ -65,6 +66,7 @@ SamiPetApi::updatePetWithCompletion(SamiPet* body, void(*success)(SamiError*)) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
addPetProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||
int code = pHttpResponse->GetHttpStatusCode();
|
||||
@ -114,6 +116,7 @@ SamiPetApi::addPetWithCompletion(SamiPet* body, void(*success)(SamiError*)) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
findPetsByStatusProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||
int code = pHttpResponse->GetHttpStatusCode();
|
||||
@ -183,6 +186,7 @@ SamiPetApi::findPetsByStatusWithCompletion(IList* status, void (* success)(IList
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
findPetsByTagsProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||
int code = pHttpResponse->GetHttpStatusCode();
|
||||
@ -252,6 +256,7 @@ SamiPetApi::findPetsByTagsWithCompletion(IList* tags, void (* success)(IList*, S
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
getPetByIdProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||
int code = pHttpResponse->GetHttpStatusCode();
|
||||
@ -319,6 +324,7 @@ SamiPetApi::getPetByIdWithCompletion(Long* petId, void (* success)(SamiPet*, Sam
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
updatePetWithFormProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||
int code = pHttpResponse->GetHttpStatusCode();
|
||||
@ -365,6 +371,7 @@ SamiPetApi::updatePetWithFormWithCompletion(String* petId, String* name, String*
|
||||
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
deletePetProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||
int code = pHttpResponse->GetHttpStatusCode();
|
||||
@ -414,6 +421,7 @@ SamiPetApi::deletePetWithCompletion(String* apiKey, Long* petId, void(*success)(
|
||||
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
uploadFileProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||
int code = pHttpResponse->GetHttpStatusCode();
|
||||
@ -461,4 +469,5 @@ SamiPetApi::uploadFileWithCompletion(Long* petId, String* additionalMetadata, Sa
|
||||
}
|
||||
|
||||
|
||||
|
||||
} /* namespace Swagger */
|
||||
|
@ -1,7 +1,8 @@
|
||||
#ifndef SamiPetApi_H_
|
||||
#define SamiPetApi_H_
|
||||
|
||||
#include <FNet.h>
|
||||
#include
|
||||
<FNet.h>
|
||||
#include "SamiApiClient.h"
|
||||
#include "SamiError.h"
|
||||
|
||||
@ -10,10 +11,12 @@ using Tizen::Base::String;
|
||||
using Tizen::Base::Long;
|
||||
#include "SamiFile.h"
|
||||
|
||||
|
||||
using namespace Tizen::Net::Http;
|
||||
|
||||
namespace Swagger {
|
||||
|
||||
|
||||
class SamiPetApi {
|
||||
public:
|
||||
SamiPetApi();
|
||||
@ -27,22 +30,30 @@ public:
|
||||
addPetWithCompletion(SamiPet* body, void(* handler)(SamiError*));
|
||||
|
||||
IList*
|
||||
findPetsByStatusWithCompletion(IList* status, void (* handler)(IList*, SamiError*));
|
||||
findPetsByStatusWithCompletion(IList* status, void (* handler)(IList*
|
||||
, SamiError*));
|
||||
|
||||
IList*
|
||||
findPetsByTagsWithCompletion(IList* tags, void (* handler)(IList*, SamiError*));
|
||||
findPetsByTagsWithCompletion(IList* tags, void (* handler)(IList*
|
||||
, SamiError*));
|
||||
|
||||
SamiPet*
|
||||
getPetByIdWithCompletion(Long* petId, void (* handler)(SamiPet*, SamiError*));
|
||||
getPetByIdWithCompletion(Long* petId, void (* handler)(SamiPet*
|
||||
, SamiError*));
|
||||
|
||||
void
|
||||
updatePetWithFormWithCompletion(String* petId, String* name, String* status, void(* handler)(SamiError*));
|
||||
updatePetWithFormWithCompletion(String* petId
|
||||
, String* name
|
||||
, String* status, void(* handler)(SamiError*));
|
||||
|
||||
void
|
||||
deletePetWithCompletion(String* apiKey, Long* petId, void(* handler)(SamiError*));
|
||||
deletePetWithCompletion(String* apiKey
|
||||
, Long* petId, void(* handler)(SamiError*));
|
||||
|
||||
void
|
||||
uploadFileWithCompletion(Long* petId, String* additionalMetadata, SamiFile* file, void(* handler)(SamiError*));
|
||||
uploadFileWithCompletion(Long* petId
|
||||
, String* additionalMetadata
|
||||
, SamiFile* file, void(* handler)(SamiError*));
|
||||
|
||||
static String getBasePath() {
|
||||
return L"http://petstore.swagger.io/v2";
|
||||
@ -53,6 +64,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
|
||||
} /* namespace Swagger */
|
||||
|
||||
#endif /* SamiPetApi_H_ */
|
||||
|
@ -16,6 +16,7 @@ SamiStoreApi::~SamiStoreApi() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
getInventoryProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||
int code = pHttpResponse->GetHttpStatusCode();
|
||||
@ -78,6 +79,7 @@ SamiStoreApi::getInventoryWithCompletion( void (* success)(HashMap*, SamiError*)
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
placeOrderProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||
int code = pHttpResponse->GetHttpStatusCode();
|
||||
@ -148,6 +150,7 @@ SamiStoreApi::placeOrderWithCompletion(SamiOrder* body, void (* success)(SamiOrd
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
getOrderByIdProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||
int code = pHttpResponse->GetHttpStatusCode();
|
||||
@ -215,6 +218,7 @@ SamiStoreApi::getOrderByIdWithCompletion(String* orderId, void (* success)(SamiO
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
deleteOrderProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
|
||||
int code = pHttpResponse->GetHttpStatusCode();
|
||||
@ -262,4 +266,5 @@ SamiStoreApi::deleteOrderWithCompletion(String* orderId, void(*success)(SamiErro
|
||||
}
|
||||
|
||||
|
||||
|
||||
} /* namespace Swagger */
|
||||
|
@ -1,7 +1,8 @@
|
||||
#ifndef SamiStoreApi_H_
|
||||
#define SamiStoreApi_H_
|
||||
|
||||
#include <FNet.h>
|
||||
#include
|
||||
<FNet.h>
|
||||
#include "SamiApiClient.h"
|
||||
#include "SamiError.h"
|
||||
|
||||
@ -9,10 +10,12 @@ using Tizen::Base::Integer;
|
||||
#include "SamiOrder.h"
|
||||
using Tizen::Base::String;
|
||||
|
||||
|
||||
using namespace Tizen::Net::Http;
|
||||
|
||||
namespace Swagger {
|
||||
|
||||
|
||||
class SamiStoreApi {
|
||||
public:
|
||||
SamiStoreApi();
|
||||
@ -20,13 +23,16 @@ public:
|
||||
|
||||
|
||||
HashMap*
|
||||
getInventoryWithCompletion( void (* handler)(HashMap*, SamiError*));
|
||||
getInventoryWithCompletion( void (* handler)(HashMap*
|
||||
, SamiError*));
|
||||
|
||||
SamiOrder*
|
||||
placeOrderWithCompletion(SamiOrder* body, void (* handler)(SamiOrder*, SamiError*));
|
||||
placeOrderWithCompletion(SamiOrder* body, void (* handler)(SamiOrder*
|
||||
, SamiError*));
|
||||
|
||||
SamiOrder*
|
||||
getOrderByIdWithCompletion(String* orderId, void (* handler)(SamiOrder*, SamiError*));
|
||||
getOrderByIdWithCompletion(String* orderId, void (* handler)(SamiOrder*
|
||||
, SamiError*));
|
||||
|
||||
void
|
||||
deleteOrderWithCompletion(String* orderId, void(* handler)(SamiError*));
|
||||
@ -40,6 +46,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
|
||||
} /* namespace Swagger */
|
||||
|
||||
#endif /* SamiStoreApi_H_ */
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
#include "SamiTag.h"
|
||||
#include <FLocales.h>
|
||||
#include
|
||||
<FLocales.h>
|
||||
|
||||
using namespace Tizen::Base;
|
||||
using namespace Tizen::System;
|
||||
@ -158,6 +159,7 @@ SamiTag::asJsonObject() {
|
||||
return pJsonObject;
|
||||
}
|
||||
|
||||
|
||||
Long*
|
||||
SamiTag::getPId() {
|
||||
return pId;
|
||||
@ -167,6 +169,7 @@ SamiTag::setPId(Long* pId) {
|
||||
this->pId = pId;
|
||||
}
|
||||
|
||||
|
||||
String*
|
||||
SamiTag::getPName() {
|
||||
return pName;
|
||||
@ -178,5 +181,6 @@ SamiTag::setPName(String* pName) {
|
||||
|
||||
|
||||
|
||||
|
||||
} /* namespace Swagger */
|
||||
|
||||
|
@ -7,10 +7,14 @@
|
||||
#ifndef SamiTag_H_
|
||||
#define SamiTag_H_
|
||||
|
||||
#include <FApp.h>
|
||||
#include <FBase.h>
|
||||
#include <FSystem.h>
|
||||
#include <FWebJson.h>
|
||||
#include
|
||||
<FApp.h>
|
||||
#include
|
||||
<FBase.h>
|
||||
#include
|
||||
<FSystem.h>
|
||||
#include
|
||||
<FWebJson.h>
|
||||
#include "SamiHelpers.h"
|
||||
#include "SamiObject.h"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
#include "SamiUser.h"
|
||||
#include <FLocales.h>
|
||||
#include
|
||||
<FLocales.h>
|
||||
|
||||
using namespace Tizen::Base;
|
||||
using namespace Tizen::System;
|
||||
@ -272,6 +273,7 @@ SamiUser::asJsonObject() {
|
||||
return pJsonObject;
|
||||
}
|
||||
|
||||
|
||||
Long*
|
||||
SamiUser::getPId() {
|
||||
return pId;
|
||||
@ -281,6 +283,7 @@ SamiUser::setPId(Long* pId) {
|
||||
this->pId = pId;
|
||||
}
|
||||
|
||||
|
||||
String*
|
||||
SamiUser::getPUsername() {
|
||||
return pUsername;
|
||||
@ -290,6 +293,7 @@ SamiUser::setPUsername(String* pUsername) {
|
||||
this->pUsername = pUsername;
|
||||
}
|
||||
|
||||
|
||||
String*
|
||||
SamiUser::getPFirstName() {
|
||||
return pFirstName;
|
||||
@ -299,6 +303,7 @@ SamiUser::setPFirstName(String* pFirstName) {
|
||||
this->pFirstName = pFirstName;
|
||||
}
|
||||
|
||||
|
||||
String*
|
||||
SamiUser::getPLastName() {
|
||||
return pLastName;
|
||||
@ -308,6 +313,7 @@ SamiUser::setPLastName(String* pLastName) {
|
||||
this->pLastName = pLastName;
|
||||
}
|
||||
|
||||
|
||||
String*
|
||||
SamiUser::getPEmail() {
|
||||
return pEmail;
|
||||
@ -317,6 +323,7 @@ SamiUser::setPEmail(String* pEmail) {
|
||||
this->pEmail = pEmail;
|
||||
}
|
||||
|
||||
|
||||
String*
|
||||
SamiUser::getPPassword() {
|
||||
return pPassword;
|
||||
@ -326,6 +333,7 @@ SamiUser::setPPassword(String* pPassword) {
|
||||
this->pPassword = pPassword;
|
||||
}
|
||||
|
||||
|
||||
String*
|
||||
SamiUser::getPPhone() {
|
||||
return pPhone;
|
||||
@ -335,6 +343,7 @@ SamiUser::setPPhone(String* pPhone) {
|
||||
this->pPhone = pPhone;
|
||||
}
|
||||
|
||||
|
||||
Integer*
|
||||
SamiUser::getPUserStatus() {
|
||||
return pUserStatus;
|
||||
@ -346,5 +355,6 @@ SamiUser::setPUserStatus(Integer* pUserStatus) {
|
||||
|
||||
|
||||
|
||||
|
||||
} /* 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