Skip to content

Commit 904cd8d

Browse files
committed
Fixed merge conflicts with vnext
2 parents 3445c1d + 33a573b commit 904cd8d

File tree

10 files changed

+269
-211
lines changed

10 files changed

+269
-211
lines changed

.azure-pipelines/ci-build.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,11 @@ stages:
270270
inputs:
271271
source: current
272272
- pwsh: |
273-
$artifactMainDirectory = Get-ChildItem -Filter Microsoft.OpenApi.Hidi-* -Directory -Recurse | select -First 1
274-
$artifactName = $artifactMainDirectory.Name -replace "Microsoft.OpenApi.Hidi-", ""
275-
#Set Variable $artifactName
276-
Write-Host "##vso[task.setvariable variable=artifactName; isSecret=false; isOutput=true;]$artifactName"
277-
Write-Host "##vso[task.setvariable variable=artifactMainDirectory; isSecret=false; isOutput=true;]$artifactMainDirectory"
273+
$artifactName = Get-ChildItem -Path $(Pipeline.Workspace) -Filter Microsoft.OpenApi.Hidi-* -recurse | select -First 1
274+
$artifactVersion= $artifactName -replace "Microsoft.OpenApi.Hidi-", ""
275+
#Set Variable $artifactName and $artifactVersion
276+
Write-Host "##vso[task.setvariable variable=artifactVersion; isSecret=false; isOutput=true]$artifactVersion"
277+
Write-Host "##vso[task.setvariable variable=artifactName; isSecret=false; isOutput=true]$artifactName.FullName"
278278
displayName: 'Fetch Artifact Name'
279279
280280
- task: NuGetCommand@2
@@ -289,10 +289,10 @@ stages:
289289
inputs:
290290
gitHubConnection: 'Github-MaggieKimani1'
291291
tagSource: userSpecifiedTag
292-
tag: '$(artifactName)'
292+
tag: '$(artifactVersion)'
293293
title: '$(artifactName)'
294294
releaseNotesSource: inline
295-
assets: '$(artifactMainDirectory)\**\*.exe'
295+
assets: '$(Pipeline.Workspace)\**\*.exe'
296296
changeLogType: issueBased
297297

298298
- deployment: deploy_lib

.github/workflows/ci-cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
4242
- name: Checkout repository
4343
id: checkout_repo
44-
uses: actions/checkout@v2
44+
uses: actions/checkout@v3
4545
with:
4646
token: ${{ secrets.GITHUB_TOKEN }}
4747
fetch-depth: 0

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- name: Checkout repository
1616
id: checkout_repo
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v3
1818

1919
- name: Setup .NET
2020
uses: actions/setup-dotnet@v2

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333

3434
<ItemGroup>
3535
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
36-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
36+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.1" />
3737
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
3838
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
39-
<PackageReference Include="System.CommandLine" Version="2.0.0-beta2.21617.1" />
39+
<PackageReference Include="System.CommandLine" Version="2.0.0-beta3.22114.1" />
4040
<PackageReference Include="Microsoft.OData.Edm" Version="7.10.0" />
4141
<PackageReference Include="Microsoft.OpenApi.OData" Version="1.0.10-preview2" />
4242
</ItemGroup>

src/Microsoft.OpenApi.Hidi/OpenApiService.cs

Lines changed: 237 additions & 180 deletions
Large diffs are not rendered by default.

src/Microsoft.OpenApi.Hidi/Program.cs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT license.
33

4+
using System;
45
using System.CommandLine;
56
using System.IO;
67
using System.Threading;
@@ -11,7 +12,7 @@ namespace Microsoft.OpenApi.Hidi
1112
{
1213
static class Program
1314
{
14-
static async Task<int> Main(string[] args)
15+
static async Task Main(string[] args)
1516
{
1617
var rootCommand = new RootCommand() {
1718
};
@@ -26,13 +27,16 @@ static async Task<int> Main(string[] args)
2627
var outputOption = new Option<FileInfo>("--output", () => new FileInfo("./output"), "The output directory path for the generated file.") { Arity = ArgumentArity.ZeroOrOne };
2728
outputOption.AddAlias("-o");
2829

30+
var cleanOutputOption = new Option<bool>("--clean-output", "Overwrite an existing file");
31+
cleanOutputOption.AddAlias("-co");
32+
2933
var versionOption = new Option<string?>("--version", "OpenAPI specification version");
3034
versionOption.AddAlias("-v");
3135

3236
var formatOption = new Option<OpenApiFormat?>("--format", "File format");
3337
formatOption.AddAlias("-f");
3438

35-
var logLevelOption = new Option<LogLevel>("--loglevel", () => LogLevel.Warning, "The log level to use when logging messages to the main output.");
39+
var logLevelOption = new Option<LogLevel>("--loglevel", () => LogLevel.Information, "The log level to use when logging messages to the main output.");
3640
logLevelOption.AddAlias("-ll");
3741

3842
var filterByOperationIdsOption = new Option<string>("--filter-by-operationids", "Filters OpenApiDocument by OperationId(s) provided");
@@ -63,6 +67,7 @@ static async Task<int> Main(string[] args)
6367
descriptionOption,
6468
csdlOption,
6569
outputOption,
70+
cleanOutputOption,
6671
versionOption,
6772
formatOption,
6873
logLevelOption,
@@ -73,14 +78,17 @@ static async Task<int> Main(string[] args)
7378
resolveExternalOption,
7479
};
7580

76-
transformCommand.SetHandler<string, string, FileInfo, string?, OpenApiFormat?, LogLevel, bool, bool, string, string, string, CancellationToken> (
77-
OpenApiService.ProcessOpenApiDocument, descriptionOption, csdlOption, outputOption, versionOption, formatOption, logLevelOption, inlineOption, resolveExternalOption, filterByOperationIdsOption, filterByTagsOption, filterByCollectionOption);
81+
transformCommand.SetHandler<string, string, FileInfo, bool, string?, OpenApiFormat?, LogLevel, bool, bool, string, string, string, CancellationToken> (
82+
OpenApiService.TransformOpenApiDocument, descriptionOption, csdlOption, outputOption, cleanOutputOption, versionOption, formatOption, logLevelOption, inlineOption, resolveExternalOption, filterByOperationIdsOption, filterByTagsOption, filterByCollectionOption);
7883

7984
rootCommand.Add(transformCommand);
8085
rootCommand.Add(validateCommand);
8186

8287
// Parse the incoming args and invoke the handler
83-
return await rootCommand.InvokeAsync(args);
88+
await rootCommand.InvokeAsync(args);
89+
90+
//// Wait for logger to write messages to the console before exiting
91+
await Task.Delay(10);
8492
}
8593
}
8694
}

src/Microsoft.OpenApi.Hidi/appsettings.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</ItemGroup>
4141

4242
<ItemGroup>
43-
<PackageReference Include="SharpYaml" Version="1.8.0" />
43+
<PackageReference Include="SharpYaml" Version="1.9.0" />
4444
</ItemGroup>
4545

4646
<ItemGroup>
@@ -66,4 +66,4 @@
6666
<LastGenOutput>SRResource.Designer.cs</LastGenOutput>
6767
</EmbeddedResource>
6868
</ItemGroup>
69-
</Project>
69+
</Project>

test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@
247247
</PackageReference>
248248
<PackageReference Include="Newtonsoft.Json" Version="13.0.1">
249249
</PackageReference>
250-
<PackageReference Include="SharpYaml" Version="1.8.0">
250+
<PackageReference Include="SharpYaml" Version="1.9.0">
251251
</PackageReference>
252252
<PackageReference Include="xunit" Version="2.4.1">
253253
</PackageReference>

test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
<ItemGroup>
1818
<PackageReference Include="FluentAssertions" Version="6.5.1" />
1919
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
20-
<PackageReference Include="Moq" Version="4.17.1" />
20+
<PackageReference Include="Moq" Version="4.17.2" />
2121
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
22-
<PackageReference Include="SharpYaml" Version="1.8.0" />
23-
<PackageReference Include="Verify" Version="16.3.2" />
24-
<PackageReference Include="Verify.Xunit" Version="16.3.2" />
22+
<PackageReference Include="SharpYaml" Version="1.9.0" />
23+
<PackageReference Include="Verify" Version="16.3.5" />
24+
<PackageReference Include="Verify.Xunit" Version="16.3.5" />
2525
<PackageReference Include="xunit" Version="2.4.1" />
2626
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
2727
<PrivateAssets>all</PrivateAssets>
@@ -30,7 +30,7 @@
3030
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
3131
<PackageReference Include="PublicApiGenerator" Version="10.3.0" />
3232
</ItemGroup>
33-
33+
3434
<ItemGroup>
3535
<ProjectReference Include="..\..\src\Microsoft.OpenApi.Hidi\Microsoft.OpenApi.Hidi.csproj" />
3636
<ProjectReference Include="..\..\src\Microsoft.OpenApi\Microsoft.OpenApi.csproj" />

0 commit comments

Comments
 (0)