Skip to content

Commit 22c0ee4

Browse files
authored
Merge branch 'vnext' into feature/improve-ci-cd
2 parents 7f9e6b8 + 84ed1bc commit 22c0ee4

File tree

226 files changed

+32535
-3524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+32535
-3524
lines changed

.azure-pipelines/ci-build.yml

+337-113
Large diffs are not rendered by default.

.github/workflows/ci-cd.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ jobs:
1313
GITHUB_RUN_NUMBER: ${{ github.run_number }}
1414
steps:
1515
- name: Setup .NET
16-
uses: actions/setup-dotnet@v1
16+
uses: actions/setup-dotnet@v2
1717
with:
18-
dotnet-version: 5.0.x
18+
dotnet-version: 6.0.x
1919

2020
- name: Checkout repository
2121
id: checkout_repo
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v3
2323
with:
2424
token: ${{ secrets.GITHUB_TOKEN }}
2525
fetch-depth: 0
2626

2727
- if: github.event_name == 'push' && github.ref == 'refs/heads/master'
2828
name: Bump GH tag
2929
id: tag_generator
30-
uses: mathieudutour/github-tag-action@v5.4
30+
uses: mathieudutour/github-tag-action@v6.0
3131
with:
3232
github_token: ${{ secrets.GITHUB_TOKEN }}
3333
default_bump: false

.github/workflows/codeql-analysis.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: CodeQL Analysis
22

33
on:
44
push:
5+
branches: [ vnext ]
56
pull_request:
67
schedule:
78
- cron: '0 8 * * *'
@@ -13,12 +14,12 @@ jobs:
1314
steps:
1415
- name: Checkout repository
1516
id: checkout_repo
16-
uses: actions/checkout@v2
17+
uses: actions/checkout@v3
1718

1819
- name: Setup .NET
19-
uses: actions/setup-dotnet@v1
20+
uses: actions/setup-dotnet@v2
2021
with:
21-
dotnet-version: 5.0.x
22+
dotnet-version: 6.0.x
2223

2324
- name: Initialize CodeQL
2425
id: init_codeql
@@ -33,7 +34,7 @@ jobs:
3334
$projectsArray = @(
3435
'.\src\Microsoft.OpenApi\Microsoft.OpenApi.csproj',
3536
'.\src\Microsoft.OpenApi.Readers\Microsoft.OpenApi.Readers.csproj',
36-
'.\src\Microsoft.OpenApi.Tool\Microsoft.OpenApi.Tool.csproj'
37+
'.\src\Microsoft.OpenApi.Hidi\Microsoft.OpenApi.Hidi.csproj'
3738
)
3839
3940
$projectsArray | ForEach-Object {

.vscode/launch.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"request": "launch",
1111
"preLaunchTask": "build",
1212
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/src/Microsoft.OpenApi.Tool/bin/Debug/netcoreapp3.1/Microsoft.OpenApi.Tool.dll",
13+
"program": "${workspaceFolder}/src/Microsoft.OpenApi.Hidi/bin/Debug/net6.0/Microsoft.OpenApi.Hidi.dll",
1414
"args": [],
15-
"cwd": "${workspaceFolder}/src/Microsoft.OpenApi.Tool",
15+
"cwd": "${workspaceFolder}/src/Microsoft.OpenApi.Hidi",
1616
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
1717
"console": "internalConsole",
1818
"stopAtEntry": false

.vscode/tasks.json

+33-6
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,43 @@
55
"tasks": [
66
{
77
"label": "build",
8-
"type": "shell",
9-
"command": "msbuild",
8+
"command": "dotnet",
9+
"type": "process",
10+
"group": "build",
11+
"args": [
12+
"build",
13+
"${workspaceFolder}/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj",
14+
"/property:GenerateFullPaths=true",
15+
"/consoleloggerparameters:NoSummary"
16+
],
17+
"problemMatcher": "$msCompile"
18+
},
19+
{
20+
"label": "test",
21+
"command": "dotnet",
22+
"type": "process",
23+
"group": "test",
1024
"args": [
25+
"test",
26+
"${workspaceFolder}/Microsoft.OpenApi.sln",
1127
"/property:GenerateFullPaths=true",
12-
"/t:build"
28+
"/consoleloggerparameters:NoSummary",
29+
"--collect:\"XPlat Code Coverage\""
1330
],
31+
"problemMatcher": "$msCompile"
32+
},
33+
{
34+
"label": "watch",
35+
"command": "dotnet",
36+
"type": "process",
1437
"group": "build",
15-
"presentation": {
16-
"reveal": "silent"
17-
},
38+
"args": [
39+
"watch",
40+
"run",
41+
"${workspaceFolder}/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj",
42+
"/property:GenerateFullPaths=true",
43+
"/consoleloggerparameters:NoSummary"
44+
],
1845
"problemMatcher": "$msCompile"
1946
},
2047
{

Microsoft.OpenApi.sln

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.29613.14
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.1.32210.238
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi", "src\Microsoft.OpenApi\Microsoft.OpenApi.csproj", "{A8E50143-69B2-472A-9D45-3F9A05D13202}"
77
EndProject
@@ -12,7 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1212
readme.md = readme.md
1313
EndProjectSection
1414
EndProject
15-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.OpenApi.Workbench", "src\Microsoft.OpenApi.Workbench\Microsoft.OpenApi.Workbench.csproj", "{6A5E91E5-0441-46EE-AEB9-8334981B7F08}"
15+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.Workbench", "src\Microsoft.OpenApi.Workbench\Microsoft.OpenApi.Workbench.csproj", "{6A5E91E5-0441-46EE-AEB9-8334981B7F08}"
1616
EndProject
1717
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.Readers", "src\Microsoft.OpenApi.Readers\Microsoft.OpenApi.Readers.csproj", "{79933258-0126-4382-8755-D50820ECC483}"
1818
EndProject
@@ -26,7 +26,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{6357D7FD-2
2626
EndProject
2727
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.SmokeTests", "test\Microsoft.OpenApi.SmokeTests\Microsoft.OpenApi.SmokeTests.csproj", "{AD79B61D-88CF-497C-9ED5-41AE3867C5AC}"
2828
EndProject
29-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.Tool", "src\Microsoft.OpenApi.Tool\Microsoft.OpenApi.Tool.csproj", "{254841B5-7DAC-4D1D-A9C5-44FE5CE467BE}"
29+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.Hidi", "src\Microsoft.OpenApi.Hidi\Microsoft.OpenApi.Hidi.csproj", "{254841B5-7DAC-4D1D-A9C5-44FE5CE467BE}"
3030
EndProject
3131
Global
3232
GlobalSection(SolutionConfigurationPlatforms) = preSolution

build.cmd

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
@echo off
2-
Echo Building Microsoft.OpenApi
2+
Echo Building Microsoft.OpenApi
33

4-
SET PROJ=%~dp0src\Microsoft.OpenApi\Microsoft.OpenApi.csproj
4+
SET PROJ=%~dp0src\Microsoft.OpenApi\Microsoft.OpenApi.csproj
55
dotnet msbuild %PROJ% /t:restore /p:Configuration=Release
66
dotnet msbuild %PROJ% /t:build /p:Configuration=Release
77
dotnet msbuild %PROJ% /t:pack /p:Configuration=Release;PackageOutputPath=%~dp0artifacts
88

99
Echo Building Microsoft.OpenApi.Readers
1010

11-
SET PROJ=%~dp0src\Microsoft.OpenApi.Readers\Microsoft.OpenApi.Readers.csproj
11+
SET PROJ=%~dp0src\Microsoft.OpenApi.Readers\Microsoft.OpenApi.Readers.csproj
1212
dotnet msbuild %PROJ% /t:restore /p:Configuration=Release
1313
dotnet msbuild %PROJ% /t:build /p:Configuration=Release
1414
dotnet msbuild %PROJ% /t:pack /p:Configuration=Release;PackageOutputPath=%~dp0artifacts
1515

16-
Echo Building Microsoft.OpenApi.Tool
16+
Echo Building Microsoft.OpenApi.Hidi
1717

18-
SET PROJ=%~dp0src\Microsoft.OpenApi.Tool\Microsoft.OpenApi.Tool.csproj
18+
SET PROJ=%~dp0src\Microsoft.OpenApi.Hidi\Microsoft.OpenApi.Hidi.csproj
1919
dotnet msbuild %PROJ% /t:restore /p:Configuration=Release
2020
dotnet msbuild %PROJ% /t:build /p:Configuration=Release
2121
dotnet msbuild %PROJ% /t:pack /p:Configuration=Release;PackageOutputPath=%~dp0artifacts

install-tool.ps1

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
$latest = Get-ChildItem .\artifacts\ Microsoft.OpenApi.Tool* | select-object -Last 1
1+
$latest = Get-ChildItem .\artifacts\Microsoft.OpenApi.Hidi* | select-object -Last 1
22
$version = $latest.Name.Split(".")[3..5] | join-string -Separator "."
33

4-
if (Test-Path -Path ./artifacts/openapi-parser.exe) {
5-
dotnet tool uninstall --tool-path artifacts Microsoft.OpenApi.Tool
4+
if (Test-Path -Path ./artifacts/hidi.exe) {
5+
dotnet tool uninstall --tool-path artifacts Microsoft.OpenApi.Hidi
66
}
7-
dotnet tool install --tool-path artifacts --add-source .\artifacts\ --version $version Microsoft.OpenApi.Tool
7+
dotnet tool install --tool-path artifacts --add-source .\artifacts\ --version $version Microsoft.OpenApi.Hidi

src/Directory.Build.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
44
</PropertyGroup>
55
<ItemGroup>
6-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-*" PrivateAssets="All"/>
6+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1-*" PrivateAssets="All"/>
77
</ItemGroup>
88
</Project>
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3+
xmlns:edm="http://docs.oasis-open.org/odata/ns/edm"
4+
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
5+
>
6+
<xsl:output method="xml" indent="yes"/>
7+
8+
<xsl:param name="entitySetOrSingleton" select="'serviceappointments'"></xsl:param>
9+
10+
<xsl:template match="edm:EntityContainer">
11+
<xsl:copy>
12+
<xsl:apply-templates select="@* | edm:EntitySet[contains($entitySetOrSingleton,@Name)] | edm:Singleton[contains($entitySetOrSingleton,@Name)]"/>
13+
</xsl:copy>
14+
</xsl:template>
15+
16+
<xsl:template match="@* | node()">
17+
<xsl:copy>
18+
<xsl:apply-templates select="@* | node()"/>
19+
</xsl:copy>
20+
</xsl:template>
21+
22+
</xsl:stylesheet>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net6.0</TargetFramework>
6+
<LangVersion>9.0</LangVersion>
7+
<PackAsTool>true</PackAsTool>
8+
<PackageIconUrl>http://go.microsoft.com/fwlink/?LinkID=288890</PackageIconUrl>
9+
<PackageProjectUrl>https://github.com/Microsoft/OpenAPI.NET</PackageProjectUrl>
10+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
11+
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
12+
<Authors>Microsoft</Authors>
13+
<Company>Microsoft</Company>
14+
<Title>Microsoft.OpenApi.Hidi</Title>
15+
<PackageId>Microsoft.OpenApi.Hidi</PackageId>
16+
<ToolCommandName>hidi</ToolCommandName>
17+
<PackageOutputPath>./../../artifacts</PackageOutputPath>
18+
<Version>1.0.0-preview1</Version>
19+
<Description>OpenAPI.NET CLI tool for slicing OpenAPI documents</Description>
20+
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
21+
<PackageTags>OpenAPI .NET</PackageTags>
22+
<RepositoryUrl>https://github.com/Microsoft/OpenAPI.NET</RepositoryUrl>
23+
<PackageReleaseNotes>
24+
- Upgrades Microsoft.OpenApi.OData to 1.0.10-preview1
25+
- Fixes an issue where hidi would not process async operations
26+
</PackageReleaseNotes>
27+
<AssemblyName>Microsoft.OpenApi.Hidi</AssemblyName>
28+
<RootNamespace>Microsoft.OpenApi.Hidi</RootNamespace>
29+
<SignAssembly>true</SignAssembly>
30+
<!-- https://github.com/dotnet/sourcelink/blob/main/docs/README.md#embeduntrackedsources -->
31+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
32+
</PropertyGroup>
33+
34+
<ItemGroup>
35+
<None Remove="CsdlFilter.xslt" />
36+
</ItemGroup>
37+
38+
<ItemGroup>
39+
<EmbeddedResource Include="CsdlFilter.xslt" />
40+
</ItemGroup>
41+
42+
<ItemGroup>
43+
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
44+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.1" />
45+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
46+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
47+
<PackageReference Include="System.CommandLine" Version="2.0.0-beta3.22114.1" />
48+
<PackageReference Include="Microsoft.OData.Edm" Version="7.10.0" />
49+
<PackageReference Include="Microsoft.OpenApi.OData" Version="1.0.10-preview3" />
50+
</ItemGroup>
51+
52+
<ItemGroup>
53+
<ProjectReference Include="..\Microsoft.OpenApi.Readers\Microsoft.OpenApi.Readers.csproj" />
54+
<ProjectReference Include="..\Microsoft.OpenApi\Microsoft.OpenApi.csproj" />
55+
</ItemGroup>
56+
57+
<ItemGroup>
58+
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" />
59+
</ItemGroup>
60+
61+
</Project>

0 commit comments

Comments
 (0)