mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-06 07:31:01 +00:00
[C#] Add C# Petstore test to AppVeyor (#3489)
* update appveyor.yml to test c# petstore client * update csproj file * add docker version test * add docker version * add docker * add cpuid.ps1 * comment out cpuid * use start process * remove mvn test * remove comments related to docker * fix appveyor to run local petstore, shippable caching turned on * add comments to ci config * remove cpuid.ps1 * update C# petstore sample
This commit is contained in:
parent
75cd4bf437
commit
3d7ff26c67
11
appveyor.yml
11
appveyor.yml
@ -1,7 +1,9 @@
|
|||||||
# for CI with appveyor.yml
|
# for CI with appveyor.yml
|
||||||
# Ref: http://www.yegor256.com/2015/01/10/windows-appveyor-maven.html
|
# Ref: http://www.yegor256.com/2015/01/10/windows-appveyor-maven.html
|
||||||
version: '{build}'
|
version: '{branch}-{build}'
|
||||||
os: Windows Server 2012
|
os: Windows Server 2012
|
||||||
|
hosts:
|
||||||
|
petstore.swagger.io: 127.0.0.1
|
||||||
install:
|
install:
|
||||||
- ps: |
|
- ps: |
|
||||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||||
@ -15,9 +17,16 @@ install:
|
|||||||
- cmd: SET PATH=C:\maven\apache-maven-3.2.5\bin;%JAVA_HOME%\bin;%PATH%
|
- cmd: SET PATH=C:\maven\apache-maven-3.2.5\bin;%JAVA_HOME%\bin;%PATH%
|
||||||
- cmd: SET MAVEN_OPTS=-XX:MaxPermSize=2g -Xmx4g
|
- cmd: SET MAVEN_OPTS=-XX:MaxPermSize=2g -Xmx4g
|
||||||
- cmd: SET JAVA_OPTS=-XX:MaxPermSize=2g -Xmx4g
|
- cmd: SET JAVA_OPTS=-XX:MaxPermSize=2g -Xmx4g
|
||||||
|
- git clone https://github.com/wing328/swagger-samples
|
||||||
|
- ps: Start-Process -FilePath 'C:\maven\apache-maven-3.2.5\bin\mvn' -ArgumentList 'jetty:run' -WorkingDirectory "$env:appveyor_build_folder\swagger-samples\java\java-jersey-jaxrs"
|
||||||
build_script:
|
build_script:
|
||||||
|
- nuget restore samples\client\petstore\csharp\SwaggerClient\IO.Swagger.sln
|
||||||
|
- msbuild samples\client\petstore\csharp\SwaggerClient\IO.Swagger.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||||
- mvn clean install --batch-mode
|
- mvn clean install --batch-mode
|
||||||
test_script:
|
test_script:
|
||||||
|
# test c# API client
|
||||||
|
- nunit-console samples\client\petstore\csharp\SwaggerClient\src\IO.Swagger.Test\bin\Debug\IO.Swagger.Test.dll --result=myresults.xml;format=AppVeyor
|
||||||
|
# generate all petstore clients
|
||||||
- .\bin\windows\run-all-petstore.cmd
|
- .\bin\windows\run-all-petstore.cmd
|
||||||
cache:
|
cache:
|
||||||
- C:\maven\
|
- C:\maven\
|
||||||
|
@ -147,39 +147,39 @@ UpgradeLog*.htm
|
|||||||
*.swp
|
*.swp
|
||||||
*.swo
|
*.swo
|
||||||
|
|
||||||
# svn
|
# svn
|
||||||
.svn
|
.svn
|
||||||
|
|
||||||
# SQL Server files
|
# SQL Server files
|
||||||
**/App_Data/*.mdf
|
**/App_Data/*.mdf
|
||||||
**/App_Data/*.ldf
|
**/App_Data/*.ldf
|
||||||
**/App_Data/*.sdf
|
**/App_Data/*.sdf
|
||||||
|
|
||||||
|
|
||||||
#LightSwitch generated files
|
#LightSwitch generated files
|
||||||
GeneratedArtifacts/
|
GeneratedArtifacts/
|
||||||
_Pvt_Extensions/
|
_Pvt_Extensions/
|
||||||
ModelManifest.xml
|
ModelManifest.xml
|
||||||
|
|
||||||
# =========================
|
# =========================
|
||||||
# Windows detritus
|
# Windows detritus
|
||||||
# =========================
|
# =========================
|
||||||
|
|
||||||
# Windows image file caches
|
# Windows image file caches
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
ehthumbs.db
|
ehthumbs.db
|
||||||
|
|
||||||
# Folder config file
|
# Folder config file
|
||||||
Desktop.ini
|
Desktop.ini
|
||||||
|
|
||||||
# Recycle Bin used on file shares
|
# Recycle Bin used on file shares
|
||||||
$RECYCLE.BIN/
|
$RECYCLE.BIN/
|
||||||
|
|
||||||
# Mac desktop service store files
|
# Mac desktop service store files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
# SASS Compiler cache
|
# SASS Compiler cache
|
||||||
.sass-cache
|
.sass-cache
|
||||||
|
|
||||||
# Visual Studio 2014 CTP
|
# Visual Studio 2014 CTP
|
||||||
**/*.sln.ide
|
**/*.sln.ide
|
||||||
|
@ -147,39 +147,39 @@ UpgradeLog*.htm
|
|||||||
*.swp
|
*.swp
|
||||||
*.swo
|
*.swo
|
||||||
|
|
||||||
# svn
|
# svn
|
||||||
.svn
|
.svn
|
||||||
|
|
||||||
# SQL Server files
|
# SQL Server files
|
||||||
**/App_Data/*.mdf
|
**/App_Data/*.mdf
|
||||||
**/App_Data/*.ldf
|
**/App_Data/*.ldf
|
||||||
**/App_Data/*.sdf
|
**/App_Data/*.sdf
|
||||||
|
|
||||||
|
|
||||||
#LightSwitch generated files
|
#LightSwitch generated files
|
||||||
GeneratedArtifacts/
|
GeneratedArtifacts/
|
||||||
_Pvt_Extensions/
|
_Pvt_Extensions/
|
||||||
ModelManifest.xml
|
ModelManifest.xml
|
||||||
|
|
||||||
# =========================
|
# =========================
|
||||||
# Windows detritus
|
# Windows detritus
|
||||||
# =========================
|
# =========================
|
||||||
|
|
||||||
# Windows image file caches
|
# Windows image file caches
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
ehthumbs.db
|
ehthumbs.db
|
||||||
|
|
||||||
# Folder config file
|
# Folder config file
|
||||||
Desktop.ini
|
Desktop.ini
|
||||||
|
|
||||||
# Recycle Bin used on file shares
|
# Recycle Bin used on file shares
|
||||||
$RECYCLE.BIN/
|
$RECYCLE.BIN/
|
||||||
|
|
||||||
# Mac desktop service store files
|
# Mac desktop service store files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
# SASS Compiler cache
|
# SASS Compiler cache
|
||||||
.sass-cache
|
.sass-cache
|
||||||
|
|
||||||
# Visual Studio 2014 CTP
|
# Visual Studio 2014 CTP
|
||||||
**/*.sln.ide
|
**/*.sln.ide
|
||||||
|
@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||||||
# Visual Studio 2012
|
# Visual Studio 2012
|
||||||
VisualStudioVersion = 12.0.0.0
|
VisualStudioVersion = 12.0.0.0
|
||||||
MinimumVisualStudioVersion = 10.0.0.1
|
MinimumVisualStudioVersion = 10.0.0.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{C95ADC68-F3D8-41D1-BA8A-6C0754E6BB54}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{F616AC0A-13D9-4D7E-ACE1-93E41B628F88}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
|
||||||
EndProject
|
EndProject
|
||||||
@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU
|
|||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{C95ADC68-F3D8-41D1-BA8A-6C0754E6BB54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{F616AC0A-13D9-4D7E-ACE1-93E41B628F88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{C95ADC68-F3D8-41D1-BA8A-6C0754E6BB54}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{F616AC0A-13D9-4D7E-ACE1-93E41B628F88}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{C95ADC68-F3D8-41D1-BA8A-6C0754E6BB54}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{F616AC0A-13D9-4D7E-ACE1-93E41B628F88}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{C95ADC68-F3D8-41D1-BA8A-6C0754E6BB54}.Release|Any CPU.Build.0 = Release|Any CPU
|
{F616AC0A-13D9-4D7E-ACE1-93E41B628F88}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
@ -6,7 +6,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c
|
|||||||
|
|
||||||
- API version: 1.0.0
|
- API version: 1.0.0
|
||||||
- SDK version: 1.0.0
|
- SDK version: 1.0.0
|
||||||
- Build date: 2016-07-26T14:25:16.509+08:00
|
- Build date: 2016-07-31T22:04:18.446+08:00
|
||||||
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
|
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
|
||||||
|
|
||||||
## Frameworks supported
|
## Frameworks supported
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<!--
|
<!--
|
||||||
Swagger Petstore
|
Swagger Petstore
|
||||||
|
|
||||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
|
||||||
OpenAPI spec version: 1.0.0
|
OpenAPI spec version: 1.0.0
|
||||||
Contact: apiteam@swagger.io
|
Contact: apiteam@swagger.io
|
||||||
@ -71,10 +71,10 @@ limitations under the License.
|
|||||||
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="nunit.framework">
|
<Reference Include="nunit.framework">
|
||||||
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
|
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
|
||||||
<HintPath Condition="Exists('..\packages')">..\packages\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
|
<HintPath Condition="Exists('..\packages')">..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
|
||||||
<HintPath Condition="Exists('..\..\packages')">..\..\packages\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
|
<HintPath Condition="Exists('..\..\packages')">..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
|
||||||
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
|
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -86,7 +86,7 @@ limitations under the License.
|
|||||||
<Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\IO.Swagger\IO.Swagger.csproj">
|
<ProjectReference Include="..\IO.Swagger\IO.Swagger.csproj">
|
||||||
<Project>{85AE8212-9819-4224-A9E5-B93419EC927B}</Project>
|
<Project>{1230F4B8-71F8-4A8C-966F-2E10106EA239}</Project>
|
||||||
<Name>IO.Swagger</Name>
|
<Name>IO.Swagger</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -24,7 +24,7 @@ limitations under the License.
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<ProjectGuid>{C95ADC68-F3D8-41D1-BA8A-6C0754E6BB54}</ProjectGuid>
|
<ProjectGuid>{F616AC0A-13D9-4D7E-ACE1-93E41B628F88}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>IO.Swagger</RootNamespace>
|
<RootNamespace>IO.Swagger</RootNamespace>
|
||||||
|
@ -3,11 +3,13 @@ language: java
|
|||||||
jdk:
|
jdk:
|
||||||
- openjdk7
|
- openjdk7
|
||||||
- openjdk8
|
- openjdk8
|
||||||
- oraclejdk7
|
|
||||||
- oraclejdk8
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
cache: true
|
||||||
|
cache_dir_list:
|
||||||
|
- $HOME/.m2
|
||||||
ci:
|
ci:
|
||||||
- ./bin/run-all-petstore > run-all-petstore.log 2>&1
|
# generate all petstore sampless (client, servers, doc)
|
||||||
|
- ./bin/run-all-petstore 2>&1 > run-all-petstore.log
|
||||||
post_ci:
|
post_ci:
|
||||||
- tail run-all-petstore.log
|
- tail run-all-petstore.log
|
||||||
|
Loading…
x
Reference in New Issue
Block a user