From 242f2ffd25d354b3653045196af592b0ac30143a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 21:10:01 +0000 Subject: [PATCH 01/15] chore(deps): bump actions/setup-dotnet from 4 to 5 Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4 to 5. - [Release notes](https://github.com/actions/setup-dotnet/releases) - [Commits](https://github.com/actions/setup-dotnet/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-dotnet dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci-cd.yml | 6 +++--- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/sonarcloud.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 06a1402cf..4135aabc2 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@v4 + uses: actions/setup-dotnet@v5 with: dotnet-version: 8.x @@ -44,7 +44,7 @@ jobs: - uses: actions/checkout@v5 - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: dotnet-version: 8.x @@ -61,7 +61,7 @@ jobs: uses: actions/checkout@v5 - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: dotnet-version: 8.x diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 73da4beea..9839c4904 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v5 - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: dotnet-version: 8.0.x diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 5ec33537f..51f9b5986 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -40,7 +40,7 @@ jobs: distribution: 'adopt' java-version: 17 - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: dotnet-version: 8.0.x - uses: actions/checkout@v5 From d52190c88ebf9854e3b1e9be4e1c73d68994d850 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Sep 2025 21:05:10 +0000 Subject: [PATCH 02/15] Bump Microsoft.Extensions.DependencyInjection and 3 others Bumps Microsoft.Extensions.DependencyInjection from 9.0.8 to 9.0.9 Bumps Microsoft.Extensions.Logging from 9.0.8 to 9.0.9 Bumps Microsoft.Extensions.Logging.Console from 9.0.8 to 9.0.9 Bumps System.Text.Json from 9.0.8 to 9.0.9 --- updated-dependencies: - dependency-name: Microsoft.Extensions.DependencyInjection dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: Microsoft.Extensions.Logging dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: Microsoft.Extensions.Logging.Console dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: System.Text.Json dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- performance/resultsComparer/resultsComparer.csproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/performance/resultsComparer/resultsComparer.csproj b/performance/resultsComparer/resultsComparer.csproj index 4e498fcbc..c9a3b9a14 100644 --- a/performance/resultsComparer/resultsComparer.csproj +++ b/performance/resultsComparer/resultsComparer.csproj @@ -8,12 +8,12 @@ - - - + + + - + From 53ced4e460a8036881b6eeeadfc0d45c7fe3fc0c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Sep 2025 21:06:53 +0000 Subject: [PATCH 03/15] Bump Microsoft.Windows.Compatibility from 9.0.8 to 9.0.9 --- updated-dependencies: - dependency-name: Microsoft.Windows.Compatibility dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .../Microsoft.OpenApi.Workbench.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.OpenApi.Workbench/Microsoft.OpenApi.Workbench.csproj b/src/Microsoft.OpenApi.Workbench/Microsoft.OpenApi.Workbench.csproj index 60097a0f1..cfd669367 100644 --- a/src/Microsoft.OpenApi.Workbench/Microsoft.OpenApi.Workbench.csproj +++ b/src/Microsoft.OpenApi.Workbench/Microsoft.OpenApi.Workbench.csproj @@ -13,7 +13,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + From 323c1f565f9c2518660102c12deff77eb3f757ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Sep 2025 12:10:39 +0000 Subject: [PATCH 04/15] Bump Microsoft.Extensions.Logging.Abstractions from 9.0.8 to 9.0.9 --- updated-dependencies: - dependency-name: Microsoft.Extensions.Logging.Abstractions dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch ... 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 7d7b1ee74..b41102cb2 100644 --- a/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj +++ b/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj @@ -30,7 +30,7 @@ - + From 0b062dcda8fc607b689b13ad7aa08156711537e9 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 10 Sep 2025 08:16:05 -0400 Subject: [PATCH 05/15] chore: updates logging dependencies --- performance/resultsComparer/resultsComparer.csproj | 2 +- src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/performance/resultsComparer/resultsComparer.csproj b/performance/resultsComparer/resultsComparer.csproj index c9a3b9a14..82a71aab7 100644 --- a/performance/resultsComparer/resultsComparer.csproj +++ b/performance/resultsComparer/resultsComparer.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj b/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj index b41102cb2..bcb83b96c 100644 --- a/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj +++ b/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj @@ -29,10 +29,10 @@ - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all From 5ae62484ed6480d6d0ac8885891e34d165cc13a4 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 10 Sep 2025 08:17:02 -0400 Subject: [PATCH 06/15] chore: updates edm dep --- 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 bcb83b96c..72a6485ea 100644 --- a/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj +++ b/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj @@ -38,7 +38,7 @@ all - + From 6206f1743c2c0e3183c4af7bab42efa419753b5e Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 10 Sep 2025 08:18:19 -0400 Subject: [PATCH 07/15] chore: updates xunit deps --- .../Microsoft.OpenApi.Hidi.Tests.csproj | 2 +- .../Microsoft.OpenApi.Readers.Tests.csproj | 2 +- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 4 ++-- 3 files changed, 4 insertions(+), 4 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 b5f2eac57..20f6516a7 100644 --- a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj +++ b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj @@ -17,7 +17,7 @@ - + diff --git a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj index 7bb3debb9..f97af0d1e 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj +++ b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj @@ -21,7 +21,7 @@ - + diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 4105c26a5..9e9ca4de5 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -14,9 +14,9 @@ - + - + From 6bed1d9eb80f67e5a98d0d84ba10632f0a90d3df Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 10 Sep 2025 08:20:12 -0400 Subject: [PATCH 08/15] chore: updates STJ dep --- .../Microsoft.OpenApi.Readers.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.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj index f97af0d1e..bfe4ffc17 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj +++ b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj @@ -19,7 +19,7 @@ - + diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 9e9ca4de5..c833527fd 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -13,7 +13,7 @@ - + From 96d942d0ac031c47c8283d58793cc24e5d95fa11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Sep 2025 21:03:54 +0000 Subject: [PATCH 09/15] chore(deps): bump dotnet-sdk from 8.0.413 to 8.0.414 Bumps [dotnet-sdk](https://github.com/dotnet/sdk) from 8.0.413 to 8.0.414. - [Release notes](https://github.com/dotnet/sdk/releases) - [Commits](https://github.com/dotnet/sdk/compare/v8.0.413...v8.0.414) --- updated-dependencies: - dependency-name: dotnet-sdk dependency-version: 8.0.414 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 4a56be52d..da70a0aea 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "8.0.413" + "version": "8.0.414" } } \ No newline at end of file From 4b31bc368ccf4b77f68b0be59d6c29dc0164a545 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 21:18:52 +0000 Subject: [PATCH 10/15] Bump BenchmarkDotNet from 0.15.2 to 0.15.3 --- updated-dependencies: - dependency-name: BenchmarkDotNet dependency-version: 0.15.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- performance/benchmark/PerformanceTests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/performance/benchmark/PerformanceTests.csproj b/performance/benchmark/PerformanceTests.csproj index cd388ff6d..643e31a91 100644 --- a/performance/benchmark/PerformanceTests.csproj +++ b/performance/benchmark/PerformanceTests.csproj @@ -14,7 +14,7 @@ CA1822 - + From 8968cdd98163149fdc61b4e7f1070e63a9bd1597 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Sep 2025 21:03:53 +0000 Subject: [PATCH 11/15] Bump BenchmarkDotNet.Diagnostics.Windows from 0.15.2 to 0.15.3 --- updated-dependencies: - dependency-name: BenchmarkDotNet.Diagnostics.Windows dependency-version: 0.15.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- performance/benchmark/PerformanceTests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/performance/benchmark/PerformanceTests.csproj b/performance/benchmark/PerformanceTests.csproj index 643e31a91..da824f498 100644 --- a/performance/benchmark/PerformanceTests.csproj +++ b/performance/benchmark/PerformanceTests.csproj @@ -15,7 +15,7 @@ - + From 292b8ed8da8b92c48fb2a0a58d222f5a2e5236bd Mon Sep 17 00:00:00 2001 From: Peter Bons Date: Fri, 19 Sep 2025 14:23:24 +0200 Subject: [PATCH 12/15] Merge pull request #2509 from Expecho/patch-1 docs: fix wrong version specification in hidi examples in readme.md --- src/Microsoft.OpenApi.Hidi/readme.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.OpenApi.Hidi/readme.md b/src/Microsoft.OpenApi.Hidi/readme.md index 7a7667e02..38efe66ae 100644 --- a/src/Microsoft.OpenApi.Hidi/readme.md +++ b/src/Microsoft.OpenApi.Hidi/readme.md @@ -95,19 +95,19 @@ This command accepts the following parameters: 1. Filtering by OperationIds ```bash -hidi transform -d files\People.yml -f yaml -o files\People.yml -v OpenApi3_0 --op users_UpdateInsights --co +hidi transform -d files\People.yml -f yaml -o files\People.yml -v 3.0 --op users_UpdateInsights --co ``` 2. Filtering by Postman collection ```bash -hidi transform --openapi files\People.yml --format yaml --output files\People2.yml --version OpenApi3_0 --filter-by-collection Graph-Collection-0017059134807617005.postman_collection.json +hidi transform --openapi files\People.yml --format yaml --output files\People2.yml --version 3.0 --filter-by-collection Graph-Collection-0017059134807617005.postman_collection.json ``` 3. CSDL--->OpenAPI conversion and filtering ```bash -hidi transform --csdl Files/Todo.xml --output Files/Todo-subset.yml --format yaml --version OpenApi3_0 --filter-by-operationids Todos.Todo.UpdateTodo +hidi transform --csdl Files/Todo.xml --output Files/Todo-subset.yml --format yaml --version 3.0 --filter-by-operationids Todos.Todo.UpdateTodo ``` 4. CSDL Filtering by EntitySets and Singletons @@ -138,4 +138,5 @@ This command generates an OpenAI style Plugin manifest and minimal OpenAPI file hidi plugin -m exampleApiManifest.yml -o mypluginfolder ``` -> Run `hidi plugin -h` to see all the available usage options. \ No newline at end of file + +> Run `hidi plugin -h` to see all the available usage options. From d93689c87ababdf64a82dc492a19b963f65b3fd1 Mon Sep 17 00:00:00 2001 From: Jonathan Porter Date: Fri, 19 Sep 2025 10:56:00 -0400 Subject: [PATCH 13/15] Merge pull request #2487 from jkporter/main fix: Fix URL processing in InternalLoad method would not detect the filename/scheme properly in some scenarios --- .../Reader/OpenApiModelFactory.cs | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs b/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs index 0b0fee38b..6f02d9426 100644 --- a/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs +++ b/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs @@ -302,8 +302,8 @@ private static ReadResult InternalLoad(MemoryStream input, string format, OpenAp Stream stream; string? format; - if (url.StartsWith("http", StringComparison.OrdinalIgnoreCase) - || url.StartsWith("https", StringComparison.OrdinalIgnoreCase)) + if (url.StartsWith("http:", StringComparison.OrdinalIgnoreCase) + || url.StartsWith("https:", StringComparison.OrdinalIgnoreCase)) { var response = await settings.HttpClient.GetAsync(url, token).ConfigureAwait(false); var mediaType = response.Content.Headers.ContentType?.MediaType; @@ -320,15 +320,27 @@ private static ReadResult InternalLoad(MemoryStream input, string format, OpenAp } else { - format = Path.GetExtension(url).Split('.').LastOrDefault(); - try { - var fileInput = new FileInfo(url); + string fileName; + if (url.StartsWith("file:", StringComparison.OrdinalIgnoreCase)) + { + fileName = new Uri(url).LocalPath; + } + else + { + fileName = url; + } + + format = Path.GetExtension(fileName).Split('.').LastOrDefault(); + + var fileInput = new FileInfo(fileName); stream = fileInput.OpenRead(); } catch (Exception ex) when ( ex is + UriFormatException or + FormatException or FileNotFoundException or PathTooLongException or DirectoryNotFoundException or From ae03eaba3fe7aa20bf0d03f895bbd4ae85d9d344 Mon Sep 17 00:00:00 2001 From: David Brodski <129956+kammerjaeger@users.noreply.github.com> Date: Fri, 19 Sep 2025 19:35:23 -0400 Subject: [PATCH 14/15] Fix OpenApiEncoding explode property serialization (to main) (#2512) fix: OpenApiEncoding explode property serialization defaults with form style --- .../Models/OpenApiEncoding.cs | 17 +++++-- .../Models/OpenApiEncodingTests.cs | 50 +++++++++++++++++++ 2 files changed, 64 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.OpenApi/Models/OpenApiEncoding.cs b/src/Microsoft.OpenApi/Models/OpenApiEncoding.cs index b478b8074..d12a24b5f 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiEncoding.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiEncoding.cs @@ -11,6 +11,10 @@ namespace Microsoft.OpenApi /// public class OpenApiEncoding : IOpenApiSerializable, IOpenApiExtensible { + /// + /// Explode backing variable + /// + private bool? _explode; /// /// The Content-Type for encoding a specific property. /// The value can be a specific media type (e.g. application/json), @@ -35,7 +39,11 @@ public class OpenApiEncoding : IOpenApiSerializable, IOpenApiExtensible /// For all other styles, the default value is false. /// This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded. /// - public bool? Explode { get; set; } + public bool? Explode + { + get => _explode ?? Style == ParameterStyle.Form; + set => _explode = value; + } /// /// Determines whether the parameter value SHOULD allow reserved characters, @@ -63,7 +71,7 @@ public OpenApiEncoding(OpenApiEncoding encoding) ContentType = encoding?.ContentType ?? ContentType; Headers = encoding?.Headers != null ? new Dictionary(encoding.Headers) : null; Style = encoding?.Style ?? Style; - Explode = encoding?.Explode ?? Explode; + Explode = encoding?._explode; AllowReserved = encoding?.AllowReserved ?? AllowReserved; Extensions = encoding?.Extensions != null ? new Dictionary(encoding.Extensions) : null; } @@ -106,7 +114,10 @@ private void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version writer.WriteProperty(OpenApiConstants.Style, Style?.GetDisplayName()); // explode - writer.WriteProperty(OpenApiConstants.Explode, Explode, false); + if (_explode.HasValue) + { + writer.WriteProperty(OpenApiConstants.Explode, Explode); + } // allowReserved writer.WriteProperty(OpenApiConstants.AllowReserved, AllowReserved, false); diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiEncodingTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiEncodingTests.cs index 0d57b6ee7..81d6426ad 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiEncodingTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiEncodingTests.cs @@ -76,5 +76,55 @@ public async Task SerializeAdvanceEncodingAsV3YamlWorks() expected = expected.MakeLineBreaksEnvironmentNeutral(); Assert.Equal(expected, actual); } + + [Theory] + [InlineData(ParameterStyle.Form, true)] + [InlineData(ParameterStyle.SpaceDelimited, false)] + [InlineData(null, false)] + public void WhenStyleIsFormTheDefaultValueOfExplodeShouldBeTrueOtherwiseFalse(ParameterStyle? style, bool expectedExplode) + { + // Arrange + var parameter = new OpenApiEncoding + { + Style = style + }; + + // Act & Assert + Assert.Equal(parameter.Explode, expectedExplode); + } + + [Theory] + [InlineData(true, true)] + [InlineData(false, true)] + [InlineData(null, false)] + public async Task WhenExplodeIsSetOutputShouldHaveExplode(bool? expectedExplode, bool hasExplode) + { + // Arrange + OpenApiEncoding parameter = new() + { + ContentType = "multipart/form-data", + Style = ParameterStyle.Form, + Explode = expectedExplode, + }; + + var expected = + $""" + contentType: multipart/form-data + style: form + """; + + if (hasExplode) + { + expected = expected + $"\nexplode: {expectedExplode.ToString().ToLower()}"; + } + + // Act + var actual = await parameter.SerializeAsYamlAsync(OpenApiSpecVersion.OpenApi3_0); + + // Assert + actual = actual.MakeLineBreaksEnvironmentNeutral(); + expected = expected.MakeLineBreaksEnvironmentNeutral(); + Assert.Equal(actual, expected); + } } } From 8384492c6c44f0bf1ffa37bfe1e6917e3e8c9a39 Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 23:35:58 +0000 Subject: [PATCH 15/15] chore(main): release 2.3.2 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ Directory.Build.props | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2d96c4d32..c5e4ca3d4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.3.1" + ".": "2.3.2" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 936c09082..ee0c0d4ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [2.3.2](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.1...v2.3.2) (2025-09-19) + + +### Bug Fixes + +* Fix URL processing in InternalLoad method would not detect the filename/scheme properly in some scenarios ([d93689c](https://github.com/microsoft/OpenAPI.NET/commit/d93689c87ababdf64a82dc492a19b963f65b3fd1)) +* OpenApiEncoding explode property serialization defaults with form style ([ae03eab](https://github.com/microsoft/OpenAPI.NET/commit/ae03eaba3fe7aa20bf0d03f895bbd4ae85d9d344)) + ## [2.3.1](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.0...v2.3.1) (2025-09-08) diff --git a/Directory.Build.props b/Directory.Build.props index 7e7b7f52e..9e0c6a8d6 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. OpenAPI .NET - 2.3.1 + 2.3.2