fix model name "client" issue

This commit is contained in:
wing328 2016-07-10 17:42:18 +08:00
parent 0119a66479
commit 1c5210581e
10 changed files with 531 additions and 22 deletions

View File

@ -57,6 +57,10 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
setReservedWordsLowerCase( setReservedWordsLowerCase(
Arrays.asList( Arrays.asList(
// set client as a reserved word to avoid conflicts with IO.Swagger.Client
// this is a workaround and can be removed if c# api client is updated to use
// fully qualified name
"client",
// local variable names in API methods (endpoints) // local variable names in API methods (endpoints)
"localVarPath", "localVarPathParams", "localVarQueryParams", "localVarHeaderParams", "localVarPath", "localVarPathParams", "localVarQueryParams", "localVarHeaderParams",
"localVarFormParams", "localVarFileParams", "localVarStatusCode", "localVarResponse", "localVarFormParams", "localVarFileParams", "localVarStatusCode", "localVarResponse",

View File

@ -561,6 +561,28 @@ paths:
description: User not found description: User not found
/fake: /fake:
patch:
tags:
- fake
summary: To test "client" model
descriptions: To test "client" model
operationId: testClientModel
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: body
description: client model
required: true
schema:
$ref: '#/definitions/Client'
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/Client'
get: get:
tags: tags:
- fake - fake
@ -1018,6 +1040,11 @@ definitions:
type: object type: object
additionalProperties: additionalProperties:
$ref: '#/definitions/Animal' $ref: '#/definitions/Animal'
Client:
type: object
properties:
client:
type: string
ReadOnlyFirst: ReadOnlyFirst:
type: object type: object
properties: properties:

View File

@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012 # Visual Studio 2012
VisualStudioVersion = 12.0.0.0 VisualStudioVersion = 12.0.0.0
MinimumVisualStudioVersion = 10.0.0.1 MinimumVisualStudioVersion = 10.0.0.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{CD9F0463-DC9D-458F-A59D-A72DB4583934}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{C8F5DE66-0944-4368-91CC-2313B4BFADDE}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject EndProject
@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CD9F0463-DC9D-458F-A59D-A72DB4583934}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C8F5DE66-0944-4368-91CC-2313B4BFADDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CD9F0463-DC9D-458F-A59D-A72DB4583934}.Debug|Any CPU.Build.0 = Debug|Any CPU {C8F5DE66-0944-4368-91CC-2313B4BFADDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD9F0463-DC9D-458F-A59D-A72DB4583934}.Release|Any CPU.ActiveCfg = Release|Any CPU {C8F5DE66-0944-4368-91CC-2313B4BFADDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD9F0463-DC9D-458F-A59D-A72DB4583934}.Release|Any CPU.Build.0 = Release|Any CPU {C8F5DE66-0944-4368-91CC-2313B4BFADDE}.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.ActiveCfg = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = 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 {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 - API version: 1.0.0
- SDK version: 1.0.0 - SDK version: 1.0.0
- Build date: 2016-07-10T16:55:14.469+08:00 - Build date: 2016-07-10T17:40:23.847+08:00
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen - Build package: class io.swagger.codegen.languages.CSharpClientCodegen
## Frameworks supported ## Frameworks supported
@ -54,27 +54,17 @@ namespace Example
{ {
var apiInstance = new FakeApi(); var apiInstance = new FakeApi();
var number = 3.4; // decimal? | None var body = new ModelClient(); // ModelClient | client model
var _double = 1.2; // double? | None
var _string = _string_example; // string | None
var _byte = B; // byte[] | None
var integer = 56; // int? | None (optional)
var int32 = 56; // int? | None (optional)
var int64 = 789; // long? | None (optional)
var _float = 3.4; // float? | None (optional)
var binary = B; // byte[] | None (optional)
var date = 2013-10-20; // DateTime? | None (optional)
var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional)
var password = password_example; // string | None (optional)
try try
{ {
// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 // To test \"client\" model
apiInstance.TestEndpointParameters(number, _double, _string, _byte, integer, int32, int64, _float, binary, date, dateTime, password); ModelClient result = apiInstance.TestClientModel(body);
Debug.WriteLine(result);
} }
catch (Exception e) catch (Exception e)
{ {
Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message ); Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message );
} }
} }
} }
@ -88,6 +78,7 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Class | Method | HTTP request | Description Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*FakeApi* | [**TestEnumQueryParameters**](docs/FakeApi.md#testenumqueryparameters) | **GET** /fake | To test enum query parameters *FakeApi* | [**TestEnumQueryParameters**](docs/FakeApi.md#testenumqueryparameters) | **GET** /fake | To test enum query parameters
*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store *PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
@ -132,6 +123,7 @@ Class | Method | HTTP request | Description
- [Model.MapTest](docs/MapTest.md) - [Model.MapTest](docs/MapTest.md)
- [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
- [Model.Model200Response](docs/Model200Response.md) - [Model.Model200Response](docs/Model200Response.md)
- [Model.ModelClient](docs/ModelClient.md)
- [Model.ModelReturn](docs/ModelReturn.md) - [Model.ModelReturn](docs/ModelReturn.md)
- [Model.Name](docs/Name.md) - [Model.Name](docs/Name.md)
- [Model.NumberOnly](docs/NumberOnly.md) - [Model.NumberOnly](docs/NumberOnly.md)

View File

@ -4,10 +4,71 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**TestEnumQueryParameters**](FakeApi.md#testenumqueryparameters) | **GET** /fake | To test enum query parameters [**TestEnumQueryParameters**](FakeApi.md#testenumqueryparameters) | **GET** /fake | To test enum query parameters
<a name="testclientmodel"></a>
# **TestClientModel**
> ModelClient TestClientModel (ModelClient body)
To test \"client\" model
### Example
```csharp
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class TestClientModelExample
{
public void main()
{
var apiInstance = new FakeApi();
var body = new ModelClient(); // ModelClient | client model
try
{
// To test \"client\" model
ModelClient result = apiInstance.TestClientModel(body);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message );
}
}
}
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**ModelClient**](ModelClient.md)| client model |
### Return type
[**ModelClient**](ModelClient.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
<a name="testendpointparameters"></a> <a name="testendpointparameters"></a>
# **TestEndpointParameters** # **TestEndpointParameters**
> void TestEndpointParameters (decimal? number, double? _double, string _string, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null) > void TestEndpointParameters (decimal? number, double? _double, string _string, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null)

View File

@ -0,0 +1,9 @@
# IO.Swagger.Model.ModelClient
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_Client** | **string** | | [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

@ -0,0 +1,90 @@
/*
* Swagger Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using NUnit.Framework;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using IO.Swagger.Api;
using IO.Swagger.Model;
using IO.Swagger.Client;
using System.Reflection;
namespace IO.Swagger.Test
{
/// <summary>
/// Class for testing ModelClient
/// </summary>
/// <remarks>
/// This file is automatically generated by Swagger Codegen.
/// Please update the test case below to test the model.
/// </remarks>
[TestFixture]
public class ModelClientTests
{
// TODO uncomment below to declare an instance variable for ModelClient
//private ModelClient instance;
/// <summary>
/// Setup before each test
/// </summary>
[SetUp]
public void Init()
{
// TODO uncomment below to create an instance of ModelClient
//instance = new ModelClient();
}
/// <summary>
/// Clean up after each test
/// </summary>
[TearDown]
public void Cleanup()
{
}
/// <summary>
/// Test an instance of ModelClient
/// </summary>
[Test]
public void ModelClientInstanceTest()
{
// TODO uncomment below to test "IsInstanceOfType" ModelClient
//Assert.IsInstanceOfType<ModelClient> (instance, "variable 'instance' is a ModelClient");
}
/// <summary>
/// Test the property '_Client'
/// </summary>
[Test]
public void _ClientTest()
{
// TODO unit test for the property '_Client'
}
}
}

View File

@ -26,6 +26,7 @@ using System.Collections.ObjectModel;
using System.Linq; using System.Linq;
using RestSharp; using RestSharp;
using IO.Swagger.Client; using IO.Swagger.Client;
using IO.Swagger.Model;
namespace IO.Swagger.Api namespace IO.Swagger.Api
{ {
@ -36,6 +37,27 @@ namespace IO.Swagger.Api
{ {
#region Synchronous Operations #region Synchronous Operations
/// <summary> /// <summary>
/// To test \&quot;client\&quot; model
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <returns>ModelClient</returns>
ModelClient TestClientModel (ModelClient body);
/// <summary>
/// To test \&quot;client\&quot; model
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <returns>ApiResponse of ModelClient</returns>
ApiResponse<ModelClient> TestClientModelWithHttpInfo (ModelClient body);
/// <summary>
/// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
/// </summary> /// </summary>
/// <remarks> /// <remarks>
@ -106,6 +128,27 @@ namespace IO.Swagger.Api
#endregion Synchronous Operations #endregion Synchronous Operations
#region Asynchronous Operations #region Asynchronous Operations
/// <summary> /// <summary>
/// To test \&quot;client\&quot; model
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <returns>Task of ModelClient</returns>
System.Threading.Tasks.Task<ModelClient> TestClientModelAsync (ModelClient body);
/// <summary>
/// To test \&quot;client\&quot; model
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">client model</param>
/// <returns>Task of ApiResponse (ModelClient)</returns>
System.Threading.Tasks.Task<ApiResponse<ModelClient>> TestClientModelAsyncWithHttpInfo (ModelClient body);
/// <summary>
/// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
/// </summary> /// </summary>
/// <remarks> /// <remarks>
@ -285,6 +328,163 @@ namespace IO.Swagger.Api
this.Configuration.AddDefaultHeader(key, value); this.Configuration.AddDefaultHeader(key, value);
} }
/// <summary>
/// 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>
/// <returns>ModelClient</returns>
public ModelClient TestClientModel (ModelClient body)
{
ApiResponse<ModelClient> localVarResponse = TestClientModelWithHttpInfo(body);
return localVarResponse.Data;
}
/// <summary>
/// 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>
/// <returns>ApiResponse of ModelClient</returns>
public ApiResponse< ModelClient > TestClientModelWithHttpInfo (ModelClient body)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestClientModel");
var localVarPath = "/fake";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json"
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
// set "format" to json by default
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
localVarPathParams.Add("format", "json");
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("TestClientModel", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<ModelClient>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(ModelClient) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient)));
}
/// <summary>
/// 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>
/// <returns>Task of ModelClient</returns>
public async System.Threading.Tasks.Task<ModelClient> TestClientModelAsync (ModelClient body)
{
ApiResponse<ModelClient> localVarResponse = await TestClientModelAsyncWithHttpInfo(body);
return localVarResponse.Data;
}
/// <summary>
/// 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>
/// <returns>Task of ApiResponse (ModelClient)</returns>
public async System.Threading.Tasks.Task<ApiResponse<ModelClient>> TestClientModelAsyncWithHttpInfo (ModelClient body)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestClientModel");
var localVarPath = "/fake";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json"
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
// set "format" to json by default
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
localVarPathParams.Add("format", "json");
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("TestClientModel", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<ModelClient>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(ModelClient) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient)));
}
/// <summary> /// <summary>
/// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
/// </summary> /// </summary>

View File

@ -24,7 +24,7 @@ limitations under the License.
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{CD9F0463-DC9D-458F-A59D-A72DB4583934}</ProjectGuid> <ProjectGuid>{C8F5DE66-0944-4368-91CC-2313B4BFADDE}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Swagger Library</RootNamespace> <RootNamespace>Swagger Library</RootNamespace>

View File

@ -0,0 +1,126 @@
/*
* Swagger Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace IO.Swagger.Model
{
/// <summary>
/// ModelClient
/// </summary>
[DataContract]
public partial class ModelClient : IEquatable<ModelClient>
{
/// <summary>
/// Initializes a new instance of the <see cref="ModelClient" /> class.
/// </summary>
/// <param name="_Client">_Client.</param>
public ModelClient(string _Client = null)
{
this._Client = _Client;
}
/// <summary>
/// Gets or Sets _Client
/// </summary>
[DataMember(Name="client", EmitDefaultValue=false)]
public string _Client { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class ModelClient {\n");
sb.Append(" _Client: ").Append(_Client).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="obj">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object obj)
{
// credit: http://stackoverflow.com/a/10454552/677735
return this.Equals(obj as ModelClient);
}
/// <summary>
/// Returns true if ModelClient instances are equal
/// </summary>
/// <param name="other">Instance of ModelClient to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ModelClient other)
{
// credit: http://stackoverflow.com/a/10454552/677735
if (other == null)
return false;
return
(
this._Client == other._Client ||
this._Client != null &&
this._Client.Equals(other._Client)
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
// credit: http://stackoverflow.com/a/263416/677735
unchecked // Overflow is fine, just wrap
{
int hash = 41;
// Suitable nullity checks etc, of course :)
if (this._Client != null)
hash = hash * 59 + this._Client.GetHashCode();
return hash;
}
}
}
}