mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-08 20:36:10 +00:00
add optional parameter to c# api client (enabled by default)
This commit is contained in:
@@ -22,7 +22,7 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||
/// <returns></returns>
|
||||
void UpdatePet (Pet body);
|
||||
void UpdatePet (Pet body = null);
|
||||
|
||||
/// <summary>
|
||||
/// Update an existing pet
|
||||
@@ -32,7 +32,7 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||
/// <returns></returns>
|
||||
System.Threading.Tasks.Task UpdatePetAsync (Pet body);
|
||||
System.Threading.Tasks.Task UpdatePetAsync (Pet body = null);
|
||||
|
||||
/// <summary>
|
||||
/// Add a new pet to the store
|
||||
@@ -42,7 +42,7 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||
/// <returns></returns>
|
||||
void AddPet (Pet body);
|
||||
void AddPet (Pet body = null);
|
||||
|
||||
/// <summary>
|
||||
/// Add a new pet to the store
|
||||
@@ -52,7 +52,7 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||
/// <returns></returns>
|
||||
System.Threading.Tasks.Task AddPetAsync (Pet body);
|
||||
System.Threading.Tasks.Task AddPetAsync (Pet body = null);
|
||||
|
||||
/// <summary>
|
||||
/// Finds Pets by status
|
||||
@@ -62,7 +62,7 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <param name="status">Status values that need to be considered for filter</param>
|
||||
/// <returns></returns>
|
||||
List<Pet> FindPetsByStatus (List<string> status);
|
||||
List<Pet> FindPetsByStatus (List<string> status = null);
|
||||
|
||||
/// <summary>
|
||||
/// Finds Pets by status
|
||||
@@ -72,7 +72,7 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <param name="status">Status values that need to be considered for filter</param>
|
||||
/// <returns></returns>
|
||||
System.Threading.Tasks.Task<List<Pet>> FindPetsByStatusAsync (List<string> status);
|
||||
System.Threading.Tasks.Task<List<Pet>> FindPetsByStatusAsync (List<string> status = null);
|
||||
|
||||
/// <summary>
|
||||
/// Finds Pets by tags
|
||||
@@ -82,7 +82,7 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <param name="tags">Tags to filter by</param>
|
||||
/// <returns></returns>
|
||||
List<Pet> FindPetsByTags (List<string> tags);
|
||||
List<Pet> FindPetsByTags (List<string> tags = null);
|
||||
|
||||
/// <summary>
|
||||
/// Finds Pets by tags
|
||||
@@ -92,7 +92,7 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <param name="tags">Tags to filter by</param>
|
||||
/// <returns></returns>
|
||||
System.Threading.Tasks.Task<List<Pet>> FindPetsByTagsAsync (List<string> tags);
|
||||
System.Threading.Tasks.Task<List<Pet>> FindPetsByTagsAsync (List<string> tags = null);
|
||||
|
||||
/// <summary>
|
||||
/// Find pet by ID
|
||||
@@ -124,7 +124,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="name">Updated name of the pet</param>
|
||||
/// <param name="status">Updated status of the pet</param>
|
||||
/// <returns></returns>
|
||||
void UpdatePetWithForm (string petId, string name, string status);
|
||||
void UpdatePetWithForm (string petId, string name = null, string status = null);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a pet in the store with form data
|
||||
@@ -136,7 +136,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="name">Updated name of the pet</param>
|
||||
/// <param name="status">Updated status of the pet</param>
|
||||
/// <returns></returns>
|
||||
System.Threading.Tasks.Task UpdatePetWithFormAsync (string petId, string name, string status);
|
||||
System.Threading.Tasks.Task UpdatePetWithFormAsync (string petId, string name = null, string status = null);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a pet
|
||||
@@ -147,7 +147,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="petId">Pet id to delete</param>
|
||||
/// <param name="apiKey"></param>
|
||||
/// <returns></returns>
|
||||
void DeletePet (long? petId, string apiKey);
|
||||
void DeletePet (long? petId, string apiKey = null);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a pet
|
||||
@@ -158,7 +158,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="petId">Pet id to delete</param>
|
||||
/// <param name="apiKey"></param>
|
||||
/// <returns></returns>
|
||||
System.Threading.Tasks.Task DeletePetAsync (long? petId, string apiKey);
|
||||
System.Threading.Tasks.Task DeletePetAsync (long? petId, string apiKey = null);
|
||||
|
||||
/// <summary>
|
||||
/// uploads an image
|
||||
@@ -170,7 +170,7 @@ namespace IO.Swagger.Api
|
||||
/// <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, Stream file);
|
||||
void UploadFile (long? petId, string additionalMetadata = null, Stream file = null);
|
||||
|
||||
/// <summary>
|
||||
/// uploads an image
|
||||
@@ -182,7 +182,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server</param>
|
||||
/// <param name="file">file to upload</param>
|
||||
/// <returns></returns>
|
||||
System.Threading.Tasks.Task UploadFileAsync (long? petId, string additionalMetadata, Stream file);
|
||||
System.Threading.Tasks.Task UploadFileAsync (long? petId, string additionalMetadata = null, Stream file = null);
|
||||
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||
/// <returns></returns>
|
||||
public void UpdatePet (Pet body)
|
||||
public void UpdatePet (Pet body = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -294,7 +294,7 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||
/// <returns></returns>
|
||||
public async System.Threading.Tasks.Task UpdatePetAsync (Pet body)
|
||||
public async System.Threading.Tasks.Task UpdatePetAsync (Pet body = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -342,7 +342,7 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||
/// <returns></returns>
|
||||
public void AddPet (Pet body)
|
||||
public void AddPet (Pet body = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -392,7 +392,7 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||
/// <returns></returns>
|
||||
public async System.Threading.Tasks.Task AddPetAsync (Pet body)
|
||||
public async System.Threading.Tasks.Task AddPetAsync (Pet body = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -440,7 +440,7 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <param name="status">Status values that need to be considered for filter</param>
|
||||
/// <returns></returns>
|
||||
public List<Pet> FindPetsByStatus (List<string> status)
|
||||
public List<Pet> FindPetsByStatus (List<string> status = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -490,7 +490,7 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <param name="status">Status values that need to be considered for filter</param>
|
||||
/// <returns></returns>
|
||||
public async System.Threading.Tasks.Task<List<Pet>> FindPetsByStatusAsync (List<string> status)
|
||||
public async System.Threading.Tasks.Task<List<Pet>> FindPetsByStatusAsync (List<string> status = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -537,7 +537,7 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <param name="tags">Tags to filter by</param>
|
||||
/// <returns></returns>
|
||||
public List<Pet> FindPetsByTags (List<string> tags)
|
||||
public List<Pet> FindPetsByTags (List<string> tags = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -587,7 +587,7 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <param name="tags">Tags to filter by</param>
|
||||
/// <returns></returns>
|
||||
public async System.Threading.Tasks.Task<List<Pet>> FindPetsByTagsAsync (List<string> tags)
|
||||
public async System.Threading.Tasks.Task<List<Pet>> FindPetsByTagsAsync (List<string> tags = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -738,7 +738,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="name">Updated name of the pet</param>
|
||||
/// <param name="status">Updated status of the pet</param>
|
||||
/// <returns></returns>
|
||||
public void UpdatePetWithForm (string petId, string name, string status)
|
||||
public void UpdatePetWithForm (string petId, string name = null, string status = null)
|
||||
{
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@@ -795,7 +795,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="name">Updated name of the pet</param>
|
||||
/// <param name="status">Updated status of the pet</param>
|
||||
/// <returns></returns>
|
||||
public async System.Threading.Tasks.Task UpdatePetWithFormAsync (string petId, string name, string status)
|
||||
public async System.Threading.Tasks.Task UpdatePetWithFormAsync (string petId, string name = null, string status = null)
|
||||
{
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling UpdatePetWithForm");
|
||||
@@ -848,7 +848,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="petId">Pet id to delete</param>
|
||||
/// <param name="apiKey"></param>
|
||||
/// <returns></returns>
|
||||
public void DeletePet (long? petId, string apiKey)
|
||||
public void DeletePet (long? petId, string apiKey = null)
|
||||
{
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@@ -903,7 +903,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="petId">Pet id to delete</param>
|
||||
/// <param name="apiKey"></param>
|
||||
/// <returns></returns>
|
||||
public async System.Threading.Tasks.Task DeletePetAsync (long? petId, string apiKey)
|
||||
public async System.Threading.Tasks.Task DeletePetAsync (long? petId, string apiKey = null)
|
||||
{
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling DeletePet");
|
||||
@@ -956,7 +956,7 @@ namespace IO.Swagger.Api
|
||||
/// <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, Stream file)
|
||||
public void UploadFile (long? petId, string additionalMetadata = null, Stream file = null)
|
||||
{
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@@ -1013,7 +1013,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server</param>
|
||||
/// <param name="file">file to upload</param>
|
||||
/// <returns></returns>
|
||||
public async System.Threading.Tasks.Task UploadFileAsync (long? petId, string additionalMetadata, Stream file)
|
||||
public async System.Threading.Tasks.Task UploadFileAsync (long? petId, string additionalMetadata = null, Stream file = null)
|
||||
{
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling UploadFile");
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <param name="body">order placed for purchasing the pet</param>
|
||||
/// <returns>Order</returns>
|
||||
Order PlaceOrder (Order body);
|
||||
Order PlaceOrder (Order body = null);
|
||||
|
||||
/// <summary>
|
||||
/// Place an order for a pet
|
||||
@@ -50,7 +50,7 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <param name="body">order placed for purchasing the pet</param>
|
||||
/// <returns>Order</returns>
|
||||
System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body);
|
||||
System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body = null);
|
||||
|
||||
/// <summary>
|
||||
/// Find purchase order by ID
|
||||
@@ -245,7 +245,7 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <param name="body">order placed for purchasing the pet</param>
|
||||
/// <returns>Order</returns>
|
||||
public Order PlaceOrder (Order body)
|
||||
public Order PlaceOrder (Order body = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -295,7 +295,7 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <param name="body">order placed for purchasing the pet</param>
|
||||
/// <returns>Order</returns>
|
||||
public async System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body)
|
||||
public async System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body = null)
|
||||
{
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <param name="body">Created user object</param>
|
||||
/// <returns></returns>
|
||||
void CreateUser (User body);
|
||||
void CreateUser (User body = null);
|
||||
|
||||
/// <summary>
|
||||
/// Create user
|
||||
@@ -32,7 +32,7 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <param name="body">Created user object</param>
|
||||
/// <returns></returns>
|
||||
System.Threading.Tasks.Task CreateUserAsync (User body);
|
||||
System.Threading.Tasks.Task CreateUserAsync (User body = null);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@@ -42,7 +42,7 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
void CreateUsersWithArrayInput (List<User> body);
|
||||
void CreateUsersWithArrayInput (List<User> body = null);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@@ -52,7 +52,7 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body);
|
||||
System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body = null);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@@ -62,7 +62,7 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
void CreateUsersWithListInput (List<User> body);
|
||||
void CreateUsersWithListInput (List<User> body = null);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@@ -72,7 +72,7 @@ namespace IO.Swagger.Api
|
||||
/// </remarks>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body);
|
||||
System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body = null);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
@@ -83,7 +83,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <returns>string</returns>
|
||||
string LoginUser (string username, string password);
|
||||
string LoginUser (string username = null, string password = null);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
@@ -94,7 +94,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <returns>string</returns>
|
||||
System.Threading.Tasks.Task<string> LoginUserAsync (string username, string password);
|
||||
System.Threading.Tasks.Task<string> LoginUserAsync (string username = null, string password = null);
|
||||
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
@@ -143,7 +143,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="body">Updated user object</param>
|
||||
/// <returns></returns>
|
||||
void UpdateUser (string username, User body);
|
||||
void UpdateUser (string username, User body = null);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user
|
||||
@@ -154,7 +154,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="body">Updated user object</param>
|
||||
/// <returns></returns>
|
||||
System.Threading.Tasks.Task UpdateUserAsync (string username, User body);
|
||||
System.Threading.Tasks.Task UpdateUserAsync (string username, User body = null);
|
||||
|
||||
/// <summary>
|
||||
/// Delete user
|
||||
@@ -236,7 +236,7 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <param name="body">Created user object</param>
|
||||
/// <returns></returns>
|
||||
public void CreateUser (User body)
|
||||
public void CreateUser (User body = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <param name="body">Created user object</param>
|
||||
/// <returns></returns>
|
||||
public async System.Threading.Tasks.Task CreateUserAsync (User body)
|
||||
public async System.Threading.Tasks.Task CreateUserAsync (User body = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -334,7 +334,7 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
public void CreateUsersWithArrayInput (List<User> body)
|
||||
public void CreateUsersWithArrayInput (List<User> body = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -384,7 +384,7 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body)
|
||||
public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -432,7 +432,7 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
public void CreateUsersWithListInput (List<User> body)
|
||||
public void CreateUsersWithListInput (List<User> body = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -482,7 +482,7 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
public async System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body)
|
||||
public async System.Threading.Tasks.Task CreateUsersWithListInputAsync (List<User> body = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -531,7 +531,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <returns>string</returns>
|
||||
public string LoginUser (string username, string password)
|
||||
public string LoginUser (string username = null, string password = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -583,7 +583,7 @@ namespace IO.Swagger.Api
|
||||
/// <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 System.Threading.Tasks.Task<string> LoginUserAsync (string username, string password)
|
||||
public async System.Threading.Tasks.Task<string> LoginUserAsync (string username = null, string password = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -828,7 +828,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="body">Updated user object</param>
|
||||
/// <returns></returns>
|
||||
public void UpdateUser (string username, User body)
|
||||
public void UpdateUser (string username, User body = null)
|
||||
{
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
@@ -883,7 +883,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="body">Updated user object</param>
|
||||
/// <returns></returns>
|
||||
public async System.Threading.Tasks.Task UpdateUserAsync (string username, User body)
|
||||
public async System.Threading.Tasks.Task UpdateUserAsync (string username, User body = null)
|
||||
{
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) throw new ApiException(400, "Missing required parameter 'username' when calling UpdateUser");
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
|
||||
<MonoDevelop.Ide.Workbench ActiveDocument="TestPet.cs">
|
||||
<Files>
|
||||
<File FileName="TestPet.cs" Line="8" Column="25" />
|
||||
<File FileName="TestPet.cs" Line="15" Column="3" />
|
||||
</Files>
|
||||
</MonoDevelop.Ide.Workbench>
|
||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
|
||||
@@ -121,6 +121,11 @@ namespace SwaggerClient.TestPet
|
||||
|
||||
Assert.AreEqual (petId, response.Tags [0].Id);
|
||||
Assert.AreEqual (56, response.Category.Id);
|
||||
|
||||
// test optional parameter
|
||||
petApi.UpdatePetWithForm (petId.ToString(), "new form name2");
|
||||
Pet response2 = petApi.GetPetById (petId);
|
||||
Assert.AreEqual ("new form name2", response2.Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -136,7 +141,8 @@ namespace SwaggerClient.TestPet
|
||||
petApi.UploadFile(petId, "new form name", fileStream);
|
||||
|
||||
// test file upload without any form parameters
|
||||
petApi.UploadFile(petId, null, fileStream);
|
||||
// using optional parameter syntax introduced at .net 4.0
|
||||
petApi.UploadFile(petId: petId, file: fileStream);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user