Skip to content

Commit 8e1c4ee

Browse files
authored
Merge branch 'dev' into dependabot/nuget/Verify.Xunit-28.6.1
2 parents d827238 + 78cf794 commit 8e1c4ee

File tree

79 files changed

+859
-809
lines changed

Some content is hidden

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

79 files changed

+859
-809
lines changed

.azure-pipelines/ci-build.yml

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
55
trigger:
66
branches:
77
include:
8-
- master
9-
- vnext
8+
- main
9+
- dev
10+
- support/v1
1011
pr:
1112
branches:
1213
include:
13-
- master
14-
- vnext
14+
- main
15+
- dev
16+
- support/v1
1517
variables:
1618
buildPlatform: 'Any CPU'
1719
buildConfiguration: 'Release'
@@ -206,10 +208,17 @@ extends:
206208
content: '*.nupkg'
207209

208210
- stage: deploy
209-
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/master'), succeeded())
211+
condition: and(or(contains(variables['build.sourceBranch'], 'refs/heads/main'),contains(variables['build.sourceBranch'], 'refs/heads/support/v1')), succeeded())
210212
dependsOn: build
211213
jobs:
212214
- deployment: deploy_hidi
215+
templateContext:
216+
type: releaseJob
217+
isProduction: true
218+
inputs:
219+
- input: pipelineArtifact
220+
artifactName: Nugets
221+
targetPath: '$(Pipeline.Workspace)'
213222
dependsOn: []
214223
environment: nuget-org
215224
strategy:
@@ -218,11 +227,6 @@ extends:
218227
pool:
219228
vmImage: ubuntu-latest
220229
steps:
221-
- task: DownloadPipelineArtifact@2
222-
displayName: Download nupkg from artifacts
223-
inputs:
224-
artifact: Nugets
225-
source: current
226230
- task: DownloadPipelineArtifact@2
227231
displayName: Download hidi executable from artifacts
228232
inputs:
@@ -264,6 +268,13 @@ extends:
264268
]'
265269

266270
- deployment: deploy_lib
271+
templateContext:
272+
type: releaseJob
273+
isProduction: true
274+
inputs:
275+
- input: pipelineArtifact
276+
artifactName: Nugets
277+
targetPath: '$(Pipeline.Workspace)'
267278
dependsOn: []
268279
environment: nuget-org
269280
strategy:
@@ -272,11 +283,6 @@ extends:
272283
pool:
273284
vmImage: ubuntu-latest
274285
steps:
275-
- task: DownloadPipelineArtifact@2
276-
displayName: Download nupkg from artifacts
277-
inputs:
278-
artifact: Nugets
279-
source: current
280286
- powershell: |
281287
$fileNames = "$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Hidi.*.nupkg", "$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Readers.*.nupkg", "$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Workbench.*.nupkg"
282288
foreach($fileName in $fileNames) {
@@ -294,6 +300,13 @@ extends:
294300
publishFeedCredentials: 'OpenAPI Nuget Connection'
295301

296302
- deployment: deploy_readers
303+
templateContext:
304+
type: releaseJob
305+
isProduction: true
306+
inputs:
307+
- input: pipelineArtifact
308+
artifactName: Nugets
309+
targetPath: '$(Pipeline.Workspace)'
297310
dependsOn: deploy_lib
298311
environment: nuget-org
299312
strategy:
@@ -302,11 +315,6 @@ extends:
302315
pool:
303316
vmImage: ubuntu-latest
304317
steps:
305-
- task: DownloadPipelineArtifact@2
306-
displayName: Download nupkg from artifacts
307-
inputs:
308-
artifact: Nugets
309-
source: current
310318
- task: 1ES.PublishNuget@1
311319
displayName: 'NuGet push'
312320
inputs:

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @irvinesunday @darrelmiller @gavinbarron @millicentachieng @MaggieKimani1 @andrueastman
1+
* @irvinesunday @darrelmiller @gavinbarron @millicentachieng @MaggieKimani1 @andrueastman @baywet

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CodeQL Analysis
22

33
on:
44
push:
5-
branches: [ vnext ]
5+
branches: [ main, dev ]
66
pull_request:
77
schedule:
88
- cron: '0 8 * * *'

.github/workflows/docker.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Publish Docker image
22
on:
33
workflow_dispatch:
44
push:
5-
branches: [master, vnext]
5+
branches: [main, dev, support/v1]
66
paths: ['src/Microsoft.OpenApi.Hidi/**', '.github/workflows/**']
77
env:
88
REGISTRY: msgraphprod.azurecr.io
@@ -16,7 +16,7 @@ jobs:
1616
steps:
1717
- name: Check out the repo
1818
uses: actions/checkout@v4
19-
- name: Login to GitHub package feed
19+
- name: Login to registry
2020
uses: docker/[email protected]
2121
with:
2222
username: ${{ secrets.ACR_USERNAME }}
@@ -28,15 +28,15 @@ jobs:
2828
echo "::set-output name=version::${version}"
2929
shell: pwsh
3030
id: getversion
31-
- name: Push to GitHub Packages - Nightly
32-
if: ${{ github.ref == 'refs/heads/vnext' }}
33-
uses: docker/build-push-action@v6.9.0
31+
- name: Push to registry - Nightly
32+
if: ${{ github.ref == 'refs/heads/dev' }}
33+
uses: docker/build-push-action@v6.10.0
3434
with:
3535
push: true
3636
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly
37-
- name: Push to GitHub Packages - Release
38-
if: ${{ github.ref == 'refs/heads/master' }}
39-
uses: docker/build-push-action@v6.9.0
37+
- name: Push to registry - Release
38+
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/support/v1' }}
39+
uses: docker/build-push-action@v6.10.0
4040
with:
4141
push: true
4242
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.getversion.outputs.version }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Ignore Visual Studio temporary files, build results, and
22
## files generated by popular Visual Studio add-ons.
33
##
4-
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
4+
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
55

66
# User-specific files
77
*.suo

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
// Use IntelliSense to find out which attributes exist for C# debugging
66
// Use hover for the description of the existing attributes
7-
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
7+
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/main/debugger-launchjson.md
88
"name": "Launch Hidi",
99
"type": "coreclr",
1010
"request": "launch",
@@ -22,7 +22,7 @@
2222
{
2323
// Use IntelliSense to find out which attributes exist for C# debugging
2424
// Use hover for the description of the existing attributes
25-
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
25+
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/main/debugger-launchjson.md
2626
"name": "Launch Workbench",
2727
"type": "coreclr",
2828
"request": "launch",

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ VOLUME /app/collection.json
1919
ENV HIDI_CONTAINER=true DOTNET_TieredPGO=1 DOTNET_TC_QuickJitForLoops=1
2020
ENTRYPOINT ["dotnet", "Microsoft.OpenApi.Hidi.dll"]
2121
LABEL description="# Welcome to Hidi \
22-
To start transforming OpenAPI documents checkout [the getting started documentation](https://github.com/microsoft/OpenAPI.NET/tree/vnext/src/Microsoft.OpenApi.Hidi) \
23-
[Source dockerfile](https://github.com/microsoft/OpenAPI.NET/blob/vnext/Dockerfile)"
22+
To start transforming OpenAPI documents checkout [the getting started documentation](https://github.com/microsoft/OpenAPI.NET/tree/main/src/Microsoft.OpenApi.Hidi) \
23+
[Source dockerfile](https://github.com/microsoft/OpenAPI.NET/blob/main/Dockerfile)"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ var httpClient = new HttpClient
8181
BaseAddress = new Uri("https://raw.githubusercontent.com/OAI/OpenAPI-Specification/")
8282
};
8383

84-
var stream = await httpClient.GetStreamAsync("master/examples/v3.0/petstore.yaml");
84+
var stream = await httpClient.GetStreamAsync("main/examples/v3.0/petstore.yaml");
8585

8686
// Read V3 as YAML
8787
var openApiDocument = new OpenApiStreamReader().Read(stream, out var diagnostic);
@@ -95,7 +95,7 @@ var outputString = openApiDocument.Serialize(OpenApiSpecVersion.OpenApi2_0, Open
9595
In order to test the validity of an OpenApi document, we avail the following tools:
9696
- [Microsoft.OpenApi.Hidi](https://www.nuget.org/packages/Microsoft.OpenApi.Hidi)
9797

98-
A commandline tool for validating and transforming OpenAPI descriptions. [Installation guidelines and documentation](https://github.com/microsoft/OpenAPI.NET/blob/vnext/src/Microsoft.OpenApi.Hidi/readme.md)
98+
A commandline tool for validating and transforming OpenAPI descriptions. [Installation guidelines and documentation](https://github.com/microsoft/OpenAPI.NET/blob/main/src/Microsoft.OpenApi.Hidi/readme.md)
9999

100100
- Microsoft.OpenApi.Workbench
101101

src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<Nullable>enable</Nullable>
1010
<ToolCommandName>hidi</ToolCommandName>
1111
<PackageOutputPath>./../../artifacts</PackageOutputPath>
12-
<Version>1.4.16</Version>
12+
<Version>2.0.0-preview3</Version>
1313
<Description>OpenAPI.NET CLI tool for slicing OpenAPI documents</Description>
1414
<SignAssembly>true</SignAssembly>
1515
<!-- https://github.com/dotnet/sourcelink/blob/main/docs/README.md#embeduntrackedsources -->
@@ -29,23 +29,23 @@
2929

3030
<ItemGroup>
3131
<PackageReference Include="Humanizer.Core" Version="2.14.1" />
32-
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.1" />
33-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
34-
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
32+
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
33+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
34+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.0" />
3535
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1" />
36-
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.11.20">
36+
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.12.19">
3737
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3838
<PrivateAssets>all</PrivateAssets>
3939
</PackageReference>
4040
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
41-
<PackageReference Include="Microsoft.OData.Edm" Version="8.2.0" />
41+
<PackageReference Include="Microsoft.OData.Edm" Version="8.2.3" />
4242
<PackageReference Include="Microsoft.OpenApi.OData" Version="2.0.0-preview.7" />
4343
<PackageReference Include="Microsoft.OpenApi.ApiManifest" Version="0.5.0-preview" />
4444
<PackageReference Include="System.CommandLine.Hosting" Version="0.4.0-alpha.22272.1" />
4545
<!--STJ
4646
required until Microsoft.Extensions.Logging.Console and Microsoft.Extensions.Configuration.Json
4747
update their dependencies -->
48-
<PackageReference Include="System.Text.Json" Version="8.0.5" />
48+
<PackageReference Include="System.Text.Json" Version="9.0.0" />
4949
</ItemGroup>
5050

5151
<ItemGroup>

src/Microsoft.OpenApi.Hidi/OpenApiService.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ private static async Task<OpenApiDocument> GetOpenApiAsync(HidiOptions options,
255255
{
256256
stream = await GetStreamAsync(options.OpenApi, logger, cancellationToken).ConfigureAwait(false);
257257
var result = await ParseOpenApiAsync(options.OpenApi, options.InlineExternal, logger, stream, cancellationToken).ConfigureAwait(false);
258-
document = result.OpenApiDocument;
258+
document = result.Document;
259259
}
260260
else throw new InvalidOperationException("No input file path or URL provided");
261261

@@ -358,7 +358,7 @@ private static MemoryStream ApplyFilterToCsdl(Stream csdlStream, string entitySe
358358
{
359359
var statsVisitor = new StatsVisitor();
360360
var walker = new OpenApiWalker(statsVisitor);
361-
walker.Walk(result.OpenApiDocument);
361+
walker.Walk(result.Document);
362362

363363
logger.LogTrace("Finished walking through the OpenApi document. Generating a statistics report..");
364364
#pragma warning disable CA2254
@@ -377,7 +377,7 @@ private static MemoryStream ApplyFilterToCsdl(Stream csdlStream, string entitySe
377377

378378
if (result is null) return null;
379379

380-
return result.OpenApiDiagnostic.Errors.Count == 0;
380+
return result.Diagnostic.Errors.Count == 0;
381381
}
382382

383383
private static async Task<ReadResult> ParseOpenApiAsync(string openApiFile, bool inlineExternal, ILogger logger, Stream stream, CancellationToken cancellationToken = default)
@@ -439,7 +439,7 @@ public static OpenApiDocument FixReferences(OpenApiDocument document, string for
439439
var sb = new StringBuilder();
440440
document.SerializeAsV3(new OpenApiYamlWriter(new StringWriter(sb)));
441441

442-
var doc = OpenApiDocument.Parse(sb.ToString(), format).OpenApiDocument;
442+
var doc = OpenApiDocument.Parse(sb.ToString(), format).Document;
443443

444444
return doc;
445445
}
@@ -649,7 +649,7 @@ private static string GetInputPathExtension(string? openapi = null, string? csdl
649649

650650
private static void LogErrors(ILogger logger, ReadResult result)
651651
{
652-
var context = result.OpenApiDiagnostic;
652+
var context = result.Diagnostic;
653653
if (context.Errors.Count != 0)
654654
{
655655
using (logger.BeginScope("Detected errors"))

0 commit comments

Comments
 (0)