Merge pull request #2132 from jimschubert/csharp_35_client

[csharp] Initial settings for v3.5 client compatibility
This commit is contained in:
wing328 2016-02-18 12:02:00 +08:00
commit c1b4f8df06
25 changed files with 587 additions and 443 deletions

View File

@ -77,6 +77,9 @@ public class CodegenConstants {
public static final String MODEL_PROPERTY_NAMING = "modelPropertyNaming";
public static final String MODEL_PROPERTY_NAMING_DESC = "Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name";
public static final String DOTNET_FRAMEWORK = "targetFramework";
public static final String DOTNET_FRAMEWORK_DESC = "The target .NET framework version.";
public static enum MODEL_PROPERTY_NAMING_TYPE {camelCase, PascalCase, snake_case, original}
}

View File

@ -1,5 +1,7 @@
package io.swagger.codegen.languages;
import com.google.common.collect.ImmutableBiMap;
import com.google.common.collect.ImmutableMap;
import io.swagger.codegen.CodegenConfig;
import io.swagger.codegen.CodegenConstants;
import io.swagger.codegen.CodegenType;
@ -25,6 +27,8 @@ import org.slf4j.LoggerFactory;
public class CSharpClientCodegen extends AbstractCSharpCodegen {
@SuppressWarnings({"unused", "hiding"})
private static final Logger LOGGER = LoggerFactory.getLogger(CSharpClientCodegen.class);
private static final String NET45 = "v4.5";
private static final String NET35 = "v3.5";
protected String packageGuid = "{" + java.util.UUID.randomUUID().toString().toUpperCase() + "}";
protected String packageTitle = "Swagger Library";
@ -34,6 +38,13 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
protected String packageCopyright = "No Copyright";
protected String clientPackage = "IO.Swagger.Client";
protected String targetFramework = NET45;
protected String targetFrameworkNuget = "net45";
protected boolean supportsAsync = Boolean.TRUE;
protected final Map<String, String> frameworks;
public CSharpClientCodegen() {
super();
modelTemplateFiles.put("model.mustache", ".cs");
@ -64,6 +75,18 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
CodegenConstants.OPTIONAL_PROJECT_GUID_DESC,
null);
CliOption framework = new CliOption(
CodegenConstants.DOTNET_FRAMEWORK,
CodegenConstants.DOTNET_FRAMEWORK_DESC
);
frameworks = new ImmutableMap.Builder<String, String>()
.put(NET35, ".NET Framework 3.5 compatible")
.put(NET45, ".NET Framework 4.5+ compatible")
.build();
framework.defaultValue(this.targetFramework);
framework.setEnum(frameworks);
cliOptions.add(framework);
// CLI Switches
addSwitch(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG,
CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG_DESC,
@ -111,6 +134,24 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
additionalProperties.put("packageCompany", packageCompany);
additionalProperties.put("packageCopyright", packageCopyright);
if (additionalProperties.containsKey(CodegenConstants.DOTNET_FRAMEWORK)) {
setTargetFramework((String) additionalProperties.get(CodegenConstants.DOTNET_FRAMEWORK));
}
if (NET35.equals(this.targetFramework)) {
setTargetFrameworkNuget("net35");
setSupportsAsync(Boolean.FALSE);
if(additionalProperties.containsKey("supportsAsync")){
additionalProperties.remove("supportsAsync");
}
} else {
setTargetFrameworkNuget("net45");
setSupportsAsync(Boolean.TRUE);
additionalProperties.put("supportsAsync", this.supportsAsync);
}
additionalProperties.put("targetFrameworkNuget", this.targetFrameworkNuget);
if (additionalProperties.containsKey(CodegenConstants.OPTIONAL_PROJECT_FILE)) {
setOptionalProjectFileFlag(Boolean.valueOf(
additionalProperties.get(CodegenConstants.OPTIONAL_PROJECT_FILE).toString()));
@ -141,7 +182,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
String binRelativePath = "..\\";
for (int i = 0; i < packageDepth; i = i + 1)
binRelativePath += "..\\";
binRelativePath += "bin\\";
binRelativePath += "vendor\\";
additionalProperties.put("binRelativePath", binRelativePath);
supportingFiles.add(new SupportingFile("Configuration.mustache",
@ -153,8 +194,6 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
supportingFiles.add(new SupportingFile("ApiResponse.mustache",
clientPackageDir, "ApiResponse.cs"));
supportingFiles.add(new SupportingFile("Newtonsoft.Json.dll", "bin", "Newtonsoft.Json.dll"));
supportingFiles.add(new SupportingFile("RestSharp.dll", "bin", "RestSharp.dll"));
supportingFiles.add(new SupportingFile("compile.mustache", "", "compile.bat"));
supportingFiles.add(new SupportingFile("compile-mono.sh.mustache", "", "compile-mono.sh"));
supportingFiles.add(new SupportingFile("packages.config.mustache", "vendor" + java.io.File.separator, "packages.config"));
@ -222,4 +261,20 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
this.packageGuid = packageGuid;
}
public void setTargetFramework(String dotnetFramework) {
if(!frameworks.containsKey(dotnetFramework)){
LOGGER.warn("Invalid .NET framework version, defaulting to " + this.targetFramework);
} else {
this.targetFramework = dotnetFramework;
}
LOGGER.info("Generating code for .NET Framework " + this.targetFramework);
}
public void setTargetFrameworkNuget(String targetFrameworkNuget) {
this.targetFrameworkNuget = targetFrameworkNuget;
}
public void setSupportsAsync(Boolean supportsAsync){
this.supportsAsync = supportsAsync;
}
}

View File

@ -146,7 +146,7 @@ namespace {{packageName}}.Client
var response = RestClient.Execute(request);
return (Object) response;
}
{{#supportsAsync}}
/// <summary>
/// Makes the asynchronous HTTP request.
/// </summary>
@ -171,7 +171,7 @@ namespace {{packageName}}.Client
pathParams, contentType);
var response = await RestClient.ExecuteTaskAsync(request);
return (Object)response;
}
}{{/supportsAsync}}
/// <summary>
/// Escape string (url-encoded).
@ -367,7 +367,7 @@ namespace {{packageName}}.Client
/// <param name="source">Object to be casted</param>
/// <param name="dest">Target type</param>
/// <returns>Casted object</returns>
public static dynamic ConvertType(dynamic source, Type dest)
{{#supportsAsync}}public static dynamic ConvertType(dynamic source, Type dest){{/supportsAsync}}{{^supportsAsync}}public static object ConvertType<T>(T source, Type dest) where T : class{{/supportsAsync}}
{
return Convert.ChangeType(source, dest);
}

View File

@ -17,7 +17,7 @@ namespace {{packageName}}.Client
/// Gets or sets the error content (body json object)
/// </summary>
/// <value>The error content (Http response body).</value>
public dynamic ErrorContent { get; private set; }
public {{#supportsAsync}}dynamic{{/supportsAsync}}{{^supportsAsync}}object{{/supportsAsync}} ErrorContent { get; private set; }
/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class.
@ -40,7 +40,7 @@ namespace {{packageName}}.Client
/// <param name="errorCode">HTTP status code.</param>
/// <param name="message">Error message.</param>
/// <param name="errorContent">Error content.</param>
public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message)
public ApiException(int errorCode, string message, {{#supportsAsync}}dynamic{{/supportsAsync}}{{^supportsAsync}}object{{/supportsAsync}} errorContent = null) : base(message)
{
this.ErrorCode = errorCode;
this.ErrorContent = errorContent;

View File

@ -1,6 +1,5 @@
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information

View File

@ -8,7 +8,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>{{packageTitle}}</RootNamespace>
<AssemblyName>{{packageTitle}}</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>{{targetFramework}}</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@ -41,10 +41,10 @@
<Reference Include="System.Xml" />
<Reference Include="Newtonsoft.Json">
<SpecificVersion>False</SpecificVersion>
<HintPath>{{binRelativePath}}Newtonsoft.Json.dll</HintPath>
<HintPath>{{binRelativePath}}/Newtonsoft.Json.8.0.2/lib/{{targetFrameworkNuget}}/Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="RestSharp">
<HintPath>{{binRelativePath}}RestSharp.dll</HintPath>
<HintPath>{{binRelativePath}}/RestSharp.105.2.3/lib/{{targetFrameworkNuget}}/RestSharp.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>

View File

@ -6,12 +6,14 @@
- [RestSharp] (https://www.nuget.org/packages/RestSharp) - 105.1.0 or later
- [Json.NET] (https://www.nuget.org/packages/Newtonsoft.Json/) - 7.0.0 or later
NOTE: The DLLs included in the package may not be the latest version. We recommned using [NuGet] (https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:
The DLLs included in the package may not be the latest version. We recommned using [NuGet] (https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:
```
Install-Package RestSharp
Install-Package Newtonsoft.Json
```
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742)
## Installation
Run the following command to generate the DLL
- [Mac/Linux] compile-mono.sh

View File

@ -16,6 +16,7 @@ namespace {{packageName}}.Api
/// </summary>
public interface I{{classname}}
{
#region Synchronous Operations
{{#operation}}
/// <summary>
/// {{summary}}
@ -36,7 +37,11 @@ namespace {{packageName}}.Api
{{#allParams}}/// <param name="{{paramName}}">{{description}}</param>
{{/allParams}}/// <returns>ApiResponse of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Object(void){{/returnType}}</returns>
ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
{{/operation}}
#endregion Synchronous Operations
{{#supportsAsync}}
#region Asynchronous Operations
{{#operation}}
/// <summary>
/// {{summary}}
/// </summary>
@ -57,6 +62,8 @@ namespace {{packageName}}.Api
{{/allParams}}/// <returns>Task of ApiResponse{{#returnType}} ({{returnType}}){{/returnType}}</returns>
System.Threading.Tasks.Task<ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>> {{operationId}}AsyncWithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
{{/operation}}
#endregion Asynchronous Operations
{{/supportsAsync}}
}
/// <summary>
@ -246,6 +253,7 @@ namespace {{packageName}}.Api
null);{{/returnType}}
}
{{#supportsAsync}}
/// <summary>
/// {{summary}} {{notes}}
/// </summary>
@ -349,7 +357,7 @@ namespace {{packageName}}.Api
{{^returnType}}return new ApiResponse<Object>(statusCode,
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
null);{{/returnType}}
}
}{{/supportsAsync}}
{{/operation}}
}
{{/operations}}

View File

@ -1,10 +1,17 @@
#!/usr/bin/env bash
frameworkVersion={{targetFrameworkNuget}}
netfx=${frameworkVersion#net}
wget -nc https://nuget.org/nuget.exe;
mozroots --import --sync
mono nuget.exe install vendor/packages.config -o vendor;
mkdir -p bin;
mcs -sdk:45 -r:vendor/Newtonsoft.Json.8.0.2/lib/net45/Newtonsoft.Json.dll,\
vendor/RestSharp.105.2.3/lib/net45/RestSharp.dll,\
cp vendor/Newtonsoft.Json.8.0.2/lib/{{targetFrameworkNuget}}/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
cp vendor/RestSharp.105.1.0/lib/{{targetFrameworkNuget}}/RestSharp.dll bin/RestSharp.dll;
mcs -sdk:${netfx} -r:bin/Newtonsoft.Json.dll,\
bin/RestSharp.dll,\
System.Runtime.Serialization.dll \
-target:library \
-out:bin/{{packageName}}.dll \

View File

@ -1,3 +1,12 @@
SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319
%CSCPATH%\csc /reference:bin/Newtonsoft.Json.dll;bin/RestSharp.dll /target:library /out:bin/{{packageName}}.dll /recurse:src\*.cs /doc:bin/{{packageName}}.xml
@echo off
{{#supportsAsync}}SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319{{/supportsAsync}}
{{^supportsAsync}}SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v3.5{{/supportsAsync}}
if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://nuget.org/nuget.exe', '.\nuget.exe')"
.\nuget.exe install vendor/packages.config -o vendor
cp vendor/Newtonsoft.Json.8.0.2/lib/{{targetFrameworkNuget}}/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll
cp vendor/RestSharp.105.1.0/lib/{{targetFrameworkNuget}}/RestSharp.dll bin/RestSharp.dll
%CSCPATH%\csc /reference:bin/Newtonsoft.Json.dll;bin/RestSharp.dll /target:library /out:bin/{{packageName}}.dll /recurse:src\*.cs /doc:bin/{{packageName}}.xml

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="RestSharp" version="105.2.3" targetFramework="net45" developmentDependency="true" />
<package id="Newtonsoft.Json" version="8.0.2" targetFramework="net45" developmentDependency="true" />
<package id="RestSharp" version="105.1.0" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
<package id="Newtonsoft.Json" version="8.0.2" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
</packages>

View File

@ -31,6 +31,7 @@ public class CSharpClientOptionsProvider implements OptionsProvider {
.put(CodegenConstants.RETURN_ICOLLECTION, "false")
.put(CodegenConstants.OPTIONAL_PROJECT_FILE, "true")
.put(CodegenConstants.OPTIONAL_PROJECT_GUID, PACKAGE_GUID_VALUE)
.put(CodegenConstants.DOTNET_FRAMEWORK, "4.x")
.build();
}

View File

@ -0,0 +1,2 @@
vendor/Newtonsoft.Json.8.0.2/
vendor/RestSharp.105.2.3/

View File

@ -1,10 +1,17 @@
#!/usr/bin/env bash
frameworkVersion=net45
netfx=${frameworkVersion#net}
wget -nc https://nuget.org/nuget.exe;
mozroots --import --sync
mono nuget.exe install vendor/packages.config -o vendor;
mkdir -p bin;
mcs -sdk:45 -r:vendor/Newtonsoft.Json.8.0.2/lib/net45/Newtonsoft.Json.dll,\
vendor/RestSharp.105.2.3/lib/net45/RestSharp.dll,\
cp vendor/Newtonsoft.Json.8.0.2/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
cp vendor/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll;
mcs -sdk:${netfx} -r:bin/Newtonsoft.Json.dll,\
bin/RestSharp.dll,\
System.Runtime.Serialization.dll \
-target:library \
-out:bin/IO.Swagger.dll \

View File

@ -1,3 +1,12 @@
SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319
%CSCPATH%\csc /reference:bin/Newtonsoft.Json.dll;bin/RestSharp.dll /target:library /out:bin/IO.Swagger.dll /recurse:src\*.cs /doc:bin/IO.Swagger.xml
@echo off
SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319
if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://nuget.org/nuget.exe', '.\nuget.exe')"
.\nuget.exe install vendor/packages.config -o vendor
cp vendor/Newtonsoft.Json.8.0.2/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll
cp vendor/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll
%CSCPATH%\csc /reference:bin/Newtonsoft.Json.dll;bin/RestSharp.dll /target:library /out:bin/IO.Swagger.dll /recurse:src\*.cs /doc:bin/IO.Swagger.xml

View File

@ -15,6 +15,7 @@ namespace IO.Swagger.Api
/// </summary>
public interface IPetApi
{
#region Synchronous Operations
/// <summary>
/// Update an existing pet
@ -36,6 +37,200 @@ namespace IO.Swagger.Api
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> UpdatePetWithHttpInfo (Pet body = null);
/// <summary>
/// Add a new pet to the store
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <returns></returns>
void AddPet (Pet body = null);
/// <summary>
/// Add a new pet to the store
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> AddPetWithHttpInfo (Pet body = null);
/// <summary>
/// Finds Pets by status
/// </summary>
/// <remarks>
/// Multiple status values can be provided with comma seperated strings
/// </remarks>
/// <param name="status">Status values that need to be considered for filter</param>
/// <returns>List&lt;Pet&gt;</returns>
List<Pet> FindPetsByStatus (List<string> status = null);
/// <summary>
/// Finds Pets by status
/// </summary>
/// <remarks>
/// Multiple status values can be provided with comma seperated strings
/// </remarks>
/// <param name="status">Status values that need to be considered for filter</param>
/// <returns>ApiResponse of List&lt;Pet&gt;</returns>
ApiResponse<List<Pet>> FindPetsByStatusWithHttpInfo (List<string> status = null);
/// <summary>
/// Finds Pets by tags
/// </summary>
/// <remarks>
/// Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
/// </remarks>
/// <param name="tags">Tags to filter by</param>
/// <returns>List&lt;Pet&gt;</returns>
List<Pet> FindPetsByTags (List<string> tags = null);
/// <summary>
/// Finds Pets by tags
/// </summary>
/// <remarks>
/// Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
/// </remarks>
/// <param name="tags">Tags to filter by</param>
/// <returns>ApiResponse of List&lt;Pet&gt;</returns>
ApiResponse<List<Pet>> FindPetsByTagsWithHttpInfo (List<string> tags = null);
/// <summary>
/// Find pet by ID
/// </summary>
/// <remarks>
/// Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
/// </remarks>
/// <param name="petId">ID of pet that needs to be fetched</param>
/// <returns>Pet</returns>
Pet GetPetById (long? petId);
/// <summary>
/// Find pet by ID
/// </summary>
/// <remarks>
/// Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
/// </remarks>
/// <param name="petId">ID of pet that needs to be fetched</param>
/// <returns>ApiResponse of Pet</returns>
ApiResponse<Pet> GetPetByIdWithHttpInfo (long? petId);
/// <summary>
/// Updates a pet in the store with form data
/// </summary>
/// <remarks>
///
/// </remarks>
/// <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 = null, string status = null);
/// <summary>
/// Updates a pet in the store with form data
/// </summary>
/// <remarks>
///
/// </remarks>
/// <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>ApiResponse of Object(void)</returns>
ApiResponse<Object> UpdatePetWithFormWithHttpInfo (string petId, string name = null, string status = null);
/// <summary>
/// Deletes a pet
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="petId">Pet id to delete</param>
/// <param name="apiKey"></param>
/// <returns></returns>
void DeletePet (long? petId, string apiKey = null);
/// <summary>
/// Deletes a pet
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="petId">Pet id to delete</param>
/// <param name="apiKey"></param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> DeletePetWithHttpInfo (long? petId, string apiKey = null);
/// <summary>
/// uploads an image
/// </summary>
/// <remarks>
///
/// </remarks>
/// <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 = null, Stream file = null);
/// <summary>
/// uploads an image
/// </summary>
/// <remarks>
///
/// </remarks>
/// <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>ApiResponse of Object(void)</returns>
ApiResponse<Object> UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null);
/// <summary>
/// Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
/// </summary>
/// <remarks>
/// Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
/// </remarks>
/// <param name="petId">ID of pet that needs to be fetched</param>
/// <returns>byte[]</returns>
byte[] GetPetByIdWithByteArray (long? petId);
/// <summary>
/// Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
/// </summary>
/// <remarks>
/// Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
/// </remarks>
/// <param name="petId">ID of pet that needs to be fetched</param>
/// <returns>ApiResponse of byte[]</returns>
ApiResponse<byte[]> GetPetByIdWithByteArrayWithHttpInfo (long? petId);
/// <summary>
/// Fake endpoint to test byte array in body parameter for adding a new pet to the store
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="body">Pet object in the form of byte array</param>
/// <returns></returns>
void AddPetUsingByteArray (byte[] body = null);
/// <summary>
/// Fake endpoint to test byte array in body parameter for adding a new pet to the store
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="body">Pet object in the form of byte array</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> AddPetUsingByteArrayWithHttpInfo (byte[] body = null);
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
/// Update an existing pet
/// </summary>
@ -56,26 +251,6 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> UpdatePetAsyncWithHttpInfo (Pet body = null);
/// <summary>
/// Add a new pet to the store
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <returns></returns>
void AddPet (Pet body = null);
/// <summary>
/// Add a new pet to the store
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> AddPetWithHttpInfo (Pet body = null);
/// <summary>
/// Add a new pet to the store
/// </summary>
@ -96,26 +271,6 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> AddPetAsyncWithHttpInfo (Pet body = null);
/// <summary>
/// Finds Pets by status
/// </summary>
/// <remarks>
/// Multiple status values can be provided with comma seperated strings
/// </remarks>
/// <param name="status">Status values that need to be considered for filter</param>
/// <returns>List&lt;Pet&gt;</returns>
List<Pet> FindPetsByStatus (List<string> status = null);
/// <summary>
/// Finds Pets by status
/// </summary>
/// <remarks>
/// Multiple status values can be provided with comma seperated strings
/// </remarks>
/// <param name="status">Status values that need to be considered for filter</param>
/// <returns>ApiResponse of List&lt;Pet&gt;</returns>
ApiResponse<List<Pet>> FindPetsByStatusWithHttpInfo (List<string> status = null);
/// <summary>
/// Finds Pets by status
/// </summary>
@ -136,26 +291,6 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse (List&lt;Pet&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<Pet>>> FindPetsByStatusAsyncWithHttpInfo (List<string> status = null);
/// <summary>
/// Finds Pets by tags
/// </summary>
/// <remarks>
/// Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
/// </remarks>
/// <param name="tags">Tags to filter by</param>
/// <returns>List&lt;Pet&gt;</returns>
List<Pet> FindPetsByTags (List<string> tags = null);
/// <summary>
/// Finds Pets by tags
/// </summary>
/// <remarks>
/// Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
/// </remarks>
/// <param name="tags">Tags to filter by</param>
/// <returns>ApiResponse of List&lt;Pet&gt;</returns>
ApiResponse<List<Pet>> FindPetsByTagsWithHttpInfo (List<string> tags = null);
/// <summary>
/// Finds Pets by tags
/// </summary>
@ -176,26 +311,6 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse (List&lt;Pet&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<Pet>>> FindPetsByTagsAsyncWithHttpInfo (List<string> tags = null);
/// <summary>
/// Find pet by ID
/// </summary>
/// <remarks>
/// Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
/// </remarks>
/// <param name="petId">ID of pet that needs to be fetched</param>
/// <returns>Pet</returns>
Pet GetPetById (long? petId);
/// <summary>
/// Find pet by ID
/// </summary>
/// <remarks>
/// Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
/// </remarks>
/// <param name="petId">ID of pet that needs to be fetched</param>
/// <returns>ApiResponse of Pet</returns>
ApiResponse<Pet> GetPetByIdWithHttpInfo (long? petId);
/// <summary>
/// Find pet by ID
/// </summary>
@ -216,30 +331,6 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse (Pet)</returns>
System.Threading.Tasks.Task<ApiResponse<Pet>> GetPetByIdAsyncWithHttpInfo (long? petId);
/// <summary>
/// Updates a pet in the store with form data
/// </summary>
/// <remarks>
///
/// </remarks>
/// <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 = null, string status = null);
/// <summary>
/// Updates a pet in the store with form data
/// </summary>
/// <remarks>
///
/// </remarks>
/// <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>ApiResponse of Object(void)</returns>
ApiResponse<Object> UpdatePetWithFormWithHttpInfo (string petId, string name = null, string status = null);
/// <summary>
/// Updates a pet in the store with form data
/// </summary>
@ -264,28 +355,6 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> UpdatePetWithFormAsyncWithHttpInfo (string petId, string name = null, string status = null);
/// <summary>
/// Deletes a pet
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="petId">Pet id to delete</param>
/// <param name="apiKey"></param>
/// <returns></returns>
void DeletePet (long? petId, string apiKey = null);
/// <summary>
/// Deletes a pet
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="petId">Pet id to delete</param>
/// <param name="apiKey"></param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> DeletePetWithHttpInfo (long? petId, string apiKey = null);
/// <summary>
/// Deletes a pet
/// </summary>
@ -308,30 +377,6 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> DeletePetAsyncWithHttpInfo (long? petId, string apiKey = null);
/// <summary>
/// uploads an image
/// </summary>
/// <remarks>
///
/// </remarks>
/// <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 = null, Stream file = null);
/// <summary>
/// uploads an image
/// </summary>
/// <remarks>
///
/// </remarks>
/// <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>ApiResponse of Object(void)</returns>
ApiResponse<Object> UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null);
/// <summary>
/// uploads an image
/// </summary>
@ -356,26 +401,6 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null);
/// <summary>
/// Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
/// </summary>
/// <remarks>
/// Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
/// </remarks>
/// <param name="petId">ID of pet that needs to be fetched</param>
/// <returns>byte[]</returns>
byte[] GetPetByIdWithByteArray (long? petId);
/// <summary>
/// Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
/// </summary>
/// <remarks>
/// Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
/// </remarks>
/// <param name="petId">ID of pet that needs to be fetched</param>
/// <returns>ApiResponse of byte[]</returns>
ApiResponse<byte[]> GetPetByIdWithByteArrayWithHttpInfo (long? petId);
/// <summary>
/// Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
/// </summary>
@ -396,26 +421,6 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse (byte[])</returns>
System.Threading.Tasks.Task<ApiResponse<byte[]>> GetPetByIdWithByteArrayAsyncWithHttpInfo (long? petId);
/// <summary>
/// Fake endpoint to test byte array in body parameter for adding a new pet to the store
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="body">Pet object in the form of byte array</param>
/// <returns></returns>
void AddPetUsingByteArray (byte[] body = null);
/// <summary>
/// Fake endpoint to test byte array in body parameter for adding a new pet to the store
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="body">Pet object in the form of byte array</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> AddPetUsingByteArrayWithHttpInfo (byte[] body = null);
/// <summary>
/// Fake endpoint to test byte array in body parameter for adding a new pet to the store
/// </summary>
@ -436,6 +441,8 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> AddPetUsingByteArrayAsyncWithHttpInfo (byte[] body = null);
#endregion Asynchronous Operations
}
/// <summary>
@ -599,6 +606,7 @@ namespace IO.Swagger.Api
null);
}
/// <summary>
/// Update an existing pet
/// </summary>
@ -765,6 +773,7 @@ namespace IO.Swagger.Api
null);
}
/// <summary>
/// Add a new pet to the store
/// </summary>
@ -926,6 +935,7 @@ namespace IO.Swagger.Api
}
/// <summary>
/// Finds Pets by status Multiple status values can be provided with comma seperated strings
/// </summary>
@ -1088,6 +1098,7 @@ namespace IO.Swagger.Api
}
/// <summary>
/// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
/// </summary>
@ -1254,6 +1265,7 @@ namespace IO.Swagger.Api
}
/// <summary>
/// Find pet by ID Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
/// </summary>
@ -1427,6 +1439,7 @@ namespace IO.Swagger.Api
null);
}
/// <summary>
/// Updates a pet in the store with form data
/// </summary>
@ -1602,6 +1615,7 @@ namespace IO.Swagger.Api
null);
}
/// <summary>
/// Deletes a pet
/// </summary>
@ -1777,6 +1791,7 @@ namespace IO.Swagger.Api
null);
}
/// <summary>
/// uploads an image
/// </summary>
@ -1950,6 +1965,7 @@ namespace IO.Swagger.Api
}
/// <summary>
/// Fake endpoint to test byte array return by &#39;Find pet by ID&#39; Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
/// </summary>
@ -2119,6 +2135,7 @@ namespace IO.Swagger.Api
null);
}
/// <summary>
/// Fake endpoint to test byte array in body parameter for adding a new pet to the store
/// </summary>

View File

@ -15,6 +15,7 @@ namespace IO.Swagger.Api
/// </summary>
public interface IStoreApi
{
#region Synchronous Operations
/// <summary>
/// Returns pet inventories by status
@ -34,24 +35,6 @@ namespace IO.Swagger.Api
/// <returns>ApiResponse of Dictionary&lt;string, int?&gt;</returns>
ApiResponse<Dictionary<string, int?>> GetInventoryWithHttpInfo ();
/// <summary>
/// Returns pet inventories by status
/// </summary>
/// <remarks>
/// Returns a map of status codes to quantities
/// </remarks>
/// <returns>Task of Dictionary&lt;string, int?&gt;</returns>
System.Threading.Tasks.Task<Dictionary<string, int?>> GetInventoryAsync ();
/// <summary>
/// Returns pet inventories by status
/// </summary>
/// <remarks>
/// Returns a map of status codes to quantities
/// </remarks>
/// <returns>Task of ApiResponse (Dictionary&lt;string, int?&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<Dictionary<string, int?>>> GetInventoryAsyncWithHttpInfo ();
/// <summary>
/// Place an order for a pet
/// </summary>
@ -72,6 +55,68 @@ namespace IO.Swagger.Api
/// <returns>ApiResponse of Order</returns>
ApiResponse<Order> PlaceOrderWithHttpInfo (Order body = null);
/// <summary>
/// Find purchase order by ID
/// </summary>
/// <remarks>
/// For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
/// </remarks>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <returns>Order</returns>
Order GetOrderById (string orderId);
/// <summary>
/// Find purchase order by ID
/// </summary>
/// <remarks>
/// For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
/// </remarks>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <returns>ApiResponse of Order</returns>
ApiResponse<Order> GetOrderByIdWithHttpInfo (string orderId);
/// <summary>
/// Delete purchase order by ID
/// </summary>
/// <remarks>
/// For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
/// </remarks>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <returns></returns>
void DeleteOrder (string orderId);
/// <summary>
/// Delete purchase order by ID
/// </summary>
/// <remarks>
/// For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
/// </remarks>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> DeleteOrderWithHttpInfo (string orderId);
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
/// Returns pet inventories by status
/// </summary>
/// <remarks>
/// Returns a map of status codes to quantities
/// </remarks>
/// <returns>Task of Dictionary&lt;string, int?&gt;</returns>
System.Threading.Tasks.Task<Dictionary<string, int?>> GetInventoryAsync ();
/// <summary>
/// Returns pet inventories by status
/// </summary>
/// <remarks>
/// Returns a map of status codes to quantities
/// </remarks>
/// <returns>Task of ApiResponse (Dictionary&lt;string, int?&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<Dictionary<string, int?>>> GetInventoryAsyncWithHttpInfo ();
/// <summary>
/// Place an order for a pet
/// </summary>
@ -92,26 +137,6 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse (Order)</returns>
System.Threading.Tasks.Task<ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body = null);
/// <summary>
/// Find purchase order by ID
/// </summary>
/// <remarks>
/// For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
/// </remarks>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <returns>Order</returns>
Order GetOrderById (string orderId);
/// <summary>
/// Find purchase order by ID
/// </summary>
/// <remarks>
/// For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
/// </remarks>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <returns>ApiResponse of Order</returns>
ApiResponse<Order> GetOrderByIdWithHttpInfo (string orderId);
/// <summary>
/// Find purchase order by ID
/// </summary>
@ -132,26 +157,6 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse (Order)</returns>
System.Threading.Tasks.Task<ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (string orderId);
/// <summary>
/// Delete purchase order by ID
/// </summary>
/// <remarks>
/// For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
/// </remarks>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <returns></returns>
void DeleteOrder (string orderId);
/// <summary>
/// Delete purchase order by ID
/// </summary>
/// <remarks>
/// For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
/// </remarks>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> DeleteOrderWithHttpInfo (string orderId);
/// <summary>
/// Delete purchase order by ID
/// </summary>
@ -172,6 +177,8 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> DeleteOrderAsyncWithHttpInfo (string orderId);
#endregion Asynchronous Operations
}
/// <summary>
@ -327,6 +334,7 @@ namespace IO.Swagger.Api
}
/// <summary>
/// Returns pet inventories by status Returns a map of status codes to quantities
/// </summary>
@ -485,6 +493,7 @@ namespace IO.Swagger.Api
}
/// <summary>
/// Place an order for a pet
/// </summary>
@ -636,6 +645,7 @@ namespace IO.Swagger.Api
}
/// <summary>
/// Find purchase order by ID For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
/// </summary>
@ -788,6 +798,7 @@ namespace IO.Swagger.Api
null);
}
/// <summary>
/// Delete purchase order by ID For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
/// </summary>

View File

@ -15,6 +15,7 @@ namespace IO.Swagger.Api
/// </summary>
public interface IUserApi
{
#region Synchronous Operations
/// <summary>
/// Create user
@ -36,26 +37,6 @@ namespace IO.Swagger.Api
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> CreateUserWithHttpInfo (User body = null);
/// <summary>
/// Create user
/// </summary>
/// <remarks>
/// This can only be done by the logged in user.
/// </remarks>
/// <param name="body">Created user object</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task CreateUserAsync (User body = null);
/// <summary>
/// Create user
/// </summary>
/// <remarks>
/// This can only be done by the logged in user.
/// </remarks>
/// <param name="body">Created user object</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUserAsyncWithHttpInfo (User body = null);
/// <summary>
/// Creates list of users with given input array
/// </summary>
@ -76,26 +57,6 @@ namespace IO.Swagger.Api
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> CreateUsersWithArrayInputWithHttpInfo (List<User> body = null);
/// <summary>
/// Creates list of users with given input array
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="body">List of user object</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body = null);
/// <summary>
/// Creates list of users with given input array
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="body">List of user object</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithArrayInputAsyncWithHttpInfo (List<User> body = null);
/// <summary>
/// Creates list of users with given input array
/// </summary>
@ -116,6 +77,152 @@ namespace IO.Swagger.Api
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> CreateUsersWithListInputWithHttpInfo (List<User> body = null);
/// <summary>
/// Logs user into the system
/// </summary>
/// <remarks>
///
/// </remarks>
/// <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 = null, string password = null);
/// <summary>
/// Logs user into the system
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="username">The user name for login</param>
/// <param name="password">The password for login in clear text</param>
/// <returns>ApiResponse of string</returns>
ApiResponse<string> LoginUserWithHttpInfo (string username = null, string password = null);
/// <summary>
/// Logs out current logged in user session
/// </summary>
/// <remarks>
///
/// </remarks>
/// <returns></returns>
void LogoutUser ();
/// <summary>
/// Logs out current logged in user session
/// </summary>
/// <remarks>
///
/// </remarks>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> LogoutUserWithHttpInfo ();
/// <summary>
/// Get user by user name
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <returns>User</returns>
User GetUserByName (string username);
/// <summary>
/// Get user by user name
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <returns>ApiResponse of User</returns>
ApiResponse<User> GetUserByNameWithHttpInfo (string username);
/// <summary>
/// Updated user
/// </summary>
/// <remarks>
/// This can only be done by the logged in user.
/// </remarks>
/// <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 = null);
/// <summary>
/// Updated user
/// </summary>
/// <remarks>
/// This can only be done by the logged in user.
/// </remarks>
/// <param name="username">name that need to be deleted</param>
/// <param name="body">Updated user object</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> UpdateUserWithHttpInfo (string username, User body = null);
/// <summary>
/// Delete user
/// </summary>
/// <remarks>
/// This can only be done by the logged in user.
/// </remarks>
/// <param name="username">The name that needs to be deleted</param>
/// <returns></returns>
void DeleteUser (string username);
/// <summary>
/// Delete user
/// </summary>
/// <remarks>
/// This can only be done by the logged in user.
/// </remarks>
/// <param name="username">The name that needs to be deleted</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> DeleteUserWithHttpInfo (string username);
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
/// Create user
/// </summary>
/// <remarks>
/// This can only be done by the logged in user.
/// </remarks>
/// <param name="body">Created user object</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task CreateUserAsync (User body = null);
/// <summary>
/// Create user
/// </summary>
/// <remarks>
/// This can only be done by the logged in user.
/// </remarks>
/// <param name="body">Created user object</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUserAsyncWithHttpInfo (User body = null);
/// <summary>
/// Creates list of users with given input array
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="body">List of user object</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List<User> body = null);
/// <summary>
/// Creates list of users with given input array
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="body">List of user object</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithArrayInputAsyncWithHttpInfo (List<User> body = null);
/// <summary>
/// Creates list of users with given input array
/// </summary>
@ -136,28 +243,6 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> CreateUsersWithListInputAsyncWithHttpInfo (List<User> body = null);
/// <summary>
/// Logs user into the system
/// </summary>
/// <remarks>
///
/// </remarks>
/// <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 = null, string password = null);
/// <summary>
/// Logs user into the system
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="username">The user name for login</param>
/// <param name="password">The password for login in clear text</param>
/// <returns>ApiResponse of string</returns>
ApiResponse<string> LoginUserWithHttpInfo (string username = null, string password = null);
/// <summary>
/// Logs user into the system
/// </summary>
@ -180,24 +265,6 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse (string)</returns>
System.Threading.Tasks.Task<ApiResponse<string>> LoginUserAsyncWithHttpInfo (string username = null, string password = null);
/// <summary>
/// Logs out current logged in user session
/// </summary>
/// <remarks>
///
/// </remarks>
/// <returns></returns>
void LogoutUser ();
/// <summary>
/// Logs out current logged in user session
/// </summary>
/// <remarks>
///
/// </remarks>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> LogoutUserWithHttpInfo ();
/// <summary>
/// Logs out current logged in user session
/// </summary>
@ -216,26 +283,6 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> LogoutUserAsyncWithHttpInfo ();
/// <summary>
/// Get user by user name
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <returns>User</returns>
User GetUserByName (string username);
/// <summary>
/// Get user by user name
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <returns>ApiResponse of User</returns>
ApiResponse<User> GetUserByNameWithHttpInfo (string username);
/// <summary>
/// Get user by user name
/// </summary>
@ -256,28 +303,6 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse (User)</returns>
System.Threading.Tasks.Task<ApiResponse<User>> GetUserByNameAsyncWithHttpInfo (string username);
/// <summary>
/// Updated user
/// </summary>
/// <remarks>
/// This can only be done by the logged in user.
/// </remarks>
/// <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 = null);
/// <summary>
/// Updated user
/// </summary>
/// <remarks>
/// This can only be done by the logged in user.
/// </remarks>
/// <param name="username">name that need to be deleted</param>
/// <param name="body">Updated user object</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> UpdateUserWithHttpInfo (string username, User body = null);
/// <summary>
/// Updated user
/// </summary>
@ -300,26 +325,6 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> UpdateUserAsyncWithHttpInfo (string username, User body = null);
/// <summary>
/// Delete user
/// </summary>
/// <remarks>
/// This can only be done by the logged in user.
/// </remarks>
/// <param name="username">The name that needs to be deleted</param>
/// <returns></returns>
void DeleteUser (string username);
/// <summary>
/// Delete user
/// </summary>
/// <remarks>
/// This can only be done by the logged in user.
/// </remarks>
/// <param name="username">The name that needs to be deleted</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> DeleteUserWithHttpInfo (string username);
/// <summary>
/// Delete user
/// </summary>
@ -340,6 +345,8 @@ namespace IO.Swagger.Api
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> DeleteUserAsyncWithHttpInfo (string username);
#endregion Asynchronous Operations
}
/// <summary>
@ -496,6 +503,7 @@ namespace IO.Swagger.Api
null);
}
/// <summary>
/// Create user This can only be done by the logged in user.
/// </summary>
@ -647,6 +655,7 @@ namespace IO.Swagger.Api
null);
}
/// <summary>
/// Creates list of users with given input array
/// </summary>
@ -798,6 +807,7 @@ namespace IO.Swagger.Api
null);
}
/// <summary>
/// Creates list of users with given input array
/// </summary>
@ -947,6 +957,7 @@ namespace IO.Swagger.Api
}
/// <summary>
/// Logs user into the system
/// </summary>
@ -1093,6 +1104,7 @@ namespace IO.Swagger.Api
null);
}
/// <summary>
/// Logs out current logged in user session
/// </summary>
@ -1240,6 +1252,7 @@ namespace IO.Swagger.Api
}
/// <summary>
/// Get user by user name
/// </summary>
@ -1401,6 +1414,7 @@ namespace IO.Swagger.Api
null);
}
/// <summary>
/// Updated user This can only be done by the logged in user.
/// </summary>
@ -1555,6 +1569,7 @@ namespace IO.Swagger.Api
null);
}
/// <summary>
/// Delete user This can only be done by the logged in user.
/// </summary>

View File

@ -1,6 +1,5 @@
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="RestSharp" version="105.2.3" targetFramework="net45" developmentDependency="true" />
<package id="RestSharp" version="105.1.0" targetFramework="net45" developmentDependency="true" />
<package id="Newtonsoft.Json" version="8.0.2" targetFramework="net45" developmentDependency="true" />
</packages>