Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,23 @@ namespace {{packageName}}.Client
return apiKeyValue;
}

private string _tempFolderPath = Path.GetTempPath();
private string _tempFolderPath;

/// <summary>
/// Gets or sets the temporary folder path to store the files downloaded from the server.
/// </summary>
/// <value>Folder path.</value>
public String TempFolderPath
{
get { return _tempFolderPath; }
get
{
// default to Path.GetTempPath() if _tempFolderPath is not set
if (String.IsNullOrEmpty(_tempFolderPath))
{
_tempFolderPath = Path.GetTempPath();
}
return _tempFolderPath;
}

set
{
Expand Down
10 changes: 5 additions & 5 deletions samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
VisualStudioVersion = 12.0.0.0
MinimumVisualStudioVersion = 10.0.0.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{4F6B73F4-427E-4C54-BB06-A106EBF09288}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{45175ABF-4F24-48D0-B481-B1A2D9B8649E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
Expand All @@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4F6B73F4-427E-4C54-BB06-A106EBF09288}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4F6B73F4-427E-4C54-BB06-A106EBF09288}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4F6B73F4-427E-4C54-BB06-A106EBF09288}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4F6B73F4-427E-4C54-BB06-A106EBF09288}.Release|Any CPU.Build.0 = Release|Any CPU
{45175ABF-4F24-48D0-B481-B1A2D9B8649E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{45175ABF-4F24-48D0-B481-B1A2D9B8649E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{45175ABF-4F24-48D0-B481-B1A2D9B8649E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{45175ABF-4F24-48D0-B481-B1A2D9B8649E}.Release|Any CPU.Build.0 = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,23 @@ public string GetApiKeyWithPrefix (string apiKeyIdentifier)
return apiKeyValue;
}

private string _tempFolderPath = Path.GetTempPath();
private string _tempFolderPath;

/// <summary>
/// Gets or sets the temporary folder path to store the files downloaded from the server.
/// </summary>
/// <value>Folder path.</value>
public String TempFolderPath
{
get { return _tempFolderPath; }
get
{
// default to Path.GetTempPath() if _tempFolderPath is not set
if (String.IsNullOrEmpty(_tempFolderPath))
{
_tempFolderPath = Path.GetTempPath();
}
return _tempFolderPath;
}

set
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Contact: apiteam@swagger.io
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4F6B73F4-427E-4C54-BB06-A106EBF09288}</ProjectGuid>
<ProjectGuid>{45175ABF-4F24-48D0-B481-B1A2D9B8649E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>IO.Swagger</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
VisualStudioVersion = 12.0.0.0
MinimumVisualStudioVersion = 10.0.0.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{4B8145C1-32ED-46D4-9DD5-10A82B5B0013}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{5B61D15D-DCEB-42AF-89A6-6AE15FB9548F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
Expand All @@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4B8145C1-32ED-46D4-9DD5-10A82B5B0013}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4B8145C1-32ED-46D4-9DD5-10A82B5B0013}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4B8145C1-32ED-46D4-9DD5-10A82B5B0013}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4B8145C1-32ED-46D4-9DD5-10A82B5B0013}.Release|Any CPU.Build.0 = Release|Any CPU
{5B61D15D-DCEB-42AF-89A6-6AE15FB9548F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5B61D15D-DCEB-42AF-89A6-6AE15FB9548F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5B61D15D-DCEB-42AF-89A6-6AE15FB9548F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5B61D15D-DCEB-42AF-89A6-6AE15FB9548F}.Release|Any CPU.Build.0 = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: class io.swagger.codegen.languages.CSharpClientCodegen
- Build package: io.swagger.codegen.languages.CSharpClientCodegen

<a name="frameworks-supported"></a>
## Frameworks supported
Expand Down Expand Up @@ -38,6 +38,20 @@ using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
```

<a name="packaging"></a>
## Packaging

A `.nuspec` is included with the project. You can follow the Nuget quickstart to [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#create-the-package) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#publish-the-package) packages.

This `.nuspec` uses placeholders from the `.csproj`, so build the `.csproj` directly:

```
nuget pack -Build -OutputDirectory out IO.Swagger.csproj
```

Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) or [other host](https://docs.microsoft.com/en-us/nuget/hosting-packages/overview) and consume the new package via Nuget as usual.

<a name="getting-started"></a>
## Getting Started

Expand Down Expand Up @@ -115,6 +129,7 @@ Class | Method | HTTP request | Description
- [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
- [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
- [Model.ArrayTest](docs/ArrayTest.md)
- [Model.Capitalization](docs/Capitalization.md)
- [Model.Cat](docs/Cat.md)
- [Model.Category](docs/Category.md)
- [Model.ClassModel](docs/ClassModel.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Method | HTTP request | Description

To test \"client\" model

To test \"client\" model

### Example
```csharp
using System;
Expand Down Expand Up @@ -166,6 +168,8 @@ void (empty response body)

To test enum parameters

To test enum parameters

### Example
```csharp
using System;
Expand Down Expand Up @@ -209,11 +213,11 @@ namespace Example

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional]
**enumFormStringArray** | [**List&lt;string&gt;**](string.md)| Form parameter enum test (string array) | [optional]
**enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg]
**enumHeaderStringArray** | [**List<string>**](string.md)| Header parameter enum test (string array) | [optional]
**enumHeaderStringArray** | [**List&lt;string&gt;**](string.md)| Header parameter enum test (string array) | [optional]
**enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg]
**enumQueryStringArray** | [**List<string>**](string.md)| Query parameter enum test (string array) | [optional]
**enumQueryStringArray** | [**List&lt;string&gt;**](string.md)| Query parameter enum test (string array) | [optional]
**enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
**enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional]
**enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ namespace Example

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status** | [**List<string>**](string.md)| Status values that need to be considered for filter |
**status** | [**List&lt;string&gt;**](string.md)| Status values that need to be considered for filter |

### Return type

Expand Down Expand Up @@ -257,7 +257,7 @@ namespace Example

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tags** | [**List<string>**](string.md)| Tags to filter by |
**tags** | [**List&lt;string&gt;**](string.md)| Tags to filter by |

### Return type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ namespace Example

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List<User>**](User.md)| List of user object |
**body** | [**List&lt;User&gt;**](User.md)| List of user object |

### Return type

Expand Down Expand Up @@ -180,7 +180,7 @@ namespace Example

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List<User>**](User.md)| List of user object |
**body** | [**List&lt;User&gt;**](User.md)| List of user object |

### Return type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Contact: apiteam@swagger.io
<Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\IO.Swagger\IO.Swagger.csproj">
<Project>{4B8145C1-32ED-46D4-9DD5-10A82B5B0013}</Project>
<Project>{5B61D15D-DCEB-42AF-89A6-6AE15FB9548F}</Project>
<Name>IO.Swagger</Name>
</ProjectReference>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public interface IFakeApi : IApiAccessor
/// To test \&quot;client\&quot; model
/// </summary>
/// <remarks>
///
/// To test \&quot;client\&quot; model
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
Expand All @@ -39,7 +39,7 @@ public interface IFakeApi : IApiAccessor
/// To test \&quot;client\&quot; model
/// </summary>
/// <remarks>
///
/// To test \&quot;client\&quot; model
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
Expand Down Expand Up @@ -96,7 +96,7 @@ public interface IFakeApi : IApiAccessor
/// To test enum parameters
/// </summary>
/// <remarks>
///
/// To test enum parameters
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="enumFormStringArray">Form parameter enum test (string array) (optional)</param>
Expand All @@ -114,7 +114,7 @@ public interface IFakeApi : IApiAccessor
/// To test enum parameters
/// </summary>
/// <remarks>
///
/// To test enum parameters
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="enumFormStringArray">Form parameter enum test (string array) (optional)</param>
Expand All @@ -133,7 +133,7 @@ public interface IFakeApi : IApiAccessor
/// To test \&quot;client\&quot; model
/// </summary>
/// <remarks>
///
/// To test \&quot;client\&quot; model
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
Expand All @@ -144,7 +144,7 @@ public interface IFakeApi : IApiAccessor
/// To test \&quot;client\&quot; model
/// </summary>
/// <remarks>
///
/// To test \&quot;client\&quot; model
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
Expand Down Expand Up @@ -201,7 +201,7 @@ public interface IFakeApi : IApiAccessor
/// To test enum parameters
/// </summary>
/// <remarks>
///
/// To test enum parameters
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="enumFormStringArray">Form parameter enum test (string array) (optional)</param>
Expand All @@ -219,7 +219,7 @@ public interface IFakeApi : IApiAccessor
/// To test enum parameters
/// </summary>
/// <remarks>
///
/// To test enum parameters
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="enumFormStringArray">Form parameter enum test (string array) (optional)</param>
Expand Down Expand Up @@ -345,7 +345,7 @@ public void AddDefaultHeader(string key, string value)
}

/// <summary>
/// To test \&quot;client\&quot; model
/// To test \&quot;client\&quot; model To test \&quot;client\&quot; model
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
Expand All @@ -357,7 +357,7 @@ public ModelClient TestClientModel (ModelClient body)
}

/// <summary>
/// To test \&quot;client\&quot; model
/// To test \&quot;client\&quot; model To test \&quot;client\&quot; model
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
Expand Down Expand Up @@ -423,7 +423,7 @@ public ApiResponse< ModelClient > TestClientModelWithHttpInfo (ModelClient body)
}

/// <summary>
/// To test \&quot;client\&quot; model
/// To test \&quot;client\&quot; model To test \&quot;client\&quot; model
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
Expand All @@ -436,7 +436,7 @@ public async System.Threading.Tasks.Task<ModelClient> TestClientModelAsync (Mode
}

/// <summary>
/// To test \&quot;client\&quot; model
/// To test \&quot;client\&quot; model To test \&quot;client\&quot; model
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
Expand Down Expand Up @@ -756,7 +756,7 @@ public async System.Threading.Tasks.Task<ApiResponse<Object>> TestEndpointParame
}

/// <summary>
/// To test enum parameters
/// To test enum parameters To test enum parameters
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="enumFormStringArray">Form parameter enum test (string array) (optional)</param>
Expand All @@ -774,7 +774,7 @@ public void TestEnumParameters (List<string> enumFormStringArray = null, string
}

/// <summary>
/// To test enum parameters
/// To test enum parameters To test enum parameters
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="enumFormStringArray">Form parameter enum test (string array) (optional)</param>
Expand Down Expand Up @@ -844,7 +844,7 @@ public ApiResponse<Object> TestEnumParametersWithHttpInfo (List<string> enumForm
}

/// <summary>
/// To test enum parameters
/// To test enum parameters To test enum parameters
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="enumFormStringArray">Form parameter enum test (string array) (optional)</param>
Expand All @@ -863,7 +863,7 @@ public async System.Threading.Tasks.Task TestEnumParametersAsync (List<string> e
}

/// <summary>
/// To test enum parameters
/// To test enum parameters To test enum parameters
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="enumFormStringArray">Form parameter enum test (string array) (optional)</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,23 @@ public string GetApiKeyWithPrefix (string apiKeyIdentifier)
return apiKeyValue;
}

private string _tempFolderPath = Path.GetTempPath();
private string _tempFolderPath;

/// <summary>
/// Gets or sets the temporary folder path to store the files downloaded from the server.
/// </summary>
/// <value>Folder path.</value>
public String TempFolderPath
{
get { return _tempFolderPath; }
get
{
// default to Path.GetTempPath() if _tempFolderPath is not set
if (String.IsNullOrEmpty(_tempFolderPath))
{
_tempFolderPath = Path.GetTempPath();
}
return _tempFolderPath;
}

set
{
Expand Down
Loading