Skip to content

Commit 79f59bf

Browse files
Merge pull request #1532 from microsoft/vnext
Master refresh: Release Hidi & libs
2 parents 7387007 + 217d40a commit 79f59bf

File tree

26 files changed

+231
-138
lines changed

26 files changed

+231
-138
lines changed

.azure-pipelines/ci-build.yml

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pool:
2121
variables:
2222
buildPlatform: 'Any CPU'
2323
buildConfiguration: 'Release'
24-
ProductBinPath: '$(Build.SourcesDirectory)\src\Microsoft.OpenApi\bin\$(BuildConfiguration)'
24+
ProductBinPath: '$(Build.SourcesDirectory)\src\Microsoft.OpenApi\bin\$(BuildConfiguration)'
2525

2626

2727
stages:
@@ -31,22 +31,22 @@ stages:
3131
- job: build
3232
steps:
3333
- task: UseDotNet@2
34-
displayName: 'Use .NET 2' # needed for ESRP signing
34+
displayName: 'Use .NET 6' # needed for ESRP signing
3535
inputs:
36-
version: 2.x
36+
version: 6.x
3737

3838
- task: UseDotNet@2
3939
displayName: 'Use .NET 7'
4040
inputs:
4141
version: 7.x
4242

43-
- task: PoliCheck@1
43+
- task: PoliCheck@2
4444
displayName: 'Run PoliCheck "/src"'
4545
inputs:
4646
inputType: CmdLine
4747
cmdLineArgs: '/F:$(Build.SourcesDirectory)/src /T:9 /Sev:"1|2" /PE:2 /O:poli_result_src.xml'
4848

49-
- task: PoliCheck@1
49+
- task: PoliCheck@2
5050
displayName: 'Run PoliCheck "/test"'
5151
inputs:
5252
inputType: CmdLine
@@ -75,14 +75,14 @@ stages:
7575
arguments: '--configuration $(BuildConfiguration) --no-build'
7676

7777
# CredScan
78-
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
78+
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3
7979
displayName: 'Run CredScan - Src'
8080
inputs:
8181
toolMajorVersion: 'V2'
8282
scanFolder: '$(Build.SourcesDirectory)\src'
8383
debugMode: false
8484

85-
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
85+
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3
8686
displayName: 'Run CredScan - Test'
8787
inputs:
8888
toolMajorVersion: 'V2'
@@ -95,34 +95,38 @@ stages:
9595
FileDirPath: '$(ProductBinPath)'
9696
enabled: false
9797

98-
- task: BinSkim@3
98+
- task: BinSkim@4
9999
displayName: 'Run BinSkim - Product Binaries'
100100
inputs:
101101
InputType: Basic
102-
AnalyzeTarget: '$(ProductBinPath)\**\Microsoft.OpenApi.dll'
102+
AnalyzeTargetGlob: '$(ProductBinPath)\**\Microsoft.OpenApi.dll'
103103
AnalyzeSymPath: '$(ProductBinPath)'
104104
AnalyzeVerbose: true
105105
AnalyzeHashes: true
106106
AnalyzeEnvironment: true
107107

108-
- task: PublishSecurityAnalysisLogs@2
108+
- task: PublishSecurityAnalysisLogs@3
109109
displayName: 'Publish Security Analysis Logs'
110110
inputs:
111111
ArtifactName: SecurityLogs
112112

113-
- task: PostAnalysis@1
113+
- task: PostAnalysis@2
114114
displayName: 'Post Analysis'
115115
inputs:
116116
BinSkim: true
117117
CredScan: true
118118
PoliCheck: true
119119

120-
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
120+
- task: EsrpCodeSigning@2
121121
displayName: 'ESRP CodeSigning'
122122
inputs:
123123
ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet (AKV)'
124124
FolderPath: src
125125
signConfigType: inlineSignParams
126+
UseMinimatch: true
127+
Pattern: |
128+
**\*.exe
129+
**\*.dll
126130
inlineOperation: |
127131
[
128132
{
@@ -162,26 +166,27 @@ stages:
162166
}
163167
]
164168
SessionTimeout: 20
165-
169+
166170
# Pack
167171
- 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
168172
displayName: 'pack OpenAPI'
169-
173+
170174
# Pack
171175
- pwsh: dotnet pack $(Build.SourcesDirectory)/src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj -o $(Build.ArtifactStagingDirectory) --configuration $(BuildConfiguration) --no-build --include-symbols --include-source /p:SymbolPackageFormat=snupkg
172176
displayName: 'pack Readers'
173177

174178
# Pack
175179
- 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
176-
displayName: 'pack Hidi'
177-
178-
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
180+
displayName: 'pack Hidi'
181+
182+
- task: EsrpCodeSigning@2
179183
displayName: 'ESRP CodeSigning Nuget Packages'
180184
inputs:
181185
ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet (AKV)'
182186
FolderPath: '$(Build.ArtifactStagingDirectory)'
183187
Pattern: '*.nupkg'
184188
signConfigType: inlineSignParams
189+
UseMinimatch: true
185190
inlineOperation: |
186191
[
187192
{
@@ -209,7 +214,7 @@ stages:
209214
$xml = [Xml] (Get-Content .\src\Microsoft.OpenApi.Hidi\Microsoft.OpenApi.Hidi.csproj)
210215
$version = $xml.Project.PropertyGroup.Version
211216
echo $version
212-
echo "##vso[task.setvariable variable=hidiversion]$version"
217+
echo "##vso[task.setvariable variable=hidiversion]$version"
213218
214219
# publish hidi as an .exe
215220
- task: DotNetCoreCLI@2
@@ -219,7 +224,7 @@ stages:
219224
arguments: -c Release --runtime win-x64 /p:PublishSingleFile=true /p:PackAsTool=false --self-contained --output $(Build.ArtifactStagingDirectory)/Microsoft.OpenApi.Hidi-v$(hidiversion)
220225
projects: 'src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj'
221226
publishWebProjects: False
222-
zipAfterPublish: false
227+
zipAfterPublish: false
223228

224229
- task: CopyFiles@2
225230
displayName: Prepare staging folder for upload
@@ -236,7 +241,7 @@ stages:
236241

237242
- task: PublishBuildArtifacts@1
238243
displayName: 'Publish Artifact: Hidi'
239-
inputs:
244+
inputs:
240245
ArtifactName: Microsoft.OpenApi.Hidi-v$(hidiversion)
241246
PathtoPublish: '$(Build.ArtifactStagingDirectory)/Microsoft.OpenApi.Hidi-v$(hidiversion)'
242247

@@ -295,8 +300,8 @@ stages:
295300
{ "label" : "enhancement", "V2-Enhancement", "displayName" : "Enhancements", "state" : "closed" },
296301
{ "label" : "bug", "bug-fix", "displayName" : "Bugs", "state" : "closed" },
297302
{ "label" : "documentation", "doc", "displayName" : "Documentation", "state" : "closed"},
298-
{ "label" : "dependencies", "displayName" : "Package Updates", "state" : "closed" }]'
299-
303+
{ "label" : "dependencies", "displayName" : "Package Updates", "state" : "closed" }]'
304+
300305
- deployment: deploy_lib
301306
dependsOn: []
302307
environment: nuget-org

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ assignees: ''
1010
**Describe the bug**
1111
A clear and concise description of what the bug is.
1212

13-
**To Reproduce**
14-
Steps to reproduce the current behavior:
13+
**OpenApi File To Reproduce**
14+
Add the OpenApi file you're using or a link to it as well as the steps to reproduce the current behavior.
1515

1616
**Expected behavior**
1717
A clear and concise description of what you expected to happen.

.github/workflows/ci-cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
GITHUB_RUN_NUMBER: ${{ github.run_number }}
1515
steps:
1616
- name: Setup .NET
17-
uses: actions/setup-dotnet@v3
17+
uses: actions/setup-dotnet@v4
1818
with:
1919
dotnet-version: 7.0.x
2020

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ jobs:
1717
uses: actions/checkout@v4
1818

1919
- name: Setup .NET
20-
uses: actions/setup-dotnet@v3
20+
uses: actions/setup-dotnet@v4
2121
with:
2222
dotnet-version: 7.0.x
2323

2424
- name: Initialize CodeQL
2525
id: init_codeql
26-
uses: github/codeql-action/init@v2
26+
uses: github/codeql-action/init@v3
2727
with:
2828
queries: security-and-quality
2929

@@ -43,6 +43,6 @@ jobs:
4343
4444
- name: Perform CodeQL Analysis
4545
id: analyze_codeql
46-
uses: github/codeql-action/analyze@v2
46+
uses: github/codeql-action/analyze@v3
4747

4848
# Built with ❤ by [Pipeline Foundation](https://pipeline.foundation)

.github/workflows/sonarcloud.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ jobs:
3030
runs-on: windows-latest
3131
steps:
3232
- name: Set up JDK 17
33-
uses: actions/setup-java@v3
33+
uses: actions/setup-java@v4
3434
with:
3535
distribution: 'adopt'
3636
java-version: 17
3737
- name: Setup .NET 5 # At the moment the scanner requires dotnet 5 https://www.nuget.org/packages/dotnet-sonarscanner
38-
uses: actions/setup-dotnet@v3
38+
uses: actions/setup-dotnet@v4
3939
with:
4040
dotnet-version: 5.0.x
4141
- name: Setup .NET
42-
uses: actions/setup-dotnet@v3
42+
uses: actions/setup-dotnet@v4
4343
with:
4444
dotnet-version: 7.0.x
4545
- uses: actions/checkout@v4

docs/CI-CD_DOCUMENTATION.md

Lines changed: 0 additions & 81 deletions
This file was deleted.
-38.8 KB
Binary file not shown.

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

Lines changed: 3 additions & 3 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.3.6</Version>
12+
<Version>1.3.7</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 -->
@@ -34,8 +34,8 @@
3434
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
3535
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
3636
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
37-
<PackageReference Include="Microsoft.OData.Edm" Version="7.18.0" />
38-
<PackageReference Include="Microsoft.OpenApi.OData" Version="1.5.0-preview9" />
37+
<PackageReference Include="Microsoft.OData.Edm" Version="7.20.0" />
38+
<PackageReference Include="Microsoft.OpenApi.OData" Version="1.6.0-preview.2" />
3939
<PackageReference Include="Microsoft.OpenApi.ApiManifest" Version="0.5.0-preview" />
4040
<PackageReference Include="System.CommandLine.Hosting" Version="0.4.0-alpha.22272.1" />
4141
</ItemGroup>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<TargetFramework>netstandard2.0</TargetFramework>
44
<LangVersion>latest</LangVersion>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
6-
<Version>1.6.11</Version>
6+
<Version>1.6.12</Version>
77
<Description>OpenAPI.NET Readers for JSON and YAML documents</Description>
88
<SignAssembly>true</SignAssembly>
99
<!-- https://github.com/dotnet/sourcelink/blob/main/docs/README.md#embeduntrackedsources -->

src/Microsoft.OpenApi.Readers/ParseNodes/OpenApiAnyConverter.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ public static IOpenApiAny GetSpecificOpenApiAny(IOpenApiAny openApiAny, OpenApiS
6666
{
6767
if (DateTimeOffset.TryParse(value, CultureInfo.InvariantCulture, DateTimeStyles.None, out var dateTimeValue))
6868
{
69-
return new OpenApiDateTime(dateTimeValue);
69+
// if the time component is exactly midnight(00:00:00) meaning no time has elapsed, return a date-only value
70+
return dateTimeValue.TimeOfDay == TimeSpan.Zero ? new OpenApiDate(dateTimeValue.Date)
71+
: new OpenApiDateTime(dateTimeValue);
7072
}
7173
}
7274
else if (type == "string")

0 commit comments

Comments
 (0)