Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
fecac2a
Bump Verify.Xunit from 22.5.0 to 22.6.0
dependabot[bot] Nov 27, 2023
05c5615
Merge pull request #1483 from microsoft/dependabot/nuget/Verify.Xunit…
baywet Nov 27, 2023
b786bc0
Update bug_report.md
MaggieKimani1 Nov 28, 2023
2e77c9c
Merge pull request #1484 from microsoft/mk/update-issue-template
MaggieKimani1 Nov 28, 2023
66b8167
Bump Moq from 4.20.69 to 4.20.70
dependabot[bot] Nov 28, 2023
57084f4
Merge pull request #1485 from microsoft/dependabot/nuget/Moq-4.20.70
baywet Nov 28, 2023
bfacb4e
Bump Microsoft.OData.Edm from 7.18.0 to 7.19.0
dependabot[bot] Nov 30, 2023
d1cf89f
Merge pull request #1488 from microsoft/dependabot/nuget/Microsoft.OD…
baywet Nov 30, 2023
5b40826
Fix unresolved references in OpenApiWalker
dldl-cmd Dec 4, 2023
8a40801
Fix culture dependency in ParseDecimalWithFallbackOnOverflow_Overflow…
dldl-cmd Dec 4, 2023
c2ca883
Merge pull request #1492 from dldl-cmd/fix_ParseDecimalWithFallbackOn…
MaggieKimani1 Dec 4, 2023
7aa2e32
Bump PublicApiGenerator from 11.0.0 to 11.1.0
dependabot[bot] Dec 4, 2023
030d397
Bump Verify.Xunit from 22.6.0 to 22.7.1
dependabot[bot] Dec 4, 2023
7c20dee
Bump actions/setup-java from 3 to 4
dependabot[bot] Dec 4, 2023
252d08c
Bump actions/setup-dotnet from 3 to 4
dependabot[bot] Dec 4, 2023
47636da
Merge pull request #1496 from microsoft/dependabot/github_actions/act…
baywet Dec 4, 2023
d3fa9ef
Merge pull request #1494 from microsoft/dependabot/nuget/Verify.Xunit…
baywet Dec 4, 2023
7d49674
Merge pull request #1493 from microsoft/dependabot/nuget/PublicApiGen…
baywet Dec 4, 2023
f6777e4
Merge pull request #1495 from microsoft/dependabot/github_actions/act…
andrueastman Dec 5, 2023
2b1d082
Merge pull request #1491 from dldl-cmd/openapiwalker_references
MaggieKimani1 Dec 5, 2023
6fd73a0
Removing irrelevant docs
timheuer Dec 7, 2023
3c76bf7
Merge pull request #1497 from timheuer/vnext
baywet Dec 7, 2023
8491402
Bump Verify.Xunit from 22.7.1 to 22.8.0
dependabot[bot] Dec 7, 2023
808c868
Merge pull request #1498 from microsoft/dependabot/nuget/Verify.Xunit…
baywet Dec 7, 2023
fce5388
Bump Microsoft.OpenApi.OData from 1.5.0-preview9 to 1.5.0
dependabot[bot] Dec 8, 2023
05e43a4
Merge pull request #1500 from microsoft/dependabot/nuget/Microsoft.Op…
baywet Dec 8, 2023
2f7307f
Bump Microsoft.OData.Edm from 7.19.0 to 7.20.0
dependabot[bot] Dec 8, 2023
de67e95
Merge pull request #1499 from microsoft/dependabot/nuget/Microsoft.OD…
baywet Dec 9, 2023
0934c91
Bump xunit.runner.visualstudio from 2.5.4 to 2.5.5
dependabot[bot] Dec 11, 2023
9ad7599
Merge pull request #1501 from microsoft/dependabot/nuget/xunit.runner…
baywet Dec 11, 2023
3ebe0f0
Bump xunit from 2.6.2 to 2.6.3
dependabot[bot] Dec 11, 2023
ffd84ed
Merge pull request #1502 from microsoft/dependabot/nuget/xunit-2.6.3
baywet Dec 11, 2023
4f83e5d
Bump github/codeql-action from 2 to 3
dependabot[bot] Dec 18, 2023
0192123
Merge pull request #1505 from microsoft/dependabot/github_actions/git…
baywet Dec 18, 2023
3d551de
Bump Verify.Xunit from 22.8.0 to 22.10.0
dependabot[bot] Dec 22, 2023
18df497
Merge pull request #1508 from microsoft/dependabot/nuget/Verify.Xunit…
baywet Dec 24, 2023
26d3781
Bump xunit.runner.visualstudio from 2.5.5 to 2.5.6
dependabot[bot] Dec 25, 2023
18eb15f
Merge pull request #1511 from microsoft/dependabot/nuget/xunit.runner…
baywet Dec 26, 2023
ae5d32c
Bump xunit from 2.6.3 to 2.6.4
dependabot[bot] Dec 26, 2023
964e9be
Merge pull request #1509 from microsoft/dependabot/nuget/xunit-2.6.4
baywet Dec 26, 2023
09c9a74
Bump Verify.Xunit from 22.10.0 to 22.10.2
dependabot[bot] Dec 26, 2023
58e63cf
Merge pull request #1510 from microsoft/dependabot/nuget/Verify.Xunit…
baywet Dec 26, 2023
68c98bc
Bump Verify.Xunit from 22.10.2 to 22.11.0
dependabot[bot] Dec 27, 2023
ce628d2
Merge pull request #1512 from microsoft/dependabot/nuget/Verify.Xunit…
baywet Dec 28, 2023
5b11414
Bump Verify.Xunit from 22.11.0 to 22.11.1
dependabot[bot] Dec 28, 2023
d5c9ac8
Merge pull request #1513 from microsoft/dependabot/nuget/Verify.Xunit…
baywet Dec 29, 2023
d3eb935
Bump Verify.Xunit from 22.11.1 to 22.11.2
dependabot[bot] Jan 4, 2024
452c629
Merge pull request #1514 from microsoft/dependabot/nuget/Verify.Xunit…
baywet Jan 4, 2024
ab3d84f
Bump xunit from 2.6.4 to 2.6.5
dependabot[bot] Jan 5, 2024
f8822ff
Merge pull request #1516 from microsoft/dependabot/nuget/xunit-2.6.5
baywet Jan 6, 2024
fceb79d
Bump Verify.Xunit from 22.11.2 to 22.11.4
dependabot[bot] Jan 6, 2024
9f4870b
Merge pull request #1518 from microsoft/dependabot/nuget/Verify.Xunit…
baywet Jan 6, 2024
e3a5c93
Bump Microsoft.Windows.Compatibility from 8.0.0 to 8.0.1
dependabot[bot] Jan 9, 2024
ebb7903
Merge pull request #1520 from microsoft/dependabot/nuget/Microsoft.Wi…
baywet Jan 9, 2024
60d2640
- makes exception more explicit when inserting duplicated tree nodes
baywet Jan 10, 2024
f1ed266
Bump Verify.Xunit from 22.11.4 to 22.11.5
dependabot[bot] Jan 10, 2024
d48bf09
Merge pull request #1522 from microsoft/dependabot/nuget/Verify.Xunit…
baywet Jan 10, 2024
1465fff
Merge pull request #1521 from microsoft/baywet-patch-1
baywet Jan 11, 2024
e036750
- fixes a bug where paths with multiple parameters would be considere…
baywet Dec 18, 2023
670b259
- adds additional test
baywet Dec 18, 2023
a9a9572
Merge pull request #1504 from microsoft/bugfix/conflicting-path
baywet Jan 11, 2024
7e98da4
Update build tasks
MaggieKimani1 Mar 30, 2023
d8b89d9
Fix indentation
MaggieKimani1 Mar 30, 2023
163b7bb
Fix binskim target argument
MaggieKimani1 Mar 31, 2023
4de9313
Merge pull request #1200 from microsoft/mk/update-compliance-tasks
MaggieKimani1 Jan 12, 2024
a0d1f23
Write out NaN and Infinity primitive values as valid JSON strings
MaggieKimani1 Jan 15, 2024
f72ef89
Add test to validate
MaggieKimani1 Jan 15, 2024
46a95c8
Remove unnecessary using
MaggieKimani1 Jan 15, 2024
dbe10d2
Merge pull request #1527 from microsoft/mk/fix-json-writer-outputs-in…
MaggieKimani1 Jan 15, 2024
a99baf2
Replaced RegEx with IndexOf/Substring to avoid RegexMatchTimeoutExcep…
mthesing88 Jan 13, 2024
d77d40a
Bump xunit from 2.6.5 to 2.6.6
dependabot[bot] Jan 15, 2024
31f39c4
Merge pull request #1528 from microsoft/dependabot/nuget/xunit-2.6.6
andrueastman Jan 16, 2024
e3eaf4a
Bump up conversion lib.
irvinesunday Jan 16, 2024
16e9c7a
Use the TimeOfDay property of a date value to determine whether its a…
MaggieKimani1 Jan 16, 2024
230a17b
Add a test to validate
MaggieKimani1 Jan 16, 2024
ad57d5c
Fix formatting
MaggieKimani1 Jan 16, 2024
efb6831
Merge pull request #1530 from microsoft/mk/fix-data-and-type-mismatch
MaggieKimani1 Jan 16, 2024
9b67690
Merge pull request #1529 from microsoft/is/update-conv-lib-hidi
MaggieKimani1 Jan 16, 2024
d26a6d1
Bump lib versions
MaggieKimani1 Jan 16, 2024
a97138f
Merge pull request #1525 from mus65/regexmatchtimeout
MaggieKimani1 Jan 16, 2024
217d40a
Merge pull request #1531 from microsoft/mk/bump-libs
MaggieKimani1 Jan 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 27 additions & 22 deletions .azure-pipelines/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pool:
variables:
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
ProductBinPath: '$(Build.SourcesDirectory)\src\Microsoft.OpenApi\bin\$(BuildConfiguration)'
ProductBinPath: '$(Build.SourcesDirectory)\src\Microsoft.OpenApi\bin\$(BuildConfiguration)'


stages:
Expand All @@ -31,22 +31,22 @@ stages:
- job: build
steps:
- task: UseDotNet@2
displayName: 'Use .NET 2' # needed for ESRP signing
displayName: 'Use .NET 6' # needed for ESRP signing
inputs:
version: 2.x
version: 6.x

- task: UseDotNet@2
displayName: 'Use .NET 7'
inputs:
version: 7.x

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

- task: PoliCheck@1
- task: PoliCheck@2
displayName: 'Run PoliCheck "/test"'
inputs:
inputType: CmdLine
Expand Down Expand Up @@ -75,14 +75,14 @@ stages:
arguments: '--configuration $(BuildConfiguration) --no-build'

# CredScan
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3
displayName: 'Run CredScan - Src'
inputs:
toolMajorVersion: 'V2'
scanFolder: '$(Build.SourcesDirectory)\src'
debugMode: false

- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3
displayName: 'Run CredScan - Test'
inputs:
toolMajorVersion: 'V2'
Expand All @@ -95,34 +95,38 @@ stages:
FileDirPath: '$(ProductBinPath)'
enabled: false

- task: BinSkim@3
- task: BinSkim@4
displayName: 'Run BinSkim - Product Binaries'
inputs:
InputType: Basic
AnalyzeTarget: '$(ProductBinPath)\**\Microsoft.OpenApi.dll'
AnalyzeTargetGlob: '$(ProductBinPath)\**\Microsoft.OpenApi.dll'
AnalyzeSymPath: '$(ProductBinPath)'
AnalyzeVerbose: true
AnalyzeHashes: true
AnalyzeEnvironment: true

- task: PublishSecurityAnalysisLogs@2
- task: PublishSecurityAnalysisLogs@3
displayName: 'Publish Security Analysis Logs'
inputs:
ArtifactName: SecurityLogs

- task: PostAnalysis@1
- task: PostAnalysis@2
displayName: 'Post Analysis'
inputs:
BinSkim: true
CredScan: true
PoliCheck: true

- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
- task: EsrpCodeSigning@2
displayName: 'ESRP CodeSigning'
inputs:
ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet (AKV)'
FolderPath: src
signConfigType: inlineSignParams
UseMinimatch: true
Pattern: |
**\*.exe
**\*.dll
inlineOperation: |
[
{
Expand Down Expand Up @@ -162,26 +166,27 @@ stages:
}
]
SessionTimeout: 20

# Pack
- 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
displayName: 'pack OpenAPI'

# Pack
- 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
displayName: 'pack Readers'

# Pack
- 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
displayName: 'pack Hidi'
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
displayName: 'pack Hidi'

- task: EsrpCodeSigning@2
displayName: 'ESRP CodeSigning Nuget Packages'
inputs:
ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet (AKV)'
FolderPath: '$(Build.ArtifactStagingDirectory)'
Pattern: '*.nupkg'
signConfigType: inlineSignParams
UseMinimatch: true
inlineOperation: |
[
{
Expand Down Expand Up @@ -209,7 +214,7 @@ stages:
$xml = [Xml] (Get-Content .\src\Microsoft.OpenApi.Hidi\Microsoft.OpenApi.Hidi.csproj)
$version = $xml.Project.PropertyGroup.Version
echo $version
echo "##vso[task.setvariable variable=hidiversion]$version"
echo "##vso[task.setvariable variable=hidiversion]$version"

# publish hidi as an .exe
- task: DotNetCoreCLI@2
Expand All @@ -219,7 +224,7 @@ stages:
arguments: -c Release --runtime win-x64 /p:PublishSingleFile=true /p:PackAsTool=false --self-contained --output $(Build.ArtifactStagingDirectory)/Microsoft.OpenApi.Hidi-v$(hidiversion)
projects: 'src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj'
publishWebProjects: False
zipAfterPublish: false
zipAfterPublish: false

- task: CopyFiles@2
displayName: Prepare staging folder for upload
Expand All @@ -236,7 +241,7 @@ stages:

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: Hidi'
inputs:
inputs:
ArtifactName: Microsoft.OpenApi.Hidi-v$(hidiversion)
PathtoPublish: '$(Build.ArtifactStagingDirectory)/Microsoft.OpenApi.Hidi-v$(hidiversion)'

Expand Down Expand Up @@ -295,8 +300,8 @@ stages:
{ "label" : "enhancement", "V2-Enhancement", "displayName" : "Enhancements", "state" : "closed" },
{ "label" : "bug", "bug-fix", "displayName" : "Bugs", "state" : "closed" },
{ "label" : "documentation", "doc", "displayName" : "Documentation", "state" : "closed"},
{ "label" : "dependencies", "displayName" : "Package Updates", "state" : "closed" }]'
{ "label" : "dependencies", "displayName" : "Package Updates", "state" : "closed" }]'

- deployment: deploy_lib
dependsOn: []
environment: nuget-org
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ assignees: ''
**Describe the bug**
A clear and concise description of what the bug is.

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

**Expected behavior**
A clear and concise description of what you expected to happen.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
GITHUB_RUN_NUMBER: ${{ github.run_number }}
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x

- name: Initialize CodeQL
id: init_codeql
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
queries: security-and-quality

Expand All @@ -43,6 +43,6 @@ jobs:

- name: Perform CodeQL Analysis
id: analyze_codeql
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3

# Built with ❤ by [Pipeline Foundation](https://pipeline.foundation)
6 changes: 3 additions & 3 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ jobs:
runs-on: windows-latest
steps:
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
- name: Setup .NET 5 # At the moment the scanner requires dotnet 5 https://www.nuget.org/packages/dotnet-sonarscanner
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 5.0.x
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- uses: actions/checkout@v4
Expand Down
81 changes: 0 additions & 81 deletions docs/CI-CD_DOCUMENTATION.md

This file was deleted.

Binary file removed docs/images/Actions_workflow_dispatch.png
Binary file not shown.
6 changes: 3 additions & 3 deletions src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Nullable>enable</Nullable>
<ToolCommandName>hidi</ToolCommandName>
<PackageOutputPath>./../../artifacts</PackageOutputPath>
<Version>1.3.6</Version>
<Version>1.3.7</Version>
<Description>OpenAPI.NET CLI tool for slicing OpenAPI documents</Description>
<SignAssembly>true</SignAssembly>
<!-- https://github.com/dotnet/sourcelink/blob/main/docs/README.md#embeduntrackedsources -->
Expand All @@ -34,8 +34,8 @@
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Include="Microsoft.OData.Edm" Version="7.18.0" />
<PackageReference Include="Microsoft.OpenApi.OData" Version="1.5.0-preview9" />
<PackageReference Include="Microsoft.OData.Edm" Version="7.20.0" />
<PackageReference Include="Microsoft.OpenApi.OData" Version="1.6.0-preview.2" />
<PackageReference Include="Microsoft.OpenApi.ApiManifest" Version="0.5.0-preview" />
<PackageReference Include="System.CommandLine.Hosting" Version="0.4.0-alpha.22272.1" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>latest</LangVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>1.6.11</Version>
<Version>1.6.12</Version>
<Description>OpenAPI.NET Readers for JSON and YAML documents</Description>
<SignAssembly>true</SignAssembly>
<!-- https://github.com/dotnet/sourcelink/blob/main/docs/README.md#embeduntrackedsources -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ public static IOpenApiAny GetSpecificOpenApiAny(IOpenApiAny openApiAny, OpenApiS
{
if (DateTimeOffset.TryParse(value, CultureInfo.InvariantCulture, DateTimeStyles.None, out var dateTimeValue))
{
return new OpenApiDateTime(dateTimeValue);
// if the time component is exactly midnight(00:00:00) meaning no time has elapsed, return a date-only value
return dateTimeValue.TimeOfDay == TimeSpan.Zero ? new OpenApiDate(dateTimeValue.Date)
: new OpenApiDateTime(dateTimeValue);
}
}
else if (type == "string")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.421302" PrivateAssets="all" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="8.0.0" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="8.0.1" />
</ItemGroup>
<ItemGroup>
<Resource Include="Themes\Metro\HowToApplyTheme.txt" />
Expand Down
15 changes: 14 additions & 1 deletion src/Microsoft.OpenApi/Any/OpenApiPrimitive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT license.

using System;
using System.Globalization;
using System.Text;
using Microsoft.OpenApi.Exceptions;
using Microsoft.OpenApi.Properties;
Expand Down Expand Up @@ -74,7 +75,19 @@ public void Write(IOpenApiWriter writer, OpenApiSpecVersion specVersion)

case PrimitiveType.Double:
var doubleValue = (OpenApiDouble)(IOpenApiPrimitive)this;
writer.WriteValue(doubleValue.Value);
var actualValue = doubleValue.Value;
if (actualValue.Equals(double.NaN)
|| actualValue.Equals(double.NegativeInfinity)
|| actualValue.Equals(double.PositiveInfinity))
{
// Write out NaN, -Infinity, Infinity as strings
writer.WriteValue(actualValue.ToString(CultureInfo.InvariantCulture));
break;
}
else
{
writer.WriteValue(actualValue);
}
break;

case PrimitiveType.String:
Expand Down
Loading