diff --git a/.gitignore b/.gitignore index 25bb6c205cb..3c008800db1 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/bin/csharp-petstore.sh b/bin/csharp-petstore.sh index c042dd9c0cd..a82efa9af10 100755 --- a/bin/csharp-petstore.sh +++ b/bin/csharp-petstore.sh @@ -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" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/windows/csharp-petstore.bat b/bin/windows/csharp-petstore.bat index 227ed319441..fbfc18d334d 100755 --- a/bin/windows/csharp-petstore.bat +++ b/bin/windows/csharp-petstore.bat @@ -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 java %JAVA_OPTS% -jar %executable% %ags% diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractCSharpCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractCSharpCodegen.java index e9d6457f6f0..304b23b3db5 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractCSharpCodegen.java @@ -12,7 +12,7 @@ import java.util.*; public abstract class AbstractCSharpCodegen extends DefaultCodegen implements CodegenConfig { protected boolean optionalAssemblyInfoFlag = true; - protected boolean optionalProjectFileFlag = false; + protected boolean optionalProjectFileFlag = true; protected boolean optionalEmitDefaultValue = false; protected boolean optionalMethodArgumentFlag = true; protected boolean useDateTimeOffsetFlag = false; @@ -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 collectionTypes; protected Set mapTypes; @@ -273,12 +278,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 @@ -528,7 +533,6 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co return toModelName(name) + "Tests"; } - public void setPackageName(String packageName) { this.packageName = packageName; } @@ -541,7 +545,6 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co this.sourceFolder = sourceFolder; } - @Override public String toEnumVarName(String name, String datatype) { String enumName = sanitizeName(name); @@ -590,4 +593,8 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co } } */ + + public String testPackageName() { + return this.packageName + ".Test"; + } } diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AspNet5ServerCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AspNet5ServerCodegen.java index cf8915974e6..790891d38bb 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AspNet5ServerCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AspNet5ServerCodegen.java @@ -11,6 +11,8 @@ import java.util.*; public class AspNet5ServerCodegen extends AbstractCSharpCodegen { + protected String sourceFolder = "src" + File.separator + packageName; + @SuppressWarnings("hiding") protected Logger LOGGER = LoggerFactory.getLogger(AspNet5ServerCodegen.class); diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java index 1212795e1bb..c30bae257a1 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java @@ -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); @@ -439,4 +455,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(); + } } diff --git a/modules/swagger-codegen/src/main/resources/csharp/Project.mustache b/modules/swagger-codegen/src/main/resources/csharp/Project.mustache index d38e5d92d1e..141d541a5b5 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/Project.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/Project.mustache @@ -39,8 +39,6 @@ - - @@ -48,18 +46,23 @@ - False - {{binRelativePath}}/Newtonsoft.Json.8.0.2/lib/{{targetFrameworkNuget}}/Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll + {{binRelativePath}}\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll - {{binRelativePath}}/RestSharp.105.2.3/lib/{{targetFrameworkNuget}}/RestSharp.dll + $(SolutionDir)\packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll + ..\packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll + ..\..\packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll + {{binRelativePath}}\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll - - - - + + + + diff --git a/modules/swagger-codegen/src/main/resources/csharp/README.mustache b/modules/swagger-codegen/src/main/resources/csharp/README.mustache index 06660a3c615..56b36dcc6a7 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/README.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/README.mustache @@ -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 diff --git a/modules/swagger-codegen/src/main/resources/csharp/Solution.mustache b/modules/swagger-codegen/src/main/resources/csharp/Solution.mustache new file mode 100644 index 00000000000..57f6201600f --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/csharp/Solution.mustache @@ -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 \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/csharp/TestProject.mustache b/modules/swagger-codegen/src/main/resources/csharp/TestProject.mustache new file mode 100644 index 00000000000..0e0bd6c1671 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/csharp/TestProject.mustache @@ -0,0 +1,81 @@ + + + + Debug + AnyCPU + {19F1DEBC-DE5E-4517-8062-F000CD499087} + Library + Properties + {{testPackageName}} + {{testPackageName}} + {{^supportsUWP}} + {{targetFramework}} + {{/supportsUWP}} + {{#supportsUWP}} + UAP + 10.0.10240.0 + 10.0.10240.0 + 14 + {{/supportsUWP}} + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + $(SolutionDir)\packages\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll + {{binRelativePath}}\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll + + + $(SolutionDir)\packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll + ..\packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll + ..\..\packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll + {{binRelativePath}}\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll + + + $(SolutionDir)\packages\NUnit.2.6.3\lib\nunit.framework.dll + ..\packages\NUnit.2.6.3\lib\nunit.framework.dll + ..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll + {{binRelativePath}}\NUnit.2.6.3\lib\nunit.framework.dll + + + + + + + + + + + + {{packageGuid}} + {{packageName}} + + + + diff --git a/modules/swagger-codegen/src/main/resources/csharp/compile-mono.sh.mustache b/modules/swagger-codegen/src/main/resources/csharp/compile-mono.sh.mustache index b1b0c4f0c73..f93437eb0c8 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/compile-mono.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/compile-mono.sh.mustache @@ -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 diff --git a/modules/swagger-codegen/src/main/resources/csharp/compile.mustache b/modules/swagger-codegen/src/main/resources/csharp/compile.mustache index 76b94cad5a1..7f6dcfe0713 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/compile.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/compile.mustache @@ -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 diff --git a/modules/swagger-codegen/src/main/resources/csharp/packages_test.config.mustache b/modules/swagger-codegen/src/main/resources/csharp/packages_test.config.mustache new file mode 100644 index 00000000000..5464714bcef --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/csharp/packages_test.config.mustache @@ -0,0 +1,6 @@ + + + + + + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/.gitignore b/samples/client/petstore/csharp/SwaggerClient/.gitignore similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/.gitignore rename to samples/client/petstore/csharp/SwaggerClient/.gitignore diff --git a/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln b/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln new file mode 100644 index 00000000000..08cd5875c2e --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln @@ -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", "{27FD0ED8-0F4A-458A-B564-6BFC0A02B9C9}" +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 +{27FD0ED8-0F4A-458A-B564-6BFC0A02B9C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{27FD0ED8-0F4A-458A-B564-6BFC0A02B9C9}.Debug|Any CPU.Build.0 = Debug|Any CPU +{27FD0ED8-0F4A-458A-B564-6BFC0A02B9C9}.Release|Any CPU.ActiveCfg = Release|Any CPU +{27FD0ED8-0F4A-458A-B564-6BFC0A02B9C9}.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 \ No newline at end of file diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/README.md b/samples/client/petstore/csharp/SwaggerClient/README.md similarity index 85% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/README.md rename to samples/client/petstore/csharp/SwaggerClient/README.md index aceb18e3396..174b3292633 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/README.md +++ b/samples/client/petstore/csharp/SwaggerClient/README.md @@ -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-27T22:04:12.906+08:00 +- Build date: 2016-05-01T20:17:48.968-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 { @@ -54,7 +54,7 @@ namespace Example { var apiInstance = new FakeApi(); - var number = number_example; // string | None + var number = 3.4; // double? | None var _double = 1.2; // double? | None var _string = _string_example; // string | None var _byte = B; // byte[] | None @@ -112,33 +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.EnumClass](docs/EnumClass.md) - - [IO.Swagger.Model.EnumTest](docs/EnumTest.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 @@ -148,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 + diff --git a/samples/client/petstore/csharp/SwaggerClient/build.bat b/samples/client/petstore/csharp/SwaggerClient/build.bat new file mode 100644 index 00000000000..80a13e48231 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/build.bat @@ -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 diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/compile-mono.sh b/samples/client/petstore/csharp/SwaggerClient/build.sh old mode 100755 new mode 100644 similarity index 56% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/compile-mono.sh rename to samples/client/petstore/csharp/SwaggerClient/build.sh index d768c892f31..159673fd60c --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/compile-mono.sh +++ b/samples/client/petstore/csharp/SwaggerClient/build.sh @@ -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 diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Animal.md b/samples/client/petstore/csharp/SwaggerClient/docs/Animal.md similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Animal.md rename to samples/client/petstore/csharp/SwaggerClient/docs/Animal.md diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/ApiResponse.md b/samples/client/petstore/csharp/SwaggerClient/docs/ApiResponse.md similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/ApiResponse.md rename to samples/client/petstore/csharp/SwaggerClient/docs/ApiResponse.md diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Cat.md b/samples/client/petstore/csharp/SwaggerClient/docs/Cat.md similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Cat.md rename to samples/client/petstore/csharp/SwaggerClient/docs/Cat.md diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Category.md b/samples/client/petstore/csharp/SwaggerClient/docs/Category.md similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Category.md rename to samples/client/petstore/csharp/SwaggerClient/docs/Category.md diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Dog.md b/samples/client/petstore/csharp/SwaggerClient/docs/Dog.md similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Dog.md rename to samples/client/petstore/csharp/SwaggerClient/docs/Dog.md diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md new file mode 100644 index 00000000000..ae9fd8c3d36 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md @@ -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 (double? 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 = 3.4; // double? | 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** | **double?**| 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) + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/FormatTest.md b/samples/client/petstore/csharp/SwaggerClient/docs/FormatTest.md similarity index 95% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/FormatTest.md rename to samples/client/petstore/csharp/SwaggerClient/docs/FormatTest.md index c5dc3cf53f3..2672fee238c 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/FormatTest.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/FormatTest.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **Binary** | **byte[]** | | [optional] **Date** | **DateTime?** | | **DateTime** | **DateTime?** | | [optional] +**Uuid** | **Guid** | | [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) diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Model200Response.md b/samples/client/petstore/csharp/SwaggerClient/docs/Model200Response.md similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Model200Response.md rename to samples/client/petstore/csharp/SwaggerClient/docs/Model200Response.md diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/ModelReturn.md b/samples/client/petstore/csharp/SwaggerClient/docs/ModelReturn.md similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/ModelReturn.md rename to samples/client/petstore/csharp/SwaggerClient/docs/ModelReturn.md diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Name.md b/samples/client/petstore/csharp/SwaggerClient/docs/Name.md similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Name.md rename to samples/client/petstore/csharp/SwaggerClient/docs/Name.md diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Order.md b/samples/client/petstore/csharp/SwaggerClient/docs/Order.md similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Order.md rename to samples/client/petstore/csharp/SwaggerClient/docs/Order.md diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Pet.md b/samples/client/petstore/csharp/SwaggerClient/docs/Pet.md similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Pet.md rename to samples/client/petstore/csharp/SwaggerClient/docs/Pet.md diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/PetApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/PetApi.md similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/PetApi.md rename to samples/client/petstore/csharp/SwaggerClient/docs/PetApi.md diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/SpecialModelName.md b/samples/client/petstore/csharp/SwaggerClient/docs/SpecialModelName.md similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/SpecialModelName.md rename to samples/client/petstore/csharp/SwaggerClient/docs/SpecialModelName.md diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/StoreApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/StoreApi.md similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/StoreApi.md rename to samples/client/petstore/csharp/SwaggerClient/docs/StoreApi.md diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Tag.md b/samples/client/petstore/csharp/SwaggerClient/docs/Tag.md similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Tag.md rename to samples/client/petstore/csharp/SwaggerClient/docs/Tag.md diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/User.md b/samples/client/petstore/csharp/SwaggerClient/docs/User.md similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/User.md rename to samples/client/petstore/csharp/SwaggerClient/docs/User.md diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/UserApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/UserApi.md similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/UserApi.md rename to samples/client/petstore/csharp/SwaggerClient/docs/UserApi.md diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/git_push.sh b/samples/client/petstore/csharp/SwaggerClient/git_push.sh similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/git_push.sh rename to samples/client/petstore/csharp/SwaggerClient/git_push.sh diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/FakeApiTests.cs new file mode 100644 index 00000000000..478311b649e --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/FakeApiTests.cs @@ -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 +{ + /// + /// Class for testing FakeApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class FakeApiTests + { + private FakeApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new FakeApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of FakeApi + /// + [Test] + public void InstanceTest() + { + Assert.IsInstanceOf (instance, "instance is a FakeApi"); + } + + + /// + /// Test TestEndpointParameters + /// + [Test] + public void TestEndpointParametersTest() + { + // TODO: add unit test for the method 'TestEndpointParameters' + double? 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); + + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/PetApiTests.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/PetApiTests.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/StoreApiTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/StoreApiTests.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/StoreApiTests.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/StoreApiTests.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserApiTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/UserApiTests.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserApiTests.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/UserApiTests.cs diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj new file mode 100644 index 00000000000..618cc188575 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj @@ -0,0 +1,73 @@ + + + + Debug + AnyCPU + {19F1DEBC-DE5E-4517-8062-F000CD499087} + Library + Properties + IO.Swagger.Test + IO.Swagger.Test + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + $(SolutionDir)\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + + + $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll + + + $(SolutionDir)\packages\NUnit.2.6.3\lib\nunit.framework.dll + ..\packages\NUnit.2.6.3\lib\nunit.framework.dll + ..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll + ..\..\vendor\NUnit.2.6.3\lib\nunit.framework.dll + + + + + + + + + + + + {27FD0ED8-0F4A-458A-B564-6BFC0A02B9C9} + IO.Swagger + + + + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/AnimalTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AnimalTests.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/AnimalTests.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AnimalTests.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/ApiResponseTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ApiResponseTests.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/ApiResponseTests.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ApiResponseTests.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/CatTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/CatTests.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/CatTests.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/CatTests.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/CategoryTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/CategoryTests.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/CategoryTests.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/CategoryTests.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/DogTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/DogTests.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/DogTests.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/DogTests.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/FormatTestTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/FormatTestTests.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/FormatTestTests.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/FormatTestTests.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/Model200ResponseTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/Model200ResponseTests.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/Model200ResponseTests.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/Model200ResponseTests.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/ModelReturnTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ModelReturnTests.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/ModelReturnTests.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ModelReturnTests.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/NameTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/NameTests.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/NameTests.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/NameTests.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/OrderTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/OrderTests.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/OrderTests.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/OrderTests.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetTests.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetTests.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetTests.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/SpecialModelNameTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/SpecialModelNameTests.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/SpecialModelNameTests.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/SpecialModelNameTests.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/TagTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/TagTests.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/TagTests.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/TagTests.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/UserTests.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserTests.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/UserTests.cs diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/packages.config b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/packages.config new file mode 100644 index 00000000000..a8a3491f63d --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/packages.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs new file mode 100644 index 00000000000..1c92dc3bbda --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs @@ -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 +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFakeApi + { + #region Synchronous Operations + /// + /// Fake endpoint for testing various parameters + /// + /// + /// Fake endpoint for testing various parameters + /// + /// Thrown when fails to make API call + /// None + /// None + /// None + /// None + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// + void TestEndpointParameters (double? 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 + /// + /// Thrown when fails to make API call + /// None + /// None + /// None + /// None + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// ApiResponse of Object(void) + ApiResponse TestEndpointParametersWithHttpInfo (double? 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 + /// + /// Fake endpoint for testing various parameters + /// + /// + /// Fake endpoint for testing various parameters + /// + /// Thrown when fails to make API call + /// None + /// None + /// None + /// None + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// Task of void + System.Threading.Tasks.Task TestEndpointParametersAsync (double? 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 + /// + /// Thrown when fails to make API call + /// None + /// None + /// None + /// None + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (double? 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 + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public class FakeApi : IFakeApi + { + /// + /// Initializes a new instance of the class. + /// + /// + 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; + } + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + 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; + } + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() + { + return this.Configuration.DefaultHeader; + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// Fake endpoint for testing various parameters Fake endpoint for testing various parameters + /// + /// Thrown when fails to make API call + /// None + /// None + /// None + /// None + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// + public void TestEndpointParameters (double? 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); + } + + /// + /// Fake endpoint for testing various parameters Fake endpoint for testing various parameters + /// + /// Thrown when fails to make API call + /// None + /// None + /// None + /// None + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// ApiResponse of Object(void) + public ApiResponse TestEndpointParametersWithHttpInfo (double? 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(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + 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(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Fake endpoint for testing various parameters Fake endpoint for testing various parameters + /// + /// Thrown when fails to make API call + /// None + /// None + /// None + /// None + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// Task of void + public async System.Threading.Tasks.Task TestEndpointParametersAsync (double? 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); + + } + + /// + /// Fake endpoint for testing various parameters Fake endpoint for testing various parameters + /// + /// Thrown when fails to make API call + /// None + /// None + /// None + /// None + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (double? 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(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + 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(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/PetApi.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/PetApi.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/StoreApi.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/StoreApi.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/StoreApi.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/StoreApi.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/UserApi.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/UserApi.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/UserApi.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/UserApi.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiClient.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiClient.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiClient.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiClient.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiException.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiException.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiException.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiException.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiResponse.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiResponse.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiResponse.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiResponse.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/Configuration.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/Configuration.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/Configuration.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/Configuration.cs diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj new file mode 100644 index 00000000000..36e6f0008e9 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj @@ -0,0 +1,61 @@ + + + + Debug + AnyCPU + {27FD0ED8-0F4A-458A-B564-6BFC0A02B9C9} + Library + Properties + Swagger Library + Swagger Library + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + $(SolutionDir)\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + + + $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll + + + + + + + + + + + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Animal.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Animal.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Animal.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Animal.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/ApiResponse.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ApiResponse.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/ApiResponse.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ApiResponse.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Cat.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Cat.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Cat.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Cat.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Category.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Category.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Category.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Category.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Dog.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Dog.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Dog.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Dog.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/FormatTest.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs similarity index 85% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/FormatTest.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs index c5a99d45af0..49e7d1041aa 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs @@ -12,13 +12,15 @@ using Newtonsoft.Json.Converters; namespace IO.Swagger.Model { /// - /// FormatTest + /// /// [DataContract] public partial class FormatTest : IEquatable - { + { + /// /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Integer. /// Int32. @@ -31,8 +33,10 @@ namespace IO.Swagger.Model /// Binary. /// Date (required). /// DateTime. + /// Uuid. /// Password (required). - 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) + + 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, Guid? Uuid = null, string Password = null) { // to ensure "Number" is required (not null) if (Number == null) @@ -70,86 +74,97 @@ namespace IO.Swagger.Model { this.Password = Password; } - - - this.Integer = Integer; - - this.Int32 = Int32; - - this.Int64 = Int64; - - this._Float = _Float; - - this._Double = _Double; - - this._String = _String; - - this.Binary = Binary; - - this.DateTime = DateTime; + this.Integer = Integer; + this.Int32 = Int32; + this.Int64 = Int64; + this._Float = _Float; + this._Double = _Double; + this._String = _String; + this.Binary = Binary; + this.DateTime = DateTime; + this.Uuid = Uuid; } - + + /// /// Gets or Sets Integer /// [DataMember(Name="integer", EmitDefaultValue=false)] public int? Integer { get; set; } + /// /// Gets or Sets Int32 /// [DataMember(Name="int32", EmitDefaultValue=false)] public int? Int32 { get; set; } + /// /// Gets or Sets Int64 /// [DataMember(Name="int64", EmitDefaultValue=false)] public long? Int64 { get; set; } + /// /// Gets or Sets Number /// [DataMember(Name="number", EmitDefaultValue=false)] public double? Number { get; set; } + /// /// Gets or Sets _Float /// [DataMember(Name="float", EmitDefaultValue=false)] public float? _Float { get; set; } + /// /// Gets or Sets _Double /// [DataMember(Name="double", EmitDefaultValue=false)] public double? _Double { get; set; } + /// /// Gets or Sets _String /// [DataMember(Name="string", EmitDefaultValue=false)] public string _String { get; set; } + /// /// Gets or Sets _Byte /// [DataMember(Name="byte", EmitDefaultValue=false)] public byte[] _Byte { get; set; } + /// /// Gets or Sets Binary /// [DataMember(Name="binary", EmitDefaultValue=false)] public byte[] Binary { get; set; } + /// /// Gets or Sets Date /// [DataMember(Name="date", EmitDefaultValue=false)] public DateTime? Date { get; set; } + /// /// Gets or Sets DateTime /// [DataMember(Name="dateTime", EmitDefaultValue=false)] public DateTime? DateTime { get; set; } + + /// + /// Gets or Sets Uuid + /// + [DataMember(Name="uuid", EmitDefaultValue=false)] + public Guid? Uuid { get; set; } + /// /// Gets or Sets Password /// [DataMember(Name="password", EmitDefaultValue=false)] public string Password { get; set; } + /// /// Returns the string presentation of the object /// @@ -159,21 +174,22 @@ namespace IO.Swagger.Model var sb = new StringBuilder(); sb.Append("class FormatTest {\n"); sb.Append(" Integer: ").Append(Integer).Append("\n"); -sb.Append(" Int32: ").Append(Int32).Append("\n"); -sb.Append(" Int64: ").Append(Int64).Append("\n"); -sb.Append(" Number: ").Append(Number).Append("\n"); -sb.Append(" _Float: ").Append(_Float).Append("\n"); -sb.Append(" _Double: ").Append(_Double).Append("\n"); -sb.Append(" _String: ").Append(_String).Append("\n"); -sb.Append(" _Byte: ").Append(_Byte).Append("\n"); -sb.Append(" Binary: ").Append(Binary).Append("\n"); -sb.Append(" Date: ").Append(Date).Append("\n"); -sb.Append(" DateTime: ").Append(DateTime).Append("\n"); -sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Int32: ").Append(Int32).Append("\n"); + sb.Append(" Int64: ").Append(Int64).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" _Float: ").Append(_Float).Append("\n"); + sb.Append(" _Double: ").Append(_Double).Append("\n"); + sb.Append(" _String: ").Append(_String).Append("\n"); + sb.Append(" _Byte: ").Append(_Byte).Append("\n"); + sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// /// Returns the JSON string presentation of the object /// @@ -261,6 +277,11 @@ sb.Append(" Password: ").Append(Password).Append("\n"); this.DateTime != null && this.DateTime.Equals(other.DateTime) ) && + ( + this.Uuid == other.Uuid || + this.Uuid != null && + this.Uuid.Equals(other.Uuid) + ) && ( this.Password == other.Password || this.Password != null && @@ -301,11 +322,13 @@ sb.Append(" Password: ").Append(Password).Append("\n"); hash = hash * 59 + this.Date.GetHashCode(); if (this.DateTime != null) hash = hash * 59 + this.DateTime.GetHashCode(); + if (this.Uuid != null) + hash = hash * 59 + this.Uuid.GetHashCode(); if (this.Password != null) hash = hash * 59 + this.Password.GetHashCode(); return hash; } } - } + } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Model200Response.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Model200Response.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Model200Response.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Model200Response.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/ModelReturn.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ModelReturn.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/ModelReturn.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ModelReturn.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Name.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Name.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Order.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Order.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Order.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Order.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Pet.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Pet.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Pet.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Pet.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/SpecialModelName.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/SpecialModelName.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/SpecialModelName.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/SpecialModelName.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Tag.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Tag.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Tag.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Tag.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/User.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/User.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/User.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/User.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Properties/AssemblyInfo.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Properties/AssemblyInfo.cs similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Properties/AssemblyInfo.cs rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Properties/AssemblyInfo.cs diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/vendor/packages.config b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/packages.config similarity index 100% rename from samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/vendor/packages.config rename to samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/packages.config diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/InlineResponse200Tests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/InlineResponse200Tests.cs deleted file mode 100644 index a4930b02df3..00000000000 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/InlineResponse200Tests.cs +++ /dev/null @@ -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 -{ - /// - /// Class for testing InlineResponse200 - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the model. - /// - [TestFixture] - public class InlineResponse200Tests - { - private InlineResponse200 instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - instance = new InlineResponse200(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of InlineResponse200 - /// - [Test] - public void InlineResponse200InstanceTest() - { - Assert.IsInstanceOf (instance, "instance is a InlineResponse200"); - } - - /// - /// Test the property 'PhotoUrls' - /// - [Test] - public void PhotoUrlsTest() - { - // TODO: unit test for the property 'PhotoUrls' - } - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO: unit test for the property 'Name' - } - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO: unit test for the property 'Id' - } - /// - /// Test the property 'Category' - /// - [Test] - public void CategoryTest() - { - // TODO: unit test for the property 'Category' - } - /// - /// Test the property 'Tags' - /// - [Test] - public void TagsTest() - { - // TODO: unit test for the property 'Tags' - } - /// - /// Test the property 'Status' - /// - [Test] - public void StatusTest() - { - // TODO: unit test for the property 'Status' - } - - } - -} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/README.mustache b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/README.mustache deleted file mode 100644 index d5f5ce413b3..00000000000 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/README.mustache +++ /dev/null @@ -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 http://swagger.io 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=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=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=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=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 - - diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/bin/Newtonsoft.Json.dll b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/bin/Newtonsoft.Json.dll deleted file mode 100644 index 4d42dd9c5fe..00000000000 Binary files a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/bin/Newtonsoft.Json.dll and /dev/null differ diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/bin/RestSharp.dll b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/bin/RestSharp.dll deleted file mode 100644 index 59d82f94198..00000000000 Binary files a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/bin/RestSharp.dll and /dev/null differ diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/compile.bat b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/compile.bat deleted file mode 100644 index 8d07d021131..00000000000 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/compile.bat +++ /dev/null @@ -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 diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/InlineResponse200.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/InlineResponse200.md deleted file mode 100644 index 6380096b06b..00000000000 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/InlineResponse200.md +++ /dev/null @@ -1,14 +0,0 @@ -# InlineResponse200 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**PhotoUrls** | **List<string>** | | [optional] -**Name** | **string** | | [optional] -**Id** | **long?** | | -**Category** | **Object** | | [optional] -**Tags** | [**List<Tag>**](Tag.md) | | [optional] -**Status** | **string** | pet status in the store | [optional] - - diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/petstore b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/petstore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/InlineResponse200.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/InlineResponse200.cs deleted file mode 100644 index 32d3db25e58..00000000000 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/InlineResponse200.cs +++ /dev/null @@ -1,235 +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.ComponentModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace IO.Swagger.Model -{ - /// - /// InlineResponse200 - /// - [DataContract] - public partial class InlineResponse200 : IEquatable - { - /// - /// pet status in the store - /// - /// pet status in the store - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - - /// - /// Enum Available for "available" - /// - [EnumMember(Value = "available")] - Available, - - /// - /// Enum Pending for "pending" - /// - [EnumMember(Value = "pending")] - Pending, - - /// - /// Enum Sold for "sold" - /// - [EnumMember(Value = "sold")] - Sold - } - - - /// - /// pet status in the store - /// - /// pet status in the store - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - - /// - /// Initializes a new instance of the class. - /// Initializes a new instance of the class. - /// - /// Tags. - /// Id (required). - /// Category. - /// pet status in the store. - /// Name. - /// PhotoUrls. - - public InlineResponse200(List Tags = null, long? Id = null, Object Category = null, StatusEnum? Status = null, string Name = null, List PhotoUrls = 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.Tags = Tags; - this.Category = Category; - this.Status = Status; - this.Name = Name; - this.PhotoUrls = PhotoUrls; - - } - - - /// - /// Gets or Sets Tags - /// - [DataMember(Name="tags", EmitDefaultValue=false)] - public List Tags { get; set; } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long? Id { get; set; } - - /// - /// Gets or Sets Category - /// - [DataMember(Name="category", EmitDefaultValue=false)] - public Object Category { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Gets or Sets PhotoUrls - /// - [DataMember(Name="photoUrls", EmitDefaultValue=false)] - public List PhotoUrls { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class InlineResponse200 {\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as InlineResponse200); - } - - /// - /// Returns true if InlineResponse200 instances are equal - /// - /// Instance of InlineResponse200 to be compared - /// Boolean - public bool Equals(InlineResponse200 other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.Tags == other.Tags || - this.Tags != null && - this.Tags.SequenceEqual(other.Tags) - ) && - ( - 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.Status == other.Status || - this.Status != null && - this.Status.Equals(other.Status) - ) && - ( - this.Name == other.Name || - this.Name != null && - this.Name.Equals(other.Name) - ) && - ( - this.PhotoUrls == other.PhotoUrls || - this.PhotoUrls != null && - this.PhotoUrls.SequenceEqual(other.PhotoUrls) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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.Tags != null) - hash = hash * 59 + this.Tags.GetHashCode(); - - if (this.Id != null) - hash = hash * 59 + this.Id.GetHashCode(); - - if (this.Category != null) - hash = hash * 59 + this.Category.GetHashCode(); - - if (this.Status != null) - hash = hash * 59 + this.Status.GetHashCode(); - - if (this.Name != null) - hash = hash * 59 + this.Name.GetHashCode(); - - if (this.PhotoUrls != null) - hash = hash * 59 + this.PhotoUrls.GetHashCode(); - - return hash; - } - } - } - -} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/ObjectReturn.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/ObjectReturn.cs deleted file mode 100644 index 1ea3dea45c5..00000000000 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/ObjectReturn.cs +++ /dev/null @@ -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 -{ - /// - /// - /// - [DataContract] - public partial class ObjectReturn : IEquatable - { - - /// - /// Initializes a new instance of the class. - /// Initializes a new instance of the class. - /// - /// _Return. - - public ObjectReturn(int? _Return = null) - { - this._Return = _Return; - - } - - - /// - /// Gets or Sets _Return - /// - [DataMember(Name="return", EmitDefaultValue=false)] - public int? _Return { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - 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(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as ObjectReturn); - } - - /// - /// Returns true if ObjectReturn instances are equal - /// - /// Instance of ObjectReturn to be compared - /// Boolean - 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) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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; - } - } - - } -} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Task.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Task.cs deleted file mode 100644 index b2182f2f712..00000000000 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Task.cs +++ /dev/null @@ -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 -{ - /// - /// - /// - [DataContract] - public partial class Task : IEquatable - { - - /// - /// Initializes a new instance of the class. - /// Initializes a new instance of the class. - /// - /// _Return. - - public Task(int? _Return = null) - { - this._Return = _Return; - - } - - - /// - /// Gets or Sets _Return - /// - [DataMember(Name="return", EmitDefaultValue=false)] - public int? _Return { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - 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(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as Task); - } - - /// - /// Returns true if Task instances are equal - /// - /// Instance of Task to be compared - /// Boolean - 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) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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; - } - } - - } -} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.csproj b/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.csproj index 389c142e1bd..a093c8f2ebf 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.csproj +++ b/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.csproj @@ -30,7 +30,10 @@ - Lib\SwaggerClient\bin\Newtonsoft.Json.dll + packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + + + packages\RestSharp.105.1.0\lib\net45\RestSharp.dll @@ -38,27 +41,13 @@ packages\NUnit.2.6.4\lib\nunit.framework.dll - - Lib\SwaggerClient\bin\RestSharp.dll - - - - - - - - - - - - - +<<<<<<< HEAD @@ -74,20 +63,26 @@ +======= +>>>>>>> 9b1d43c6f539add1b436ea52f5351125c2da7f3a - - - + + - - + + + + {0862164F-97E9-4226-B458-E09905B21F2F} + IO.Swagger + + \ No newline at end of file diff --git a/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.sln b/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.sln index dfb6e762ce2..5274859c30a 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.sln +++ b/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.sln @@ -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 diff --git a/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.userprefs b/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.userprefs index eb976117be8..65a0da9f040 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.userprefs +++ b/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.userprefs @@ -1,12 +1,18 @@  - + - - - - + + + + + + + + + + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.csproj.FilesWrittenAbsolute.txt b/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.csproj.FilesWrittenAbsolute.txt new file mode 100644 index 00000000000..8e1a7e18f36 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.csproj.FilesWrittenAbsolute.txt @@ -0,0 +1,11 @@ +/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 diff --git a/samples/client/petstore/csharp/SwaggerClientTest/packages.config b/samples/client/petstore/csharp/SwaggerClientTest/packages.config index 09300da2fcd..0a536655794 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/packages.config +++ b/samples/client/petstore/csharp/SwaggerClientTest/packages.config @@ -1,4 +1,6 @@  + + \ No newline at end of file diff --git a/samples/client/petstore/csharp/SwaggerClientTest/packages/repositories.config b/samples/client/petstore/csharp/SwaggerClientTest/packages/repositories.config index ba8d0d576a8..c109c8ad2e5 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/packages/repositories.config +++ b/samples/client/petstore/csharp/SwaggerClientTest/packages/repositories.config @@ -1,4 +1,5 @@ - - - + + + + \ No newline at end of file