Update C# client structure using common standards

Aligns C# project outputs more with community accepted standards and
leverges Nuget for package management.

This also moves the generated C# sample code out of the test project's
Lib folder. The output structure here was causing some issues with
maintainability (e.g. had to update test project with generated code).

(see: https://gist.github.com/davidfowl/ed7564297c61fe9ab814)
Output for a project, IO.Swagger will now look like:

    .
    ├── IO.Swagger.sln
    ├── README.md
    ├── bin
    ├── build.bat
    ├── build.sh
    ├── docs
    ├── packages
    └── src
        ├── IO.Swagger
        │   └── packages.config
        └── IO.Swagger.Test
            └── packages.config

This is a change from the Java-like src/main/csharp/IO/Swagger/etc
structure and will be a breaking change for some.
This commit is contained in:
Jim Schubert 2016-04-26 22:37:40 -04:00
parent 07d2374320
commit 7b578a4c4e
97 changed files with 1086 additions and 905 deletions

10
.gitignore vendored
View File

@ -91,13 +91,19 @@ samples/client/petstore/swift/SwaggerClientTests/Pods/Pods.xcodeproj/xcshareddat
samples/client/petstore/csharp/SwaggerClientTest/.vs
samples/client/petstore/csharp/SwaggerClientTest/obj
samples/client/petstore/csharp/SwaggerClientTest/bin
samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/vendor/
samples/client/petstore/csharp/SwaggerClientTest/packages
samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/
samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/
samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/nuget.exe
samples/client/petstore/csharp/SwaggerClientTest/TestResult.xml
samples/client/petstore/csharp/SwaggerClientTest/nuget.exe
samples/client/petstore/csharp/SwaggerClientTest/testrunner/
samples/client/petstore/csharp/SwaggerClient/.vs
samples/client/petstore/csharp/SwaggerClient/nuget.exe
samples/client/petstore/csharp/SwaggerClient/obj
samples/client/petstore/csharp/SwaggerClient/bin
samples/client/petstore/csharp/SwaggerClient/obj/Debug/
samples/client/petstore/csharp/SwaggerClient/bin/Debug/
samples/client/petstore/csharp/SwaggerClient/packages
# Python
*.pyc

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-with-fake-endpoints-models-for-testing.yaml -l csharp -o samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient"
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l csharp -o samples/client/petstore/csharp/SwaggerClient -DoptionalProjectFile=true"
java $JAVA_OPTS -jar $executable $ags

View File

@ -5,6 +5,6 @@ If Not Exist %executable% (
)
set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties
set ags=generate -t modules\swagger-codegen\src\main\resources\csharp -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -l csharp -o samples\client\petstore\csharp\SwaggerClientTest\Lib\SwaggerClient
set ags=generate -t modules\swagger-codegen\src\main\resources\csharp -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -l csharp -o samples\client\petstore\csharp\SwaggerClient -DoptionalProjectFile=true
java %JAVA_OPTS% -jar %executable% %ags%

View File

@ -21,7 +21,12 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
protected String packageVersion = "1.0.0";
protected String packageName = "IO.Swagger";
protected String sourceFolder = "src" + File.separator + packageName;
protected String sourceFolder = "src";
// TODO: Add option for test folder output location. Nice to allow e.g. ./test instead of ./src.
// This would require updating relative paths (e.g. path to main project file in test project file)
protected String testFolder = sourceFolder;
protected Set<String> collectionTypes;
protected Set<String> mapTypes;
@ -277,12 +282,12 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
@Override
public String apiFileFolder() {
return outputFolder + File.separator + sourceFolder + File.separator + apiPackage().replace('.', File.separatorChar);
return outputFolder + File.separator + sourceFolder + File.separator + packageName + File.separator + apiPackage();
}
@Override
public String modelFileFolder() {
return outputFolder + File.separator + sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar);
return outputFolder + File.separator + sourceFolder + File.separator + packageName + File.separator + modelPackage();
}
@Override
@ -532,7 +537,6 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
return toModelName(name) + "Tests";
}
public void setPackageName(String packageName) {
this.packageName = packageName;
}
@ -544,4 +548,8 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
public void setSourceFolder(String sourceFolder) {
this.sourceFolder = sourceFolder;
}
public String testPackageName() {
return this.packageName + ".Test";
}
}

View File

@ -68,9 +68,6 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
modelDocTemplateFiles.put("model_doc.mustache", ".md");
apiDocTemplateFiles.put("api_doc.mustache", ".md");
// C# client default
setSourceFolder("src" + File.separator + "main" + File.separator + "csharp");
cliOptions.clear();
// CLI options
@ -141,9 +138,9 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
public void processOpts() {
super.processOpts();
apiPackage = packageName + ".Api";
modelPackage = packageName + ".Model";
clientPackage = packageName + ".Client";
apiPackage = "Api";
modelPackage = "Model";
clientPackage = "Client";
additionalProperties.put("clientPackage", clientPackage);
@ -157,6 +154,10 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
if (additionalProperties.containsKey(CodegenConstants.DOTNET_FRAMEWORK)) {
setTargetFramework((String) additionalProperties.get(CodegenConstants.DOTNET_FRAMEWORK));
} else {
// Ensure default is set.
setTargetFramework(NET45);
additionalProperties.put("targetFramework", this.targetFramework);
}
if (NET35.equals(this.targetFramework)) {
@ -201,8 +202,12 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
.get(CodegenConstants.OPTIONAL_ASSEMBLY_INFO).toString()));
}
String packageFolder = sourceFolder + File.separator + packageName.replace(".", java.io.File.separator);
String clientPackageDir = sourceFolder + File.separator + clientPackage.replace(".", java.io.File.separator);
final String testPackageName = testPackageName();
String packageFolder = sourceFolder + File.separator + packageName;
String clientPackageDir = packageFolder + File.separator + clientPackage;
String testPackageFolder = testFolder + File.separator + testPackageName;
additionalProperties.put("testPackageName", testPackageName);
//Compute the relative path to the bin directory where the external assemblies live
//This is necessary to properly generate the project file
@ -210,7 +215,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
String binRelativePath = "..\\";
for (int i = 0; i < packageDepth; i = i + 1)
binRelativePath += "..\\";
binRelativePath += "vendor\\";
binRelativePath += "vendor";
additionalProperties.put("binRelativePath", binRelativePath);
supportingFiles.add(new SupportingFile("Configuration.mustache",
@ -222,9 +227,13 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
supportingFiles.add(new SupportingFile("ApiResponse.mustache",
clientPackageDir, "ApiResponse.cs"));
supportingFiles.add(new SupportingFile("compile.mustache", "", "compile.bat"));
supportingFiles.add(new SupportingFile("compile-mono.sh.mustache", "", "compile-mono.sh"));
supportingFiles.add(new SupportingFile("packages.config.mustache", "vendor" + java.io.File.separator, "packages.config"));
supportingFiles.add(new SupportingFile("compile.mustache", "", "build.bat"));
supportingFiles.add(new SupportingFile("compile-mono.sh.mustache", "", "build.sh"));
// copy package.config to nuget's standard location for project-level installs
supportingFiles.add(new SupportingFile("packages.config.mustache", packageFolder + File.separator, "packages.config"));
supportingFiles.add(new SupportingFile("packages_test.config.mustache", testPackageFolder + File.separator, "packages.config"));
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
@ -233,7 +242,14 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
supportingFiles.add(new SupportingFile("AssemblyInfo.mustache", packageFolder + File.separator + "Properties", "AssemblyInfo.cs"));
}
if (optionalProjectFileFlag) {
supportingFiles.add(new SupportingFile("Project.mustache", packageFolder, clientPackage + ".csproj"));
supportingFiles.add(new SupportingFile("Solution.mustache", "", packageName + ".sln"));
supportingFiles.add(new SupportingFile("Project.mustache", packageFolder, packageName + ".csproj"));
// TODO: Check if test project output is enabled, partially related to #2506. Should have options for:
// 1) No test project
// 2) No model tests
// 3) No api tests
supportingFiles.add(new SupportingFile("TestProject.mustache", testPackageFolder, testPackageName + ".csproj"));
}
additionalProperties.put("apiDocPath", apiDocPath);
@ -491,4 +507,13 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
return (outputFolder + "/" + modelDocPath).replace('/', File.separatorChar);
}
@Override
public String apiTestFileFolder() {
return outputFolder + File.separator + testFolder + File.separator + testPackageName() + File.separator + apiPackage();
}
@Override
public String modelTestFileFolder() {
return outputFolder + File.separator + testFolder + File.separator + testPackageName() + File.separator + modelPackage();
}
}

View File

@ -39,8 +39,6 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
@ -48,18 +46,23 @@
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Xml" />
<Reference Include="Newtonsoft.Json">
<SpecificVersion>False</SpecificVersion>
<HintPath>{{binRelativePath}}/Newtonsoft.Json.8.0.2/lib/{{targetFrameworkNuget}}/Newtonsoft.Json.dll</HintPath>
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll</HintPath>
<HintPath Condition="Exists('{{binRelativePath}}')">{{binRelativePath}}\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="RestSharp">
<HintPath>{{binRelativePath}}/RestSharp.105.2.3/lib/{{targetFrameworkNuget}}/RestSharp.dll</HintPath>
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll</HintPath>
<HintPath Condition="Exists('{{binRelativePath}}')">{{binRelativePath}}\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs"/>
<Compile Include="Api\*.cs"/>
<Compile Include="Client\*.cs"/>
<Compile Include="Model\*.cs"/>
<Compile Include="**\*.cs"/>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -37,8 +37,8 @@ NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploa
## Installation
Run the following command to generate the DLL
- [Mac/Linux] `/bin/sh compile-mono.sh`
- [Windows] `compile.bat`
- [Mac/Linux] `/bin/sh build.sh`
- [Windows] `build.bat`
Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces:
```csharp

View File

@ -0,0 +1,27 @@
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}") = "{{packageName}}", "src\{{packageName}}\{{packageName}}.csproj", "{{packageGuid}}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{testPackageName}}", "src\{{testPackageName}}\{{testPackageName}}.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{{packageGuid}}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{{packageGuid}}.Debug|Any CPU.Build.0 = Debug|Any CPU
{{packageGuid}}.Release|Any CPU.ActiveCfg = Release|Any CPU
{{packageGuid}}.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
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<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>{19F1DEBC-DE5E-4517-8062-F000CD499087}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>{{testPackageName}}</RootNamespace>
<AssemblyName>{{testPackageName}}</AssemblyName>
{{^supportsUWP}}
<TargetFrameworkVersion>{{targetFramework}}</TargetFrameworkVersion>
{{/supportsUWP}}
{{#supportsUWP}}
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.10240.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
{{/supportsUWP}}
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Xml" />
<Reference Include="Newtonsoft.Json">
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll</HintPath>
<HintPath Condition="Exists('{{binRelativePath}}')">{{binRelativePath}}\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="RestSharp">
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll</HintPath>
<HintPath Condition="Exists('{{binRelativePath}}')">{{binRelativePath}}\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('{{binRelativePath}}')">{{binRelativePath}}\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="**\*.cs"/>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\{{packageName}}\{{packageName}}.csproj">
<Project>{{packageGuid}}</Project>
<Name>{{packageName}}</Name>
</ProjectReference>
</ItemGroup>
</Project>

View File

@ -4,17 +4,17 @@ netfx=${frameworkVersion#net}
wget -nc https://nuget.org/nuget.exe;
mozroots --import --sync
mono nuget.exe install vendor/packages.config -o vendor;
mono nuget.exe install src/{{packageName}}/packages.config -o packages;
mkdir -p bin;
cp vendor/Newtonsoft.Json.8.0.2/lib/{{targetFrameworkNuget}}/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
cp vendor/RestSharp.105.1.0/lib/{{targetFrameworkNuget}}/RestSharp.dll bin/RestSharp.dll;
cp packages/Newtonsoft.Json.8.0.2/lib/{{targetFrameworkNuget}}/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
cp packages/RestSharp.105.1.0/lib/{{targetFrameworkNuget}}/RestSharp.dll bin/RestSharp.dll;
mcs -sdk:${netfx} -r:bin/Newtonsoft.Json.dll,\
bin/RestSharp.dll,\
System.Runtime.Serialization.dll \
-target:library \
-out:bin/{{packageName}}.dll \
-recurse:'src/*.cs' \
-recurse:'src/{{packageName}}/*.cs' \
-doc:bin/{{packageName}}.xml \
-platform:anycpu

View File

@ -4,11 +4,11 @@
{{^supportsAsync}}SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v3.5{{/supportsAsync}}
if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://nuget.org/nuget.exe', '.\nuget.exe')"
.\nuget.exe install vendor/packages.config -o vendor
.\nuget.exe install src\{{packageName}}\packages.config -o packages
if not exist ".\bin" mkdir bin
copy vendor\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll
copy vendor\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll bin\RestSharp.dll
copy packages\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll
copy packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll bin\RestSharp.dll
%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\RestSharp.dll /target:library /out:bin\{{packageName}}.dll /recurse:src\*.cs /doc:bin\{{packageName}}.xml
%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\RestSharp.dll /target:library /out:bin\{{packageName}}.dll /recurse:src\{{packageName}}\*.cs /doc:bin\{{packageName}}.xml

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="2.6.3" targetFramework="{{targetFrameworkNuget}}" />
<package id="RestSharp" version="105.1.0" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
<package id="Newtonsoft.Json" version="8.0.2" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
</packages>

View File

@ -0,0 +1,27 @@
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", "{C22D7F6C-D698-469A-A3C9-5A499DE213B8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C22D7F6C-D698-469A-A3C9-5A499DE213B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C22D7F6C-D698-469A-A3C9-5A499DE213B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C22D7F6C-D698-469A-A3C9-5A499DE213B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C22D7F6C-D698-469A-A3C9-5A499DE213B8}.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
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

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-04-21T17:22:44.115+08:00
- Build date: 2016-05-01T19:55:27.477-04:00
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
## Frameworks supported
@ -27,14 +27,14 @@ NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploa
## Installation
Run the following command to generate the DLL
- [Mac/Linux] `/bin/sh compile-mono.sh`
- [Windows] `compile.bat`
- [Mac/Linux] `/bin/sh build.sh`
- [Windows] `build.bat`
Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces:
```csharp
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
using Model;
```
## Getting Started
@ -44,7 +44,7 @@ using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
using Model;
namespace Example
{
@ -53,20 +53,28 @@ namespace Example
public void main()
{
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
var apiInstance = new PetApi();
var body = new Pet(); // Pet | Pet object that needs to be added to the store
var apiInstance = new FakeApi();
var number = number_example; // string | None
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
{
// Add a new pet to the store
apiInstance.AddPet(body);
// Fake endpoint for testing various parameters
apiInstance.TestEndpointParameters(number, _double, _string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
}
catch (Exception e)
{
Debug.Print("Exception when calling PetApi.AddPet: " + e.Message );
Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message );
}
}
}
@ -79,6 +87,7 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters
*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
@ -103,31 +112,25 @@ Class | Method | HTTP request | Description
## Documentation for Models
- [IO.Swagger.Model.Animal](docs/Animal.md)
- [IO.Swagger.Model.ApiResponse](docs/ApiResponse.md)
- [IO.Swagger.Model.Cat](docs/Cat.md)
- [IO.Swagger.Model.Category](docs/Category.md)
- [IO.Swagger.Model.Dog](docs/Dog.md)
- [IO.Swagger.Model.FormatTest](docs/FormatTest.md)
- [IO.Swagger.Model.Model200Response](docs/Model200Response.md)
- [IO.Swagger.Model.ModelReturn](docs/ModelReturn.md)
- [IO.Swagger.Model.Name](docs/Name.md)
- [IO.Swagger.Model.Order](docs/Order.md)
- [IO.Swagger.Model.Pet](docs/Pet.md)
- [IO.Swagger.Model.SpecialModelName](docs/SpecialModelName.md)
- [IO.Swagger.Model.Tag](docs/Tag.md)
- [IO.Swagger.Model.User](docs/User.md)
- [Model.Animal](docs/Animal.md)
- [Model.ApiResponse](docs/ApiResponse.md)
- [Model.Cat](docs/Cat.md)
- [Model.Category](docs/Category.md)
- [Model.Dog](docs/Dog.md)
- [Model.FormatTest](docs/FormatTest.md)
- [Model.Model200Response](docs/Model200Response.md)
- [Model.ModelReturn](docs/ModelReturn.md)
- [Model.Name](docs/Name.md)
- [Model.Order](docs/Order.md)
- [Model.Pet](docs/Pet.md)
- [Model.SpecialModelName](docs/SpecialModelName.md)
- [Model.Tag](docs/Tag.md)
- [Model.User](docs/User.md)
## Documentation for Authorization
### api_key
- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header
### petstore_auth
- **Type**: OAuth
@ -137,3 +140,9 @@ Class | Method | HTTP request | Description
- write:pets: modify pets in your account
- read:pets: read your pets
### api_key
- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header

View File

@ -0,0 +1,14 @@
@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
if not exist ".\bin" mkdir bin
copy packages\Newtonsoft.Json.8.0.2\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 /target:library /out:bin\IO.Swagger.dll /recurse:src\IO.Swagger\*.cs /doc:bin\IO.Swagger.xml

View File

@ -4,17 +4,17 @@ netfx=${frameworkVersion#net}
wget -nc https://nuget.org/nuget.exe;
mozroots --import --sync
mono nuget.exe install vendor/packages.config -o vendor;
mono nuget.exe install src/IO.Swagger/packages.config -o packages;
mkdir -p bin;
cp vendor/Newtonsoft.Json.8.0.2/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
cp vendor/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll;
cp packages/Newtonsoft.Json.8.0.2/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll;
mcs -sdk:${netfx} -r:bin/Newtonsoft.Json.dll,\
bin/RestSharp.dll,\
System.Runtime.Serialization.dll \
-target:library \
-out:bin/IO.Swagger.dll \
-recurse:'src/*.cs' \
-recurse:'src/IO.Swagger/*.cs' \
-doc:bin/IO.Swagger.xml \
-platform:anycpu

View File

@ -0,0 +1,91 @@
# IO.Swagger.Api.FakeApi
All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters
# **TestEndpointParameters**
> void TestEndpointParameters (string 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)
Fake endpoint for testing various parameters
Fake endpoint for testing various parameters
### Example
```csharp
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class TestEndpointParametersExample
{
public void main()
{
var apiInstance = new FakeApi();
var number = number_example; // string | None
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
{
// Fake endpoint for testing various parameters
apiInstance.TestEndpointParameters(number, _double, _string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
}
catch (Exception e)
{
Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message );
}
}
}
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**number** | **string**| None |
**_double** | **double?**| None |
**_string** | **string**| None |
**_byte** | **byte[]**| None |
**integer** | **int?**| None | [optional]
**int32** | **int?**| None | [optional]
**int64** | **long?**| None | [optional]
**_float** | **float?**| None | [optional]
**binary** | **byte[]**| None | [optional]
**date** | **DateTime?**| None | [optional]
**dateTime** | **DateTime?**| None | [optional]
**password** | **string**| None | [optional]
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, 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)

View File

@ -10,11 +10,11 @@ Name | Type | Description | Notes
**_Float** | **float?** | | [optional]
**_Double** | **double?** | | [optional]
**_String** | **string** | | [optional]
**_Byte** | **byte[]** | | [optional]
**_Byte** | **byte[]** | |
**Binary** | **byte[]** | | [optional]
**Date** | **DateTime?** | | [optional]
**Date** | **DateTime?** | |
**DateTime** | **DateTime?** | | [optional]
**Password** | **string** | | [optional]
**Password** | **string** | |
[[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,80 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Reflection;
using RestSharp;
using NUnit.Framework;
using IO.Swagger.Client;
using IO.Swagger.Api;
namespace IO.Swagger.Test
{
/// <summary>
/// Class for testing FakeApi
/// </summary>
/// <remarks>
/// This file is automatically generated by Swagger Codegen.
/// Please update the test case below to test the API endpoint.
/// </remarks>
[TestFixture]
public class FakeApiTests
{
private FakeApi instance;
/// <summary>
/// Setup before each unit test
/// </summary>
[SetUp]
public void Init()
{
instance = new FakeApi();
}
/// <summary>
/// Clean up after each unit test
/// </summary>
[TearDown]
public void Cleanup()
{
}
/// <summary>
/// Test an instance of FakeApi
/// </summary>
[Test]
public void InstanceTest()
{
Assert.IsInstanceOf<FakeApi> (instance, "instance is a FakeApi");
}
/// <summary>
/// Test TestEndpointParameters
/// </summary>
[Test]
public void TestEndpointParametersTest()
{
// TODO: add unit test for the method 'TestEndpointParameters'
string number = null; // TODO: replace null with proper value
double? _double = null; // TODO: replace null with proper value
string _string = null; // TODO: replace null with proper value
byte[] _byte = null; // TODO: replace null with proper value
int? integer = null; // TODO: replace null with proper value
int? int32 = null; // TODO: replace null with proper value
long? int64 = null; // TODO: replace null with proper value
float? _float = null; // TODO: replace null with proper value
byte[] binary = null; // TODO: replace null with proper value
DateTime? date = null; // TODO: replace null with proper value
DateTime? dateTime = null; // TODO: replace null with proper value
string password = null; // TODO: replace null with proper value
instance.TestEndpointParameters(number, _double, _string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
}
}
}

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<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>{19F1DEBC-DE5E-4517-8062-F000CD499087}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>IO.Swagger.Test</RootNamespace>
<AssemblyName>IO.Swagger.Test</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Xml" />
<Reference Include="Newtonsoft.Json">
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="RestSharp">
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
<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>
<Reference Include="nunit.framework">
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="**\*.cs"/>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\IO.Swagger\IO.Swagger.csproj">
<Project>{C22D7F6C-D698-469A-A3C9-5A499DE213B8}</Project>
<Name>IO.Swagger</Name>
</ProjectReference>
</ItemGroup>
</Project>

View File

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

View File

@ -0,0 +1,418 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using RestSharp;
using IO.Swagger.Client;
namespace IO.Swagger.Api
{
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public interface IFakeApi
{
#region Synchronous Operations
/// <summary>
/// Fake endpoint for testing various parameters
/// </summary>
/// <remarks>
/// Fake endpoint for testing various parameters
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="number">None</param>
/// <param name="_double">None</param>
/// <param name="_string">None</param>
/// <param name="_byte">None</param>
/// <param name="integer">None (optional)</param>
/// <param name="int32">None (optional)</param>
/// <param name="int64">None (optional)</param>
/// <param name="_float">None (optional)</param>
/// <param name="binary">None (optional)</param>
/// <param name="date">None (optional)</param>
/// <param name="dateTime">None (optional)</param>
/// <param name="password">None (optional)</param>
/// <returns></returns>
void TestEndpointParameters (string 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);
/// <summary>
/// Fake endpoint for testing various parameters
/// </summary>
/// <remarks>
/// Fake endpoint for testing various parameters
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="number">None</param>
/// <param name="_double">None</param>
/// <param name="_string">None</param>
/// <param name="_byte">None</param>
/// <param name="integer">None (optional)</param>
/// <param name="int32">None (optional)</param>
/// <param name="int64">None (optional)</param>
/// <param name="_float">None (optional)</param>
/// <param name="binary">None (optional)</param>
/// <param name="date">None (optional)</param>
/// <param name="dateTime">None (optional)</param>
/// <param name="password">None (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> TestEndpointParametersWithHttpInfo (string 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);
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
/// Fake endpoint for testing various parameters
/// </summary>
/// <remarks>
/// Fake endpoint for testing various parameters
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="number">None</param>
/// <param name="_double">None</param>
/// <param name="_string">None</param>
/// <param name="_byte">None</param>
/// <param name="integer">None (optional)</param>
/// <param name="int32">None (optional)</param>
/// <param name="int64">None (optional)</param>
/// <param name="_float">None (optional)</param>
/// <param name="binary">None (optional)</param>
/// <param name="date">None (optional)</param>
/// <param name="dateTime">None (optional)</param>
/// <param name="password">None (optional)</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task TestEndpointParametersAsync (string 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);
/// <summary>
/// Fake endpoint for testing various parameters
/// </summary>
/// <remarks>
/// Fake endpoint for testing various parameters
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="number">None</param>
/// <param name="_double">None</param>
/// <param name="_string">None</param>
/// <param name="_byte">None</param>
/// <param name="integer">None (optional)</param>
/// <param name="int32">None (optional)</param>
/// <param name="int64">None (optional)</param>
/// <param name="_float">None (optional)</param>
/// <param name="binary">None (optional)</param>
/// <param name="date">None (optional)</param>
/// <param name="dateTime">None (optional)</param>
/// <param name="password">None (optional)</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> TestEndpointParametersAsyncWithHttpInfo (string 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);
#endregion Asynchronous Operations
}
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public class FakeApi : IFakeApi
{
/// <summary>
/// Initializes a new instance of the <see cref="FakeApi"/> class.
/// </summary>
/// <returns></returns>
public FakeApi(String basePath)
{
this.Configuration = new Configuration(new ApiClient(basePath));
// ensure API client has configuration ready
if (Configuration.ApiClient.Configuration == null)
{
this.Configuration.ApiClient.Configuration = this.Configuration;
}
}
/// <summary>
/// Initializes a new instance of the <see cref="FakeApi"/> class
/// using Configuration object
/// </summary>
/// <param name="configuration">An instance of Configuration</param>
/// <returns></returns>
public FakeApi(Configuration configuration = null)
{
if (configuration == null) // use the default one in Configuration
this.Configuration = Configuration.Default;
else
this.Configuration = configuration;
// ensure API client has configuration ready
if (Configuration.ApiClient.Configuration == null)
{
this.Configuration.ApiClient.Configuration = this.Configuration;
}
}
/// <summary>
/// Gets the base path of the API client.
/// </summary>
/// <value>The base path</value>
public String GetBasePath()
{
return this.Configuration.ApiClient.RestClient.BaseUrl.ToString();
}
/// <summary>
/// Sets the base path of the API client.
/// </summary>
/// <value>The base path</value>
[Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
public void SetBasePath(String basePath)
{
// do nothing
}
/// <summary>
/// Gets or sets the configuration object
/// </summary>
/// <value>An instance of the Configuration</value>
public Configuration Configuration {get; set;}
/// <summary>
/// Gets the default header.
/// </summary>
/// <returns>Dictionary of HTTP header</returns>
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
public Dictionary<String, String> DefaultHeader()
{
return this.Configuration.DefaultHeader;
}
/// <summary>
/// Add default header.
/// </summary>
/// <param name="key">Header field name.</param>
/// <param name="value">Header field value.</param>
/// <returns></returns>
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
public void AddDefaultHeader(string key, string value)
{
this.Configuration.AddDefaultHeader(key, value);
}
/// <summary>
/// Fake endpoint for testing various parameters Fake endpoint for testing various parameters
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="number">None</param>
/// <param name="_double">None</param>
/// <param name="_string">None</param>
/// <param name="_byte">None</param>
/// <param name="integer">None (optional)</param>
/// <param name="int32">None (optional)</param>
/// <param name="int64">None (optional)</param>
/// <param name="_float">None (optional)</param>
/// <param name="binary">None (optional)</param>
/// <param name="date">None (optional)</param>
/// <param name="dateTime">None (optional)</param>
/// <param name="password">None (optional)</param>
/// <returns></returns>
public void TestEndpointParameters (string 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)
{
TestEndpointParametersWithHttpInfo(number, _double, _string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
}
/// <summary>
/// Fake endpoint for testing various parameters Fake endpoint for testing various parameters
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="number">None</param>
/// <param name="_double">None</param>
/// <param name="_string">None</param>
/// <param name="_byte">None</param>
/// <param name="integer">None (optional)</param>
/// <param name="int32">None (optional)</param>
/// <param name="int64">None (optional)</param>
/// <param name="_float">None (optional)</param>
/// <param name="binary">None (optional)</param>
/// <param name="date">None (optional)</param>
/// <param name="dateTime">None (optional)</param>
/// <param name="password">None (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
public ApiResponse<Object> TestEndpointParametersWithHttpInfo (string 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)
{
// verify the required parameter 'number' is set
if (number == null)
throw new ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters");
// verify the required parameter '_double' is set
if (_double == null)
throw new ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters");
// verify the required parameter '_string' is set
if (_string == null)
throw new ApiException(400, "Missing required parameter '_string' when calling FakeApi->TestEndpointParameters");
// verify the required parameter '_byte' is set
if (_byte == null)
throw new ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters");
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[] {
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"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 (integer != null) localVarFormParams.Add("integer", Configuration.ApiClient.ParameterToString(integer)); // form parameter
if (int32 != null) localVarFormParams.Add("int32", Configuration.ApiClient.ParameterToString(int32)); // form parameter
if (int64 != null) localVarFormParams.Add("int64", Configuration.ApiClient.ParameterToString(int64)); // form parameter
if (number != null) localVarFormParams.Add("number", Configuration.ApiClient.ParameterToString(number)); // form parameter
if (_float != null) localVarFormParams.Add("float", Configuration.ApiClient.ParameterToString(_float)); // form parameter
if (_double != null) localVarFormParams.Add("double", Configuration.ApiClient.ParameterToString(_double)); // form parameter
if (_string != null) localVarFormParams.Add("string", Configuration.ApiClient.ParameterToString(_string)); // form parameter
if (_byte != null) localVarFormParams.Add("byte", Configuration.ApiClient.ParameterToString(_byte)); // form parameter
if (binary != null) localVarFormParams.Add("binary", Configuration.ApiClient.ParameterToString(binary)); // form parameter
if (date != null) localVarFormParams.Add("date", Configuration.ApiClient.ParameterToString(date)); // form parameter
if (dateTime != null) localVarFormParams.Add("dateTime", Configuration.ApiClient.ParameterToString(dateTime)); // form parameter
if (password != null) localVarFormParams.Add("password", Configuration.ApiClient.ParameterToString(password)); // form parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode >= 400)
throw new ApiException (localVarStatusCode, "Error calling TestEndpointParameters: " + localVarResponse.Content, localVarResponse.Content);
else if (localVarStatusCode == 0)
throw new ApiException (localVarStatusCode, "Error calling TestEndpointParameters: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage);
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
null);
}
/// <summary>
/// Fake endpoint for testing various parameters Fake endpoint for testing various parameters
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="number">None</param>
/// <param name="_double">None</param>
/// <param name="_string">None</param>
/// <param name="_byte">None</param>
/// <param name="integer">None (optional)</param>
/// <param name="int32">None (optional)</param>
/// <param name="int64">None (optional)</param>
/// <param name="_float">None (optional)</param>
/// <param name="binary">None (optional)</param>
/// <param name="date">None (optional)</param>
/// <param name="dateTime">None (optional)</param>
/// <param name="password">None (optional)</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task TestEndpointParametersAsync (string 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)
{
await TestEndpointParametersAsyncWithHttpInfo(number, _double, _string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
}
/// <summary>
/// Fake endpoint for testing various parameters Fake endpoint for testing various parameters
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="number">None</param>
/// <param name="_double">None</param>
/// <param name="_string">None</param>
/// <param name="_byte">None</param>
/// <param name="integer">None (optional)</param>
/// <param name="int32">None (optional)</param>
/// <param name="int64">None (optional)</param>
/// <param name="_float">None (optional)</param>
/// <param name="binary">None (optional)</param>
/// <param name="date">None (optional)</param>
/// <param name="dateTime">None (optional)</param>
/// <param name="password">None (optional)</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<ApiResponse<Object>> TestEndpointParametersAsyncWithHttpInfo (string 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)
{
// verify the required parameter 'number' is set
if (number == null)
throw new ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters");
// verify the required parameter '_double' is set
if (_double == null)
throw new ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters");
// verify the required parameter '_string' is set
if (_string == null)
throw new ApiException(400, "Missing required parameter '_string' when calling FakeApi->TestEndpointParameters");
// verify the required parameter '_byte' is set
if (_byte == null)
throw new ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters");
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[] {
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"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 (integer != null) localVarFormParams.Add("integer", Configuration.ApiClient.ParameterToString(integer)); // form parameter
if (int32 != null) localVarFormParams.Add("int32", Configuration.ApiClient.ParameterToString(int32)); // form parameter
if (int64 != null) localVarFormParams.Add("int64", Configuration.ApiClient.ParameterToString(int64)); // form parameter
if (number != null) localVarFormParams.Add("number", Configuration.ApiClient.ParameterToString(number)); // form parameter
if (_float != null) localVarFormParams.Add("float", Configuration.ApiClient.ParameterToString(_float)); // form parameter
if (_double != null) localVarFormParams.Add("double", Configuration.ApiClient.ParameterToString(_double)); // form parameter
if (_string != null) localVarFormParams.Add("string", Configuration.ApiClient.ParameterToString(_string)); // form parameter
if (_byte != null) localVarFormParams.Add("byte", Configuration.ApiClient.ParameterToString(_byte)); // form parameter
if (binary != null) localVarFormParams.Add("binary", Configuration.ApiClient.ParameterToString(binary)); // form parameter
if (date != null) localVarFormParams.Add("date", Configuration.ApiClient.ParameterToString(date)); // form parameter
if (dateTime != null) localVarFormParams.Add("dateTime", Configuration.ApiClient.ParameterToString(dateTime)); // form parameter
if (password != null) localVarFormParams.Add("password", Configuration.ApiClient.ParameterToString(password)); // form parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode >= 400)
throw new ApiException (localVarStatusCode, "Error calling TestEndpointParameters: " + localVarResponse.Content, localVarResponse.Content);
else if (localVarStatusCode == 0)
throw new ApiException (localVarStatusCode, "Error calling TestEndpointParameters: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage);
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
null);
}
}
}

View File

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<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>{C22D7F6C-D698-469A-A3C9-5A499DE213B8}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Swagger Library</RootNamespace>
<AssemblyName>Swagger Library</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Xml" />
<Reference Include="Newtonsoft.Json">
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="RestSharp">
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
<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>

View File

@ -29,11 +29,11 @@ namespace IO.Swagger.Model
/// <param name="_Float">_Float.</param>
/// <param name="_Double">_Double.</param>
/// <param name="_String">_String.</param>
/// <param name="_Byte">_Byte.</param>
/// <param name="_Byte">_Byte (required).</param>
/// <param name="Binary">Binary.</param>
/// <param name="Date">Date.</param>
/// <param name="Date">Date (required).</param>
/// <param name="DateTime">DateTime.</param>
/// <param name="Password">Password.</param>
/// <param name="Password">Password (required).</param>
public FormatTest(int? Integer = null, int? Int32 = null, long? Int64 = null, double? Number = null, float? _Float = null, double? _Double = null, string _String = null, byte[] _Byte = null, byte[] Binary = null, DateTime? Date = null, DateTime? DateTime = null, string Password = null)
{
@ -46,17 +46,41 @@ namespace IO.Swagger.Model
{
this.Number = Number;
}
// to ensure "_Byte" is required (not null)
if (_Byte == null)
{
throw new InvalidDataException("_Byte is a required property for FormatTest and cannot be null");
}
else
{
this._Byte = _Byte;
}
// to ensure "Date" is required (not null)
if (Date == null)
{
throw new InvalidDataException("Date is a required property for FormatTest and cannot be null");
}
else
{
this.Date = Date;
}
// to ensure "Password" is required (not null)
if (Password == null)
{
throw new InvalidDataException("Password is a required property for FormatTest and cannot be null");
}
else
{
this.Password = Password;
}
this.Integer = Integer;
this.Int32 = Int32;
this.Int64 = Int64;
this._Float = _Float;
this._Double = _Double;
this._String = _String;
this._Byte = _Byte;
this.Binary = Binary;
this.Date = Date;
this.DateTime = DateTime;
this.Password = Password;
}

View File

@ -1,104 +0,0 @@
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 InlineResponse200
/// </summary>
/// <remarks>
/// This file is automatically generated by Swagger Codegen.
/// Please update the test case below to test the model.
/// </remarks>
[TestFixture]
public class InlineResponse200Tests
{
private InlineResponse200 instance;
/// <summary>
/// Setup before each test
/// </summary>
[SetUp]
public void Init()
{
instance = new InlineResponse200();
}
/// <summary>
/// Clean up after each test
/// </summary>
[TearDown]
public void Cleanup()
{
}
/// <summary>
/// Test an instance of InlineResponse200
/// </summary>
[Test]
public void InlineResponse200InstanceTest()
{
Assert.IsInstanceOf<InlineResponse200> (instance, "instance is a InlineResponse200");
}
/// <summary>
/// Test the property 'PhotoUrls'
/// </summary>
[Test]
public void PhotoUrlsTest()
{
// TODO: unit test for the property 'PhotoUrls'
}
/// <summary>
/// Test the property 'Name'
/// </summary>
[Test]
public void NameTest()
{
// TODO: unit test for the property 'Name'
}
/// <summary>
/// Test the property 'Id'
/// </summary>
[Test]
public void IdTest()
{
// TODO: unit test for the property 'Id'
}
/// <summary>
/// Test the property 'Category'
/// </summary>
[Test]
public void CategoryTest()
{
// TODO: unit test for the property 'Category'
}
/// <summary>
/// Test the property 'Tags'
/// </summary>
[Test]
public void TagsTest()
{
// TODO: unit test for the property 'Tags'
}
/// <summary>
/// Test the property 'Status'
/// </summary>
[Test]
public void StatusTest()
{
// TODO: unit test for the property 'Status'
}
}
}

View File

@ -1,184 +0,0 @@
- the C# library for the Swagger Petstore
This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API version: 1.0.0
- Package version:
- Build date: 2016-04-14T06:55:47.468-04:00
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
## Frameworks supported
- .NET 4.0 or later
- 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
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:
```
Install-Package RestSharp
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)
## Installation
Run the following command to generate the DLL
- [Mac/Linux] compile-mono.sh
- [Windows] compile.bat
Then include the DLL (under the `bin` folder) in the C# project
```csharp
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Module;
namespace Example
{
public class Example
{
public void main(){
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
// Configure API key authorization: test_api_client_id
Configuration.Default.ApiKey.Add('x-test_api_client_id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add('x-test_api_client_id', 'BEARER');
// Configure API key authorization: test_api_client_secret
Configuration.Default.ApiKey.Add('x-test_api_client_secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add('x-test_api_client_secret', 'BEARER');
// Configure API key authorization: api_key
Configuration.Default.ApiKey.Add('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add('api_key', 'BEARER');
// Configure HTTP basic authorization: test_http_basic
Configuration.Default.Username = 'YOUR_USERNAME';
Configuration.Default.Password = 'YOUR_PASSWORD';
// Configure API key authorization: test_api_key_query
Configuration.Default.ApiKey.Add('test_api_key_query', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add('test_api_key_query', 'BEARER');
// Configure API key authorization: test_api_key_header
Configuration.Default.ApiKey.Add('test_api_key_header', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add('test_api_key_header', 'BEARER');
var apiInstance = new ();
try {
apiInstance.();
} catch (Exception e) {
Debug.Print("Exception when calling .: " + e.Message );
}
}
}
}
```
## Documentation for API Endpoints
All URIs are relative to *http://petstore.swagger.io/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*::PetApi* | [**AddPet**](docs/PetApi.md#AddPet) | **POST** /pet | Add a new pet to the store
*::PetApi* | [**AddPetUsingByteArray**](docs/PetApi.md#AddPetUsingByteArray) | **POST** /pet?testing_byte_array&#x3D;true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
*::PetApi* | [**DeletePet**](docs/PetApi.md#DeletePet) | **DELETE** /pet/{petId} | Deletes a pet
*::PetApi* | [**FindPetsByStatus**](docs/PetApi.md#FindPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
*::PetApi* | [**FindPetsByTags**](docs/PetApi.md#FindPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
*::PetApi* | [**GetPetById**](docs/PetApi.md#GetPetById) | **GET** /pet/{petId} | Find pet by ID
*::PetApi* | [**GetPetByIdInObject**](docs/PetApi.md#GetPetByIdInObject) | **GET** /pet/{petId}?response&#x3D;inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
*::PetApi* | [**PetPetIdtestingByteArraytrueGet**](docs/PetApi.md#PetPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array&#x3D;true | Fake endpoint to test byte array return by 'Find pet by ID'
*::PetApi* | [**UpdatePet**](docs/PetApi.md#UpdatePet) | **PUT** /pet | Update an existing pet
*::PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#UpdatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
*::PetApi* | [**UploadFile**](docs/PetApi.md#UploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
*::StoreApi* | [**DeleteOrder**](docs/StoreApi.md#DeleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
*::StoreApi* | [**FindOrdersByStatus**](docs/StoreApi.md#FindOrdersByStatus) | **GET** /store/findByStatus | Finds orders by status
*::StoreApi* | [**GetInventory**](docs/StoreApi.md#GetInventory) | **GET** /store/inventory | Returns pet inventories by status
*::StoreApi* | [**GetInventoryInObject**](docs/StoreApi.md#GetInventoryInObject) | **GET** /store/inventory?response&#x3D;arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
*::StoreApi* | [**GetOrderById**](docs/StoreApi.md#GetOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
*::StoreApi* | [**PlaceOrder**](docs/StoreApi.md#PlaceOrder) | **POST** /store/order | Place an order for a pet
*::UserApi* | [**CreateUser**](docs/UserApi.md#CreateUser) | **POST** /user | Create user
*::UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#CreateUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
*::UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#CreateUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
*::UserApi* | [**DeleteUser**](docs/UserApi.md#DeleteUser) | **DELETE** /user/{username} | Delete user
*::UserApi* | [**GetUserByName**](docs/UserApi.md#GetUserByName) | **GET** /user/{username} | Get user by user name
*::UserApi* | [**LoginUser**](docs/UserApi.md#LoginUser) | **GET** /user/login | Logs user into the system
*::UserApi* | [**LogoutUser**](docs/UserApi.md#LogoutUser) | **GET** /user/logout | Logs out current logged in user session
*::UserApi* | [**UpdateUser**](docs/UserApi.md#UpdateUser) | **PUT** /user/{username} | Updated user
## Documentation for Models
- [::Animal](docs/Animal.md)
- [::Cat](docs/Cat.md)
- [::Category](docs/Category.md)
- [::Dog](docs/Dog.md)
- [::FormatTest](docs/FormatTest.md)
- [::InlineResponse200](docs/InlineResponse200.md)
- [::Model200Response](docs/Model200Response.md)
- [::ModelReturn](docs/ModelReturn.md)
- [::Name](docs/Name.md)
- [::Order](docs/Order.md)
- [::Pet](docs/Pet.md)
- [::SpecialModelName](docs/SpecialModelName.md)
- [::Tag](docs/Tag.md)
- [::User](docs/User.md)
## Documentation for Authorization
### petstore_auth
- **Type**: OAuth
- **Flow**: implicit
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
- **Scopes**:
- write:pets: modify pets in your account
- read:pets: read your pets
### test_api_client_id
- **Type**: API key
- **API key parameter name**: x-test_api_client_id
- **Location**: HTTP header
### test_api_client_secret
- **Type**: API key
- **API key parameter name**: x-test_api_client_secret
- **Location**: HTTP header
### api_key
- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header
### test_http_basic
- **Type**: HTTP basic authentication
### test_api_key_query
- **Type**: API key
- **API key parameter name**: test_api_key_query
- **Location**: URL query string
### test_api_key_header
- **Type**: API key
- **API key parameter name**: test_api_key_header
- **Location**: HTTP header

View File

@ -1,14 +0,0 @@
@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 vendor/packages.config -o vendor
if not exist ".\bin" mkdir bin
copy vendor\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll
copy vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll
%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\RestSharp.dll /target:library /out:bin\IO.Swagger.dll /recurse:src\*.cs /doc:bin\IO.Swagger.xml

View File

@ -1,14 +0,0 @@
# InlineResponse200
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**PhotoUrls** | **List&lt;string&gt;** | | [optional]
**Name** | **string** | | [optional]
**Id** | **long?** | |
**Category** | **Object** | | [optional]
**Tags** | [**List&lt;Tag&gt;**](Tag.md) | | [optional]
**Status** | **string** | pet status in the store | [optional]

View File

@ -1,217 +0,0 @@
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>
///
/// </summary>
[DataContract]
public partial class InlineResponse200 : IEquatable<InlineResponse200>
{
/// <summary>
/// pet status in the store
/// </summary>
/// <value>pet status in the store</value>
[JsonConverter(typeof(StringEnumConverter))]
public enum StatusEnum {
[EnumMember(Value = "available")]
Available,
[EnumMember(Value = "pending")]
Pending,
[EnumMember(Value = "sold")]
Sold
}
/// <summary>
/// pet status in the store
/// </summary>
/// <value>pet status in the store</value>
[DataMember(Name="status", EmitDefaultValue=false)]
public StatusEnum? Status { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="InlineResponse200" /> class.
/// Initializes a new instance of the <see cref="InlineResponse200" />class.
/// </summary>
/// <param name="PhotoUrls">PhotoUrls.</param>
/// <param name="Name">Name.</param>
/// <param name="Id">Id (required).</param>
/// <param name="Category">Category.</param>
/// <param name="Tags">Tags.</param>
/// <param name="Status">pet status in the store.</param>
public InlineResponse200(List<string> PhotoUrls = null, string Name = null, long? Id = null, Object Category = null, List<Tag> Tags = null, StatusEnum? Status = null)
{
// to ensure "Id" is required (not null)
if (Id == null)
{
throw new InvalidDataException("Id is a required property for InlineResponse200 and cannot be null");
}
else
{
this.Id = Id;
}
this.PhotoUrls = PhotoUrls;
this.Name = Name;
this.Category = Category;
this.Tags = Tags;
this.Status = Status;
}
/// <summary>
/// Gets or Sets PhotoUrls
/// </summary>
[DataMember(Name="photoUrls", EmitDefaultValue=false)]
public List<string> PhotoUrls { get; set; }
/// <summary>
/// Gets or Sets Name
/// </summary>
[DataMember(Name="name", EmitDefaultValue=false)]
public string Name { get; set; }
/// <summary>
/// Gets or Sets Id
/// </summary>
[DataMember(Name="id", EmitDefaultValue=false)]
public long? Id { get; set; }
/// <summary>
/// Gets or Sets Category
/// </summary>
[DataMember(Name="category", EmitDefaultValue=false)]
public Object Category { get; set; }
/// <summary>
/// Gets or Sets Tags
/// </summary>
[DataMember(Name="tags", EmitDefaultValue=false)]
public List<Tag> Tags { 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 InlineResponse200 {\n");
sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Category: ").Append(Category).Append("\n");
sb.Append(" Tags: ").Append(Tags).Append("\n");
sb.Append(" Status: ").Append(Status).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 InlineResponse200);
}
/// <summary>
/// Returns true if InlineResponse200 instances are equal
/// </summary>
/// <param name="other">Instance of InlineResponse200 to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(InlineResponse200 other)
{
// credit: http://stackoverflow.com/a/10454552/677735
if (other == null)
return false;
return
(
this.PhotoUrls == other.PhotoUrls ||
this.PhotoUrls != null &&
this.PhotoUrls.SequenceEqual(other.PhotoUrls)
) &&
(
this.Name == other.Name ||
this.Name != null &&
this.Name.Equals(other.Name)
) &&
(
this.Id == other.Id ||
this.Id != null &&
this.Id.Equals(other.Id)
) &&
(
this.Category == other.Category ||
this.Category != null &&
this.Category.Equals(other.Category)
) &&
(
this.Tags == other.Tags ||
this.Tags != null &&
this.Tags.SequenceEqual(other.Tags)
) &&
(
this.Status == other.Status ||
this.Status != null &&
this.Status.Equals(other.Status)
);
}
/// <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.PhotoUrls != null)
hash = hash * 59 + this.PhotoUrls.GetHashCode();
if (this.Name != null)
hash = hash * 59 + this.Name.GetHashCode();
if (this.Id != null)
hash = hash * 59 + this.Id.GetHashCode();
if (this.Category != null)
hash = hash * 59 + this.Category.GetHashCode();
if (this.Tags != null)
hash = hash * 59 + this.Tags.GetHashCode();
if (this.Status != null)
hash = hash * 59 + this.Status.GetHashCode();
return hash;
}
}
}
}

View File

@ -1,113 +0,0 @@
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>
///
/// </summary>
[DataContract]
public partial class ObjectReturn : IEquatable<ObjectReturn>
{
/// <summary>
/// Initializes a new instance of the <see cref="ObjectReturn" /> class.
/// Initializes a new instance of the <see cref="ObjectReturn" />class.
/// </summary>
/// <param name="_Return">_Return.</param>
public ObjectReturn(int? _Return = null)
{
this._Return = _Return;
}
/// <summary>
/// Gets or Sets _Return
/// </summary>
[DataMember(Name="return", EmitDefaultValue=false)]
public int? _Return { 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 ObjectReturn {\n");
sb.Append(" _Return: ").Append(_Return).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 ObjectReturn);
}
/// <summary>
/// Returns true if ObjectReturn instances are equal
/// </summary>
/// <param name="other">Instance of ObjectReturn to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ObjectReturn other)
{
// credit: http://stackoverflow.com/a/10454552/677735
if (other == null)
return false;
return
(
this._Return == other._Return ||
this._Return != null &&
this._Return.Equals(other._Return)
);
}
/// <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._Return != null)
hash = hash * 59 + this._Return.GetHashCode();
return hash;
}
}
}
}

View File

@ -1,113 +0,0 @@
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>
///
/// </summary>
[DataContract]
public partial class Task : IEquatable<Task>
{
/// <summary>
/// Initializes a new instance of the <see cref="Task" /> class.
/// Initializes a new instance of the <see cref="Task" />class.
/// </summary>
/// <param name="_Return">_Return.</param>
public Task(int? _Return = null)
{
this._Return = _Return;
}
/// <summary>
/// Gets or Sets _Return
/// </summary>
[DataMember(Name="return", EmitDefaultValue=false)]
public int? _Return { 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 Task {\n");
sb.Append(" _Return: ").Append(_Return).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 Task);
}
/// <summary>
/// Returns true if Task instances are equal
/// </summary>
/// <param name="other">Instance of Task to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(Task other)
{
// credit: http://stackoverflow.com/a/10454552/677735
if (other == null)
return false;
return
(
this._Return == other._Return ||
this._Return != null &&
this._Return.Equals(other._Return)
);
}
/// <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._Return != null)
hash = hash * 59 + this._Return.GetHashCode();
return hash;
}
}
}
}

View File

@ -30,7 +30,10 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="Newtonsoft.Json">
<HintPath>Lib\SwaggerClient\bin\Newtonsoft.Json.dll</HintPath>
<HintPath>packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="RestSharp">
<HintPath>packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="Microsoft.CSharp" />
@ -38,53 +41,30 @@
<HintPath>packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
<Reference Include="RestSharp">
<HintPath>Lib\SwaggerClient\bin\RestSharp.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Api\PetApi.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Api\StoreApi.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Api\UserApi.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Client\ApiClient.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Client\ApiException.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Client\Configuration.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Category.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Order.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Pet.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Tag.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\User.cs" />
<Compile Include="TestPet.cs" />
<Compile Include="TestApiClient.cs" />
<Compile Include="TestConfiguration.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Client\ApiResponse.cs" />
<Compile Include="TestOrder.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\InlineResponse200.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\ObjectReturn.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\SpecialModelName.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\ModelReturn.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Name.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Task.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Model200Response.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Animal.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Cat.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Dog.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\FormatTest.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\ApiResponse.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<None Include="Lib\SwaggerClient\compile.bat" />
<None Include="Lib\SwaggerClient\bin\Newtonsoft.Json.dll" />
<None Include="Lib\SwaggerClient\bin\RestSharp.dll" />
<None Include="..\SwaggerClient\build.bat" />
<None Include="..\SwaggerClient\build.sh" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Folder Include="Lib\" />
<Folder Include="Lib\SwaggerClient\" />
<Folder Include="..\SwaggerClient\" />
<EmbeddedResource Include="swagger-logo.png" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SwaggerClient\src\IO.Swagger\IO.Swagger.csproj">
<Project>{0862164F-97E9-4226-B458-E09905B21F2F}</Project>
<Name>IO.Swagger</Name>
</ProjectReference>
</ItemGroup>
</Project>

View File

@ -3,12 +3,18 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SwaggerClientTest", "SwaggerClientTest.csproj", "{1011E844-3414-4D65-BF1F-7C8CE0167174}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "..\SwaggerClient\src\IO.Swagger\IO.Swagger.csproj", "{0862164F-97E9-4226-B458-E09905B21F2F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0862164F-97E9-4226-B458-E09905B21F2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0862164F-97E9-4226-B458-E09905B21F2F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0862164F-97E9-4226-B458-E09905B21F2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0862164F-97E9-4226-B458-E09905B21F2F}.Release|Any CPU.Build.0 = Release|Any CPU
{1011E844-3414-4D65-BF1F-7C8CE0167174}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1011E844-3414-4D65-BF1F-7C8CE0167174}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1011E844-3414-4D65-BF1F-7C8CE0167174}.Release|Any CPU.ActiveCfg = Release|Any CPU

View File

@ -1,25 +1,15 @@
<Properties StartupItem="SwaggerClientTest.csproj">
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.Workbench ActiveDocument="TestPet.cs">
<MonoDevelop.Ide.Workbench ActiveDocument="../SwaggerClient/src/IO.Swagger/Api/FakeApi.cs">
<Files>
<File FileName="TestPet.cs" Line="29" Column="39" />
<File FileName="TestOrder.cs" Line="99" Column="6" />
<File FileName="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs" Line="711" Column="1" />
<File FileName="TestPet.cs" Line="1" Column="1" />
<File FileName="TestOrder.cs" Line="1" Column="1" />
<File FileName="../SwaggerClient/src/IO.Swagger/Api/FakeApi.cs" Line="1" Column="1" />
</Files>
<Pads>
<Pad Id="MonoDevelop.NUnit.TestPad">
<State name="__root__">
<Node name="SwaggerClientTest" expanded="True">
<Node name="SwaggerClientTest" expanded="True">
<Node name="SwaggerClientTest" expanded="True">
<Node name="TestPet" expanded="True">
<Node name="TestPet" expanded="True">
<Node name="TestGetPetByIdAsyncWithHttpInfo" selected="True" />
</Node>
</Node>
</Node>
</Node>
</Node>
<Node name="SwaggerClientTest" expanded="True" selected="True" />
</State>
</Pad>
</Pads>

View File

@ -1,9 +1,11 @@
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttribute.cs
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.swagger-logo.png
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll.mdb
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll.mdb
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/Newtonsoft.Json.dll
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/RestSharp.dll
/Volumes/Extra/projects/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttribute.cs
/Volumes/Extra/projects/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.swagger-logo.png
/Volumes/Extra/projects/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll.mdb
/Volumes/Extra/projects/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll
/Volumes/Extra/projects/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll
/Volumes/Extra/projects/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll.mdb
/Volumes/Extra/projects/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/Newtonsoft.Json.dll
/Volumes/Extra/projects/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/RestSharp.dll
/Volumes/Extra/projects/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll
/Volumes/Extra/projects/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/Swagger Library.dll
/Volumes/Extra/projects/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/Swagger Library.dll.mdb

View File

@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<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.2" targetFramework="net45" developmentDependency="true" />
</packages>

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path="../packages.config" />
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path="../../SwaggerClient/src/IO.Swagger/packages.config" />
<repository path="../packages.config" />
</repositories>