Skip to content

Commit 9c4fd10

Browse files
Merge pull request #1861 from microsoft/mk/sync-v2-with-vnext
Sync vnext changes with the v2 branch
2 parents d302b5d + d2dc8ec commit 9c4fd10

File tree

200 files changed

+3080
-1250
lines changed

Some content is hidden

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

200 files changed

+3080
-1250
lines changed

.azure-pipelines/ci-build.yml

Lines changed: 44 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ extends:
5757
version: 8.x
5858

5959
# Install the nuget tool.
60-
- task: NuGetToolInstaller@0
61-
displayName: 'Use NuGet >=5.2.0'
60+
- task: NuGetToolInstaller@1
61+
displayName: 'Use NuGet >=6.11.0'
6262
inputs:
63-
versionSpec: '>=5.2.0'
63+
versionSpec: '>=6.11.0'
6464
checkLatest: true
6565

6666
# Build the Product project
@@ -78,16 +78,17 @@ extends:
7878
projects: '$(Build.SourcesDirectory)\Microsoft.OpenApi.sln'
7979
arguments: '--configuration $(BuildConfiguration) --no-build'
8080

81-
- task: EsrpCodeSigning@2
82-
displayName: 'ESRP CodeSigning'
81+
- task: EsrpCodeSigning@5
82+
displayName: 'ESRP CodeSigning binaries'
8383
inputs:
84-
ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet (AKV)'
85-
FolderPath: src
86-
signConfigType: inlineSignParams
87-
UseMinimatch: true
88-
Pattern: |
89-
**\*.exe
90-
**\*.dll
84+
ConnectedServiceName: 'Federated DevX ESRP Managed Identity Connection'
85+
AppRegistrationClientId: '65035b7f-7357-4f29-bf25-c5ee5c3949f8'
86+
AppRegistrationTenantId: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2'
87+
AuthAKVName: 'akv-prod-eastus'
88+
AuthCertName: 'ReferenceLibraryPrivateCert'
89+
AuthSignCertName: 'ReferencePackagePublisherCertificate'
90+
FolderPath: '$(Build.SourcesDirectory)\src'
91+
signConfigType: 'inlineSignParams'
9192
inlineOperation: |
9293
[
9394
{
@@ -126,7 +127,10 @@ extends:
126127
"toolVersion": "1.0"
127128
}
128129
]
129-
SessionTimeout: 20
130+
SessionTimeout: '20'
131+
MaxConcurrency: '50'
132+
MaxRetryAttempts: '5'
133+
PendingAnalysisWaitTimeoutMinutes: '5'
130134

131135
# Pack core lib
132136
- pwsh: dotnet pack $(Build.SourcesDirectory)/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj -o $(Build.ArtifactStagingDirectory) --configuration $(BuildConfiguration) --no-build --include-symbols --include-source /p:SymbolPackageFormat=snupkg
@@ -140,32 +144,39 @@ extends:
140144
- pwsh: dotnet pack $(Build.SourcesDirectory)/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj -o $(Build.ArtifactStagingDirectory) --configuration $(BuildConfiguration) --no-build --include-symbols --include-source /p:SymbolPackageFormat=snupkg
141145
displayName: 'pack Hidi'
142146

143-
- task: EsrpCodeSigning@2
147+
- task: EsrpCodeSigning@5
144148
displayName: 'ESRP CodeSigning Nuget Packages'
145149
inputs:
146-
ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet (AKV)'
150+
ConnectedServiceName: 'Federated DevX ESRP Managed Identity Connection'
151+
AppRegistrationClientId: '65035b7f-7357-4f29-bf25-c5ee5c3949f8'
152+
AppRegistrationTenantId: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2'
153+
AuthAKVName: 'akv-prod-eastus'
154+
AuthCertName: 'ReferenceLibraryPrivateCert'
155+
AuthSignCertName: 'ReferencePackagePublisherCertificate'
147156
FolderPath: '$(Build.ArtifactStagingDirectory)'
148157
Pattern: '*.nupkg'
149-
signConfigType: inlineSignParams
150-
UseMinimatch: true
158+
signConfigType: 'inlineSignParams'
151159
inlineOperation: |
152160
[
153-
{
154-
"keyCode": "CP-401405",
155-
"operationSetCode": "NuGetSign",
156-
"parameters": [ ],
157-
"toolName": "sign",
158-
"toolVersion": "1.0"
159-
},
160-
{
161-
"keyCode": "CP-401405",
162-
"operationSetCode": "NuGetVerify",
163-
"parameters": [ ],
164-
"toolName": "sign",
165-
"toolVersion": "1.0"
166-
}
167-
]
168-
SessionTimeout: 20
161+
{
162+
"keyCode": "CP-401405",
163+
"operationSetCode": "NuGetSign",
164+
"parameters": [ ],
165+
"toolName": "sign",
166+
"toolVersion": "1.0"
167+
},
168+
{
169+
"keyCode": "CP-401405",
170+
"operationSetCode": "NuGetVerify",
171+
"parameters": [ ],
172+
"toolName": "sign",
173+
"toolVersion": "1.0"
174+
}
175+
]
176+
SessionTimeout: '60'
177+
MaxConcurrency: '50'
178+
MaxRetryAttempts: '5'
179+
PendingAnalysisWaitTimeoutMinutes: '5'
169180

170181
- task: PowerShell@2
171182
displayName: "Get Hidi's version-number from .csproj"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## DO NOT MODIFY THIS FILE MANUALLY. This is part of auto-baselining from 1ES Pipeline Templates. Go to [https://aka.ms/1espt-autobaselining] for more details.
2+
3+
pipelines:
4+
107:
5+
usedNonDefaultBranch: true
6+
retail:
7+
source:
8+
credscan:
9+
lastModifiedDate: 2024-09-13
10+
eslint:
11+
lastModifiedDate: 2024-09-13
12+
psscriptanalyzer:
13+
lastModifiedDate: 2024-09-13
14+
armory:
15+
lastModifiedDate: 2024-09-13

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,14 @@ csharp_preserve_single_line_blocks = true
121121
[*.vb]
122122
# Modifier preferences
123123
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
124+
125+
126+
# Verify settings
127+
[*.{received,verified}.{txt,xml,json}]
128+
charset = "utf-8-bom"
129+
end_of_line = lf
130+
indent_size = unset
131+
indent_style = unset
132+
insert_final_newline = false
133+
tab_width = unset
134+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@
1515
*.PDF diff=astextplain
1616
*.rtf diff=astextplain
1717
*.RTF diff=astextplain
18+
19+
# VerifyTests
20+
*.verified.txt text eol=lf working-tree-encoding=UTF-8

.github/CODEOWNERS

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

.github/workflows/docker.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Check out the repo
1818
uses: actions/checkout@v4
1919
- name: Login to GitHub package feed
20-
uses: docker/login-action@v3.2.0
20+
uses: docker/login-action@v3.3.0
2121
with:
2222
username: ${{ secrets.ACR_USERNAME }}
2323
password: ${{ secrets.ACR_PASSWORD }}
@@ -30,13 +30,13 @@ jobs:
3030
id: getversion
3131
- name: Push to GitHub Packages - Nightly
3232
if: ${{ github.ref == 'refs/heads/vnext' }}
33-
uses: docker/build-push-action@v6.3.0
33+
uses: docker/build-push-action@v6.7.0
3434
with:
3535
push: true
3636
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly
3737
- name: Push to GitHub Packages - Release
3838
if: ${{ github.ref == 'refs/heads/master' }}
39-
uses: docker/build-push-action@v6.3.0
39+
uses: docker/build-push-action@v6.7.0
4040
with:
4141
push: true
4242
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.getversion.outputs.version }}

Microsoft.OpenApi.sln

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E546B92F-20A
2424
EndProject
2525
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{6357D7FD-2DE4-4900-ADB9-ABC37052040A}"
2626
EndProject
27-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.SmokeTests", "test\Microsoft.OpenApi.SmokeTests\Microsoft.OpenApi.SmokeTests.csproj", "{AD79B61D-88CF-497C-9ED5-41AE3867C5AC}"
28-
EndProject
2927
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.Hidi", "src\Microsoft.OpenApi.Hidi\Microsoft.OpenApi.Hidi.csproj", "{254841B5-7DAC-4D1D-A9C5-44FE5CE467BE}"
3028
EndProject
3129
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.OpenApi.Hidi.Tests", "test\Microsoft.OpenApi.Hidi.Tests\Microsoft.OpenApi.Hidi.Tests.csproj", "{D8F799DD-04AC-4A13-B344-45A5B944450A}"
3230
EndProject
31+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.OpenApi.Trimming.Tests", "test\Microsoft.OpenApi.Trimming.Tests\Microsoft.OpenApi.Trimming.Tests.csproj", "{1D2E0C6E-B103-4CB6-912E-D56FA1501296}"
32+
EndProject
3333
Global
3434
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3535
Debug|Any CPU = Debug|Any CPU
@@ -56,10 +56,6 @@ Global
5656
{1ED3C2C1-E1E7-4925-B4E6-2D969C3F5237}.Debug|Any CPU.Build.0 = Debug|Any CPU
5757
{1ED3C2C1-E1E7-4925-B4E6-2D969C3F5237}.Release|Any CPU.ActiveCfg = Release|Any CPU
5858
{1ED3C2C1-E1E7-4925-B4E6-2D969C3F5237}.Release|Any CPU.Build.0 = Release|Any CPU
59-
{AD79B61D-88CF-497C-9ED5-41AE3867C5AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
60-
{AD79B61D-88CF-497C-9ED5-41AE3867C5AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
61-
{AD79B61D-88CF-497C-9ED5-41AE3867C5AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
62-
{AD79B61D-88CF-497C-9ED5-41AE3867C5AC}.Release|Any CPU.Build.0 = Release|Any CPU
6359
{254841B5-7DAC-4D1D-A9C5-44FE5CE467BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
6460
{254841B5-7DAC-4D1D-A9C5-44FE5CE467BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
6561
{254841B5-7DAC-4D1D-A9C5-44FE5CE467BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -68,6 +64,10 @@ Global
6864
{D8F799DD-04AC-4A13-B344-45A5B944450A}.Debug|Any CPU.Build.0 = Debug|Any CPU
6965
{D8F799DD-04AC-4A13-B344-45A5B944450A}.Release|Any CPU.ActiveCfg = Release|Any CPU
7066
{D8F799DD-04AC-4A13-B344-45A5B944450A}.Release|Any CPU.Build.0 = Release|Any CPU
67+
{1D2E0C6E-B103-4CB6-912E-D56FA1501296}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
68+
{1D2E0C6E-B103-4CB6-912E-D56FA1501296}.Debug|Any CPU.Build.0 = Debug|Any CPU
69+
{1D2E0C6E-B103-4CB6-912E-D56FA1501296}.Release|Any CPU.ActiveCfg = Release|Any CPU
70+
{1D2E0C6E-B103-4CB6-912E-D56FA1501296}.Release|Any CPU.Build.0 = Release|Any CPU
7171
EndGlobalSection
7272
GlobalSection(SolutionProperties) = preSolution
7373
HideSolutionNode = FALSE
@@ -78,9 +78,9 @@ Global
7878
{79933258-0126-4382-8755-D50820ECC483} = {E546B92F-20A8-49C3-8323-4B25BB78F3E1}
7979
{AD83F991-DBF3-4251-8613-9CC54C826964} = {6357D7FD-2DE4-4900-ADB9-ABC37052040A}
8080
{1ED3C2C1-E1E7-4925-B4E6-2D969C3F5237} = {6357D7FD-2DE4-4900-ADB9-ABC37052040A}
81-
{AD79B61D-88CF-497C-9ED5-41AE3867C5AC} = {6357D7FD-2DE4-4900-ADB9-ABC37052040A}
8281
{254841B5-7DAC-4D1D-A9C5-44FE5CE467BE} = {E546B92F-20A8-49C3-8323-4B25BB78F3E1}
8382
{D8F799DD-04AC-4A13-B344-45A5B944450A} = {6357D7FD-2DE4-4900-ADB9-ABC37052040A}
83+
{1D2E0C6E-B103-4CB6-912E-D56FA1501296} = {6357D7FD-2DE4-4900-ADB9-ABC37052040A}
8484
EndGlobalSection
8585
GlobalSection(ExtensibilityGlobals) = postSolution
8686
SolutionGuid = {9F171EFC-0DB5-4B10-ABFA-AF48D52CC565}

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,6 @@ In order to test the validity of an OpenApi document, we avail the following too
113113

114114
5. Copy and paste your OpenAPI descriptions in the **Input Content** window or paste the path to the descriptions file in the **Input File** textbox and click on `Convert` to render the results.
115115

116-
# Build Status
117-
118-
|**master**|
119-
|--|
120-
|[![Build status](https://ci.appveyor.com/api/projects/status/9l6hly3vjeu0tmtx/branch/master?svg=true)](https://ci.appveyor.com/project/MicrosoftOpenAPINETAdmin/openapi-net-54e7i/branch/master)|
121-
122116
# Contributing
123117

124118
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
using System.CommandLine.Invocation;
3+
using System.Threading.Tasks;
4+
5+
namespace Microsoft.OpenApi.Hidi.Handlers;
6+
7+
internal abstract class AsyncCommandHandler : ICommandHandler
8+
{
9+
public int Invoke(InvocationContext context)
10+
{
11+
throw new InvalidOperationException("This method should not be called");
12+
}
13+
public abstract Task<int> InvokeAsync(InvocationContext context);
14+
}

src/Microsoft.OpenApi.Hidi/Handlers/PluginCommandHandler.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,14 @@
1111

1212
namespace Microsoft.OpenApi.Hidi.Handlers
1313
{
14-
internal class PluginCommandHandler : ICommandHandler
14+
internal class PluginCommandHandler : AsyncCommandHandler
1515
{
1616
public CommandOptions CommandOptions { get; }
1717
public PluginCommandHandler(CommandOptions commandOptions)
1818
{
1919
CommandOptions = commandOptions;
2020
}
21-
public int Invoke(InvocationContext context)
22-
{
23-
return InvokeAsync(context).GetAwaiter().GetResult();
24-
}
25-
public async Task<int> InvokeAsync(InvocationContext context)
21+
public override async Task<int> InvokeAsync(InvocationContext context)
2622
{
2723
var hidiOptions = new HidiOptions(context.ParseResult, CommandOptions);
2824
var cancellationToken = (CancellationToken)context.BindingContext.GetRequiredService(typeof(CancellationToken));
@@ -31,7 +27,7 @@ public async Task<int> InvokeAsync(InvocationContext context)
3127
var logger = loggerFactory.CreateLogger<PluginCommandHandler>();
3228
try
3329
{
34-
await OpenApiService.PluginManifest(hidiOptions, logger, cancellationToken).ConfigureAwait(false);
30+
await OpenApiService.PluginManifestAsync(hidiOptions, logger, cancellationToken).ConfigureAwait(false);
3531

3632
return 0;
3733
}

0 commit comments

Comments
 (0)