forked from loafle/openapi-generator-original
fix test cases, fix warning in exceptionfactory, update
.swagger-codegen-ignore for c# to keep logo file (for upload test)
This commit is contained in:
parent
6ddf34ce8a
commit
bca3d24d20
@ -1,7 +1,15 @@
|
||||
{{>partial_header}}
|
||||
|
||||
using System;
|
||||
using RestSharp;
|
||||
|
||||
namespace {{packageName}}.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// A delegate to ExceptionFactory method
|
||||
/// </summary>
|
||||
/// <param name="methodName">Method name</param>
|
||||
/// <param name="response">Response</param>
|
||||
/// <returns>Exceptions</returns>
|
||||
public delegate Exception ExceptionFactory(string methodName, IRestResponse response);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ namespace {{packageName}}.Test
|
||||
[Test]
|
||||
public void {{operationId}}InstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test 'IsInstanceOfType' {{classname}}
|
||||
// test 'IsInstanceOfType' {{classname}}
|
||||
Assert.IsInstanceOfType(typeof({{classname}}), instance, "instance is a {{classname}}");
|
||||
}
|
||||
|
||||
@ -62,9 +62,9 @@ namespace {{packageName}}.Test
|
||||
[Test]
|
||||
public void {{operationId}}Test()
|
||||
{
|
||||
// TODO uncomment below to test the method '{{operationId}}'
|
||||
// TODO uncomment below to test the method and replace null with proper value
|
||||
{{#allParams}}
|
||||
//{{{dataType}}} {{paramName}} = null; // TODO: replace null with proper value
|
||||
//{{{dataType}}} {{paramName}} = null;
|
||||
{{/allParams}}
|
||||
//{{#returnType}}var response = {{/returnType}}instance.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||
{{#returnType}}//Assert.IsInstanceOf<{{{returnType}}}> (response, "response is {{{returnType}}}");{{/returnType}}
|
||||
|
@ -1,4 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# 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={{targetFrameworkNuget}}
|
||||
netfx=${frameworkVersion#net}
|
||||
|
||||
@ -8,9 +23,9 @@ echo "[INFO] Download nuget and packages"
|
||||
wget -nc https://nuget.org/nuget.exe;
|
||||
mozroots --import --sync
|
||||
mono nuget.exe install src/{{packageName}}/packages.config -o packages;
|
||||
mkdir -p bin;
|
||||
|
||||
echo "[INFO] Copy DLLs to the 'bin' folder"
|
||||
mkdir -p bin;
|
||||
cp packages/Newtonsoft.Json.8.0.3/lib/{{targetFrameworkNuget}}/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
|
||||
cp packages/RestSharp.105.1.0/lib/{{targetFrameworkNuget}}/RestSharp.dll bin/RestSharp.dll;
|
||||
|
||||
@ -23,3 +38,11 @@ System.Runtime.Serialization.dll \
|
||||
-recurse:'src/{{packageName}}/*.cs' \
|
||||
-doc:bin/{{packageName}}.xml \
|
||||
-platform:anycpu
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "[ERROR] Compilation failed with exit code $?"
|
||||
exit 1
|
||||
else
|
||||
echo "[INFO] bin/{{{packageName}}}.dll was created successfully"
|
||||
fi
|
||||
|
@ -1,3 +1,17 @@
|
||||
:: 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
|
||||
|
||||
{{#supportsAsync}}SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319{{/supportsAsync}}
|
||||
|
@ -1,4 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# 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
|
||||
|
||||
|
@ -21,3 +21,4 @@
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
||||
src/IO.Swagger.Test/IO.Swagger.Test.csproj
|
||||
|
@ -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", "{64A65E8F-EACE-4663-9B82-B565E01CFEAE}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{7B20DAE3-B510-4814-8986-CF1B89EA039E}"
|
||||
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
|
||||
{64A65E8F-EACE-4663-9B82-B565E01CFEAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{64A65E8F-EACE-4663-9B82-B565E01CFEAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{64A65E8F-EACE-4663-9B82-B565E01CFEAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{64A65E8F-EACE-4663-9B82-B565E01CFEAE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7B20DAE3-B510-4814-8986-CF1B89EA039E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7B20DAE3-B510-4814-8986-CF1B89EA039E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7B20DAE3-B510-4814-8986-CF1B89EA039E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7B20DAE3-B510-4814-8986-CF1B89EA039E}.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
|
||||
|
@ -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-06-12T01:56:22.092+08:00
|
||||
- Build date: 2016-06-12T12:38:46.317+08:00
|
||||
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
|
||||
|
||||
## Frameworks supported
|
||||
|
@ -1,3 +1,17 @@
|
||||
:: 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
|
||||
|
@ -1,4 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# 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}
|
||||
|
||||
@ -8,9 +23,9 @@ echo "[INFO] Download nuget and packages"
|
||||
wget -nc https://nuget.org/nuget.exe;
|
||||
mozroots --import --sync
|
||||
mono nuget.exe install src/IO.Swagger/packages.config -o packages;
|
||||
mkdir -p bin;
|
||||
|
||||
echo "[INFO] Copy DLLs to the 'bin' folder"
|
||||
mkdir -p bin;
|
||||
cp packages/Newtonsoft.Json.8.0.3/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
|
||||
cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll;
|
||||
|
||||
@ -23,3 +38,11 @@ System.Runtime.Serialization.dll \
|
||||
-recurse:'src/IO.Swagger/*.cs' \
|
||||
-doc:bin/IO.Swagger.xml \
|
||||
-platform:anycpu
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "[ERROR] Compilation failed with exit code $?"
|
||||
exit 1
|
||||
else
|
||||
echo "[INFO] bin/IO.Swagger.dll was created successfully"
|
||||
fi
|
||||
|
@ -1,4 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# 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
|
||||
|
||||
|
@ -48,7 +48,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void InstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<FakeApi> (instance, "instance is a FakeApi");
|
||||
Assert.IsInstanceOfType(typeof(FakeApi), instance, "instance is a FakeApi");
|
||||
}
|
||||
|
||||
|
||||
|
@ -97,7 +97,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void InstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<PetApi> (instance, "instance is a PetApi");
|
||||
Assert.IsInstanceOfType(typeof(PetApi), instance, "instance is a PetApi");
|
||||
}
|
||||
|
||||
|
||||
@ -134,7 +134,7 @@ namespace IO.Swagger.Test
|
||||
List<Pet> listPet = petApi.FindPetsByTags (tagsList);
|
||||
foreach (Pet pet in listPet) // Loop through List with foreach.
|
||||
{
|
||||
Assert.IsInstanceOf<Pet> (pet, "Response is a Pet");
|
||||
Assert.IsInstanceOfType(typeof(Pet), pet, "Response is a Pet");
|
||||
Assert.AreEqual ("csharp sample tag name1", pet.Tags[0]);
|
||||
}
|
||||
}
|
||||
@ -147,7 +147,7 @@ namespace IO.Swagger.Test
|
||||
{
|
||||
List<string> tags = new List<String>(new String[] {"pet"});
|
||||
var response = instance.FindPetsByTags(tags);
|
||||
Assert.IsInstanceOf<List<Pet>> (response, "response is List<Pet>");
|
||||
Assert.IsInstanceOfType(typeof(List<Pet>), response, "response is List<Pet>");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -161,19 +161,19 @@ namespace IO.Swagger.Test
|
||||
|
||||
PetApi petApi = new PetApi (c1);
|
||||
Pet response = petApi.GetPetById (petId);
|
||||
Assert.IsInstanceOf<Pet> (response, "Response is a Pet");
|
||||
Assert.IsInstanceOfType(typeof(Pet), response, "Response is a Pet");
|
||||
|
||||
Assert.AreEqual ("Csharp test", response.Name);
|
||||
Assert.AreEqual (Pet.StatusEnum.Available, response.Status);
|
||||
|
||||
Assert.IsInstanceOf<List<Tag>> (response.Tags, "Response.Tags is a Array");
|
||||
Assert.IsInstanceOfType(typeof(List<Tag>), response.Tags, "Response.Tags is a Array");
|
||||
Assert.AreEqual (petId, response.Tags [0].Id);
|
||||
Assert.AreEqual ("csharp sample tag name1", response.Tags [0].Name);
|
||||
|
||||
Assert.IsInstanceOf<List<String>> (response.PhotoUrls, "Response.PhotoUrls is a Array");
|
||||
Assert.IsInstanceOfType(typeof(List<String>), response.PhotoUrls, "Response.PhotoUrls is a Array");
|
||||
Assert.AreEqual ("sample photoUrls", response.PhotoUrls [0]);
|
||||
|
||||
Assert.IsInstanceOf<Category> (response.Category, "Response.Category is a Category");
|
||||
Assert.IsInstanceOfType(typeof(Category), response.Category, "Response.Category is a Category");
|
||||
Assert.AreEqual (56, response.Category.Id);
|
||||
Assert.AreEqual ("sample category name2", response.Category.Name);
|
||||
}
|
||||
@ -187,19 +187,19 @@ namespace IO.Swagger.Test
|
||||
PetApi petApi = new PetApi ();
|
||||
var task = petApi.GetPetByIdAsync (petId);
|
||||
Pet response = task.Result;
|
||||
Assert.IsInstanceOf<Pet> (response, "Response is a Pet");
|
||||
Assert.IsInstanceOfType(typeof(Pet), response, "Response is a Pet");
|
||||
|
||||
Assert.AreEqual ("Csharp test", response.Name);
|
||||
Assert.AreEqual (Pet.StatusEnum.Available, response.Status);
|
||||
|
||||
Assert.IsInstanceOf<List<Tag>> (response.Tags, "Response.Tags is a Array");
|
||||
Assert.IsInstanceOfType(typeof(List<Tag>), response.Tags, "Response.Tags is a Array");
|
||||
Assert.AreEqual (petId, response.Tags [0].Id);
|
||||
Assert.AreEqual ("csharp sample tag name1", response.Tags [0].Name);
|
||||
|
||||
Assert.IsInstanceOf<List<String>> (response.PhotoUrls, "Response.PhotoUrls is a Array");
|
||||
Assert.IsInstanceOfType(typeof(List<String>), response.PhotoUrls, "Response.PhotoUrls is a Array");
|
||||
Assert.AreEqual ("sample photoUrls", response.PhotoUrls [0]);
|
||||
|
||||
Assert.IsInstanceOf<Category> (response.Category, "Response.Category is a Category");
|
||||
Assert.IsInstanceOfType(typeof(Category), response.Category, "Response.Category is a Category");
|
||||
Assert.AreEqual (56, response.Category.Id);
|
||||
Assert.AreEqual ("sample category name2", response.Category.Name);
|
||||
|
||||
@ -219,19 +219,19 @@ namespace IO.Swagger.Test
|
||||
Assert.AreEqual (task.Result.Headers["Content-Type"], "application/json");
|
||||
|
||||
Pet response = task.Result.Data;
|
||||
Assert.IsInstanceOf<Pet> (response, "Response is a Pet");
|
||||
Assert.IsInstanceOfType(typeof(Pet), response, "Response is a Pet");
|
||||
|
||||
Assert.AreEqual ("Csharp test", response.Name);
|
||||
Assert.AreEqual (Pet.StatusEnum.Available, response.Status);
|
||||
|
||||
Assert.IsInstanceOf<List<Tag>> (response.Tags, "Response.Tags is a Array");
|
||||
Assert.IsInstanceOfType(typeof(List<Tag>), response.Tags, "Response.Tags is a Array");
|
||||
Assert.AreEqual (petId, response.Tags [0].Id);
|
||||
Assert.AreEqual ("csharp sample tag name1", response.Tags [0].Name);
|
||||
|
||||
Assert.IsInstanceOf<List<String>> (response.PhotoUrls, "Response.PhotoUrls is a Array");
|
||||
Assert.IsInstanceOfType(typeof(List<String>), response.PhotoUrls, "Response.PhotoUrls is a Array");
|
||||
Assert.AreEqual ("sample photoUrls", response.PhotoUrls [0]);
|
||||
|
||||
Assert.IsInstanceOf<Category> (response.Category, "Response.Category is a Category");
|
||||
Assert.IsInstanceOfType(typeof(Category), response.Category, "Response.Category is a Category");
|
||||
Assert.AreEqual (56, response.Category.Id);
|
||||
Assert.AreEqual ("sample category name2", response.Category.Name);
|
||||
|
||||
@ -258,9 +258,9 @@ namespace IO.Swagger.Test
|
||||
petApi.UpdatePetWithForm (petId, "new form name", "pending");
|
||||
|
||||
Pet response = petApi.GetPetById (petId);
|
||||
Assert.IsInstanceOf<Pet> (response, "Response is a Pet");
|
||||
Assert.IsInstanceOf<Category> (response.Category, "Response.Category is a Category");
|
||||
Assert.IsInstanceOf<List<Tag>> (response.Tags, "Response.Tags is a Array");
|
||||
Assert.IsInstanceOfType(typeof(Pet), response, "Response is a Pet");
|
||||
Assert.IsInstanceOfType(typeof(Category), response.Category, "Response.Category is a Category");
|
||||
Assert.IsInstanceOfType(typeof(List<Tag>), response.Tags, "Response.Tags is a Array");
|
||||
|
||||
Assert.AreEqual ("new form name", response.Name);
|
||||
Assert.AreEqual (Pet.StatusEnum.Pending, response.Status);
|
||||
|
@ -50,7 +50,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void InstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<StoreApi> (instance, "instance is a StoreApi");
|
||||
Assert.IsInstanceOfType(typeof(StoreApi), instance, "instance is a StoreApi");
|
||||
}
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@ namespace IO.Swagger.Test
|
||||
|
||||
foreach(KeyValuePair<string, int?> entry in response)
|
||||
{
|
||||
Assert.IsInstanceOf (typeof(int?), entry.Value);
|
||||
Assert.IsInstanceOfType(typeof(int?), entry.Value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void InstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<UserApi> (instance, "instance is a UserApi");
|
||||
Assert.IsInstanceOfType(typeof(UserApi), instance, "instance is a UserApi");
|
||||
}
|
||||
|
||||
|
||||
|
@ -20,7 +20,7 @@ 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">
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
@ -78,7 +78,7 @@ limitations under the License.
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="**\*.cs"/>
|
||||
<Compile Include="**\*.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
@ -86,9 +86,11 @@ limitations under the License.
|
||||
<Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\IO.Swagger\IO.Swagger.csproj">
|
||||
<Project>{64A65E8F-EACE-4663-9B82-B565E01CFEAE}</Project>
|
||||
<Project>{85AE8212-9819-4224-A9E5-B93419EC927B}</Project>
|
||||
<Name>IO.Swagger</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="swagger-logo.png" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void AdditionalPropertiesClassInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<AdditionalPropertiesClass> (instance, "instance is a AdditionalPropertiesClass");
|
||||
Assert.IsInstanceOfType(typeof(AdditionalPropertiesClass), instance, "instance is a AdditionalPropertiesClass");
|
||||
}
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void AnimalFarmInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<AnimalFarm> (instance, "instance is a AnimalFarm");
|
||||
Assert.IsInstanceOfType(typeof(AnimalFarm), instance, "instance is a AnimalFarm");
|
||||
}
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void AnimalInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<Animal> (instance, "instance is a Animal");
|
||||
Assert.IsInstanceOfType(typeof(Animal), instance, "instance is a Animal");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void ApiResponseInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<ApiResponse> (instance, "instance is a ApiResponse");
|
||||
Assert.IsInstanceOfType(typeof(ApiResponse), instance, "instance is a ApiResponse");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void ArrayTestInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<ArrayTest> (instance, "instance is a ArrayTest");
|
||||
Assert.IsInstanceOfType(typeof(ArrayTest), instance, "instance is a ArrayTest");
|
||||
}
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void CatInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<Cat> (instance, "instance is a Cat");
|
||||
Assert.IsInstanceOfType(typeof(Cat), instance, "instance is a Cat");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void CategoryInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<Category> (instance, "instance is a Category");
|
||||
Assert.IsInstanceOfType(typeof(Category), instance, "instance is a Category");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void DogInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<Dog> (instance, "instance is a Dog");
|
||||
Assert.IsInstanceOfType(typeof(Dog), instance, "instance is a Dog");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void EnumClassInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<EnumClass> (instance, "instance is a EnumClass");
|
||||
Assert.IsInstanceOfType(typeof(EnumClass), instance, "instance is a EnumClass");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void EnumTestInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<EnumTest> (instance, "instance is a EnumTest");
|
||||
Assert.IsInstanceOfType(typeof(EnumTest), instance, "instance is a EnumTest");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void FormatTestInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<FormatTest> (instance, "instance is a FormatTest");
|
||||
Assert.IsInstanceOfType(typeof(FormatTest), instance, "instance is a FormatTest");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void MixedPropertiesAndAdditionalPropertiesClassInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<MixedPropertiesAndAdditionalPropertiesClass> (instance, "instance is a MixedPropertiesAndAdditionalPropertiesClass");
|
||||
Assert.IsInstanceOfType(typeof(MixedPropertiesAndAdditionalPropertiesClass), instance, "instance is a MixedPropertiesAndAdditionalPropertiesClass");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void Model200ResponseInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<Model200Response> (instance, "instance is a Model200Response");
|
||||
Assert.IsInstanceOfType(typeof(Model200Response), instance, "instance is a Model200Response");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void ModelReturnInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<ModelReturn> (instance, "instance is a ModelReturn");
|
||||
Assert.IsInstanceOfType(typeof(ModelReturn), instance, "instance is a ModelReturn");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void NameInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<Name> (instance, "instance is a Name");
|
||||
Assert.IsInstanceOfType(typeof(Name), instance, "instance is a Name");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -57,7 +57,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void OrderInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<Order> (instance, "instance is a Order");
|
||||
Assert.IsInstanceOfType(typeof(Order), instance, "instance is a Order");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -49,7 +49,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void PetInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<Pet> (instance, "instance is a Pet");
|
||||
Assert.IsInstanceOfType(typeof(Pet), instance, "instance is a Pet");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void ReadOnlyFirstInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<ReadOnlyFirst> (instance, "instance is a ReadOnlyFirst");
|
||||
Assert.IsInstanceOfType(typeof(ReadOnlyFirst), instance, "instance is a ReadOnlyFirst");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void SpecialModelNameInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<SpecialModelName> (instance, "instance is a SpecialModelName");
|
||||
Assert.IsInstanceOfType(typeof(SpecialModelName), instance, "instance is a SpecialModelName");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void TagInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<Tag> (instance, "instance is a Tag");
|
||||
Assert.IsInstanceOfType(typeof(Tag), instance, "instance is a Tag");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
||||
[Test]
|
||||
public void UserInstanceTest()
|
||||
{
|
||||
Assert.IsInstanceOf<User> (instance, "instance is a User");
|
||||
Assert.IsInstanceOfType(typeof(User), instance, "instance is a User");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1,7 +1,36 @@
|
||||
/*
|
||||
* 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 RestSharp;
|
||||
|
||||
namespace IO.Swagger.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// A delegate to ExceptionFactory method
|
||||
/// </summary>
|
||||
/// <param name="methodName">Method name</param>
|
||||
/// <param name="response">Response</param>
|
||||
/// <returns>Exceptions</returns>
|
||||
public delegate Exception ExceptionFactory(string methodName, IRestResponse response);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ limitations under the License.
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{64A65E8F-EACE-4663-9B82-B565E01CFEAE}</ProjectGuid>
|
||||
<ProjectGuid>{7B20DAE3-B510-4814-8986-CF1B89EA039E}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Swagger Library</RootNamespace>
|
||||
|
Loading…
x
Reference in New Issue
Block a user