From fecac2aec59945d55432e303c3be1539493bd893 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 21:39:56 +0000 Subject: [PATCH 01/44] Bump Verify.Xunit from 22.5.0 to 22.6.0 Bumps [Verify.Xunit](https://github.com/VerifyTests/Verify) from 22.5.0 to 22.6.0. - [Release notes](https://github.com/VerifyTests/Verify/releases) - [Commits](https://github.com/VerifyTests/Verify/commits/22.6.0) --- updated-dependencies: - dependency-name: Verify.Xunit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index c234da25a..abaf54ce1 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -15,7 +15,7 @@ - + From b786bc075f08b8d80700c68ed2b1884e80c56f80 Mon Sep 17 00:00:00 2001 From: Maggie Kimani Date: Tue, 28 Nov 2023 17:45:56 +0300 Subject: [PATCH 02/44] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index c5b4cab90..a7d83e3dc 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -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. From 66b81674049371a7fff94b750a7d08fad1a75e27 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Nov 2023 21:44:30 +0000 Subject: [PATCH 03/44] Bump Moq from 4.20.69 to 4.20.70 Bumps [Moq](https://github.com/moq/moq) from 4.20.69 to 4.20.70. - [Release notes](https://github.com/moq/moq/releases) - [Changelog](https://github.com/devlooped/moq/blob/main/CHANGELOG.md) - [Commits](https://github.com/moq/moq/compare/v4.20.69...v4.20.70) --- updated-dependencies: - dependency-name: Moq dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .../Microsoft.OpenApi.Hidi.Tests.csproj | 2 +- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj index 8ea740315..4a5dd2ad2 100644 --- a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj +++ b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj @@ -13,7 +13,7 @@ - + diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index abaf54ce1..4e9ef5341 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -12,7 +12,7 @@ - + From bfacb4e3cab16c08a74d47ca759c0f6d58be354a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 30 Nov 2023 21:10:02 +0000 Subject: [PATCH 04/44] Bump Microsoft.OData.Edm from 7.18.0 to 7.19.0 Bumps Microsoft.OData.Edm from 7.18.0 to 7.19.0. --- updated-dependencies: - dependency-name: Microsoft.OData.Edm dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj b/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj index c5f3e09d0..85a6bafbb 100644 --- a/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj +++ b/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj @@ -34,7 +34,7 @@ - + From 5b408268e292a193cecacb87f47f4319bae7f9fd Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 4 Dec 2023 13:06:28 +0100 Subject: [PATCH 05/44] Fix unresolved references in OpenApiWalker --- src/Microsoft.OpenApi/Services/OpenApiWalker.cs | 3 ++- .../Walkers/WalkerLocationTests.cs | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.OpenApi/Services/OpenApiWalker.cs b/src/Microsoft.OpenApi/Services/OpenApiWalker.cs index 7ce011f4b..446663f6b 100644 --- a/src/Microsoft.OpenApi/Services/OpenApiWalker.cs +++ b/src/Microsoft.OpenApi/Services/OpenApiWalker.cs @@ -1091,7 +1091,8 @@ private void Walk(string context, Action walk) /// private bool ProcessAsReference(IOpenApiReferenceable referenceable, bool isComponent = false) { - var isReference = referenceable.Reference != null && !isComponent; + var isReference = referenceable.Reference != null && + (!isComponent || referenceable.UnresolvedReference); if (isReference) { Walk(referenceable); diff --git a/test/Microsoft.OpenApi.Tests/Walkers/WalkerLocationTests.cs b/test/Microsoft.OpenApi.Tests/Walkers/WalkerLocationTests.cs index 09c808a1e..83b7eb341 100644 --- a/test/Microsoft.OpenApi.Tests/Walkers/WalkerLocationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Walkers/WalkerLocationTests.cs @@ -233,6 +233,18 @@ public void LocateReferences() Headers = new Dictionary { ["test-header"] = testHeader + }, + SecuritySchemes = new Dictionary + { + ["test-secScheme"] = new OpenApiSecurityScheme + { + Reference = new OpenApiReference + { + Id = "reference-to-scheme", + Type = ReferenceType.SecurityScheme + }, + UnresolvedReference = true + } } } }; @@ -245,6 +257,7 @@ public void LocateReferences() "referenceAt: #/paths/~1/get/responses/200/content/application~1json/schema", "referenceAt: #/paths/~1/get/responses/200/headers/test-header", "referenceAt: #/components/schemas/derived/anyOf/0", + "referenceAt: #/components/securitySchemes/test-secScheme", "referenceAt: #/components/headers/test-header/schema" }); } From 8a4080177ed5942581b086adb971504f9a61f520 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 4 Dec 2023 13:10:59 +0100 Subject: [PATCH 06/44] Fix culture dependency in ParseDecimalWithFallbackOnOverflow_Overflows_ReturnsFallback test --- .../ParseNodes/ParserHelperTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/Microsoft.OpenApi.Readers.Tests/ParseNodes/ParserHelperTests.cs b/test/Microsoft.OpenApi.Readers.Tests/ParseNodes/ParserHelperTests.cs index b343abb5c..1368e103d 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/ParseNodes/ParserHelperTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/ParseNodes/ParserHelperTests.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. +using System.Globalization; using Microsoft.OpenApi.Readers.ParseNodes; using Xunit; @@ -18,7 +19,7 @@ public void ParseDecimalWithFallbackOnOverflow_ReturnsParsedValue() [Fact] public void ParseDecimalWithFallbackOnOverflow_Overflows_ReturnsFallback() { - Assert.Equal(10, ParserHelper.ParseDecimalWithFallbackOnOverflow(double.MaxValue.ToString(), 10)); + Assert.Equal(10, ParserHelper.ParseDecimalWithFallbackOnOverflow(double.MaxValue.ToString(CultureInfo.InvariantCulture), 10)); } } } From 7aa2e323643e8398d8d081386489e702d9b61829 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 21:09:57 +0000 Subject: [PATCH 07/44] Bump PublicApiGenerator from 11.0.0 to 11.1.0 Bumps [PublicApiGenerator](https://github.com/PublicApiGenerator/PublicApiGenerator) from 11.0.0 to 11.1.0. - [Release notes](https://github.com/PublicApiGenerator/PublicApiGenerator/releases) - [Commits](https://github.com/PublicApiGenerator/PublicApiGenerator/compare/11.0.0...11.1.0) --- updated-dependencies: - dependency-name: PublicApiGenerator dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 4e9ef5341..34da13b28 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -19,7 +19,7 @@ - + From 030d397434104aae3f7b15e4a3ef71507bc59e2d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 21:10:30 +0000 Subject: [PATCH 08/44] Bump Verify.Xunit from 22.6.0 to 22.7.1 Bumps [Verify.Xunit](https://github.com/VerifyTests/Verify) from 22.6.0 to 22.7.1. - [Release notes](https://github.com/VerifyTests/Verify/releases) - [Commits](https://github.com/VerifyTests/Verify/compare/22.6.0...22.7.1) --- updated-dependencies: - dependency-name: Verify.Xunit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 4e9ef5341..dd48c70af 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -15,7 +15,7 @@ - + From 7c20deed494108c54feca636e22fe7b9123e9c30 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 21:35:50 +0000 Subject: [PATCH 09/44] Bump actions/setup-java from 3 to 4 Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-java dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/sonarcloud.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index c6b975ae5..bcf9cbaf1 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -30,7 +30,7 @@ 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 From 252d08c48c2fc6708d6c3d039250fd70840c0c1f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 21:35:56 +0000 Subject: [PATCH 10/44] Bump actions/setup-dotnet from 3 to 4 Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 3 to 4. - [Release notes](https://github.com/actions/setup-dotnet/releases) - [Commits](https://github.com/actions/setup-dotnet/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-dotnet dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci-cd.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/sonarcloud.yml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 77dc8fd7b..95f001e1f 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -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 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f58bfa0c9..11c90f95b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v4 - name: Setup .NET - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: 7.0.x diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index c6b975ae5..bb84522e9 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -35,11 +35,11 @@ jobs: 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 From 6fd73a0c813b04c4de22c9e268bce1210cfb6118 Mon Sep 17 00:00:00 2001 From: Tim Heuer Date: Thu, 7 Dec 2023 07:56:04 -0800 Subject: [PATCH 11/44] Removing irrelevant docs --- docs/CI-CD_DOCUMENTATION.md | 81 ---------------------- docs/images/Actions_workflow_dispatch.png | Bin 39746 -> 0 bytes 2 files changed, 81 deletions(-) delete mode 100644 docs/CI-CD_DOCUMENTATION.md delete mode 100644 docs/images/Actions_workflow_dispatch.png diff --git a/docs/CI-CD_DOCUMENTATION.md b/docs/CI-CD_DOCUMENTATION.md deleted file mode 100644 index 40053cf82..000000000 --- a/docs/CI-CD_DOCUMENTATION.md +++ /dev/null @@ -1,81 +0,0 @@ -# CI/CD documentation - -## 1. Run workflow manually - -1. Go to the project's GitHub repository and click on the **Actions** tab - -2. From the "Workflows" list on the left, click on "CI/CD Pipeline" - -3. On the right, next to the "This workflow has a workflow_dispatch event trigger" label, click on the "Run workflow" dropdown, make sure the default branch is selected (if not manually changed, should be main or master) in the "Use workflow from" dropdown and click the "Run workflow" button - -![Actions_workflow_dispatch](images/Actions_workflow_dispatch.png) - -NOTE: **screenshots are only exemplary** - -
- -## 2. Automated NuGet publishing - -To setup the automated publishing to NuGet: - -1. Go to the repo **Settings** tab -> **Secrets** - -2. Add a secret with the name `NUGET_API_KEY` and as value use an API key from NuGet.org that is assigned to the packages for this project - -NOTE: the automated NuGet publishing is execute **only** when a release is triggered by the ["Automated versioning" feature](#3-automated-versioning) - -
- -## 3. Automated versioning - -Automatically bumps up the GitHub tag in the repo and executes the CD job - -Note: **not every commit to your default branch creates a release** - -Follow these instructions for any commit (push or PR merge) to your default branch, you would like to execute the automated versioning. - -You would need one of three keywords at the start of your commit title. Each of the three keywords corresponds to a number in your release version i.e. v1.2.3. The release versioning uses the ["Conventional Commits" specification](https://www.conventionalcommits.org/en/v1.0.0/): - -- "fix: ..." - this keyword corresponds to the last number v1.2.**3**, also known as PATCH; -- "feat: ..." - this keyword corresponds to the middle number v1.**2**.3, also known as MINOR; -- "perf: ..." - this keyword corresponds to the first number v**1**.2.3, also known as MAJOR. In addition, to trigger a MAJOR release, you would need to write "BREAKING CHANGE: ..." in the description of the commit, with an empty line above it to indicate it is in the