Skip to content

Commit 0d913e6

Browse files
authored
add step to restore Org.OpenAPITools.Test.csproj (#420)
1 parent 5ae2d9b commit 0d913e6

File tree

4 files changed

+105
-3
lines changed

4 files changed

+105
-3
lines changed
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
OpenAPI Petstore
4+
5+
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
6+
7+
OpenAPI spec version: 1.0.0
8+
9+
-->
10+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
11+
<PropertyGroup>
12+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
13+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
14+
<ProjectGuid>{19F1DEBC-DE5E-4517-8062-F000CD499087}</ProjectGuid>
15+
<OutputType>Library</OutputType>
16+
<AppDesignerFolder>Properties</AppDesignerFolder>
17+
<RootNamespace>Org.OpenAPITools.Test</RootNamespace>
18+
<AssemblyName>Org.OpenAPITools.Test</AssemblyName>
19+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
20+
<FileAlignment>512</FileAlignment>
21+
</PropertyGroup>
22+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
23+
<DebugSymbols>true</DebugSymbols>
24+
<DebugType>full</DebugType>
25+
<Optimize>false</Optimize>
26+
<OutputPath>bin\Debug\</OutputPath>
27+
<DefineConstants>DEBUG;TRACE</DefineConstants>
28+
<ErrorReport>prompt</ErrorReport>
29+
<WarningLevel>4</WarningLevel>
30+
</PropertyGroup>
31+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
32+
<DebugType>pdbonly</DebugType>
33+
<Optimize>true</Optimize>
34+
<OutputPath>bin\Release\</OutputPath>
35+
<DefineConstants>TRACE</DefineConstants>
36+
<ErrorReport>prompt</ErrorReport>
37+
<WarningLevel>4</WarningLevel>
38+
</PropertyGroup>
39+
<ItemGroup>
40+
<Reference Include="System" />
41+
<Reference Include="System.Core" />
42+
<Reference Include="System.Xml.Linq" />
43+
<Reference Include="System.Data.DataSetExtensions" />
44+
<Reference Include="System.ComponentModel.DataAnnotations" />
45+
<Reference Include="Microsoft.CSharp" />
46+
<Reference Include="System.Data" />
47+
<Reference Include="System.Runtime.Serialization" />
48+
<Reference Include="System.Xml" />
49+
<Reference Include="Newtonsoft.Json">
50+
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
51+
<HintPath Condition="Exists('..\packages')">..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
52+
<HintPath Condition="Exists('..\..\packages')">..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
53+
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
54+
</Reference>
55+
<Reference Include="JsonSubTypes">
56+
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll</HintPath>
57+
<HintPath Condition="Exists('..\packages')">..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll</HintPath>
58+
<HintPath Condition="Exists('..\..\packages')">..\..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll</HintPath>
59+
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll</HintPath>
60+
</Reference>
61+
<Reference Include="RestSharp">
62+
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
63+
<HintPath Condition="Exists('..\packages')">..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
64+
<HintPath Condition="Exists('..\..\packages')">..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
65+
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
66+
</Reference>
67+
<Reference Include="nunit.framework">
68+
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
69+
<HintPath Condition="Exists('..\packages')">..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
70+
<HintPath Condition="Exists('..\..\packages')">..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
71+
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
72+
</Reference>
73+
</ItemGroup>
74+
<ItemGroup>
75+
<Compile Include="**\*.cs" Exclude="obj\**" />
76+
</ItemGroup>
77+
<ItemGroup>
78+
<None Include="packages.config" />
79+
</ItemGroup>
80+
<Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets" />
81+
<ItemGroup>
82+
<ProjectReference Include="..\Org.OpenAPITools\Org.OpenAPITools.csproj">
83+
<Project>{321C8C3F-0156-40C1-AE42-D59761FB9B6C}</Project>
84+
<Name>Org.OpenAPITools</Name>
85+
</ProjectReference>
86+
</ItemGroup>
87+
<ItemGroup>
88+
<EmbeddedResource Include="linux-logo.png" />
89+
</ItemGroup>
90+
</Project>
91+

bin/csharp-petstore.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,8 @@ fi
2929
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
3030
ags="generate $@ -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l csharp -o samples/client/petstore/csharp/OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C}"
3131

32+
# restore csproj file
33+
echo "restore csproject file: CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj"
34+
cp ./CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj ./samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/
35+
3236
java $JAVA_OPTS -jar $executable $ags

bin/windows/csharp-petstore.bat

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ If Not Exist %executable% (
55
)
66

77
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
8-
set ags=generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l csharp -o samples\client\petstore\csharp\SwaggerClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C}
8+
set ags=generate -i modules\openapi-generator\src\test/resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -l csharp -o samples\client\petstore\csharp\SwaggerClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C}
99

1010
java %JAVA_OPTS% -jar %executable% %ags%
11+
12+
# restore csproj file
13+
echo "restore csproject file: CI\samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj"
14+
copy .\CI\samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj .\samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\
15+

samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ OpenAPI spec version: 1.0.0
7272
</Reference>
7373
</ItemGroup>
7474
<ItemGroup>
75-
<Compile Include="**\*.cs"
76-
Exclude="obj\**"/>
75+
<Compile Include="**\*.cs" Exclude="obj\**" />
7776
</ItemGroup>
7877
<ItemGroup>
7978
<None Include="packages.config" />
@@ -85,5 +84,8 @@ OpenAPI spec version: 1.0.0
8584
<Name>Org.OpenAPITools</Name>
8685
</ProjectReference>
8786
</ItemGroup>
87+
<ItemGroup>
88+
<EmbeddedResource Include="linux-logo.png" />
89+
</ItemGroup>
8890
</Project>
8991

0 commit comments

Comments
 (0)