Merge pull request #3360 from wing328/csharp_escape_double_hyphen

[C#] fix double hyphen in c# generator
This commit is contained in:
wing328 2016-07-13 20:44:55 +08:00 committed by GitHub
commit cee45bc9aa
24 changed files with 170 additions and 168 deletions

View File

@ -669,7 +669,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
@Override
public String escapeUnsafeCharacters(String input) {
return input.replace("*/", "*_/").replace("/*", "/_*");
return input.replace("*/", "*_/").replace("/*", "/_*").replace("--", "- -");
}
}

View File

@ -414,10 +414,10 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
// string
String var = value.replaceAll("_", " ");
var = WordUtils.capitalizeFully(var);
//var = WordUtils.capitalizeFully(var);
var = camelize(var);
var = var.replaceAll("\\W+", "");
if (var.matches("\\d.*")) {
return "_" + var;
} else {

View File

@ -1,68 +1,68 @@
swagger: '2.0'
info:
description: "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end \r\n \n \r"
version: 1.0.0 */ ' " =end \r\n \n \r
title: Swagger Petstore */ ' " =end \r\n \n \r
termsOfService: http://swagger.io/terms/ */ ' " =end \r\n \n \r
description: "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- \r\n \n \r"
version: 1.0.0 */ ' " =end -- \r\n \n \r
title: Swagger Petstore */ ' " =end -- \r\n \n \r
termsOfService: http://swagger.io/terms/ */ ' " =end -- \r\n \n \r
contact:
email: apiteam@swagger.io */ ' " =end \r\n \n \r
email: apiteam@swagger.io */ ' " =end -- \r\n \n \r
license:
name: Apache 2.0 */ ' " =end \r\n \n \r
url: http://www.apache.org/licenses/LICENSE-2.0.html */ ' " =end \r\n \n \r
host: petstore.swagger.io */ ' " =end \r\n \n \r
basePath: /v2 */ ' " =end \r\n \n \r
name: Apache 2.0 */ ' " =end -- \r\n \n \r
url: http://www.apache.org/licenses/LICENSE-2.0.html */ ' " =end -- \r\n \n \r
host: petstore.swagger.io */ ' " =end -- \r\n \n \r
basePath: /v2 */ ' " =end -- \r\n \n \r
tags:
- name: fake
description: Everything about your Pets */ ' " =end \r\n \n \r
description: Everything about your Pets */ ' " =end -- \r\n \n \r
externalDocs:
description: Find out more */ ' " =end \r\n \n \r
description: Find out more */ ' " =end -- \r\n \n \r
url: 'http://swagger.io'
schemes:
- http */ ' " =end \r\n \n \r
- http */ ' " =end -- \r\n \n \r
paths:
/fake:
put:
tags:
- fake
summary: To test code injection */ ' " =end \r\n \n \r
descriptions: To test code injection */ ' " =end \r\n \n \r
operationId: testCodeInject */ ' " =end \r\n \n \r
summary: To test code injection */ ' " =end -- \r\n \n \r
descriptions: To test code injection */ ' " =end -- \r\n \n \r
operationId: testCodeInject */ ' " =end -- \r\n \n \r
consumes:
- application/json
- "*/ ' \" =end \r\n \n \r"
- "*/ ' \" =end -- \r\n \n \r"
produces:
- application/json
- "*/ ' \" =end \r\n \n \r"
- "*/ ' \" =end -- \r\n \n \r"
parameters:
- name: test code inject */ ' " =end \r\n \n \r
- name: test code inject */ ' " =end -- \r\n \n \r
type: string
in: formData
description: To test code injection */ ' " =end \r\n \n \r
description: To test code injection */ ' " =end -- \r\n \n \r
responses:
'400':
description: To test code injection */ ' " =end \r\n \n \r
description: To test code injection */ ' " =end -- \r\n \n \r
securityDefinitions:
petstore_auth:
type: oauth2
authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'
flow: implicit
scopes:
'write:pets': modify pets in your account */ ' " =end \r\n \n \r
'read:pets': read your pets */ ' " =end \r\n \n \r
'write:pets': modify pets in your account */ ' " =end -- \r\n \n \r
'read:pets': read your pets */ ' " =end -- \r\n \n \r
api_key:
type: apiKey
name: api_key */ ' " =end \r\n \n \r
name: api_key */ ' " =end -- \r\n \n \r
in: header
definitions:
Return:
description: Model for testing reserved words */ ' " =end \r\n \n \r
description: Model for testing reserved words */ ' " =end -- \r\n \n \r
properties:
return:
description: property description */ ' " =end \r\n \n \r
description: property description */ ' " =end -- \r\n \n \r
type: integer
format: int32
xml:
name: Return
externalDocs:
description: Find out more about Swagger */ ' " =end \r\n \n \r
description: Find out more about Swagger */ ' " =end -- \r\n \n \r
url: 'http://swagger.io'

View File

@ -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", "{29125490-71E4-47ED-B0D7-34505F58103C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{8CE139DF-64BC-4591-85F8-8506C2B67514}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{29125490-71E4-47ED-B0D7-34505F58103C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{29125490-71E4-47ED-B0D7-34505F58103C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{29125490-71E4-47ED-B0D7-34505F58103C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{29125490-71E4-47ED-B0D7-34505F58103C}.Release|Any CPU.Build.0 = Release|Any CPU
{8CE139DF-64BC-4591-85F8-8506C2B67514}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8CE139DF-64BC-4591-85F8-8506C2B67514}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8CE139DF-64BC-4591-85F8-8506C2B67514}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8CE139DF-64BC-4591-85F8-8506C2B67514}.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

View File

@ -1,9 +1,9 @@
<Properties>
<Properties StartupItem="src/IO.Swagger/IO.Swagger.csproj">
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.Workbench ActiveDocument="src/IO.Swagger/Client/Configuration.cs">
<Files>
<File FileName="src/IO.Swagger/Client/ApiClient.cs" Line="72" Column="77" />
<File FileName="src/IO.Swagger/Client/Configuration.cs" Line="311" Column="58" />
<File FileName="src/IO.Swagger/Client/ApiClient.cs" Line="1" Column="1" />
<File FileName="src/IO.Swagger/Client/Configuration.cs" Line="22" Column="1" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>

View File

@ -1,12 +1,12 @@
# IO.Swagger - the C# library for the Swagger Petstore &#39; \&quot; &#x3D;end
# IO.Swagger - the C# library for the Swagger Petstore *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end - -
This C# SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API version: 1.0.0 &#39; \&quot; &#x3D;end
- API version: 1.0.0 *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r
- SDK version: 1.0.0
- Build date: 2016-06-29T22:47:27.264+08:00
- Build date: 2016-07-13T18:16:08.689+08:00
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
## Frameworks supported
@ -14,8 +14,8 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c
- Windows Phone 7.1 (Mango)
## Dependencies
- [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
- [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
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:
```
@ -54,31 +54,33 @@ namespace Example
{
var apiInstance = new FakeApi();
var testCodeInjectEnd = testCodeInjectEnd_example; // string | To test code injection ' \" =end (optional)
var testCodeInjectEndRnNR = testCodeInjectEndRnNR_example; // string | To test code injection *_/ ' \" =end - - \\r\\n \\n \\r (optional)
try
{
// To test code injection ' \" =end
apiInstance.TestCodeInjectEnd(testCodeInjectEnd);
// To test code injection *_/ ' \" =end - - \\r\\n \\n \\r
apiInstance.TestCodeInjectEndRnNR(testCodeInjectEndRnNR);
}
catch (Exception e)
{
Debug.Print("Exception when calling FakeApi.TestCodeInjectEnd: " + e.Message );
Debug.Print("Exception when calling FakeApi.TestCodeInjectEndRnNR: " + e.Message );
}
}
}
}
```
<a name="documentation-for-api-endpoints"></a>
## Documentation for API Endpoints
All URIs are relative to *https://petstore.swagger.io ' \" =end/v2 ' \" =end*
All URIs are relative to *https://petstore.swagger.io *_/ ' \" =end - - \\r\\n \\n \\r/v2 *_/ ' \" =end - - \\r\\n \\n \\r*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*FakeApi* | [**TestCodeInjectEnd**](docs/FakeApi.md#testcodeinjectend) | **PUT** /fake | To test code injection ' \" =end
*FakeApi* | [**TestCodeInjectEndRnNR**](docs/FakeApi.md#testcodeinjectendrnnr) | **PUT** /fake | To test code injection *_/ ' \" =end - - \\r\\n \\n \\r
<a name="documentation-for-models"></a>
## Documentation for Models
- [Model.ModelReturn](docs/ModelReturn.md)
@ -86,11 +88,10 @@ Class | Method | HTTP request | Description
## Documentation for Authorization
### api_key
- **Type**: API key
- **API key parameter name**: api_key */ &#39; &quot; &#x3D;end
- **API key parameter name**: api_key */ &#39; &quot; &#x3D;end -- \r\n \n \r
- **Location**: HTTP header
### petstore_auth
@ -99,6 +100,6 @@ Class | Method | HTTP request | Description
- **Flow**: implicit
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
- **Scopes**:
- write:pets: modify pets in your account */ &#39; &quot; &#x3D;end
- read:pets: read your pets */ &#39; &quot; &#x3D;end
- write:pets: modify pets in your account */ &#39; &quot; &#x3D;end -- \r\n \n \r
- read:pets: read your pets */ &#39; &quot; &#x3D;end -- \r\n \n \r

View File

@ -1,16 +1,17 @@
# IO.Swagger.Api.FakeApi
All URIs are relative to *https://petstore.swagger.io ' \" =end/v2 ' \" =end*
All URIs are relative to *https://petstore.swagger.io *_/ ' \" =end - - \\r\\n \\n \\r/v2 *_/ ' \" =end - - \\r\\n \\n \\r*
Method | HTTP request | Description
------------- | ------------- | -------------
[**TestCodeInjectEnd**](FakeApi.md#testcodeinjectend) | **PUT** /fake | To test code injection &#39; \&quot; &#x3D;end
[**TestCodeInjectEndRnNR**](FakeApi.md#testcodeinjectendrnnr) | **PUT** /fake | To test code injection *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r
# **TestCodeInjectEnd**
> void TestCodeInjectEnd (string testCodeInjectEnd = null)
<a name="testcodeinjectendrnnr"></a>
# **TestCodeInjectEndRnNR**
> void TestCodeInjectEndRnNR (string testCodeInjectEndRnNR = null)
To test code injection ' \" =end
To test code injection *_/ ' \" =end - - \\r\\n \\n \\r
### Example
```csharp
@ -22,22 +23,22 @@ using IO.Swagger.Model;
namespace Example
{
public class TestCodeInjectEndExample
public class TestCodeInjectEndRnNRExample
{
public void main()
{
var apiInstance = new FakeApi();
var testCodeInjectEnd = testCodeInjectEnd_example; // string | To test code injection ' \" =end (optional)
var testCodeInjectEndRnNR = testCodeInjectEndRnNR_example; // string | To test code injection *_/ ' \" =end - - \\r\\n \\n \\r (optional)
try
{
// To test code injection ' \" =end
apiInstance.TestCodeInjectEnd(testCodeInjectEnd);
// To test code injection *_/ ' \" =end - - \\r\\n \\n \\r
apiInstance.TestCodeInjectEndRnNR(testCodeInjectEndRnNR);
}
catch (Exception e)
{
Debug.Print("Exception when calling FakeApi.TestCodeInjectEnd: " + e.Message );
Debug.Print("Exception when calling FakeApi.TestCodeInjectEndRnNR: " + e.Message );
}
}
}
@ -48,7 +49,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**testCodeInjectEnd** | **string**| To test code injection &#39; \&quot; &#x3D;end | [optional]
**testCodeInjectEndRnNR** | **string**| To test code injection *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r | [optional]
### Return type
@ -60,8 +61,8 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json, */ ' =end
- **Accept**: application/json, */ ' =end
- **Content-Type**: application/json, *_/ ' =end - -
- **Accept**: application/json, *_/ ' =end - -
[[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

@ -3,7 +3,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_Return** | **int?** | property description &#39; \&quot; &#x3D;end | [optional]
**_Return** | **int?** | property description *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r | [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

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Swagger Petstore ' \" =end
Swagger Petstore *_/ ' \" =end - - \\r\\n \\n \\r
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end - -
OpenAPI spec version: 1.0.0 ' \" =end
Contact: apiteam@swagger.io ' \" =end
OpenAPI spec version: 1.0.0 *_/ ' \" =end - - \\r\\n \\n \\r
Contact: apiteam@swagger.io *_/ ' \" =end - - \\r\\n \\n \\r
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
@ -86,7 +86,7 @@ limitations under the License.
<Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\IO.Swagger\IO.Swagger.csproj">
<Project>{29125490-71E4-47ED-B0D7-34505F58103C}</Project>
<Project>{8CE139DF-64BC-4591-85F8-8506C2B67514}</Project>
<Name>IO.Swagger</Name>
</ProjectReference>
</ItemGroup>

View File

@ -1,10 +1,10 @@
/*
* Swagger Petstore ' \" =end
* Swagger Petstore *_/ ' \" =end - - \\r\\n \\n \\r
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end - -
*
* OpenAPI spec version: 1.0.0 ' \" =end
* Contact: apiteam@swagger.io ' \" =end
* OpenAPI spec version: 1.0.0 *_/ ' \" =end - - \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end - - \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -36,49 +36,49 @@ namespace IO.Swagger.Api
{
#region Synchronous Operations
/// <summary>
/// To test code injection &#39; \&quot; &#x3D;end
/// To test code injection *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="testCodeInjectEnd">To test code injection &#39; \&quot; &#x3D;end (optional)</param>
/// <param name="testCodeInjectEndRnNR">To test code injection *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r (optional)</param>
/// <returns></returns>
void TestCodeInjectEnd (string testCodeInjectEnd = null);
void TestCodeInjectEndRnNR (string testCodeInjectEndRnNR = null);
/// <summary>
/// To test code injection &#39; \&quot; &#x3D;end
/// To test code injection *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="testCodeInjectEnd">To test code injection &#39; \&quot; &#x3D;end (optional)</param>
/// <param name="testCodeInjectEndRnNR">To test code injection *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> TestCodeInjectEndWithHttpInfo (string testCodeInjectEnd = null);
ApiResponse<Object> TestCodeInjectEndRnNRWithHttpInfo (string testCodeInjectEndRnNR = null);
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
/// To test code injection &#39; \&quot; &#x3D;end
/// To test code injection *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="testCodeInjectEnd">To test code injection &#39; \&quot; &#x3D;end (optional)</param>
/// <param name="testCodeInjectEndRnNR">To test code injection *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r (optional)</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task TestCodeInjectEndAsync (string testCodeInjectEnd = null);
System.Threading.Tasks.Task TestCodeInjectEndRnNRAsync (string testCodeInjectEndRnNR = null);
/// <summary>
/// To test code injection &#39; \&quot; &#x3D;end
/// To test code injection *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="testCodeInjectEnd">To test code injection &#39; \&quot; &#x3D;end (optional)</param>
/// <param name="testCodeInjectEndRnNR">To test code injection *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r (optional)</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> TestCodeInjectEndAsyncWithHttpInfo (string testCodeInjectEnd = null);
System.Threading.Tasks.Task<ApiResponse<Object>> TestCodeInjectEndRnNRAsyncWithHttpInfo (string testCodeInjectEndRnNR = null);
#endregion Asynchronous Operations
}
@ -192,23 +192,23 @@ namespace IO.Swagger.Api
}
/// <summary>
/// To test code injection &#39; \&quot; &#x3D;end
/// To test code injection *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="testCodeInjectEnd">To test code injection &#39; \&quot; &#x3D;end (optional)</param>
/// <param name="testCodeInjectEndRnNR">To test code injection *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r (optional)</param>
/// <returns></returns>
public void TestCodeInjectEnd (string testCodeInjectEnd = null)
public void TestCodeInjectEndRnNR (string testCodeInjectEndRnNR = null)
{
TestCodeInjectEndWithHttpInfo(testCodeInjectEnd);
TestCodeInjectEndRnNRWithHttpInfo(testCodeInjectEndRnNR);
}
/// <summary>
/// To test code injection &#39; \&quot; &#x3D;end
/// To test code injection *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="testCodeInjectEnd">To test code injection &#39; \&quot; &#x3D;end (optional)</param>
/// <param name="testCodeInjectEndRnNR">To test code injection *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
public ApiResponse<Object> TestCodeInjectEndWithHttpInfo (string testCodeInjectEnd = null)
public ApiResponse<Object> TestCodeInjectEndRnNRWithHttpInfo (string testCodeInjectEndRnNR = null)
{
var localVarPath = "/fake";
@ -222,14 +222,14 @@ namespace IO.Swagger.Api
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json",
"*/ ' =end"
"*_/ ' =end - - "
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json",
"*/ ' =end"
"*_/ ' =end - - "
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
@ -238,7 +238,7 @@ namespace IO.Swagger.Api
// set "format" to json by default
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
localVarPathParams.Add("format", "json");
if (testCodeInjectEnd != null) localVarFormParams.Add("test code inject */ &#39; &quot; &#x3D;end", Configuration.ApiClient.ParameterToString(testCodeInjectEnd)); // form parameter
if (testCodeInjectEndRnNR != null) localVarFormParams.Add("test code inject */ &#39; &quot; &#x3D;end -- \r\n \n \r", Configuration.ApiClient.ParameterToString(testCodeInjectEndRnNR)); // form parameter
// make the HTTP request
@ -250,7 +250,7 @@ namespace IO.Swagger.Api
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("TestCodeInjectEnd", localVarResponse);
Exception exception = ExceptionFactory("TestCodeInjectEndRnNR", localVarResponse);
if (exception != null) throw exception;
}
@ -261,24 +261,24 @@ namespace IO.Swagger.Api
}
/// <summary>
/// To test code injection &#39; \&quot; &#x3D;end
/// To test code injection *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="testCodeInjectEnd">To test code injection &#39; \&quot; &#x3D;end (optional)</param>
/// <param name="testCodeInjectEndRnNR">To test code injection *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r (optional)</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task TestCodeInjectEndAsync (string testCodeInjectEnd = null)
public async System.Threading.Tasks.Task TestCodeInjectEndRnNRAsync (string testCodeInjectEndRnNR = null)
{
await TestCodeInjectEndAsyncWithHttpInfo(testCodeInjectEnd);
await TestCodeInjectEndRnNRAsyncWithHttpInfo(testCodeInjectEndRnNR);
}
/// <summary>
/// To test code injection &#39; \&quot; &#x3D;end
/// To test code injection *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="testCodeInjectEnd">To test code injection &#39; \&quot; &#x3D;end (optional)</param>
/// <param name="testCodeInjectEndRnNR">To test code injection *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r (optional)</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<ApiResponse<Object>> TestCodeInjectEndAsyncWithHttpInfo (string testCodeInjectEnd = null)
public async System.Threading.Tasks.Task<ApiResponse<Object>> TestCodeInjectEndRnNRAsyncWithHttpInfo (string testCodeInjectEndRnNR = null)
{
var localVarPath = "/fake";
@ -292,14 +292,14 @@ namespace IO.Swagger.Api
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json",
"*/ ' =end"
"*_/ ' =end - - "
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json",
"*/ ' =end"
"*_/ ' =end - - "
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
@ -308,7 +308,7 @@ namespace IO.Swagger.Api
// set "format" to json by default
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
localVarPathParams.Add("format", "json");
if (testCodeInjectEnd != null) localVarFormParams.Add("test code inject */ &#39; &quot; &#x3D;end", Configuration.ApiClient.ParameterToString(testCodeInjectEnd)); // form parameter
if (testCodeInjectEndRnNR != null) localVarFormParams.Add("test code inject */ &#39; &quot; &#x3D;end -- \r\n \n \r", Configuration.ApiClient.ParameterToString(testCodeInjectEndRnNR)); // form parameter
// make the HTTP request
@ -320,7 +320,7 @@ namespace IO.Swagger.Api
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("TestCodeInjectEnd", localVarResponse);
Exception exception = ExceptionFactory("TestCodeInjectEndRnNR", localVarResponse);
if (exception != null) throw exception;
}

View File

@ -1,10 +1,10 @@
/*
* Swagger Petstore ' \" =end
* Swagger Petstore *_/ ' \" =end - - \\r\\n \\n \\r
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end - -
*
* OpenAPI spec version: 1.0.0 ' \" =end
* Contact: apiteam@swagger.io ' \" =end
* OpenAPI spec version: 1.0.0 *_/ ' \" =end - - \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end - - \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -60,17 +60,17 @@ namespace IO.Swagger.Client
/// <summary>
/// Initializes a new instance of the <see cref="ApiClient" /> class
/// with default configuration and base path (https://petstore.swagger.io ' \" =end/v2 ' \" =end).
/// with default configuration and base path (https://petstore.swagger.io *_/ ' \" =end - - \\r\\n \\n \\r/v2 *_/ ' \" =end - - \\r\\n \\n \\r).
/// </summary>
public ApiClient()
{
Configuration = Configuration.Default;
RestClient = new RestClient("https://petstore.swagger.io ' \" =end/v2 ' \" =end");
RestClient = new RestClient("https://petstore.swagger.io *_/ ' \" =end - - \\r\\n \\n \\r/v2 *_/ ' \" =end - - \\r\\n \\n \\r");
}
/// <summary>
/// Initializes a new instance of the <see cref="ApiClient" /> class
/// with default base path (https://petstore.swagger.io ' \" =end/v2 ' \" =end).
/// with default base path (https://petstore.swagger.io *_/ ' \" =end - - \\r\\n \\n \\r/v2 *_/ ' \" =end - - \\r\\n \\n \\r).
/// </summary>
/// <param name="config">An instance of Configuration.</param>
public ApiClient(Configuration config = null)
@ -80,7 +80,7 @@ namespace IO.Swagger.Client
else
Configuration = config;
RestClient = new RestClient("https://petstore.swagger.io ' \" =end/v2 ' \" =end");
RestClient = new RestClient("https://petstore.swagger.io *_/ ' \" =end - - \\r\\n \\n \\r/v2 *_/ ' \" =end - - \\r\\n \\n \\r");
}
/// <summary>
@ -88,7 +88,7 @@ namespace IO.Swagger.Client
/// with default configuration.
/// </summary>
/// <param name="basePath">The base path.</param>
public ApiClient(String basePath = "https://petstore.swagger.io ' \" =end/v2 ' \" =end")
public ApiClient(String basePath = "https://petstore.swagger.io *_/ ' \" =end - - \\r\\n \\n \\r/v2 *_/ ' \" =end - - \\r\\n \\n \\r")
{
if (String.IsNullOrEmpty(basePath))
throw new ArgumentException("basePath cannot be empty");

View File

@ -1,10 +1,10 @@
/*
* Swagger Petstore ' \" =end
* Swagger Petstore *_/ ' \" =end - - \\r\\n \\n \\r
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end - -
*
* OpenAPI spec version: 1.0.0 ' \" =end
* Contact: apiteam@swagger.io ' \" =end
* OpenAPI spec version: 1.0.0 *_/ ' \" =end - - \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end - - \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,10 +1,10 @@
/*
* Swagger Petstore ' \" =end
* Swagger Petstore *_/ ' \" =end - - \\r\\n \\n \\r
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end - -
*
* OpenAPI spec version: 1.0.0 ' \" =end
* Contact: apiteam@swagger.io ' \" =end
* OpenAPI spec version: 1.0.0 *_/ ' \" =end - - \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end - - \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,10 +1,10 @@
/*
* Swagger Petstore ' \" =end
* Swagger Petstore *_/ ' \" =end - - \\r\\n \\n \\r
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end - -
*
* OpenAPI spec version: 1.0.0 ' \" =end
* Contact: apiteam@swagger.io ' \" =end
* OpenAPI spec version: 1.0.0 *_/ ' \" =end - - \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end - - \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -308,7 +308,7 @@ namespace IO.Swagger.Client
.GetExecutingAssembly()
.GetReferencedAssemblies()
.Where(x => x.Name == "System.Core").First().Version.ToString() + "\n";
report += " Version of the API: 1.0.0 ' \" =end\n";
report += " Version of the API: 1.0.0 *_/ ' \" =end - - \\r\\n \\n \\r\n";
report += " SDK Package Version: 1.0.0\n";
return report;

View File

@ -1,10 +1,10 @@
/*
* Swagger Petstore ' \" =end
* Swagger Petstore *_/ ' \" =end - - \\r\\n \\n \\r
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end - -
*
* OpenAPI spec version: 1.0.0 ' \" =end
* Contact: apiteam@swagger.io ' \" =end
* OpenAPI spec version: 1.0.0 *_/ ' \" =end - - \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end - - \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,10 +1,10 @@
/*
* Swagger Petstore ' \" =end
* Swagger Petstore *_/ ' \" =end - - \\r\\n \\n \\r
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end - -
*
* OpenAPI spec version: 1.0.0 ' \" =end
* Contact: apiteam@swagger.io ' \" =end
* OpenAPI spec version: 1.0.0 *_/ ' \" =end - - \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end - - \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Swagger Petstore ' \" =end
Swagger Petstore *_/ ' \" =end - - \\r\\n \\n \\r
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end - -
OpenAPI spec version: 1.0.0 &#39; \&quot; &#x3D;end
Contact: apiteam@swagger.io ' \" =end
OpenAPI spec version: 1.0.0 *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r
Contact: apiteam@swagger.io *_/ ' \" =end - - \\r\\n \\n \\r
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
@ -24,7 +24,7 @@ limitations under the License.
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{29125490-71E4-47ED-B0D7-34505F58103C}</ProjectGuid>
<ProjectGuid>{8CE139DF-64BC-4591-85F8-8506C2B67514}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Swagger Library</RootNamespace>

View File

@ -1,10 +1,10 @@
/*
* Swagger Petstore ' \" =end
* Swagger Petstore *_/ ' \" =end - - \\r\\n \\n \\r
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end - -
*
* OpenAPI spec version: 1.0.0 ' \" =end
* Contact: apiteam@swagger.io ' \" =end
* OpenAPI spec version: 1.0.0 *_/ ' \" =end - - \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end - - \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -34,7 +34,7 @@ using Newtonsoft.Json.Converters;
namespace IO.Swagger.Model
{
/// <summary>
/// Model for testing reserved words &#39; \&quot; &#x3D;end
/// Model for testing reserved words *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r
/// </summary>
[DataContract]
public partial class ModelReturn : IEquatable<ModelReturn>
@ -42,16 +42,16 @@ namespace IO.Swagger.Model
/// <summary>
/// Initializes a new instance of the <see cref="ModelReturn" /> class.
/// </summary>
/// <param name="_Return">property description &#39; \&quot; &#x3D;end.</param>
/// <param name="_Return">property description *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r.</param>
public ModelReturn(int? _Return = null)
{
this._Return = _Return;
}
/// <summary>
/// property description &#39; \&quot; &#x3D;end
/// property description *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r
/// </summary>
/// <value>property description &#39; \&quot; &#x3D;end</value>
/// <value>property description *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r</value>
[DataMember(Name="return", EmitDefaultValue=false)]
public int? _Return { get; set; }
/// <summary>

View File

@ -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", "{D285D0CA-2FEE-4760-8780-E13C90E527E8}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{4744D957-AA0D-4BF3-A0B6-60A13E6749BB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D285D0CA-2FEE-4760-8780-E13C90E527E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D285D0CA-2FEE-4760-8780-E13C90E527E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D285D0CA-2FEE-4760-8780-E13C90E527E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D285D0CA-2FEE-4760-8780-E13C90E527E8}.Release|Any CPU.Build.0 = Release|Any CPU
{4744D957-AA0D-4BF3-A0B6-60A13E6749BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4744D957-AA0D-4BF3-A0B6-60A13E6749BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4744D957-AA0D-4BF3-A0B6-60A13E6749BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4744D957-AA0D-4BF3-A0B6-60A13E6749BB}.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

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 date: 2016-07-13T16:19:48.141+08:00
- Build date: 2016-07-13T19:06:48.432+08:00
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
## Frameworks supported

View File

@ -24,7 +24,7 @@ limitations under the License.
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D285D0CA-2FEE-4760-8780-E13C90E527E8}</ProjectGuid>
<ProjectGuid>{4744D957-AA0D-4BF3-A0B6-60A13E6749BB}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Swagger Library</RootNamespace>

View File

@ -47,16 +47,16 @@ namespace IO.Swagger.Model
Abc,
/// <summary>
/// Enum efg for "-efg"
/// Enum Efg for "-efg"
/// </summary>
[EnumMember(Value = "-efg")]
efg,
Efg,
/// <summary>
/// Enum xyz for "(xyz)"
/// Enum Xyz for "(xyz)"
/// </summary>
[EnumMember(Value = "(xyz)")]
xyz
Xyz
}
}

View File

@ -47,10 +47,10 @@ namespace IO.Swagger.Model
{
/// <summary>
/// Enum Upper for "UPPER"
/// Enum UPPER for "UPPER"
/// </summary>
[EnumMember(Value = "UPPER")]
Upper,
UPPER,
/// <summary>
/// Enum Lower for "lower"

View File

@ -48,10 +48,10 @@ namespace IO.Swagger.Model
{
/// <summary>
/// Enum Upper for "UPPER"
/// Enum UPPER for "UPPER"
/// </summary>
[EnumMember(Value = "UPPER")]
Upper,
UPPER,
/// <summary>
/// Enum Lower for "lower"