Update C# dotnet2 client with OAS2, OAS3 petstore (#143)

* update csharp2 from codegen 2x

* update csharp dotnet 2 client (oas2)

* update csharp dotnet2 with pestore oas3
This commit is contained in:
William Cheng 2018-04-19 15:05:47 +08:00 committed by GitHub
parent 6e2ca294b5
commit 80d10e2cba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 145 additions and 128 deletions

View File

@ -26,6 +26,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l csharp-dotnet2 -o samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient --additional-properties hideGenerationTimestamp=true"
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l csharp-dotnet2 -o samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient --additional-properties hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags

View File

@ -0,0 +1,31 @@
#!/bin/sh
SCRIPT="$0"
while [ -h "$SCRIPT" ] ; do
ls=`ls -ld "$SCRIPT"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
SCRIPT="$link"
else
SCRIPT=`dirname "$SCRIPT"`/"$link"
fi
done
if [ ! -d "${APP_DIR}" ]; then
APP_DIR=`dirname "$SCRIPT"`/..
APP_DIR=`cd "${APP_DIR}"; pwd`
fi
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
if [ ! -f "$executable" ]
then
mvn clean package
fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -l csharp-dotnet2 -o samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient --additional-properties hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags

View File

@ -1041,6 +1041,8 @@ public class DefaultCodegen implements CodegenConfig {
codegenParameter.example = "3.4";
} else if (Boolean.TRUE.equals(codegenParameter.isDouble)) {
codegenParameter.example = "1.2";
} else if (Boolean.TRUE.equals(codegenParameter.isNumber)) {
codegenParameter.example = "8.14";
} else if (Boolean.TRUE.equals(codegenParameter.isBinary)) {
codegenParameter.example = "BINARY_DATA_HERE";
} else if (Boolean.TRUE.equals(codegenParameter.isByteArray)) {

View File

@ -1,6 +1,7 @@
package org.openapitools.codegen.languages;
import org.openapitools.codegen.*;
import java.io.File;
public class CSharpDotNet2ClientCodegen extends AbstractCSharpCodegen {

View File

@ -47,7 +47,12 @@ namespace Example
var apiInstance = new {{classname}}();
{{#allParams}}
{{#isPrimitiveType}}
{{^isBinary}}
var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
{{/isBinary}}
{{#isBinary}}
var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
{{/isBinary}}
{{/isPrimitiveType}}
{{^isPrimitiveType}}
var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
@ -75,7 +80,7 @@ namespace Example
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}
{{#allParams}} **{{paramName}}** | {{#isFile}}**{{{dataType}}}**{{/isFile}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{{dataType}}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{baseType}}.md){{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
{{/allParams}}
### Return type

View File

@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{datatype}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{datatype}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
{{/vars}}
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -6,7 +6,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c
- API version: 1.0.0
- SDK version: 1.0.0
- Build package: io.swagger.codegen.languages.CsharpDotNet2ClientCodegen
- Build package: org.openapitools.codegen.languages.CSharpDotNet2ClientCodegen
<a name="frameworks-supported"></a>
## Frameworks supported
@ -53,12 +53,12 @@ namespace Example
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new PetApi();
var body = new Pet(); // Pet | Pet object that needs to be added to the store
var pet = new Pet(); // Pet | Pet object that needs to be added to the store
try
{
// Add a new pet to the store
apiInstance.AddPet(body);
apiInstance.AddPet(pet);
}
catch (Exception e)
{

View File

@ -6,8 +6,8 @@ Name | Type | Description | Notes
**Id** | **long?** | | [optional]
**Category** | [**Category**](Category.md) | | [optional]
**Name** | **string** | |
**PhotoUrls** | **List&lt;string&gt;** | |
**Tags** | [**List&lt;Tag&gt;**](Tag.md) | | [optional]
**PhotoUrls** | **List<string>** | |
**Tags** | [**List<Tag>**](Tag.md) | | [optional]
**Status** | **string** | pet status in the store | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -16,12 +16,10 @@ Method | HTTP request | Description
<a name="addpet"></a>
# **AddPet**
> void AddPet (Pet body)
> void AddPet (Pet pet)
Add a new pet to the store
### Example
```csharp
using System;
@ -41,12 +39,12 @@ namespace Example
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new PetApi();
var body = new Pet(); // Pet | Pet object that needs to be added to the store
var pet = new Pet(); // Pet | Pet object that needs to be added to the store
try
{
// Add a new pet to the store
apiInstance.AddPet(body);
apiInstance.AddPet(pet);
}
catch (Exception e)
{
@ -61,7 +59,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@ -73,8 +71,8 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@ -84,8 +82,6 @@ void (empty response body)
Deletes a pet
### Example
```csharp
using System;
@ -140,7 +136,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@ -343,12 +339,10 @@ Name | Type | Description | Notes
<a name="updatepet"></a>
# **UpdatePet**
> void UpdatePet (Pet body)
> void UpdatePet (Pet pet)
Update an existing pet
### Example
```csharp
using System;
@ -368,12 +362,12 @@ namespace Example
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new PetApi();
var body = new Pet(); // Pet | Pet object that needs to be added to the store
var pet = new Pet(); // Pet | Pet object that needs to be added to the store
try
{
// Update an existing pet
apiInstance.UpdatePet(body);
apiInstance.UpdatePet(pet);
}
catch (Exception e)
{
@ -388,7 +382,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@ -400,8 +394,8 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@ -411,8 +405,6 @@ void (empty response body)
Updates a pet in the store with form data
### Example
```csharp
using System;
@ -469,7 +461,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/xml, application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@ -479,8 +471,6 @@ void (empty response body)
uploads an image
### Example
```csharp
using System;

View File

@ -67,7 +67,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@ -198,12 +198,10 @@ No authorization required
<a name="placeorder"></a>
# **PlaceOrder**
> Order PlaceOrder (Order body)
> Order PlaceOrder (Order order)
Place an order for a pet
### Example
```csharp
using System;
@ -220,12 +218,12 @@ namespace Example
{
var apiInstance = new StoreApi();
var body = new Order(); // Order | order placed for purchasing the pet
var order = new Order(); // Order | order placed for purchasing the pet
try
{
// Place an order for a pet
Order result = apiInstance.PlaceOrder(body);
Order result = apiInstance.PlaceOrder(order);
Debug.WriteLine(result);
}
catch (Exception e)
@ -241,7 +239,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
@ -253,7 +251,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -16,7 +16,7 @@ Method | HTTP request | Description
<a name="createuser"></a>
# **CreateUser**
> void CreateUser (User body)
> void CreateUser (User user)
Create user
@ -38,12 +38,12 @@ namespace Example
{
var apiInstance = new UserApi();
var body = new User(); // User | Created user object
var user = new User(); // User | Created user object
try
{
// Create user
apiInstance.CreateUser(body);
apiInstance.CreateUser(user);
}
catch (Exception e)
{
@ -58,7 +58,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**User**](User.md)| Created user object |
**user** | [**User**](User.md)| Created user object |
### Return type
@ -70,19 +70,17 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Content-Type**: application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
<a name="createuserswitharrayinput"></a>
# **CreateUsersWithArrayInput**
> void CreateUsersWithArrayInput (List<User> body)
> void CreateUsersWithArrayInput (List<User> user)
Creates list of users with given input array
### Example
```csharp
using System;
@ -99,12 +97,12 @@ namespace Example
{
var apiInstance = new UserApi();
var body = new List<User>(); // List<User> | List of user object
var user = new List<User>(); // List<User> | List of user object
try
{
// Creates list of users with given input array
apiInstance.CreateUsersWithArrayInput(body);
apiInstance.CreateUsersWithArrayInput(user);
}
catch (Exception e)
{
@ -119,7 +117,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List<User>**](User.md)| List of user object |
**user** | [**List<User>**](List.md)| List of user object |
### Return type
@ -132,18 +130,16 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
<a name="createuserswithlistinput"></a>
# **CreateUsersWithListInput**
> void CreateUsersWithListInput (List<User> body)
> void CreateUsersWithListInput (List<User> user)
Creates list of users with given input array
### Example
```csharp
using System;
@ -160,12 +156,12 @@ namespace Example
{
var apiInstance = new UserApi();
var body = new List<User>(); // List<User> | List of user object
var user = new List<User>(); // List<User> | List of user object
try
{
// Creates list of users with given input array
apiInstance.CreateUsersWithListInput(body);
apiInstance.CreateUsersWithListInput(user);
}
catch (Exception e)
{
@ -180,7 +176,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List<User>**](User.md)| List of user object |
**user** | [**List<User>**](List.md)| List of user object |
### Return type
@ -193,7 +189,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@ -254,7 +250,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@ -264,8 +260,6 @@ No authorization required
Get user by user name
### Example
```csharp
using System;
@ -326,8 +320,6 @@ No authorization required
Logs user into the system
### Example
```csharp
using System;
@ -390,8 +382,6 @@ No authorization required
Logs out current logged in user session
### Example
```csharp
using System;
@ -437,13 +427,13 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
<a name="updateuser"></a>
# **UpdateUser**
> void UpdateUser (string username, User body)
> void UpdateUser (string username, User user)
Updated user
@ -466,12 +456,12 @@ namespace Example
var apiInstance = new UserApi();
var username = username_example; // string | name that need to be deleted
var body = new User(); // User | Updated user object
var user = new User(); // User | Updated user object
try
{
// Updated user
apiInstance.UpdateUser(username, body);
apiInstance.UpdateUser(username, user);
}
catch (Exception e)
{
@ -487,7 +477,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **string**| name that need to be deleted |
**body** | [**User**](User.md)| Updated user object |
**user** | [**User**](User.md)| Updated user object |
### Return type
@ -499,8 +489,8 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Content-Type**: application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -14,9 +14,9 @@ namespace IO.Swagger.Api
/// <summary>
/// Add a new pet to the store
/// </summary>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="pet">Pet object that needs to be added to the store</param>
/// <returns></returns>
void AddPet (Pet body);
void AddPet (Pet pet);
/// <summary>
/// Deletes a pet
/// </summary>
@ -45,9 +45,9 @@ namespace IO.Swagger.Api
/// <summary>
/// Update an existing pet
/// </summary>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="pet">Pet object that needs to be added to the store</param>
/// <returns></returns>
void UpdatePet (Pet body);
void UpdatePet (Pet pet);
/// <summary>
/// Updates a pet in the store with form data
/// </summary>
@ -122,13 +122,13 @@ namespace IO.Swagger.Api
/// <summary>
/// Add a new pet to the store
/// </summary>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="pet">Pet object that needs to be added to the store</param>
/// <returns></returns>
public void AddPet (Pet body)
public void AddPet (Pet pet)
{
// verify the required parameter 'body' is set
if (body == null) throw new ApiException(400, "Missing required parameter 'body' when calling AddPet");
// verify the required parameter 'pet' is set
if (pet == null) throw new ApiException(400, "Missing required parameter 'pet' when calling AddPet");
var path = "/pet";
@ -140,7 +140,7 @@ namespace IO.Swagger.Api
var fileParams = new Dictionary<String, FileParameter>();
String postBody = null;
postBody = ApiClient.Serialize(body); // http body (model) parameter
postBody = ApiClient.Serialize(pet); // http body (model) parameter
// authentication setting, if any
String[] authSettings = new String[] { "petstore_auth" };
@ -309,13 +309,13 @@ namespace IO.Swagger.Api
/// <summary>
/// Update an existing pet
/// </summary>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="pet">Pet object that needs to be added to the store</param>
/// <returns></returns>
public void UpdatePet (Pet body)
public void UpdatePet (Pet pet)
{
// verify the required parameter 'body' is set
if (body == null) throw new ApiException(400, "Missing required parameter 'body' when calling UpdatePet");
// verify the required parameter 'pet' is set
if (pet == null) throw new ApiException(400, "Missing required parameter 'pet' when calling UpdatePet");
var path = "/pet";
@ -327,7 +327,7 @@ namespace IO.Swagger.Api
var fileParams = new Dictionary<String, FileParameter>();
String postBody = null;
postBody = ApiClient.Serialize(body); // http body (model) parameter
postBody = ApiClient.Serialize(pet); // http body (model) parameter
// authentication setting, if any
String[] authSettings = new String[] { "petstore_auth" };

View File

@ -31,9 +31,9 @@ namespace IO.Swagger.Api
/// <summary>
/// Place an order for a pet
/// </summary>
/// <param name="body">order placed for purchasing the pet</param>
/// <param name="order">order placed for purchasing the pet</param>
/// <returns>Order</returns>
Order PlaceOrder (Order body);
Order PlaceOrder (Order order);
}
/// <summary>
@ -198,13 +198,13 @@ namespace IO.Swagger.Api
/// <summary>
/// Place an order for a pet
/// </summary>
/// <param name="body">order placed for purchasing the pet</param>
/// <param name="order">order placed for purchasing the pet</param>
/// <returns>Order</returns>
public Order PlaceOrder (Order body)
public Order PlaceOrder (Order order)
{
// verify the required parameter 'body' is set
if (body == null) throw new ApiException(400, "Missing required parameter 'body' when calling PlaceOrder");
// verify the required parameter 'order' is set
if (order == null) throw new ApiException(400, "Missing required parameter 'order' when calling PlaceOrder");
var path = "/store/order";
@ -216,7 +216,7 @@ namespace IO.Swagger.Api
var fileParams = new Dictionary<String, FileParameter>();
String postBody = null;
postBody = ApiClient.Serialize(body); // http body (model) parameter
postBody = ApiClient.Serialize(order); // http body (model) parameter
// authentication setting, if any
String[] authSettings = new String[] { };

View File

@ -14,21 +14,21 @@ namespace IO.Swagger.Api
/// <summary>
/// Create user This can only be done by the logged in user.
/// </summary>
/// <param name="body">Created user object</param>
/// <param name="user">Created user object</param>
/// <returns></returns>
void CreateUser (User body);
void CreateUser (User user);
/// <summary>
/// Creates list of users with given input array
/// </summary>
/// <param name="body">List of user object</param>
/// <param name="user">List of user object</param>
/// <returns></returns>
void CreateUsersWithArrayInput (List<User> body);
void CreateUsersWithArrayInput (List<User> user);
/// <summary>
/// Creates list of users with given input array
/// </summary>
/// <param name="body">List of user object</param>
/// <param name="user">List of user object</param>
/// <returns></returns>
void CreateUsersWithListInput (List<User> body);
void CreateUsersWithListInput (List<User> user);
/// <summary>
/// Delete user This can only be done by the logged in user.
/// </summary>
@ -38,7 +38,7 @@ namespace IO.Swagger.Api
/// <summary>
/// Get user by user name
/// </summary>
/// <param name="username">The name that needs to be fetched. Use user1 for testing. </param>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <returns>User</returns>
User GetUserByName (string username);
/// <summary>
@ -57,9 +57,9 @@ namespace IO.Swagger.Api
/// 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>
/// <param name="user">Updated user object</param>
/// <returns></returns>
void UpdateUser (string username, User body);
void UpdateUser (string username, User user);
}
/// <summary>
@ -118,13 +118,13 @@ namespace IO.Swagger.Api
/// <summary>
/// Create user This can only be done by the logged in user.
/// </summary>
/// <param name="body">Created user object</param>
/// <param name="user">Created user object</param>
/// <returns></returns>
public void CreateUser (User body)
public void CreateUser (User user)
{
// verify the required parameter 'body' is set
if (body == null) throw new ApiException(400, "Missing required parameter 'body' when calling CreateUser");
// verify the required parameter 'user' is set
if (user == null) throw new ApiException(400, "Missing required parameter 'user' when calling CreateUser");
var path = "/user";
@ -136,7 +136,7 @@ namespace IO.Swagger.Api
var fileParams = new Dictionary<String, FileParameter>();
String postBody = null;
postBody = ApiClient.Serialize(body); // http body (model) parameter
postBody = ApiClient.Serialize(user); // http body (model) parameter
// authentication setting, if any
String[] authSettings = new String[] { };
@ -155,13 +155,13 @@ namespace IO.Swagger.Api
/// <summary>
/// Creates list of users with given input array
/// </summary>
/// <param name="body">List of user object</param>
/// <param name="user">List of user object</param>
/// <returns></returns>
public void CreateUsersWithArrayInput (List<User> body)
public void CreateUsersWithArrayInput (List<User> user)
{
// verify the required parameter 'body' is set
if (body == null) throw new ApiException(400, "Missing required parameter 'body' when calling CreateUsersWithArrayInput");
// verify the required parameter 'user' is set
if (user == null) throw new ApiException(400, "Missing required parameter 'user' when calling CreateUsersWithArrayInput");
var path = "/user/createWithArray";
@ -173,7 +173,7 @@ namespace IO.Swagger.Api
var fileParams = new Dictionary<String, FileParameter>();
String postBody = null;
postBody = ApiClient.Serialize(body); // http body (model) parameter
postBody = ApiClient.Serialize(user); // http body (model) parameter
// authentication setting, if any
String[] authSettings = new String[] { };
@ -192,13 +192,13 @@ namespace IO.Swagger.Api
/// <summary>
/// Creates list of users with given input array
/// </summary>
/// <param name="body">List of user object</param>
/// <param name="user">List of user object</param>
/// <returns></returns>
public void CreateUsersWithListInput (List<User> body)
public void CreateUsersWithListInput (List<User> user)
{
// verify the required parameter 'body' is set
if (body == null) throw new ApiException(400, "Missing required parameter 'body' when calling CreateUsersWithListInput");
// verify the required parameter 'user' is set
if (user == null) throw new ApiException(400, "Missing required parameter 'user' when calling CreateUsersWithListInput");
var path = "/user/createWithList";
@ -210,7 +210,7 @@ namespace IO.Swagger.Api
var fileParams = new Dictionary<String, FileParameter>();
String postBody = null;
postBody = ApiClient.Serialize(body); // http body (model) parameter
postBody = ApiClient.Serialize(user); // http body (model) parameter
// authentication setting, if any
String[] authSettings = new String[] { };
@ -266,7 +266,7 @@ namespace IO.Swagger.Api
/// <summary>
/// Get user by user name
/// </summary>
/// <param name="username">The name that needs to be fetched. Use user1 for testing. </param>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <returns>User</returns>
public User GetUserByName (string username)
{
@ -378,16 +378,16 @@ namespace IO.Swagger.Api
/// 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>
/// <param name="user">Updated user object</param>
/// <returns></returns>
public void UpdateUser (string username, User body)
public void UpdateUser (string username, User user)
{
// verify the required parameter 'username' is set
if (username == null) throw new ApiException(400, "Missing required parameter 'username' when calling UpdateUser");
// verify the required parameter 'body' is set
if (body == null) throw new ApiException(400, "Missing required parameter 'body' when calling UpdateUser");
// verify the required parameter 'user' is set
if (user == null) throw new ApiException(400, "Missing required parameter 'user' when calling UpdateUser");
var path = "/user/{username}";
@ -400,7 +400,7 @@ namespace IO.Swagger.Api
var fileParams = new Dictionary<String, FileParameter>();
String postBody = null;
postBody = ApiClient.Serialize(body); // http body (model) parameter
postBody = ApiClient.Serialize(user); // http body (model) parameter
// authentication setting, if any
String[] authSettings = new String[] { };