[C#] Fix guid for C# security samples (#5283)

* Issue #5196: also fix the packageGuid for the C# security samples.

* Update C# security samples.
This commit is contained in:
Paŭlo Ebermann 2017-04-04 08:38:47 +02:00 committed by wing328
parent 8eead58afc
commit eb3565b6c0
19 changed files with 156 additions and 226 deletions

View File

@ -26,6 +26,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-security-test.yaml -l csharp -o samples/client/petstore-security-test/csharp/SwaggerClient"
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-security-test.yaml -l csharp -o samples/client/petstore-security-test/csharp/SwaggerClient --additional-properties packageGuid={8CE139DF-64BC-4591-85F8-8506C2B67514}"
java $JAVA_OPTS -jar $executable $ags

View File

@ -147,39 +147,39 @@ UpgradeLog*.htm
*.swp
*.swo
# svn
.svn
# svn
.svn
# SQL Server files
**/App_Data/*.mdf
**/App_Data/*.ldf
**/App_Data/*.sdf
# SQL Server files
**/App_Data/*.mdf
**/App_Data/*.ldf
**/App_Data/*.sdf
#LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml
#LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml
# =========================
# Windows detritus
# =========================
# =========================
# Windows detritus
# =========================
# Windows image file caches
Thumbs.db
ehthumbs.db
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Mac desktop service store files
.DS_Store
# Mac desktop service store files
.DS_Store
# SASS Compiler cache
.sass-cache
# SASS Compiler cache
.sass-cache
# Visual Studio 2014 CTP
**/*.sln.ide
# Visual Studio 2014 CTP
**/*.sln.ide

View File

@ -1,18 +1,6 @@
#
# 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.
#
language: csharp
mono:
- latest

View File

@ -6,18 +6,19 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c
- API version: 1.0.0 *_/ ' \" =end - - \\r\\n \\n \\r
- SDK version: 1.0.0
- Build date: 2016-07-13T18:16:08.689+08:00
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
- Build package: io.swagger.codegen.languages.CSharpClientCodegen
<a name="frameworks-supported"></a>
## Frameworks supported
- .NET 4.0 or later
- Windows Phone 7.1 (Mango)
<a name="dependencies"></a>
## 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
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 recommend using [NuGet] (https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:
```
Install-Package RestSharp
Install-Package Newtonsoft.Json
@ -25,6 +26,7 @@ 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)
<a name="installation"></a>
## Installation
Run the following command to generate the DLL
- [Mac/Linux] `/bin/sh build.sh`
@ -34,9 +36,22 @@ Then include the DLL (under the `bin` folder) in the C# project, and use the nam
```csharp
using IO.Swagger.Api;
using IO.Swagger.Client;
using Model;
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
```csharp
@ -44,7 +59,7 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using Model;
using IO.Swagger.Model;
namespace Example
{
@ -86,20 +101,23 @@ Class | Method | HTTP request | Description
- [Model.ModelReturn](docs/ModelReturn.md)
<a name="documentation-for-authorization"></a>
## Documentation for Authorization
<a name="api_key"></a>
### api_key
- **Type**: API key
- **API key parameter name**: api_key */ &#39; &quot; &#x3D;end -- \r\n \n \r
- **Location**: HTTP header
<a name="petstore_auth"></a>
### petstore_auth
- **Type**: OAuth
- **Flow**: implicit
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
- **Scopes**:
- 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
- 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,22 +1,10 @@
:: 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.
@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 src\IO.Swagger\packages.config -o packages
@ -24,5 +12,5 @@ if not exist ".\bin" mkdir bin
copy packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll
copy packages\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll
%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\IO.Swagger.dll /recurse:src\IO.Swagger\*.cs /doc:bin\IO.Swagger.xml
%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\RestSharp.dll /target:library /out:bin\IO.Swagger.dll /recurse:src\IO.Swagger\*.cs /doc:bin\IO.Swagger.xml

View File

@ -2,17 +2,6 @@
#
# 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.
frameworkVersion=net45
netfx=${frameworkVersion#net}
@ -32,6 +21,7 @@ cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll;
echo "[INFO] Run 'mcs' to build bin/IO.Swagger.dll"
mcs -sdk:${netfx} -r:bin/Newtonsoft.Json.dll,\
bin/RestSharp.dll,\
System.ComponentModel.DataAnnotations.dll,\
System.Runtime.Serialization.dll \
-target:library \
-out:bin/IO.Swagger.dll \

View File

@ -2,17 +2,6 @@
#
# 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.
wget -nc https://nuget.org/nuget.exe
mozroots --import --sync
@ -26,8 +15,8 @@ mozroots --import --sync
mono nuget.exe install src/IO.Swagger.Test/packages.config -o packages
echo "[INFO] Install NUnit runners via NuGet"
mono nuget.exe install NUnit.Runners -Version 3.2.1 -OutputDirectory packages
mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory packages
echo "[INFO] Build the solution and run the unit test"
xbuild IO.Swagger.sln && \
mono ./packages/NUnit.ConsoleRunner.3.2.1/tools/nunit3-console.exe src/IO.Swagger.Test/bin/Debug/IO.Swagger.Test.dll
mono ./packages/NUnit.Runners.2.6.4/tools/nunit-console.exe src/IO.Swagger.Test/bin/Debug/IO.Swagger.Test.dll

View File

@ -6,19 +6,6 @@ This spec is mainly for testing Petstore server and contains fake endpoints, mod
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");
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.
-->
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
@ -54,6 +41,7 @@ limitations under the License.
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Runtime.Serialization" />
@ -71,10 +59,10 @@ limitations under the License.
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="3.2.1" targetFramework="net45" />
<package id="NUnit" version="2.6.4" targetFramework="net45" />
<package id="RestSharp" version="105.1.0" targetFramework="net45" developmentDependency="true" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" developmentDependency="true" />
</packages>

View File

@ -6,18 +6,6 @@
* 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");
* 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;
@ -235,9 +223,6 @@ namespace IO.Swagger.Api
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 (testCodeInjectEndRnNR != null) localVarFormParams.Add("test code inject */ &#39; &quot; &#x3D;end -- \r\n \n \r", Configuration.ApiClient.ParameterToString(testCodeInjectEndRnNR)); // form parameter
@ -305,9 +290,6 @@ namespace IO.Swagger.Api
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 (testCodeInjectEndRnNR != null) localVarFormParams.Add("test code inject */ &#39; &quot; &#x3D;end -- \r\n \n \r", Configuration.ApiClient.ParameterToString(testCodeInjectEndRnNR)); // form parameter

View File

@ -6,18 +6,6 @@
* 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");
* 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;

View File

@ -6,18 +6,6 @@
* 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");
* 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;

View File

@ -6,18 +6,6 @@
* 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");
* 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;

View File

@ -6,18 +6,6 @@
* 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");
* 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;
@ -179,7 +167,28 @@ namespace IO.Swagger.Client
/// <returns></returns>
public void AddDefaultHeader(string key, string value)
{
_defaultHeaderMap.Add(key, value);
_defaultHeaderMap[key] = value;
}
/// <summary>
/// Add Api Key Header.
/// </summary>
/// <param name="key">Api Key name.</param>
/// <param name="value">Api Key value.</param>
/// <returns></returns>
public void AddApiKey(string key, string value)
{
ApiKey[key] = value;
}
/// <summary>
/// Sets the API key prefix.
/// </summary>
/// <param name="key">Api Key name.</param>
/// <param name="value">Api Key value.</param>
public void AddApiKeyPrefix(string key, string value)
{
ApiKeyPrefix[key] = value;
}
/// <summary>
@ -234,7 +243,7 @@ namespace IO.Swagger.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.
@ -242,7 +251,15 @@ namespace IO.Swagger.Client
/// <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
{

View File

@ -6,18 +6,6 @@
* 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");
* 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.
*/
@ -31,6 +19,6 @@ namespace IO.Swagger.Client
/// </summary>
/// <param name="methodName">Method name</param>
/// <param name="response">Response</param>
/// <returns>Exceptions</returns>
/// <returns>Exceptions</returns>
public delegate Exception ExceptionFactory(string methodName, IRestResponse response);
}

View File

@ -6,18 +6,6 @@
* 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");
* 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.
*/

View File

@ -6,29 +6,17 @@ This spec is mainly for testing Petstore server and contains fake endpoints, mod
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");
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.
-->
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8CE139DF-64BC-4591-85F8-8506C2B67514}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Swagger Library</RootNamespace>
<AssemblyName>Swagger Library</AssemblyName>
<RootNamespace>IO.Swagger</RootNamespace>
<AssemblyName>IO.Swagger</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
@ -54,6 +42,7 @@ limitations under the License.
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Runtime.Serialization" />
@ -70,13 +59,14 @@ limitations under the License.
<HintPath Condition="Exists('..\..\packages')">..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="**\*.cs"/>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
<Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets" /></Project>

View File

@ -0,0 +1,40 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<!-- The identifier that must be unique within the hosting gallery -->
<id>$id$</id>
<title>Swagger Library</title>
<!-- The package version number that is used when resolving dependencies -->
<version>$version$</version>
<!-- Authors contain text that appears directly on the gallery -->
<authors>$author$</authors>
<!-- Owners are typically nuget.org identities that allow gallery
users to earily find other packages by the same owners. -->
<owners>$author$</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<developmentDependency>false</developmentDependency>
<!-- The description can be used in package manager UI. Note that the
nuget.org gallery uses information you add in the portal. -->
<description>A library generated from a Swagger doc</description>
<copyright>http://swagger.io/terms/ *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r</copyright>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r</licenseUrl>
<!-- Dependencies are automatically installed when the package is installed -->
<dependencies>
<dependency id="NewtonSoft.Json" version="8.0.3" />
<dependency id="RestSharp" version="105.1.0" />
</dependencies>
</metadata>
<files>
<!-- A readme.txt will be displayed when the package is installed -->
<file src="..\..\README.md" target="" />
<file src="..\..\docs\**\*.*" target="docs" />
</files>
</package>

View File

@ -6,30 +6,20 @@
* 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");
* 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.Text.RegularExpressions;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@ -37,13 +27,13 @@ namespace IO.Swagger.Model
/// Model for testing reserved words *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r
/// </summary>
[DataContract]
public partial class ModelReturn : IEquatable<ModelReturn>
public partial class ModelReturn : IEquatable<ModelReturn>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="ModelReturn" /> class.
/// </summary>
/// <param name="_Return">property description *_/ &#39; \&quot; &#x3D;end - - \\r\\n \\n \\r.</param>
public ModelReturn(int? _Return = null)
public ModelReturn(int? _Return = default(int?))
{
this._Return = _Return;
}
@ -122,6 +112,16 @@ namespace IO.Swagger.Model
return hash;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}