From ab1ea509ec671467e602afe25606b1840e529491 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sun, 31 Aug 2025 08:11:12 +0200 Subject: [PATCH 01/22] feat: update tools and readme --- .config/dotnet-tools.json | 4 ++-- README.md | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 13f3a42..929748a 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -10,14 +10,14 @@ "rollForward": false }, "dotnet-serve": { - "version": "1.10.175", + "version": "1.10.190", "commands": [ "dotnet-serve" ], "rollForward": false }, "fantomas": { - "version": "7.0.0", + "version": "7.0.3", "commands": [ "fantomas" ], diff --git a/README.md b/README.md index 10819c3..f24c38a 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,18 @@ -# SwaggerProvider [![NuGet Badge](https://buildstats.info/nuget/SwaggerProvider)](https://www.nuget.org/packages/SwaggerProvider) +# SwaggerProvider -This SwaggerProvider can be used to access RESTful API generated using [Swagger.io](http://swagger.io) +![NuGet Version](https://badgen.net/nuget/v/SwaggerProvider) ![NuGet Downloads](https://badgen.net/nuget/dt/SwaggerProvider) -[![Build Status](https://github.com/fsprojects/SwaggerProvider/workflows/Build%20and%20Test/badge.svg?branch=master)](https://github.com/fsprojects/SwaggerProvider/actions?query=branch%3Amaster) +This SwaggerProvider can be used to access RESTful API generated using [Swagger.io](http://swagger.io) -Documentation: http://fsprojects.github.io/SwaggerProvider/ +Documentation: ## Swagger RESTful API Documentation Specification Swagger is available for ASP.NET WebAPI APIs with [Swashbuckle](https://github.com/domaindrivendev/Swashbuckle). Also possible to [Create an ASP.NET API app in Azure App Service](https://azure.microsoft.com/en-us/documentation/articles/app-service-dotnet-create-api-app/) - ## Maintainer(s) - [@sergey-tihon](https://github.com/sergey-tihon) The default maintainer account for projects under "fsprojects" is @fsprojectsgit - F# Community Project Incubation Space (repo management) - From ede95864dd03212bf16dbb7e7fe784908c4dbd5b Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sun, 31 Aug 2025 09:21:32 +0200 Subject: [PATCH 02/22] hk: deps update & Microsoft.OpenApi 2.3 --- docs/RELEASE_NOTES.md | 6 + paket.dependencies | 10 +- paket.lock | 518 +++++++++--------- src/Common/AssemblyInfo.fs | 8 +- .../paket.references | 3 +- tests/SwaggerProvider.Tests/paket.references | 2 +- 6 files changed, 276 insertions(+), 271 deletions(-) diff --git a/docs/RELEASE_NOTES.md b/docs/RELEASE_NOTES.md index 77c8dc1..5395dce 100644 --- a/docs/RELEASE_NOTES.md +++ b/docs/RELEASE_NOTES.md @@ -1,3 +1,9 @@ +#### 2.4.0 - Aug 31, 2025 + +- Microsoft.OpenApi v2.3.0 +- Removed dependency on Microsoft.OpenApi.Readers +- Dependencies update + #### 2.3.1 - May 13, 2025 - Performance improvement: ProvidedTypes update to the most recent version (#267) diff --git a/paket.dependencies b/paket.dependencies index 3519eb2..e051f66 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -1,11 +1,11 @@ -version 8.0.3 +version 9.0.2 source https://api.nuget.org/v3/index.json storage: none -nuget FSharp.Core ~> 6 // We need task{} CE from F# 6.0 -nuget System.Text.Json ~> 6 +nuget FSharp.Core ~> 8 +nuget System.Text.Json ~> 8 nuget FSharp.SystemTextJson -nuget Microsoft.OpenApi.Readers +nuget Microsoft.OpenApi nuget NETStandard.Library.NETFramework # delete when we drop custom parser for v2 @@ -41,5 +41,5 @@ group Test nuget Microsoft.NET.Test.Sdk nuget FsUnit.Xunit - nuget Microsoft.OpenApi.Readers redirects: force + nuget Microsoft.OpenApi redirects: force nuget FSharp.SystemTextJson diff --git a/paket.lock b/paket.lock index f143915..381485e 100644 --- a/paket.lock +++ b/paket.lock @@ -1,59 +1,55 @@ STORAGE: NONE NUGET remote: https://api.nuget.org/v3/index.json - FSharp.Core (6.0.7) - FSharp.SystemTextJson (1.3.13) + FSharp.Core (8.0.403) + FSharp.SystemTextJson (1.4.36) FSharp.Core (>= 4.7) - restriction: >= netstandard2.0 - System.Text.Json (>= 6.0) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (9.0.1) - restriction: || (>= net461) (&& (< netcoreapp3.1) (>= netstandard2.0)) + System.Text.Json (>= 6.0.10) - restriction: >= netstandard2.0 + Microsoft.Bcl.AsyncInterfaces (9.0.8) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) Microsoft.NETCore.Platforms (7.0.4) - restriction: >= net461 - Microsoft.OpenApi (1.6.24) - restriction: >= netstandard2.0 - Microsoft.OpenApi.Readers (1.6.24) - Microsoft.OpenApi (>= 1.6.24) - restriction: >= netstandard2.0 - SharpYaml (>= 2.1.1) - restriction: >= netstandard2.0 + Microsoft.OpenApi (2.3) + System.Text.Json (>= 8.0.5) - restriction: >= netstandard2.0 NETStandard.Library (2.0.3) - restriction: >= net461 Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (>= net45) (< netstandard1.3)) (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0)) (&& (>= net46) (< netstandard1.4)) (>= net461) (>= netcoreapp2.0) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8) (< win8)) (&& (< netstandard1.0) (< portable-net45+win8) (>= portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard1.3) (< win8) (>= wpa81)) (&& (< netstandard1.5) (>= uap10.0)) (>= uap10.1) (>= wp8) NETStandard.Library.NETFramework (2.0.0-preview2-25405-01) Microsoft.NETCore.Platforms (>= 2.0.0-preview2-25405-01) - restriction: >= net461 NETStandard.Library (>= 2.0.0-preview2-25401-01) - restriction: >= net461 - SharpYaml (2.1.1) - restriction: >= netstandard2.0 - System.Buffers (4.6) - restriction: || (>= net461) (&& (< net6.0) (>= netcoreapp3.1)) (&& (< netcoreapp2.1) (>= netstandard2.0)) (&& (< netcoreapp3.1) (>= netstandard2.0)) - System.Memory (4.6) - restriction: || (>= net461) (&& (< net6.0) (>= netcoreapp3.1)) (&& (< netcoreapp3.1) (>= netstandard2.0)) - System.Buffers (>= 4.6) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0)) - System.Numerics.Vectors (>= 4.6) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.1) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0)) - System.Numerics.Vectors (4.6) - restriction: || (>= net461) (&& (< netcoreapp2.1) (>= netstandard2.0)) (&& (< netcoreapp3.1) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (6.1) - restriction: || (>= net461) (&& (< net6.0) (>= netcoreapp3.1)) (&& (< netcoreapp2.1) (>= netstandard2.0)) (&& (< netcoreapp3.1) (>= netstandard2.0)) - System.Text.Encodings.Web (9.0.1) - restriction: || (>= net461) (&& (< net6.0) (>= netcoreapp3.1)) (&& (< netcoreapp3.1) (>= netstandard2.0)) + System.Buffers (4.6.1) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= net7.0) (< net8.0)) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) + System.Memory (4.6.3) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= net7.0) (< net8.0)) + System.Buffers (>= 4.6.1) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) + System.Numerics.Vectors (>= 4.6.1) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) + System.Runtime.CompilerServices.Unsafe (>= 6.1.2) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) + System.Numerics.Vectors (4.6.1) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) + System.Runtime.CompilerServices.Unsafe (6.1.2) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= net7.0) (< net8.0)) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) + System.Text.Encodings.Web (9.0.8) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= net7.0) (< net8.0)) System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) - System.Text.Json (6.0.11) - Microsoft.Bcl.AsyncInterfaces (>= 6.0) - restriction: || (>= net461) (&& (< netcoreapp3.1) (>= netstandard2.0)) - System.Buffers (>= 4.5.1) - restriction: || (>= net461) (&& (< netcoreapp3.1) (>= netstandard2.0)) - System.Memory (>= 4.5.4) - restriction: || (>= net461) (&& (< netcoreapp3.1) (>= netstandard2.0)) - System.Numerics.Vectors (>= 4.5) - restriction: || (>= net461) (&& (< netcoreapp3.1) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net461) (&& (< net6.0) (>= netcoreapp3.1)) (&& (< netcoreapp3.1) (>= netstandard2.0)) - System.Text.Encodings.Web (>= 6.0.1) - restriction: || (>= net461) (&& (< net6.0) (>= netcoreapp3.1)) (&& (< netcoreapp3.1) (>= netstandard2.0)) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net461) (&& (< netcoreapp3.1) (>= netstandard2.0)) - System.ValueTuple (>= 4.5) - restriction: >= net461 - System.Threading.Tasks.Extensions (4.6) - restriction: || (>= net461) (&& (< netcoreapp3.1) (>= netstandard2.0)) (&& (>= netstandard2.0) (< netstandard2.1)) - System.Runtime.CompilerServices.Unsafe (>= 6.1) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0)) - System.ValueTuple (4.6.1) - restriction: >= net461 + System.Text.Json (8.0.6) + Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) + System.Text.Encodings.Web (>= 8.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= net7.0) (< net8.0)) + System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.ValueTuple (>= 4.5) - restriction: >= net462 + System.Threading.Tasks.Extensions (4.6.3) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (< netstandard2.1)) + System.Runtime.CompilerServices.Unsafe (>= 6.1.2) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) + System.ValueTuple (4.6.1) - restriction: >= net462 YamlDotNet (16.3) GITHUB remote: fsprojects/FSharp.TypeProviders.SDK - src/ProvidedTypes.fs (3b22420be5eddecaee89105d208cc4fb7b2e4df3) - src/ProvidedTypes.fsi (3b22420be5eddecaee89105d208cc4fb7b2e4df3) + src/ProvidedTypes.fs (ce34c1cc71096857b8342f1dedf93391addc9df6) + src/ProvidedTypes.fsi (ce34c1cc71096857b8342f1dedf93391addc9df6) remote: fsprojects/FSharp.Data - src/FSharp.Data.Runtime.Utilities/NameUtils.fs (db461d259bbaba330ca0c9255e9b957043a34b84) - src/FSharp.Data.Runtime.Utilities/Pluralizer.fs (db461d259bbaba330ca0c9255e9b957043a34b84) + src/FSharp.Data.Runtime.Utilities/NameUtils.fs (70733c01c059ae9ca832303e331113b08772083b) + src/FSharp.Data.Runtime.Utilities/Pluralizer.fs (70733c01c059ae9ca832303e331113b08772083b) GROUP Server RESTRICTION: == net9.0 NUGET remote: https://api.nuget.org/v3/index.json - FSharp.Core (9.0.101) + FSharp.Core (9.0.303) Microsoft.AspNetCore (2.3) Microsoft.AspNetCore.Diagnostics (>= 2.3) Microsoft.AspNetCore.HostFiltering (>= 2.3) @@ -86,31 +82,31 @@ NUGET Microsoft.AspNetCore.Authentication.Abstractions (>= 2.3) Microsoft.AspNetCore.Http (>= 2.3) Microsoft.AspNetCore.Http.Extensions (>= 2.3) - Microsoft.AspNetCore.Authorization (9.0.1) - Microsoft.AspNetCore.Metadata (>= 9.0.1) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.1) - Microsoft.Extensions.Options (>= 9.0.1) + Microsoft.AspNetCore.Authorization (9.0.8) + Microsoft.AspNetCore.Metadata (>= 9.0.8) + Microsoft.Extensions.Logging.Abstractions (>= 9.0.8) + Microsoft.Extensions.Options (>= 9.0.8) Microsoft.AspNetCore.Authorization.Policy (2.3) Microsoft.AspNetCore.Authentication.Abstractions (>= 2.3) Microsoft.AspNetCore.Authorization (>= 2.3) - Microsoft.AspNetCore.Connections.Abstractions (9.0.1) - Microsoft.Extensions.Features (>= 9.0.1) + Microsoft.AspNetCore.Connections.Abstractions (9.0.8) + Microsoft.Extensions.Features (>= 9.0.8) Microsoft.AspNetCore.Cors (2.3) Microsoft.AspNetCore.Http.Extensions (>= 2.3) Microsoft.Extensions.Configuration.Abstractions (>= 8.0) Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2) Microsoft.Extensions.Logging.Abstractions (>= 8.0.2) Microsoft.Extensions.Options (>= 8.0.2) - Microsoft.AspNetCore.Cryptography.Internal (9.0.1) - Microsoft.AspNetCore.DataProtection (9.0.1) - Microsoft.AspNetCore.Cryptography.Internal (>= 9.0.1) - Microsoft.AspNetCore.DataProtection.Abstractions (>= 9.0.1) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1) - Microsoft.Extensions.Hosting.Abstractions (>= 9.0.1) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.1) - Microsoft.Extensions.Options (>= 9.0.1) - System.Security.Cryptography.Xml (>= 9.0.1) - Microsoft.AspNetCore.DataProtection.Abstractions (9.0.1) + Microsoft.AspNetCore.Cryptography.Internal (9.0.8) + Microsoft.AspNetCore.DataProtection (9.0.8) + Microsoft.AspNetCore.Cryptography.Internal (>= 9.0.8) + Microsoft.AspNetCore.DataProtection.Abstractions (>= 9.0.8) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) + Microsoft.Extensions.Hosting.Abstractions (>= 9.0.8) + Microsoft.Extensions.Logging.Abstractions (>= 9.0.8) + Microsoft.Extensions.Options (>= 9.0.8) + System.Security.Cryptography.Xml (>= 9.0.8) + Microsoft.AspNetCore.DataProtection.Abstractions (9.0.8) Microsoft.AspNetCore.Diagnostics (2.3) Microsoft.AspNetCore.Diagnostics.Abstractions (>= 2.3) Microsoft.AspNetCore.Hosting.Abstractions (>= 2.3) @@ -168,7 +164,7 @@ NUGET Microsoft.AspNetCore.Http.Features (5.0.17) Microsoft.Extensions.Primitives (>= 5.0.1) System.IO.Pipelines (>= 5.0.2) - Microsoft.AspNetCore.HttpOverrides (2.3) + Microsoft.AspNetCore.HttpOverrides (2.3.5) Microsoft.AspNetCore.Http.Extensions (>= 2.3) Microsoft.Extensions.Logging.Abstractions (>= 8.0.2) Microsoft.Extensions.Options (>= 8.0.2) @@ -178,7 +174,7 @@ NUGET Microsoft.AspNetCore.Http.Extensions (>= 2.3) Microsoft.Extensions.Configuration.Binder (>= 8.0.2) Microsoft.Extensions.Options (>= 8.0.2) - Microsoft.AspNetCore.JsonPatch (9.0.1) + Microsoft.AspNetCore.JsonPatch (9.0.8) Microsoft.CSharp (>= 4.7) Newtonsoft.Json (>= 13.0.3) Microsoft.AspNetCore.Localization (2.3) @@ -186,7 +182,7 @@ NUGET Microsoft.Extensions.Localization.Abstractions (>= 8.0.11) Microsoft.Extensions.Logging.Abstractions (>= 8.0.2) Microsoft.Extensions.Options (>= 8.0.2) - Microsoft.AspNetCore.Metadata (9.0.1) + Microsoft.AspNetCore.Metadata (9.0.8) Microsoft.AspNetCore.Mvc (2.3) Microsoft.AspNetCore.Mvc.ApiExplorer (>= 2.3) Microsoft.AspNetCore.Mvc.Cors (>= 2.3) @@ -326,235 +322,239 @@ NUGET Microsoft.AspNetCore.Hosting.Abstractions (>= 2.3) Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions (>= 2.3) Microsoft.Extensions.Options (>= 8.0.2) - Microsoft.AspNetCore.WebUtilities (9.0.1) - Microsoft.Net.Http.Headers (>= 9.0.1) - Microsoft.CodeAnalysis.Analyzers (3.11) - Microsoft.CodeAnalysis.Common (4.12) - Microsoft.CodeAnalysis.Analyzers (>= 3.3.4) - System.Collections.Immutable (>= 8.0) - System.Reflection.Metadata (>= 8.0) - Microsoft.CodeAnalysis.CSharp (4.12) - Microsoft.CodeAnalysis.Analyzers (>= 3.3.4) - Microsoft.CodeAnalysis.Common (4.12) - System.Collections.Immutable (>= 8.0) - System.Reflection.Metadata (>= 8.0) + Microsoft.AspNetCore.WebUtilities (9.0.8) + Microsoft.Net.Http.Headers (>= 9.0.8) + Microsoft.CodeAnalysis.Analyzers (4.14) + Microsoft.CodeAnalysis.Common (4.14) + Microsoft.CodeAnalysis.Analyzers (>= 3.11) + System.Collections.Immutable (>= 9.0) + System.Reflection.Metadata (>= 9.0) + Microsoft.CodeAnalysis.CSharp (4.14) + Microsoft.CodeAnalysis.Analyzers (>= 3.11) + Microsoft.CodeAnalysis.Common (4.14) + System.Collections.Immutable (>= 9.0) + System.Reflection.Metadata (>= 9.0) Microsoft.CodeAnalysis.Razor (6.0.36) Microsoft.AspNetCore.Razor.Language (>= 6.0.36) Microsoft.CodeAnalysis.Common (>= 4.0) Microsoft.CodeAnalysis.CSharp (>= 4.0) Microsoft.CSharp (4.7) - Microsoft.Extensions.ApiDescription.Server (9.0.1) - Microsoft.Extensions.Caching.Abstractions (9.0.1) - Microsoft.Extensions.Primitives (>= 9.0.1) - Microsoft.Extensions.Caching.Memory (9.0.1) - Microsoft.Extensions.Caching.Abstractions (>= 9.0.1) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.1) - Microsoft.Extensions.Options (>= 9.0.1) - Microsoft.Extensions.Primitives (>= 9.0.1) - Microsoft.Extensions.Configuration (9.0.1) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.1) - Microsoft.Extensions.Primitives (>= 9.0.1) - Microsoft.Extensions.Configuration.Abstractions (9.0.1) - Microsoft.Extensions.Primitives (>= 9.0.1) - Microsoft.Extensions.Configuration.Binder (9.0.1) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.1) - Microsoft.Extensions.Configuration.CommandLine (9.0.1) - Microsoft.Extensions.Configuration (>= 9.0.1) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.1) - Microsoft.Extensions.Configuration.EnvironmentVariables (9.0.1) - Microsoft.Extensions.Configuration (>= 9.0.1) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.1) - Microsoft.Extensions.Configuration.FileExtensions (9.0.1) - Microsoft.Extensions.Configuration (>= 9.0.1) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.1) - Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.1) - Microsoft.Extensions.FileProviders.Physical (>= 9.0.1) - Microsoft.Extensions.Primitives (>= 9.0.1) - Microsoft.Extensions.Configuration.Json (9.0.1) - Microsoft.Extensions.Configuration (>= 9.0.1) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.1) - Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.1) - Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.1) - Microsoft.Extensions.Configuration.UserSecrets (9.0.1) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.1) - Microsoft.Extensions.Configuration.Json (>= 9.0.1) - Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.1) - Microsoft.Extensions.FileProviders.Physical (>= 9.0.1) - Microsoft.Extensions.DependencyInjection (9.0.1) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1) - Microsoft.Extensions.DependencyInjection.Abstractions (9.0.1) - Microsoft.Extensions.DependencyModel (9.0.1) - Microsoft.Extensions.Diagnostics.Abstractions (9.0.1) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1) - Microsoft.Extensions.Options (>= 9.0.1) - Microsoft.Extensions.Features (9.0.1) - Microsoft.Extensions.FileProviders.Abstractions (9.0.1) - Microsoft.Extensions.Primitives (>= 9.0.1) - Microsoft.Extensions.FileProviders.Composite (9.0.1) - Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.1) - Microsoft.Extensions.Primitives (>= 9.0.1) - Microsoft.Extensions.FileProviders.Physical (9.0.1) - Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.1) - Microsoft.Extensions.FileSystemGlobbing (>= 9.0.1) - Microsoft.Extensions.Primitives (>= 9.0.1) - Microsoft.Extensions.FileSystemGlobbing (9.0.1) - Microsoft.Extensions.Hosting.Abstractions (9.0.1) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.1) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1) - Microsoft.Extensions.Diagnostics.Abstractions (>= 9.0.1) - Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.1) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.1) - Microsoft.Extensions.Localization (9.0.1) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1) - Microsoft.Extensions.Localization.Abstractions (>= 9.0.1) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.1) - Microsoft.Extensions.Options (>= 9.0.1) - Microsoft.Extensions.Localization.Abstractions (9.0.1) - Microsoft.Extensions.Logging (9.0.1) - Microsoft.Extensions.DependencyInjection (>= 9.0.1) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.1) - Microsoft.Extensions.Options (>= 9.0.1) - Microsoft.Extensions.Logging.Abstractions (9.0.1) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1) - Microsoft.Extensions.Logging.Configuration (9.0.1) - Microsoft.Extensions.Configuration (>= 9.0.1) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.1) - Microsoft.Extensions.Configuration.Binder (>= 9.0.1) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1) - Microsoft.Extensions.Logging (>= 9.0.1) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.1) - Microsoft.Extensions.Options (>= 9.0.1) - Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.1) - Microsoft.Extensions.Logging.Console (9.0.1) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1) - Microsoft.Extensions.Logging (>= 9.0.1) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.1) - Microsoft.Extensions.Logging.Configuration (>= 9.0.1) - Microsoft.Extensions.Options (>= 9.0.1) - Microsoft.Extensions.Logging.Debug (9.0.1) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1) - Microsoft.Extensions.Logging (>= 9.0.1) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.1) - Microsoft.Extensions.ObjectPool (9.0.1) - Microsoft.Extensions.Options (9.0.1) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1) - Microsoft.Extensions.Primitives (>= 9.0.1) - Microsoft.Extensions.Options.ConfigurationExtensions (9.0.1) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.1) - Microsoft.Extensions.Configuration.Binder (>= 9.0.1) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1) - Microsoft.Extensions.Options (>= 9.0.1) - Microsoft.Extensions.Primitives (>= 9.0.1) - Microsoft.Extensions.Primitives (9.0.1) - Microsoft.Extensions.WebEncoders (9.0.1) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1) - Microsoft.Extensions.Options (>= 9.0.1) - Microsoft.Net.Http.Headers (9.0.1) - Microsoft.Extensions.Primitives (>= 9.0.1) - Microsoft.OpenApi (1.6.24) + Microsoft.Extensions.ApiDescription.Server (9.0.8) + Microsoft.Extensions.Caching.Abstractions (9.0.8) + Microsoft.Extensions.Primitives (>= 9.0.8) + Microsoft.Extensions.Caching.Memory (9.0.8) + Microsoft.Extensions.Caching.Abstractions (>= 9.0.8) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) + Microsoft.Extensions.Logging.Abstractions (>= 9.0.8) + Microsoft.Extensions.Options (>= 9.0.8) + Microsoft.Extensions.Primitives (>= 9.0.8) + Microsoft.Extensions.Configuration (9.0.8) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) + Microsoft.Extensions.Primitives (>= 9.0.8) + Microsoft.Extensions.Configuration.Abstractions (9.0.8) + Microsoft.Extensions.Primitives (>= 9.0.8) + Microsoft.Extensions.Configuration.Binder (9.0.8) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) + Microsoft.Extensions.Configuration.CommandLine (9.0.8) + Microsoft.Extensions.Configuration (>= 9.0.8) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) + Microsoft.Extensions.Configuration.EnvironmentVariables (9.0.8) + Microsoft.Extensions.Configuration (>= 9.0.8) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) + Microsoft.Extensions.Configuration.FileExtensions (9.0.8) + Microsoft.Extensions.Configuration (>= 9.0.8) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) + Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.8) + Microsoft.Extensions.FileProviders.Physical (>= 9.0.8) + Microsoft.Extensions.Primitives (>= 9.0.8) + Microsoft.Extensions.Configuration.Json (9.0.8) + Microsoft.Extensions.Configuration (>= 9.0.8) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) + Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.8) + Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.8) + Microsoft.Extensions.Configuration.UserSecrets (9.0.8) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) + Microsoft.Extensions.Configuration.Json (>= 9.0.8) + Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.8) + Microsoft.Extensions.FileProviders.Physical (>= 9.0.8) + Microsoft.Extensions.DependencyInjection (9.0.8) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) + Microsoft.Extensions.DependencyInjection.Abstractions (9.0.8) + Microsoft.Extensions.DependencyModel (9.0.8) + Microsoft.Extensions.Diagnostics.Abstractions (9.0.8) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) + Microsoft.Extensions.Options (>= 9.0.8) + Microsoft.Extensions.Features (9.0.8) + Microsoft.Extensions.FileProviders.Abstractions (9.0.8) + Microsoft.Extensions.Primitives (>= 9.0.8) + Microsoft.Extensions.FileProviders.Composite (9.0.8) + Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.8) + Microsoft.Extensions.Primitives (>= 9.0.8) + Microsoft.Extensions.FileProviders.Physical (9.0.8) + Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.8) + Microsoft.Extensions.FileSystemGlobbing (>= 9.0.8) + Microsoft.Extensions.Primitives (>= 9.0.8) + Microsoft.Extensions.FileSystemGlobbing (9.0.8) + Microsoft.Extensions.Hosting.Abstractions (9.0.8) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) + Microsoft.Extensions.Diagnostics.Abstractions (>= 9.0.8) + Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.8) + Microsoft.Extensions.Logging.Abstractions (>= 9.0.8) + Microsoft.Extensions.Localization (9.0.8) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) + Microsoft.Extensions.Localization.Abstractions (>= 9.0.8) + Microsoft.Extensions.Logging.Abstractions (>= 9.0.8) + Microsoft.Extensions.Options (>= 9.0.8) + Microsoft.Extensions.Localization.Abstractions (9.0.8) + Microsoft.Extensions.Logging (9.0.8) + Microsoft.Extensions.DependencyInjection (>= 9.0.8) + Microsoft.Extensions.Logging.Abstractions (>= 9.0.8) + Microsoft.Extensions.Options (>= 9.0.8) + Microsoft.Extensions.Logging.Abstractions (9.0.8) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) + Microsoft.Extensions.Logging.Configuration (9.0.8) + Microsoft.Extensions.Configuration (>= 9.0.8) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) + Microsoft.Extensions.Configuration.Binder (>= 9.0.8) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) + Microsoft.Extensions.Logging (>= 9.0.8) + Microsoft.Extensions.Logging.Abstractions (>= 9.0.8) + Microsoft.Extensions.Options (>= 9.0.8) + Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.8) + Microsoft.Extensions.Logging.Console (9.0.8) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) + Microsoft.Extensions.Logging (>= 9.0.8) + Microsoft.Extensions.Logging.Abstractions (>= 9.0.8) + Microsoft.Extensions.Logging.Configuration (>= 9.0.8) + Microsoft.Extensions.Options (>= 9.0.8) + Microsoft.Extensions.Logging.Debug (9.0.8) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) + Microsoft.Extensions.Logging (>= 9.0.8) + Microsoft.Extensions.Logging.Abstractions (>= 9.0.8) + Microsoft.Extensions.ObjectPool (9.0.8) + Microsoft.Extensions.Options (9.0.8) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) + Microsoft.Extensions.Primitives (>= 9.0.8) + Microsoft.Extensions.Options.ConfigurationExtensions (9.0.8) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) + Microsoft.Extensions.Configuration.Binder (>= 9.0.8) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) + Microsoft.Extensions.Options (>= 9.0.8) + Microsoft.Extensions.Primitives (>= 9.0.8) + Microsoft.Extensions.Primitives (9.0.8) + Microsoft.Extensions.WebEncoders (9.0.8) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) + Microsoft.Extensions.Options (>= 9.0.8) + Microsoft.Net.Http.Headers (9.0.8) + Microsoft.Extensions.Primitives (>= 9.0.8) + Microsoft.OpenApi (2.3) + System.Text.Json (>= 8.0.5) Newtonsoft.Json (13.0.3) Newtonsoft.Json.Bson (1.0.3) Newtonsoft.Json (>= 13.0.1) - Swashbuckle.AspNetCore (7.2) - Microsoft.Extensions.ApiDescription.Server (>= 6.0.5) - Swashbuckle.AspNetCore.Swagger (>= 7.2) - Swashbuckle.AspNetCore.SwaggerGen (>= 7.2) - Swashbuckle.AspNetCore.SwaggerUI (>= 7.2) - Swashbuckle.AspNetCore.Swagger (7.2) - Microsoft.OpenApi (>= 1.6.22) - Swashbuckle.AspNetCore.SwaggerGen (7.2) - Swashbuckle.AspNetCore.Swagger (>= 7.2) - Swashbuckle.AspNetCore.SwaggerUI (7.2) - System.Buffers (4.6) - System.Collections.Immutable (9.0.1) + Swashbuckle.AspNetCore (9.0.4) + Microsoft.Extensions.ApiDescription.Server (>= 9.0) + Swashbuckle.AspNetCore.Swagger (>= 9.0.4) + Swashbuckle.AspNetCore.SwaggerGen (>= 9.0.4) + Swashbuckle.AspNetCore.SwaggerUI (>= 9.0.4) + Swashbuckle.AspNetCore.Swagger (9.0.4) + Microsoft.OpenApi (>= 1.6.25) + Swashbuckle.AspNetCore.SwaggerGen (9.0.4) + Swashbuckle.AspNetCore.Swagger (>= 9.0.4) + Swashbuckle.AspNetCore.SwaggerUI (9.0.4) + System.Buffers (4.6.1) + System.Collections.Immutable (9.0.8) System.ComponentModel.Annotations (5.0) - System.Diagnostics.DiagnosticSource (9.0.1) - System.Formats.Asn1 (9.0.1) - System.IO.Pipelines (9.0.1) - System.Memory (4.6) - System.Numerics.Vectors (4.6) - System.Reflection.Metadata (9.0.1) - System.Runtime.CompilerServices.Unsafe (6.1) + System.Diagnostics.DiagnosticSource (9.0.8) + System.Formats.Asn1 (9.0.8) + System.IO.Pipelines (9.0.8) + System.Memory (4.6.3) + System.Numerics.Vectors (4.6.1) + System.Reflection.Metadata (9.0.8) + System.Runtime.CompilerServices.Unsafe (6.1.2) System.Security.Cryptography.Cng (5.0) System.Formats.Asn1 (>= 5.0) - System.Security.Cryptography.Pkcs (9.0.1) - System.Security.Cryptography.Xml (9.0.1) - System.Security.Cryptography.Pkcs (>= 9.0.1) + System.Security.Cryptography.Pkcs (9.0.8) + System.Security.Cryptography.Xml (9.0.8) + System.Security.Cryptography.Pkcs (>= 9.0.8) System.Security.Principal.Windows (5.0) - System.Text.Encodings.Web (9.0.1) - System.Text.Json (9.0.1) - System.Threading.Tasks.Extensions (4.6) + System.Text.Encodings.Web (9.0.8) + System.Text.Json (9.0.8) + System.Threading.Tasks.Extensions (4.6.3) GROUP Test RESTRICTION: == net9.0 NUGET remote: https://api.nuget.org/v3/index.json - FSharp.Compiler.Service (43.9.101) - FSharp.Core (9.0.101) - System.Buffers (>= 4.5.1) - System.Collections.Immutable (>= 8.0) - System.Diagnostics.DiagnosticSource (>= 8.0) - System.Memory (>= 4.5.5) + FSharp.Compiler.Service (43.9.303) + FSharp.Core (9.0.303) + System.Buffers (>= 4.6) + System.Collections.Immutable (>= 9.0) + System.Diagnostics.DiagnosticSource (>= 9.0) + System.Memory (>= 4.6) System.Reflection.Emit (>= 4.7) - System.Reflection.Metadata (>= 8.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - FSharp.Core (9.0.101) - FSharp.SystemTextJson (1.3.13) + System.Reflection.Metadata (>= 9.0) + System.Runtime.CompilerServices.Unsafe (>= 6.1) + FSharp.Core (9.0.303) + FSharp.SystemTextJson (1.4.36) FSharp.Core (>= 4.7) - System.Text.Json (>= 6.0) - FsUnit.xUnit (7.0.1) + System.Text.Json (>= 6.0.10) + FsUnit.xUnit (7.1.1) FSharp.Core (>= 5.0.2) NHamcrest (>= 4.0) xunit.v3 (>= 1.0) - Microsoft.Bcl.AsyncInterfaces (9.0.1) - Microsoft.CodeCoverage (17.12) - Microsoft.NET.Test.Sdk (17.12) - Microsoft.CodeCoverage (>= 17.12) - Microsoft.TestPlatform.TestHost (>= 17.12) - Microsoft.OpenApi (1.6.24) - redirects: force - Microsoft.OpenApi.Readers (1.6.24) - redirects: force - Microsoft.OpenApi (>= 1.6.24) - SharpYaml (>= 2.1.1) - Microsoft.Testing.Extensions.TrxReport.Abstractions (1.5.1) - Microsoft.Testing.Platform (>= 1.5.1) - Microsoft.Testing.Platform (1.5.1) - Microsoft.Testing.Platform.MSBuild (1.5.1) - Microsoft.Testing.Platform (>= 1.5.1) - Microsoft.TestPlatform.ObjectModel (17.12) - System.Reflection.Metadata (>= 1.6) - Microsoft.TestPlatform.TestHost (17.12) - Microsoft.TestPlatform.ObjectModel (>= 17.12) - Newtonsoft.Json (>= 13.0.1) + Microsoft.Bcl.AsyncInterfaces (9.0.8) + Microsoft.CodeCoverage (17.14.1) + Microsoft.NET.Test.Sdk (17.14.1) + Microsoft.CodeCoverage (>= 17.14.1) + Microsoft.TestPlatform.TestHost (>= 17.14.1) + Microsoft.OpenApi (2.3) - redirects: force + System.Text.Json (>= 8.0.5) + Microsoft.Testing.Extensions.TrxReport.Abstractions (1.8.3) + Microsoft.Testing.Platform (>= 1.8.3) + Microsoft.Testing.Platform (1.8.3) + Microsoft.Testing.Platform.MSBuild (1.8.3) + Microsoft.Testing.Platform (>= 1.8.3) + Microsoft.TestPlatform.ObjectModel (17.14.1) + System.Reflection.Metadata (>= 8.0) + Microsoft.TestPlatform.TestHost (17.14.1) + Microsoft.TestPlatform.ObjectModel (>= 17.14.1) + Newtonsoft.Json (>= 13.0.3) + Microsoft.Win32.Registry (5.0) + System.Security.AccessControl (>= 5.0) + System.Security.Principal.Windows (>= 5.0) Newtonsoft.Json (13.0.3) NHamcrest (4.0) - SharpYaml (2.1.1) - redirects: force - System.Buffers (4.6) - System.Collections.Immutable (9.0.1) - System.Diagnostics.DiagnosticSource (9.0.1) - System.Memory (4.6) + System.Buffers (4.6.1) + System.Collections.Immutable (9.0.8) + System.Diagnostics.DiagnosticSource (9.0.8) + System.Memory (4.6.3) System.Reflection.Emit (4.7) - System.Reflection.Metadata (9.0.1) - System.Runtime.CompilerServices.Unsafe (6.1) - System.Text.Json (9.0.1) - xunit.analyzers (1.19) - xunit.v3 (1.0.1) - xunit.analyzers (>= 1.19) - xunit.v3.assert (1.0.1) - xunit.v3.core (1.0.1) - xunit.v3.assert (1.0.1) - xunit.v3.common (1.0.1) + System.Reflection.Metadata (9.0.8) + System.Runtime.CompilerServices.Unsafe (6.1.2) + System.Security.AccessControl (6.0.1) + System.Security.Principal.Windows (5.0) + System.Text.Json (9.0.8) - redirects: force + xunit.analyzers (1.24) + xunit.v3 (3.0.1) + xunit.analyzers (>= 1.24) + xunit.v3.assert (3.0.1) + xunit.v3.core (3.0.1) + xunit.v3.assert (3.0.1) + xunit.v3.common (3.0.1) Microsoft.Bcl.AsyncInterfaces (>= 6.0) - xunit.v3.core (1.0.1) - Microsoft.Testing.Platform.MSBuild (>= 1.5) - xunit.v3.extensibility.core (1.0.1) - xunit.v3.runner.inproc.console (1.0.1) - xunit.v3.extensibility.core (1.0.1) - xunit.v3.common (1.0.1) - xunit.v3.runner.common (1.0.1) - xunit.v3.common (1.0.1) - xunit.v3.runner.inproc.console (1.0.1) - Microsoft.Testing.Extensions.TrxReport.Abstractions (>= 1.5) - Microsoft.Testing.Platform (>= 1.5) - xunit.v3.extensibility.core (1.0.1) - xunit.v3.runner.common (1.0.1) + xunit.v3.core (3.0.1) + Microsoft.Testing.Platform.MSBuild (>= 1.8.2) + xunit.v3.extensibility.core (3.0.1) + xunit.v3.runner.inproc.console (3.0.1) + xunit.v3.extensibility.core (3.0.1) + xunit.v3.common (3.0.1) + xunit.v3.runner.common (3.0.1) + Microsoft.Win32.Registry (5.0) + xunit.v3.common (3.0.1) + xunit.v3.runner.inproc.console (3.0.1) + Microsoft.Testing.Extensions.TrxReport.Abstractions (>= 1.8.2) + Microsoft.Testing.Platform (>= 1.8.2) + xunit.v3.extensibility.core (3.0.1) + xunit.v3.runner.common (3.0.1) diff --git a/src/Common/AssemblyInfo.fs b/src/Common/AssemblyInfo.fs index 0a72f20..9b8f5a3 100644 --- a/src/Common/AssemblyInfo.fs +++ b/src/Common/AssemblyInfo.fs @@ -5,13 +5,13 @@ open System.Reflection [] [] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "SwaggerProvider" let [] AssemblyProduct = "SwaggerProvider" let [] AssemblyDescription = "F# Type Provider for Swagger & Open API" - let [] AssemblyVersion = "2.3.1" - let [] AssemblyFileVersion = "2.3.1" + let [] AssemblyVersion = "2.4.0" + let [] AssemblyFileVersion = "2.4.0" diff --git a/src/SwaggerProvider.DesignTime/paket.references b/src/SwaggerProvider.DesignTime/paket.references index 2b83f2e..044a519 100644 --- a/src/SwaggerProvider.DesignTime/paket.references +++ b/src/SwaggerProvider.DesignTime/paket.references @@ -2,8 +2,7 @@ File: ProvidedTypes.fsi File: ProvidedTypes.fs File: Pluralizer.fs File: NameUtils.fs - System.Text.Json -Microsoft.OpenApi.Readers +Microsoft.OpenApi YamlDotNet diff --git a/tests/SwaggerProvider.Tests/paket.references b/tests/SwaggerProvider.Tests/paket.references index 399fcde..f1224c9 100755 --- a/tests/SwaggerProvider.Tests/paket.references +++ b/tests/SwaggerProvider.Tests/paket.references @@ -3,5 +3,5 @@ group Test FSharp.SystemTextJson FsUnit.xUnit Microsoft.NET.Test.Sdk - Microsoft.OpenApi.Readers + Microsoft.OpenApi System.Text.Json From 79c95d6690e730393d16a1da0174a119087e6a61 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sun, 31 Aug 2025 11:04:55 +0200 Subject: [PATCH 03/22] migrate v3 provider to new api --- docs/RELEASE_NOTES.md | 2 +- paket.dependencies | 2 +- paket.lock | 4 +- .../Provider.OpenApiClient.fs | 4 +- .../v3/DefinitionCompiler.fs | 58 ++++++++++--------- .../v3/OperationCompiler.fs | 19 +++--- .../Schema.Parser.Tests.fs | 5 +- 7 files changed, 49 insertions(+), 45 deletions(-) diff --git a/docs/RELEASE_NOTES.md b/docs/RELEASE_NOTES.md index 5395dce..0d4a1b8 100644 --- a/docs/RELEASE_NOTES.md +++ b/docs/RELEASE_NOTES.md @@ -1,6 +1,6 @@ #### 2.4.0 - Aug 31, 2025 -- Microsoft.OpenApi v2.3.0 +- Microsoft.OpenApi v2.3.0 with OpenAPI v3.1 Support - Removed dependency on Microsoft.OpenApi.Readers - Dependencies update diff --git a/paket.dependencies b/paket.dependencies index e051f66..e075a29 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -41,5 +41,5 @@ group Test nuget Microsoft.NET.Test.Sdk nuget FsUnit.Xunit - nuget Microsoft.OpenApi redirects: force + nuget Microsoft.OpenApi nuget FSharp.SystemTextJson diff --git a/paket.lock b/paket.lock index 381485e..a6d3c04 100644 --- a/paket.lock +++ b/paket.lock @@ -509,7 +509,7 @@ NUGET Microsoft.NET.Test.Sdk (17.14.1) Microsoft.CodeCoverage (>= 17.14.1) Microsoft.TestPlatform.TestHost (>= 17.14.1) - Microsoft.OpenApi (2.3) - redirects: force + Microsoft.OpenApi (2.3) System.Text.Json (>= 8.0.5) Microsoft.Testing.Extensions.TrxReport.Abstractions (1.8.3) Microsoft.Testing.Platform (>= 1.8.3) @@ -535,7 +535,7 @@ NUGET System.Runtime.CompilerServices.Unsafe (6.1.2) System.Security.AccessControl (6.0.1) System.Security.Principal.Windows (5.0) - System.Text.Json (9.0.8) - redirects: force + System.Text.Json (9.0.8) xunit.analyzers (1.24) xunit.v3 (3.0.1) xunit.analyzers (>= 1.24) diff --git a/src/SwaggerProvider.DesignTime/Provider.OpenApiClient.fs b/src/SwaggerProvider.DesignTime/Provider.OpenApiClient.fs index 0103328..9568d10 100644 --- a/src/SwaggerProvider.DesignTime/Provider.OpenApiClient.fs +++ b/src/SwaggerProvider.DesignTime/Provider.OpenApiClient.fs @@ -66,9 +66,9 @@ type public OpenApiClientTypeProvider(cfg: TypeProviderConfig) as this = let addCache() = lazy let schemaData = SchemaReader.readSchemaPath "" schemaPath |> Async.RunSynchronously - let openApiReader = Microsoft.OpenApi.Readers.OpenApiStringReader() - let (schema, diagnostic) = openApiReader.Read(schemaData) + let readResult = Microsoft.OpenApi.OpenApiDocument.Parse(schemaData) + let schema, diagnostic = (readResult.Document, readResult.Diagnostic) if diagnostic.Errors.Count > 0 then failwithf diff --git a/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs b/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs index f0bbac3..660411d 100644 --- a/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs +++ b/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs @@ -8,7 +8,7 @@ open FSharp.Data.Runtime.NameUtils open Swagger.Internal open SwaggerProvider.Internal open Microsoft.FSharp.Quotations -open Microsoft.OpenApi.Models +open Microsoft.OpenApi type DefinitionPath = { Namespace: string list @@ -229,7 +229,7 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = failwithf $"Cannot find definition '%s{tyPath}' in schema definitions %A{pathToType.Keys |> Seq.toArray}" | None -> failwithf $"Cannot find definition '%s{tyPath}' (references to relative documents are not supported yet)" - and compileBySchema (ns: NamespaceAbstraction) tyName (schemaObj: OpenApiSchema) isRequired registerNew fromByPathCompiler = + and compileBySchema (ns: NamespaceAbstraction) tyName (schemaObj: IOpenApiSchema) isRequired registerNew fromByPathCompiler = let compileNewObject() = if schemaObj.Properties.Count = 0 && schemaObj.AllOf.Count = 0 then if not <| isNull tyName then @@ -385,22 +385,19 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = let tyType = match schemaObj with | null -> failwithf $"Cannot compile object '%s{tyName}' when schema is 'null'" - | _ when - (not(isNull schemaObj.Reference)) - && not <| schemaObj.Reference.Id.EndsWith(tyName) - -> + | :? OpenApiSchemaReference as schemaRef when not <| schemaRef.Reference.Id.EndsWith(tyName) -> ns.ReleaseNameReservation tyName - compileByPath <| schemaObj.Reference.ReferenceV3 - | _ when schemaObj.UnresolvedReference -> - match pathToType.TryGetValue schemaObj.Reference.ReferenceV3 with + compileByPath <| schemaRef.Reference.Id + | :? OpenApiSchemaReference as schemaRef -> + match pathToType.TryGetValue schemaRef.Reference.Id with | true, ty -> ns.ReleaseNameReservation tyName ty - | _ -> failwithf $"Cannot compile object '%s{tyName}' based on unresolved reference '{schemaObj.Reference.ReferenceV3}'" + | _ -> failwithf $"Cannot compile object '%s{tyName}' based on unresolved reference '{schemaRef.Reference.Id}'" // TODO: fail on external references //| _ when schemaObj.Reference <> null && tyName <> schemaObj.Reference.Id -> | _ when - schemaObj.Type = "object" + schemaObj.Type.Value = JsonSchemaType.Object && not(isNull schemaObj.AdditionalProperties) -> // Dictionary -> ns.ReleaseNameReservation tyName @@ -410,26 +407,33 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = compileBySchema ns (ns.ReserveUniqueName tyName "Item") elSchema true ns.RegisterType false ProvidedTypeBuilder.MakeGenericType(typedefof>, [ typeof; elTy ]) - | _ when isNull schemaObj.Type || schemaObj.Type = "object" -> // Object props -> + | _ when + not schemaObj.Type.HasValue + || schemaObj.Type.Value = JsonSchemaType.Object + -> // Object props -> compileNewObject() | _ -> ns.MarkTypeAsNameAlias tyName - match schemaObj.Type, schemaObj.Format with - | "integer", "int64" -> typeof - | "integer", _ -> typeof - | "number", "double" -> typeof - | "number", _ -> typeof - | "boolean", _ -> typeof - | "string", "byte" -> typeof.MakeArrayType 1 - | "string", "binary" // for `application/octet-stream` request body - | "file", _ -> // for `multipart/form-data` : https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#considerations-for-file-uploads + if not schemaObj.Type.HasValue then + failwithf $"Schema type is not specified for '%s{tyName}'" + + match schemaObj.Type.Value, schemaObj.Format with + | JsonSchemaType.Integer, "int64" -> typeof + | JsonSchemaType.Integer, _ -> typeof + | JsonSchemaType.Number, "double" -> typeof + | JsonSchemaType.Number, _ -> typeof + | JsonSchemaType.Boolean, _ -> typeof + | JsonSchemaType.String, "byte" -> typeof.MakeArrayType 1 + | JsonSchemaType.String, "binary" -> + // for `application/octet-stream` request body + // for `multipart/form-data` : https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#considerations-for-file-uploads typeof - | "string", "date" - | "string", "date-time" -> typeof - | "string", "uuid" -> typeof - | "string", _ -> typeof - | "array", _ -> + | JsonSchemaType.String, "date" + | JsonSchemaType.String, "date-time" -> typeof + | JsonSchemaType.String, "uuid" -> typeof + | JsonSchemaType.String, _ -> typeof + | JsonSchemaType.Array, _ -> ns.ReleaseNameReservation tyName let elSchema = schemaObj.Items @@ -437,7 +441,7 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = compileBySchema ns (ns.ReserveUniqueName tyName "Item") elSchema true ns.RegisterType false elTy.MakeArrayType(1) - | ty, format -> failwithf $"Type %s{tyName}(%s{ty},%s{format}) should be caught by other match statement (%A{schemaObj.Type})" + | ty, format -> failwithf $"Type %s{tyName}(%A{ty},%s{format}) should be caught by other match statement (%A{schemaObj.Type})" if fromByPathCompiler then registerNew(tyName, tyType) diff --git a/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs b/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs index 6630838..eedd7bf 100644 --- a/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs +++ b/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs @@ -8,7 +8,7 @@ open System.Text.RegularExpressions open Microsoft.FSharp.Quotations open Microsoft.FSharp.Quotations.ExprShape -open Microsoft.OpenApi.Models +open Microsoft.OpenApi open ProviderImplementation.ProvidedTypes open FSharp.Data.Runtime.NameUtils @@ -19,7 +19,7 @@ open Swagger.Internal // We cannot use record here // TP cannot load DTC with OpenApiPathItem/OperationType props (from 3rd party assembly) // Probably related to https://github.com/fsprojects/FSharp.TypeProviders.SDK/issues/274 -type ApiCall = string * OpenApiPathItem * OperationType +type ApiCall = string * IOpenApiPathItem * HttpMethod [] type PayloadType = @@ -63,7 +63,7 @@ type OperationCompiler(schema: OpenApiDocument, defCompiler: DefinitionCompiler, if String.IsNullOrWhiteSpace providedMethodName then failwithf $"Operation name could not be empty. See '%s{path}/%A{opTy}'" - let unambiguousName(par: OpenApiParameter) = + let unambiguousName(par: IOpenApiParameter) = $"%s{par.Name}In%A{par.In}" let openApiParameters = [ yield! pathItem.Parameters; yield! operation.Parameters ] @@ -79,7 +79,7 @@ type OperationCompiler(schema: OpenApiDocument, defCompiler: DefinitionCompiler, let payloadMime, parameters = /// handles de-duplicating Swagger parameter names if the same parameter name /// appears in multiple locations in a given operation definition. - let uniqueParamName usedNames (param: OpenApiParameter) = + let uniqueParamName usedNames (param: IOpenApiParameter) = let name = niceCamelName param.Name if usedNames |> Set.contains name then @@ -100,6 +100,7 @@ type OperationCompiler(schema: OpenApiDocument, defCompiler: DefinitionCompiler, Schema = schema, Required = true //operation.RequestBody.Required ) + :> IOpenApiParameter Some(payloadType, p) @@ -124,7 +125,7 @@ type OperationCompiler(schema: OpenApiDocument, defCompiler: DefinitionCompiler, if bodyFormatAndParam.IsSome then yield bodyFormatAndParam.Value |> snd ] |> List.distinctBy(fun op -> op.Name, op.In) - |> List.partition(fun x -> x.Required) + |> List.partition(_.Required) List.append required optional @@ -266,7 +267,7 @@ type OperationCompiler(schema: OpenApiDocument, defCompiler: DefinitionCompiler, let path, queryParams, headers = let path, queryParams, headers, cookies = ((<@ path @>, <@ [] @>, headers, <@ [] @>), parameters) - ||> List.fold(fun (path, query, headers, cookies) (param: OpenApiParameter, valueExpr) -> + ||> List.fold(fun (path, query, headers, cookies) (param: IOpenApiParameter, valueExpr) -> if param.In.HasValue then let name = param.Name @@ -438,9 +439,9 @@ type OperationCompiler(schema: OpenApiDocument, defCompiler: DefinitionCompiler, List.ofSeq schema.Paths |> List.collect(fun path -> - if path.Value.UnresolvedReference then - failwith - $"TP does not support unresolved paths / external references. Path '%s{path.Key}' refer to '%s{path.Value.Reference.ReferenceV3}'" + // if path.Value.UnresolvedReference then + // failwith + // $"TP does not support unresolved paths / external references. Path '%s{path.Key}' refer to '%s{path.Value.Reference.ReferenceV3}'" List.ofSeq path.Value.Operations |> List.map(fun kv -> path.Key, path.Value, kv.Key)) diff --git a/tests/SwaggerProvider.Tests/Schema.Parser.Tests.fs b/tests/SwaggerProvider.Tests/Schema.Parser.Tests.fs index caff84b..b53c324 100644 --- a/tests/SwaggerProvider.Tests/Schema.Parser.Tests.fs +++ b/tests/SwaggerProvider.Tests/Schema.Parser.Tests.fs @@ -21,9 +21,8 @@ module V3 = open SwaggerProvider.Internal.v3.Compilers let testSchema schemaStr = - let openApiReader = Microsoft.OpenApi.Readers.OpenApiStringReader() - - let schema, diagnostic = openApiReader.Read(schemaStr) + let readResult = Microsoft.OpenApi.OpenApiDocument.Parse(schemaStr) + let schema = readResult.Document (* if diagnostic.Errors.Count > 0 then failwithf "Schema parse errors:\n- %s" (diagnostic.Errors From a27df525b292de145e67f5ddf522b2e6cf7c7758 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sun, 31 Aug 2025 11:09:02 +0200 Subject: [PATCH 04/22] small fixes for test server --- .../Controllers/FileController.fs | 12 ++++++++++-- tests/Swashbuckle.WebApi.Server/Startup.fs | 9 ++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs b/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs index 529dcc3..29e5c47 100644 --- a/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs +++ b/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs @@ -4,10 +4,18 @@ open System open System.IO open Microsoft.AspNetCore.Mvc open Microsoft.AspNetCore.Http -open Microsoft.OpenApi.Models -open Swagger.Internal open Swashbuckle.AspNetCore.SwaggerGen +module MediaTypes = + + open System.Net.Mime + + [] + let ApplicationOctetStream = MediaTypeNames.Application.Octet + + [] + let ApplicationJson = MediaTypeNames.Application.Json + type FormWithFile() = member val Name: string = "" with get, set member val File: IFormFile = null with get, set diff --git a/tests/Swashbuckle.WebApi.Server/Startup.fs b/tests/Swashbuckle.WebApi.Server/Startup.fs index 1827251..0f081a7 100644 --- a/tests/Swashbuckle.WebApi.Server/Startup.fs +++ b/tests/Swashbuckle.WebApi.Server/Startup.fs @@ -5,7 +5,7 @@ open Microsoft.AspNetCore.Builder open Microsoft.AspNetCore.Hosting open Microsoft.Extensions.Configuration open Microsoft.Extensions.DependencyInjection -open Microsoft.OpenApi.Models +open Microsoft.OpenApi open System.Text.Json.Serialization open Swashbuckle.WebApi.Server.Controllers @@ -25,6 +25,7 @@ type Startup private () = converters.Add(JsonFSharpConverter()) converters.Add(JsonStringEnumConverter())) |> ignore + // Register the Swagger & OpenApi services services.AddSwaggerGen(fun c -> c.SwaggerDoc("v1", OpenApiInfo(Title = "My API", Version = "v1")) @@ -40,14 +41,12 @@ type Startup private () = // Register the Swagger generator and the Swagger UI middlewares app.UseSwagger(fun c -> c.RouteTemplate <- "/swagger/{documentName}/swagger.json" - c.SerializeAsV2 <- true // false = v3 = OpenApi - ) + c.OpenApiVersion <- OpenApiSpecVersion.OpenApi2_0) |> ignore app.UseSwagger(fun c -> c.RouteTemplate <- "/swagger/{documentName}/openapi.json" - c.SerializeAsV2 <- false // false = v3 = OpenApi - ) + c.OpenApiVersion <- OpenApiSpecVersion.OpenApi3_0) |> ignore app.UseSwaggerUI(fun c -> From b1a85ab37ac050317e2a6db58cc9054504a03d5a Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Thu, 18 Sep 2025 20:48:50 +0200 Subject: [PATCH 05/22] feat: pre-release swashbuckle --- paket.dependencies | 3 +- paket.lock | 337 +++++++++--------- .../Controllers/FileController.fs | 3 +- 3 files changed, 173 insertions(+), 170 deletions(-) diff --git a/paket.dependencies b/paket.dependencies index e075a29..77fc453 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -19,13 +19,14 @@ github fsprojects/FSharp.Data:main src/FSharp.Data.Runtime.Utilities/Pluralizer. github fsprojects/FSharp.Data:main src/FSharp.Data.Runtime.Utilities/NameUtils.fs group Server + source https://www.myget.org/F/domaindrivendev/api/v3/index.json source https://api.nuget.org/v3/index.json framework: net9.0 nuget Microsoft.AspNetCore nuget Microsoft.AspNetCore.Mvc nuget Microsoft.AspNetCore.HttpsPolicy - nuget Swashbuckle.AspNetCore + nuget Swashbuckle.AspNetCore ~> 10.0.0-pr.3283 nuget Microsoft.OpenApi nuget FSharp.Core nuget System.Text.Json diff --git a/paket.lock b/paket.lock index a6d3c04..1dd933d 100644 --- a/paket.lock +++ b/paket.lock @@ -5,10 +5,10 @@ NUGET FSharp.SystemTextJson (1.4.36) FSharp.Core (>= 4.7) - restriction: >= netstandard2.0 System.Text.Json (>= 6.0.10) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (9.0.8) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + Microsoft.Bcl.AsyncInterfaces (9.0.9) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) Microsoft.NETCore.Platforms (7.0.4) - restriction: >= net461 - Microsoft.OpenApi (2.3) + Microsoft.OpenApi (2.3.1) System.Text.Json (>= 8.0.5) - restriction: >= netstandard2.0 NETStandard.Library (2.0.3) - restriction: >= net461 Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (>= net45) (< netstandard1.3)) (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0)) (&& (>= net46) (< netstandard1.4)) (>= net461) (>= netcoreapp2.0) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8) (< win8)) (&& (< netstandard1.0) (< portable-net45+win8) (>= portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard1.3) (< win8) (>= wpa81)) (&& (< netstandard1.5) (>= uap10.0)) (>= uap10.1) (>= wp8) @@ -22,7 +22,7 @@ NUGET System.Runtime.CompilerServices.Unsafe (>= 6.1.2) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) System.Numerics.Vectors (4.6.1) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) System.Runtime.CompilerServices.Unsafe (6.1.2) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= net7.0) (< net8.0)) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) - System.Text.Encodings.Web (9.0.8) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= net7.0) (< net8.0)) + System.Text.Encodings.Web (9.0.9) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= net7.0) (< net8.0)) System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) @@ -43,8 +43,8 @@ GITHUB src/ProvidedTypes.fs (ce34c1cc71096857b8342f1dedf93391addc9df6) src/ProvidedTypes.fsi (ce34c1cc71096857b8342f1dedf93391addc9df6) remote: fsprojects/FSharp.Data - src/FSharp.Data.Runtime.Utilities/NameUtils.fs (70733c01c059ae9ca832303e331113b08772083b) - src/FSharp.Data.Runtime.Utilities/Pluralizer.fs (70733c01c059ae9ca832303e331113b08772083b) + src/FSharp.Data.Runtime.Utilities/NameUtils.fs (9e8299ad6f940d29254620775c2c23983bdd797e) + src/FSharp.Data.Runtime.Utilities/Pluralizer.fs (9e8299ad6f940d29254620775c2c23983bdd797e) GROUP Server RESTRICTION: == net9.0 NUGET @@ -82,31 +82,31 @@ NUGET Microsoft.AspNetCore.Authentication.Abstractions (>= 2.3) Microsoft.AspNetCore.Http (>= 2.3) Microsoft.AspNetCore.Http.Extensions (>= 2.3) - Microsoft.AspNetCore.Authorization (9.0.8) - Microsoft.AspNetCore.Metadata (>= 9.0.8) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.8) - Microsoft.Extensions.Options (>= 9.0.8) + Microsoft.AspNetCore.Authorization (9.0.9) + Microsoft.AspNetCore.Metadata (>= 9.0.9) + Microsoft.Extensions.Logging.Abstractions (>= 9.0.9) + Microsoft.Extensions.Options (>= 9.0.9) Microsoft.AspNetCore.Authorization.Policy (2.3) Microsoft.AspNetCore.Authentication.Abstractions (>= 2.3) Microsoft.AspNetCore.Authorization (>= 2.3) - Microsoft.AspNetCore.Connections.Abstractions (9.0.8) - Microsoft.Extensions.Features (>= 9.0.8) + Microsoft.AspNetCore.Connections.Abstractions (9.0.9) + Microsoft.Extensions.Features (>= 9.0.9) Microsoft.AspNetCore.Cors (2.3) Microsoft.AspNetCore.Http.Extensions (>= 2.3) Microsoft.Extensions.Configuration.Abstractions (>= 8.0) Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2) Microsoft.Extensions.Logging.Abstractions (>= 8.0.2) Microsoft.Extensions.Options (>= 8.0.2) - Microsoft.AspNetCore.Cryptography.Internal (9.0.8) - Microsoft.AspNetCore.DataProtection (9.0.8) - Microsoft.AspNetCore.Cryptography.Internal (>= 9.0.8) - Microsoft.AspNetCore.DataProtection.Abstractions (>= 9.0.8) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) - Microsoft.Extensions.Hosting.Abstractions (>= 9.0.8) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.8) - Microsoft.Extensions.Options (>= 9.0.8) - System.Security.Cryptography.Xml (>= 9.0.8) - Microsoft.AspNetCore.DataProtection.Abstractions (9.0.8) + Microsoft.AspNetCore.Cryptography.Internal (9.0.9) + Microsoft.AspNetCore.DataProtection (9.0.9) + Microsoft.AspNetCore.Cryptography.Internal (>= 9.0.9) + Microsoft.AspNetCore.DataProtection.Abstractions (>= 9.0.9) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) + Microsoft.Extensions.Hosting.Abstractions (>= 9.0.9) + Microsoft.Extensions.Logging.Abstractions (>= 9.0.9) + Microsoft.Extensions.Options (>= 9.0.9) + System.Security.Cryptography.Xml (>= 9.0.9) + Microsoft.AspNetCore.DataProtection.Abstractions (9.0.9) Microsoft.AspNetCore.Diagnostics (2.3) Microsoft.AspNetCore.Diagnostics.Abstractions (>= 2.3) Microsoft.AspNetCore.Hosting.Abstractions (>= 2.3) @@ -174,7 +174,7 @@ NUGET Microsoft.AspNetCore.Http.Extensions (>= 2.3) Microsoft.Extensions.Configuration.Binder (>= 8.0.2) Microsoft.Extensions.Options (>= 8.0.2) - Microsoft.AspNetCore.JsonPatch (9.0.8) + Microsoft.AspNetCore.JsonPatch (9.0.9) Microsoft.CSharp (>= 4.7) Newtonsoft.Json (>= 13.0.3) Microsoft.AspNetCore.Localization (2.3) @@ -182,7 +182,7 @@ NUGET Microsoft.Extensions.Localization.Abstractions (>= 8.0.11) Microsoft.Extensions.Logging.Abstractions (>= 8.0.2) Microsoft.Extensions.Options (>= 8.0.2) - Microsoft.AspNetCore.Metadata (9.0.8) + Microsoft.AspNetCore.Metadata (9.0.9) Microsoft.AspNetCore.Mvc (2.3) Microsoft.AspNetCore.Mvc.ApiExplorer (>= 2.3) Microsoft.AspNetCore.Mvc.Cors (>= 2.3) @@ -322,8 +322,8 @@ NUGET Microsoft.AspNetCore.Hosting.Abstractions (>= 2.3) Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions (>= 2.3) Microsoft.Extensions.Options (>= 8.0.2) - Microsoft.AspNetCore.WebUtilities (9.0.8) - Microsoft.Net.Http.Headers (>= 9.0.8) + Microsoft.AspNetCore.WebUtilities (9.0.9) + Microsoft.Net.Http.Headers (>= 9.0.9) Microsoft.CodeAnalysis.Analyzers (4.14) Microsoft.CodeAnalysis.Common (4.14) Microsoft.CodeAnalysis.Analyzers (>= 3.11) @@ -339,149 +339,150 @@ NUGET Microsoft.CodeAnalysis.Common (>= 4.0) Microsoft.CodeAnalysis.CSharp (>= 4.0) Microsoft.CSharp (4.7) - Microsoft.Extensions.ApiDescription.Server (9.0.8) - Microsoft.Extensions.Caching.Abstractions (9.0.8) - Microsoft.Extensions.Primitives (>= 9.0.8) - Microsoft.Extensions.Caching.Memory (9.0.8) - Microsoft.Extensions.Caching.Abstractions (>= 9.0.8) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.8) - Microsoft.Extensions.Options (>= 9.0.8) - Microsoft.Extensions.Primitives (>= 9.0.8) - Microsoft.Extensions.Configuration (9.0.8) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) - Microsoft.Extensions.Primitives (>= 9.0.8) - Microsoft.Extensions.Configuration.Abstractions (9.0.8) - Microsoft.Extensions.Primitives (>= 9.0.8) - Microsoft.Extensions.Configuration.Binder (9.0.8) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) - Microsoft.Extensions.Configuration.CommandLine (9.0.8) - Microsoft.Extensions.Configuration (>= 9.0.8) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) - Microsoft.Extensions.Configuration.EnvironmentVariables (9.0.8) - Microsoft.Extensions.Configuration (>= 9.0.8) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) - Microsoft.Extensions.Configuration.FileExtensions (9.0.8) - Microsoft.Extensions.Configuration (>= 9.0.8) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) - Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.8) - Microsoft.Extensions.FileProviders.Physical (>= 9.0.8) - Microsoft.Extensions.Primitives (>= 9.0.8) - Microsoft.Extensions.Configuration.Json (9.0.8) - Microsoft.Extensions.Configuration (>= 9.0.8) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) - Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.8) - Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.8) - Microsoft.Extensions.Configuration.UserSecrets (9.0.8) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) - Microsoft.Extensions.Configuration.Json (>= 9.0.8) - Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.8) - Microsoft.Extensions.FileProviders.Physical (>= 9.0.8) - Microsoft.Extensions.DependencyInjection (9.0.8) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) - Microsoft.Extensions.DependencyInjection.Abstractions (9.0.8) - Microsoft.Extensions.DependencyModel (9.0.8) - Microsoft.Extensions.Diagnostics.Abstractions (9.0.8) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) - Microsoft.Extensions.Options (>= 9.0.8) - Microsoft.Extensions.Features (9.0.8) - Microsoft.Extensions.FileProviders.Abstractions (9.0.8) - Microsoft.Extensions.Primitives (>= 9.0.8) - Microsoft.Extensions.FileProviders.Composite (9.0.8) - Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.8) - Microsoft.Extensions.Primitives (>= 9.0.8) - Microsoft.Extensions.FileProviders.Physical (9.0.8) - Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.8) - Microsoft.Extensions.FileSystemGlobbing (>= 9.0.8) - Microsoft.Extensions.Primitives (>= 9.0.8) - Microsoft.Extensions.FileSystemGlobbing (9.0.8) - Microsoft.Extensions.Hosting.Abstractions (9.0.8) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) - Microsoft.Extensions.Diagnostics.Abstractions (>= 9.0.8) - Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.8) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.8) - Microsoft.Extensions.Localization (9.0.8) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) - Microsoft.Extensions.Localization.Abstractions (>= 9.0.8) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.8) - Microsoft.Extensions.Options (>= 9.0.8) - Microsoft.Extensions.Localization.Abstractions (9.0.8) - Microsoft.Extensions.Logging (9.0.8) - Microsoft.Extensions.DependencyInjection (>= 9.0.8) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.8) - Microsoft.Extensions.Options (>= 9.0.8) - Microsoft.Extensions.Logging.Abstractions (9.0.8) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) - Microsoft.Extensions.Logging.Configuration (9.0.8) - Microsoft.Extensions.Configuration (>= 9.0.8) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) - Microsoft.Extensions.Configuration.Binder (>= 9.0.8) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) - Microsoft.Extensions.Logging (>= 9.0.8) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.8) - Microsoft.Extensions.Options (>= 9.0.8) - Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.8) - Microsoft.Extensions.Logging.Console (9.0.8) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) - Microsoft.Extensions.Logging (>= 9.0.8) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.8) - Microsoft.Extensions.Logging.Configuration (>= 9.0.8) - Microsoft.Extensions.Options (>= 9.0.8) - Microsoft.Extensions.Logging.Debug (9.0.8) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) - Microsoft.Extensions.Logging (>= 9.0.8) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.8) - Microsoft.Extensions.ObjectPool (9.0.8) - Microsoft.Extensions.Options (9.0.8) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) - Microsoft.Extensions.Primitives (>= 9.0.8) - Microsoft.Extensions.Options.ConfigurationExtensions (9.0.8) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8) - Microsoft.Extensions.Configuration.Binder (>= 9.0.8) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) - Microsoft.Extensions.Options (>= 9.0.8) - Microsoft.Extensions.Primitives (>= 9.0.8) - Microsoft.Extensions.Primitives (9.0.8) - Microsoft.Extensions.WebEncoders (9.0.8) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8) - Microsoft.Extensions.Options (>= 9.0.8) - Microsoft.Net.Http.Headers (9.0.8) - Microsoft.Extensions.Primitives (>= 9.0.8) - Microsoft.OpenApi (2.3) + Microsoft.Extensions.ApiDescription.Server (9.0.9) + Microsoft.Extensions.Caching.Abstractions (9.0.9) + Microsoft.Extensions.Primitives (>= 9.0.9) + Microsoft.Extensions.Caching.Memory (9.0.9) + Microsoft.Extensions.Caching.Abstractions (>= 9.0.9) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) + Microsoft.Extensions.Logging.Abstractions (>= 9.0.9) + Microsoft.Extensions.Options (>= 9.0.9) + Microsoft.Extensions.Primitives (>= 9.0.9) + Microsoft.Extensions.Configuration (9.0.9) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) + Microsoft.Extensions.Primitives (>= 9.0.9) + Microsoft.Extensions.Configuration.Abstractions (9.0.9) + Microsoft.Extensions.Primitives (>= 9.0.9) + Microsoft.Extensions.Configuration.Binder (9.0.9) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) + Microsoft.Extensions.Configuration.CommandLine (9.0.9) + Microsoft.Extensions.Configuration (>= 9.0.9) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) + Microsoft.Extensions.Configuration.EnvironmentVariables (9.0.9) + Microsoft.Extensions.Configuration (>= 9.0.9) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) + Microsoft.Extensions.Configuration.FileExtensions (9.0.9) + Microsoft.Extensions.Configuration (>= 9.0.9) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) + Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.9) + Microsoft.Extensions.FileProviders.Physical (>= 9.0.9) + Microsoft.Extensions.Primitives (>= 9.0.9) + Microsoft.Extensions.Configuration.Json (9.0.9) + Microsoft.Extensions.Configuration (>= 9.0.9) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) + Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.9) + Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.9) + Microsoft.Extensions.Configuration.UserSecrets (9.0.9) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) + Microsoft.Extensions.Configuration.Json (>= 9.0.9) + Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.9) + Microsoft.Extensions.FileProviders.Physical (>= 9.0.9) + Microsoft.Extensions.DependencyInjection (9.0.9) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) + Microsoft.Extensions.DependencyInjection.Abstractions (9.0.9) + Microsoft.Extensions.DependencyModel (9.0.9) + Microsoft.Extensions.Diagnostics.Abstractions (9.0.9) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) + Microsoft.Extensions.Options (>= 9.0.9) + Microsoft.Extensions.Features (9.0.9) + Microsoft.Extensions.FileProviders.Abstractions (9.0.9) + Microsoft.Extensions.Primitives (>= 9.0.9) + Microsoft.Extensions.FileProviders.Composite (9.0.9) + Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.9) + Microsoft.Extensions.Primitives (>= 9.0.9) + Microsoft.Extensions.FileProviders.Physical (9.0.9) + Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.9) + Microsoft.Extensions.FileSystemGlobbing (>= 9.0.9) + Microsoft.Extensions.Primitives (>= 9.0.9) + Microsoft.Extensions.FileSystemGlobbing (9.0.9) + Microsoft.Extensions.Hosting.Abstractions (9.0.9) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) + Microsoft.Extensions.Diagnostics.Abstractions (>= 9.0.9) + Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.9) + Microsoft.Extensions.Logging.Abstractions (>= 9.0.9) + Microsoft.Extensions.Localization (9.0.9) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) + Microsoft.Extensions.Localization.Abstractions (>= 9.0.9) + Microsoft.Extensions.Logging.Abstractions (>= 9.0.9) + Microsoft.Extensions.Options (>= 9.0.9) + Microsoft.Extensions.Localization.Abstractions (9.0.9) + Microsoft.Extensions.Logging (9.0.9) + Microsoft.Extensions.DependencyInjection (>= 9.0.9) + Microsoft.Extensions.Logging.Abstractions (>= 9.0.9) + Microsoft.Extensions.Options (>= 9.0.9) + Microsoft.Extensions.Logging.Abstractions (9.0.9) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) + Microsoft.Extensions.Logging.Configuration (9.0.9) + Microsoft.Extensions.Configuration (>= 9.0.9) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) + Microsoft.Extensions.Configuration.Binder (>= 9.0.9) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) + Microsoft.Extensions.Logging (>= 9.0.9) + Microsoft.Extensions.Logging.Abstractions (>= 9.0.9) + Microsoft.Extensions.Options (>= 9.0.9) + Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.9) + Microsoft.Extensions.Logging.Console (9.0.9) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) + Microsoft.Extensions.Logging (>= 9.0.9) + Microsoft.Extensions.Logging.Abstractions (>= 9.0.9) + Microsoft.Extensions.Logging.Configuration (>= 9.0.9) + Microsoft.Extensions.Options (>= 9.0.9) + Microsoft.Extensions.Logging.Debug (9.0.9) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) + Microsoft.Extensions.Logging (>= 9.0.9) + Microsoft.Extensions.Logging.Abstractions (>= 9.0.9) + Microsoft.Extensions.ObjectPool (9.0.9) + Microsoft.Extensions.Options (9.0.9) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) + Microsoft.Extensions.Primitives (>= 9.0.9) + Microsoft.Extensions.Options.ConfigurationExtensions (9.0.9) + Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) + Microsoft.Extensions.Configuration.Binder (>= 9.0.9) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) + Microsoft.Extensions.Options (>= 9.0.9) + Microsoft.Extensions.Primitives (>= 9.0.9) + Microsoft.Extensions.Primitives (9.0.9) + Microsoft.Extensions.WebEncoders (9.0.9) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) + Microsoft.Extensions.Options (>= 9.0.9) + Microsoft.Net.Http.Headers (9.0.9) + Microsoft.Extensions.Primitives (>= 9.0.9) + Microsoft.OpenApi (2.3.1) System.Text.Json (>= 8.0.5) - Newtonsoft.Json (13.0.3) + Newtonsoft.Json (13.0.4) Newtonsoft.Json.Bson (1.0.3) Newtonsoft.Json (>= 13.0.1) - Swashbuckle.AspNetCore (9.0.4) - Microsoft.Extensions.ApiDescription.Server (>= 9.0) - Swashbuckle.AspNetCore.Swagger (>= 9.0.4) - Swashbuckle.AspNetCore.SwaggerGen (>= 9.0.4) - Swashbuckle.AspNetCore.SwaggerUI (>= 9.0.4) - Swashbuckle.AspNetCore.Swagger (9.0.4) - Microsoft.OpenApi (>= 1.6.25) - Swashbuckle.AspNetCore.SwaggerGen (9.0.4) - Swashbuckle.AspNetCore.Swagger (>= 9.0.4) - Swashbuckle.AspNetCore.SwaggerUI (9.0.4) System.Buffers (4.6.1) - System.Collections.Immutable (9.0.8) + System.Collections.Immutable (9.0.9) System.ComponentModel.Annotations (5.0) - System.Diagnostics.DiagnosticSource (9.0.8) - System.Formats.Asn1 (9.0.8) - System.IO.Pipelines (9.0.8) + System.Diagnostics.DiagnosticSource (9.0.9) + System.Formats.Asn1 (9.0.9) + System.IO.Pipelines (9.0.9) System.Memory (4.6.3) System.Numerics.Vectors (4.6.1) - System.Reflection.Metadata (9.0.8) + System.Reflection.Metadata (9.0.9) System.Runtime.CompilerServices.Unsafe (6.1.2) System.Security.Cryptography.Cng (5.0) System.Formats.Asn1 (>= 5.0) - System.Security.Cryptography.Pkcs (9.0.8) - System.Security.Cryptography.Xml (9.0.8) - System.Security.Cryptography.Pkcs (>= 9.0.8) + System.Security.Cryptography.Pkcs (9.0.9) + System.Security.Cryptography.Xml (9.0.9) + System.Security.Cryptography.Pkcs (>= 9.0.9) System.Security.Principal.Windows (5.0) - System.Text.Encodings.Web (9.0.8) - System.Text.Json (9.0.8) + System.Text.Encodings.Web (9.0.9) + System.Text.Json (9.0.9) System.Threading.Tasks.Extensions (4.6.3) + remote: https://www.myget.org/F/domaindrivendev/api/v3/index.json + Swashbuckle.AspNetCore (10.0.0-pr.3283.1771) + Microsoft.Extensions.ApiDescription.Server (>= 9.0) + Swashbuckle.AspNetCore.Swagger (>= 10.0.0-pr.3283.1771) + Swashbuckle.AspNetCore.SwaggerGen (>= 10.0.0-pr.3283.1771) + Swashbuckle.AspNetCore.SwaggerUI (>= 10.0.0-pr.3283.1771) + Swashbuckle.AspNetCore.Swagger (10.0.0-pr.3283.1771) + Microsoft.OpenApi (>= 2.0) + Swashbuckle.AspNetCore.SwaggerGen (10.0.0-pr.3283.1771) + Swashbuckle.AspNetCore.Swagger (>= 10.0.0-pr.3283.1771) + Swashbuckle.AspNetCore.SwaggerUI (10.0.0-pr.3283.1771) GROUP Test RESTRICTION: == net9.0 @@ -504,18 +505,18 @@ NUGET FSharp.Core (>= 5.0.2) NHamcrest (>= 4.0) xunit.v3 (>= 1.0) - Microsoft.Bcl.AsyncInterfaces (9.0.8) + Microsoft.Bcl.AsyncInterfaces (9.0.9) Microsoft.CodeCoverage (17.14.1) Microsoft.NET.Test.Sdk (17.14.1) Microsoft.CodeCoverage (>= 17.14.1) Microsoft.TestPlatform.TestHost (>= 17.14.1) - Microsoft.OpenApi (2.3) + Microsoft.OpenApi (2.3.1) System.Text.Json (>= 8.0.5) - Microsoft.Testing.Extensions.TrxReport.Abstractions (1.8.3) - Microsoft.Testing.Platform (>= 1.8.3) - Microsoft.Testing.Platform (1.8.3) - Microsoft.Testing.Platform.MSBuild (1.8.3) - Microsoft.Testing.Platform (>= 1.8.3) + Microsoft.Testing.Extensions.TrxReport.Abstractions (1.8.4) + Microsoft.Testing.Platform (>= 1.8.4) + Microsoft.Testing.Platform (1.8.4) + Microsoft.Testing.Platform.MSBuild (1.8.4) + Microsoft.Testing.Platform (>= 1.8.4) Microsoft.TestPlatform.ObjectModel (17.14.1) System.Reflection.Metadata (>= 8.0) Microsoft.TestPlatform.TestHost (17.14.1) @@ -524,18 +525,18 @@ NUGET Microsoft.Win32.Registry (5.0) System.Security.AccessControl (>= 5.0) System.Security.Principal.Windows (>= 5.0) - Newtonsoft.Json (13.0.3) + Newtonsoft.Json (13.0.4) NHamcrest (4.0) System.Buffers (4.6.1) - System.Collections.Immutable (9.0.8) - System.Diagnostics.DiagnosticSource (9.0.8) + System.Collections.Immutable (9.0.9) + System.Diagnostics.DiagnosticSource (9.0.9) System.Memory (4.6.3) System.Reflection.Emit (4.7) - System.Reflection.Metadata (9.0.8) + System.Reflection.Metadata (9.0.9) System.Runtime.CompilerServices.Unsafe (6.1.2) System.Security.AccessControl (6.0.1) System.Security.Principal.Windows (5.0) - System.Text.Json (9.0.8) + System.Text.Json (9.0.9) xunit.analyzers (1.24) xunit.v3 (3.0.1) xunit.analyzers (>= 1.24) diff --git a/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs b/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs index 29e5c47..8341982 100644 --- a/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs +++ b/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs @@ -4,6 +4,7 @@ open System open System.IO open Microsoft.AspNetCore.Mvc open Microsoft.AspNetCore.Http +open Microsoft.OpenApi open Swashbuckle.AspNetCore.SwaggerGen module MediaTypes = @@ -34,7 +35,7 @@ type BinaryContentFilter() = op.RequestBody.Content.Add( MediaTypes.ApplicationOctetStream, - OpenApiMediaType(Schema = OpenApiSchema(Type = "string", Format = "binary")) + OpenApiMediaType(Schema = OpenApiSchema(Type = JsonSchemaType.String, Format = "binary")) ) [] From a1c7f4c1d93f7d2d8e06bdb56b6b602f9a09d5e1 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Thu, 18 Sep 2025 23:05:46 +0200 Subject: [PATCH 06/22] feat: add yaml schema format support --- paket.dependencies | 1 + paket.lock | 5 +++++ src/SwaggerProvider.DesignTime/Provider.OpenApiClient.fs | 8 +++++++- src/SwaggerProvider.DesignTime/paket.references | 1 + tests/SwaggerProvider.Tests/Schema.Parser.Tests.fs | 8 +++++++- 5 files changed, 21 insertions(+), 2 deletions(-) diff --git a/paket.dependencies b/paket.dependencies index 77fc453..61307cf 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -6,6 +6,7 @@ nuget FSharp.Core ~> 8 nuget System.Text.Json ~> 8 nuget FSharp.SystemTextJson nuget Microsoft.OpenApi +nuget Microsoft.OpenApi.YamlReader nuget NETStandard.Library.NETFramework # delete when we drop custom parser for v2 diff --git a/paket.lock b/paket.lock index 1dd933d..f58a229 100644 --- a/paket.lock +++ b/paket.lock @@ -10,11 +10,16 @@ NUGET Microsoft.NETCore.Platforms (7.0.4) - restriction: >= net461 Microsoft.OpenApi (2.3.1) System.Text.Json (>= 8.0.5) - restriction: >= netstandard2.0 + Microsoft.OpenApi.YamlReader (2.3.1) + Microsoft.OpenApi (>= 2.3.1) - restriction: >= netstandard2.0 + SharpYaml (>= 2.1.3) - restriction: >= netstandard2.0 + System.Text.Json (>= 8.0.5) - restriction: >= netstandard2.0 NETStandard.Library (2.0.3) - restriction: >= net461 Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (>= net45) (< netstandard1.3)) (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0)) (&& (>= net46) (< netstandard1.4)) (>= net461) (>= netcoreapp2.0) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8) (< win8)) (&& (< netstandard1.0) (< portable-net45+win8) (>= portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard1.3) (< win8) (>= wpa81)) (&& (< netstandard1.5) (>= uap10.0)) (>= uap10.1) (>= wp8) NETStandard.Library.NETFramework (2.0.0-preview2-25405-01) Microsoft.NETCore.Platforms (>= 2.0.0-preview2-25405-01) - restriction: >= net461 NETStandard.Library (>= 2.0.0-preview2-25401-01) - restriction: >= net461 + SharpYaml (2.1.3) - restriction: >= netstandard2.0 System.Buffers (4.6.1) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= net7.0) (< net8.0)) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) System.Memory (4.6.3) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= net7.0) (< net8.0)) System.Buffers (>= 4.6.1) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) diff --git a/src/SwaggerProvider.DesignTime/Provider.OpenApiClient.fs b/src/SwaggerProvider.DesignTime/Provider.OpenApiClient.fs index 9568d10..4ce7425 100644 --- a/src/SwaggerProvider.DesignTime/Provider.OpenApiClient.fs +++ b/src/SwaggerProvider.DesignTime/Provider.OpenApiClient.fs @@ -2,6 +2,7 @@ namespace SwaggerProvider open System open System.Reflection +open Microsoft.OpenApi.Reader open ProviderImplementation.ProvidedTypes open Microsoft.FSharp.Core.CompilerServices open Swagger @@ -67,7 +68,12 @@ type public OpenApiClientTypeProvider(cfg: TypeProviderConfig) as this = lazy let schemaData = SchemaReader.readSchemaPath "" schemaPath |> Async.RunSynchronously - let readResult = Microsoft.OpenApi.OpenApiDocument.Parse(schemaData) + let settings = OpenApiReaderSettings() + settings.AddYamlReader() + + let readResult = + Microsoft.OpenApi.OpenApiDocument.Parse(schemaData, settings = settings) + let schema, diagnostic = (readResult.Document, readResult.Diagnostic) if diagnostic.Errors.Count > 0 then diff --git a/src/SwaggerProvider.DesignTime/paket.references b/src/SwaggerProvider.DesignTime/paket.references index 044a519..e380a4f 100644 --- a/src/SwaggerProvider.DesignTime/paket.references +++ b/src/SwaggerProvider.DesignTime/paket.references @@ -4,5 +4,6 @@ File: Pluralizer.fs File: NameUtils.fs System.Text.Json Microsoft.OpenApi +Microsoft.OpenApi.YamlReader YamlDotNet diff --git a/tests/SwaggerProvider.Tests/Schema.Parser.Tests.fs b/tests/SwaggerProvider.Tests/Schema.Parser.Tests.fs index b53c324..208c8b7 100644 --- a/tests/SwaggerProvider.Tests/Schema.Parser.Tests.fs +++ b/tests/SwaggerProvider.Tests/Schema.Parser.Tests.fs @@ -1,5 +1,6 @@ module SwaggerProvider.Tests.v3 +open Microsoft.OpenApi.Reader open Xunit open FsUnitTyped open System @@ -21,7 +22,12 @@ module V3 = open SwaggerProvider.Internal.v3.Compilers let testSchema schemaStr = - let readResult = Microsoft.OpenApi.OpenApiDocument.Parse(schemaStr) + let settings = OpenApiReaderSettings() + settings.AddYamlReader() + + let readResult = + Microsoft.OpenApi.OpenApiDocument.Parse(schemaStr, settings = settings) + let schema = readResult.Document (* if diagnostic.Errors.Count > 0 then failwithf "Schema parse errors:\n- %s" From 7f04627b0b5188e494f7e0ae45bcfaa664f6943c Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Fri, 19 Sep 2025 18:09:02 +0200 Subject: [PATCH 07/22] refact selectors --- .../v2/OperationCompiler.fs | 2 +- src/SwaggerProvider.DesignTime/v2/Parser/Parsers.fs | 12 ++++++------ .../v3/DefinitionCompiler.fs | 4 ++-- tests/SwaggerProvider.Tests/APIs.guru.fs | 6 +++--- .../Controllers/UpdateControllers.fs | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/SwaggerProvider.DesignTime/v2/OperationCompiler.fs b/src/SwaggerProvider.DesignTime/v2/OperationCompiler.fs index e319708..01a73f0 100644 --- a/src/SwaggerProvider.DesignTime/v2/OperationCompiler.fs +++ b/src/SwaggerProvider.DesignTime/v2/OperationCompiler.fs @@ -32,7 +32,7 @@ type OperationCompiler(schema: SwaggerObject, defCompiler: DefinitionCompiler, i else Set.add name existing, name - let required, optional = op.Parameters |> Array.partition(fun x -> x.Required) + let required, optional = op.Parameters |> Array.partition(_.Required) Array.append required optional |> Array.fold diff --git a/src/SwaggerProvider.DesignTime/v2/Parser/Parsers.fs b/src/SwaggerProvider.DesignTime/v2/Parser/Parsers.fs index ec4abc2..5ade60b 100644 --- a/src/SwaggerProvider.DesignTime/v2/Parser/Parsers.fs +++ b/src/SwaggerProvider.DesignTime/v2/Parser/Parsers.fs @@ -61,7 +61,7 @@ type SchemaNode() = /// Gets the string array for the property if it exists. Empty array otherwise. member this.GetStringArraySafe(propertyName) = match this.TryGetProperty(propertyName) with - | Some(value) -> value.AsArray() |> Array.map(fun x -> x.AsString()) + | Some(value) -> value.AsArray() |> Array.map(_.AsString()) | None -> [||] module Parsers = @@ -138,11 +138,11 @@ module Parsers = let (|IsEnum|_|)(obj: SchemaNode) = // Parse `enum` - http://json-schema.org/latest/json-schema-validation.html#anchor76 obj.TryGetProperty("enum") - |> Option.map(fun cases -> cases.AsArray() |> Array.map(fun x -> x.AsString())) + |> Option.map(fun cases -> cases.AsArray() |> Array.map(_.AsString())) let (|IsRef|_|)(obj: SchemaNode) = obj.TryGetProperty("$ref") // Parse `$refs` - |> Option.map(fun ref -> ref.AsString()) + |> Option.map(_.AsString()) let (|IsArray|_|)(obj: SchemaNode) = // Parse Arrays - http://json-schema.org/latest/json-schema-validation.html#anchor36 @@ -182,7 +182,7 @@ module Parsers = let requiredProperties = match obj.TryGetProperty("required") with | None -> Set.empty<_> - | Some(req) -> req.AsArray() |> Array.map(fun x -> x.AsString()) |> Set.ofArray + | Some(req) -> req.AsArray() |> Array.map(_.AsString()) |> Set.ofArray let properties = properties.Properties() @@ -203,7 +203,7 @@ module Parsers = let (|IsAllOf|_|)(obj: SchemaNode) = // Identify composition element 'allOf' - obj.TryGetProperty("allOf") |> Option.map(fun x -> x.AsArray()) + obj.TryGetProperty("allOf") |> Option.map(_.AsArray()) let (|IsComposition|_|)(obj: SchemaNode) = // Models with Object Composition @@ -252,7 +252,7 @@ module Parsers = | IsEnum cases -> let ty = obj.TryGetProperty("type") - |> Option.map(fun x -> x.AsString()) + |> Option.map(_.AsString()) |> Option.defaultValue "string" Enum(cases, ty) diff --git a/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs b/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs index 660411d..9af97c2 100644 --- a/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs +++ b/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs @@ -249,7 +249,7 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = | true -> schemaObj.AllOf |> Seq.append [ schemaObj ] - |> Seq.collect(fun x -> x.Properties) + |> Seq.collect(_.Properties) | false -> schemaObj.Properties let schemaObjRequired = @@ -257,7 +257,7 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = | true -> schemaObj.AllOf |> Seq.append [ schemaObj ] - |> Seq.collect(fun x -> x.Required) + |> Seq.collect(_.Required) |> System.Collections.Generic.HashSet :> System.Collections.Generic.ISet | false -> schemaObj.Required diff --git a/tests/SwaggerProvider.Tests/APIs.guru.fs b/tests/SwaggerProvider.Tests/APIs.guru.fs index e528a35..cf2dac5 100644 --- a/tests/SwaggerProvider.Tests/APIs.guru.fs +++ b/tests/SwaggerProvider.Tests/APIs.guru.fs @@ -15,7 +15,7 @@ let private apisGuruList = |> Async.RunSynchronously JsonDocument.Parse(list).RootElement.EnumerateObject() - |> Seq.map(fun x -> x.Value)) + |> Seq.map(_.Value)) let private getApisGuruSchemas propertyName = let getProp (prop: string) (obj: JsonElement) = @@ -30,9 +30,9 @@ let private getApisGuruSchemas propertyName = |> Seq.choose(fun schema -> schema |> getProp "versions" - |> Option.bind(fun v -> v.EnumerateObject() |> Seq.map(fun y -> y.Value) |> Seq.last |> Some)) + |> Option.bind(fun v -> v.EnumerateObject() |> Seq.map(_.Value) |> Seq.last |> Some)) |> Seq.choose(getProp propertyName) - |> Seq.map(fun x -> x.GetString()) + |> Seq.map(_.GetString()) |> Seq.toArray let Schemas = lazy (getApisGuruSchemas "swaggerYamlUrl") // "swaggerUrl" diff --git a/tests/Swashbuckle.WebApi.Server/Controllers/UpdateControllers.fs b/tests/Swashbuckle.WebApi.Server/Controllers/UpdateControllers.fs index 88d4afd..a5d05e7 100644 --- a/tests/Swashbuckle.WebApi.Server/Controllers/UpdateControllers.fs +++ b/tests/Swashbuckle.WebApi.Server/Controllers/UpdateControllers.fs @@ -37,7 +37,7 @@ type UpdateStringController() = inherit UpdateController((+) "Hello, ") type UpdateDateTimeController() = - inherit UpdateController(fun x -> x.AddDays(1.0)) + inherit UpdateController(_.AddDays(1.0)) type UpdateGuidController() = inherit UpdateController(id) From 09418a4b58b347b42def761b5cd03f8f35239c7c Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Thu, 25 Sep 2025 20:32:14 +0200 Subject: [PATCH 08/22] fix: one null ref --- .../v3/DefinitionCompiler.fs | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs b/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs index 9af97c2..714ef5f 100644 --- a/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs +++ b/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs @@ -225,7 +225,7 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = let ns, tyName = tyPath |> DefinitionPath.Parse |> nsRoot.Resolve let ty = compileBySchema ns tyName def true (registerInNsAndInDef tyPath ns) true ty :> Type - | None when tyPath.StartsWith(DefinitionPath.DefinitionPrefix) -> + | None when tyPath.StartsWith DefinitionPath.DefinitionPrefix -> failwithf $"Cannot find definition '%s{tyPath}' in schema definitions %A{pathToType.Keys |> Seq.toArray}" | None -> failwithf $"Cannot find definition '%s{tyPath}' (references to relative documents are not supported yet)" @@ -244,23 +244,27 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = registerNew(tyName, ty :> Type) // Combine composite schemas + let hasAllOf = + match schemaObj.AllOf with + | null -> false + | _ -> schemaObj.AllOf.Count > 0 + let schemaObjProperties = - match schemaObj.AllOf.Count > 0 with + match hasAllOf with | true -> schemaObj.AllOf |> Seq.append [ schemaObj ] - |> Seq.collect(_.Properties) + |> Seq.collect _.Properties | false -> schemaObj.Properties + |> fun x -> if isNull x then Seq.empty else x + let schemaObjRequired = - match schemaObj.AllOf.Count > 0 with - | true -> - schemaObj.AllOf - |> Seq.append [ schemaObj ] - |> Seq.collect(_.Required) - |> System.Collections.Generic.HashSet - :> System.Collections.Generic.ISet + match hasAllOf with + | true -> schemaObj.AllOf |> Seq.append [ schemaObj ] |> Seq.collect _.Required | false -> schemaObj.Required + |> fun x -> if isNull x then Seq.empty else x + |> Set.ofSeq // Generate fields and properties let members = @@ -270,10 +274,10 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = |> List.map(fun p -> let propName, propSchema = p.Key, p.Value - if String.IsNullOrEmpty(propName) then + if String.IsNullOrEmpty propName then failwithf $"Property cannot be created with empty name. TypeName:%A{tyName}; SchemaObj:%A{schemaObj}" - let isRequired = schemaObjRequired.Contains(propName) + let isRequired = schemaObjRequired.Contains propName let pTy = compileBySchema ns (ns.ReserveUniqueName tyName (nicePascalName propName)) propSchema isRequired ns.RegisterType false From 9e8659f9d44c92182f45384176015a0e733d8ccf Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sun, 28 Sep 2025 21:05:56 +0200 Subject: [PATCH 09/22] fix: few more errors --- .../v3/DefinitionCompiler.fs | 55 ++++++++++--------- .../v3/OperationCompiler.fs | 8 ++- 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs b/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs index 714ef5f..b51f228 100644 --- a/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs +++ b/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs @@ -20,10 +20,10 @@ type DefinitionPath = static member Parse(definition: string) = let nsSeparator = '.' - if (not <| definition.StartsWith(DefinitionPath.DefinitionPrefix)) then + if not <| definition.StartsWith DefinitionPath.DefinitionPrefix then failwithf $"Definition path ('%s{definition}') does not start with %s{DefinitionPath.DefinitionPrefix}" - let definitionPath = definition.Substring(DefinitionPath.DefinitionPrefix.Length) + let definitionPath = definition.Substring DefinitionPath.DefinitionPrefix.Length let rec getCharInTypeName ind = if ind = definitionPath.Length then @@ -96,7 +96,7 @@ and NamespaceAbstraction(name: string) = /// Release previously reserved name member _.ReleaseNameReservation tyName = - updateReservation "release the name" tyName (fun () -> providedTys.Remove(tyName) |> ignore) + updateReservation "release the name" tyName (fun () -> providedTys.Remove tyName |> ignore) /// Mark type name as named alias for basic type member _.MarkTypeAsNameAlias tyName = @@ -121,12 +121,12 @@ and NamespaceAbstraction(name: string) = | true, Namespace ns -> ns | true, NestedType(_, ns) -> ns | true, ProvidedType ty -> - let ns = NamespaceAbstraction(name) + let ns = NamespaceAbstraction name providedTys[name] <- NestedType(ty, ns) ns | false, _ | true, Reservation -> - let ns = NamespaceAbstraction(name) + let ns = NamespaceAbstraction name providedTys[name] <- Namespace ns ns | true, value -> failwithf $"Name collision, cannot create namespace '%s{name}' because it used by '%A{value}'" @@ -175,14 +175,14 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = |> Map.ofSeq let pathToType = Collections.Generic.Dictionary<_, Type>() - let nsRoot = NamespaceAbstraction("Root") + let nsRoot = NamespaceAbstraction "Root" let nsOps = nsRoot.GetOrCreateNamespace "OperationTypes" let generateProperty (scope: UniqueNameGenerator) propName ty = let propertyName = scope.MakeUnique <| nicePascalName propName let providedField = - let fieldName = $"_%c{Char.ToLower propertyName[0]}%s{propertyName.Substring(1)}" + let fieldName = $"_%c{Char.ToLower propertyName[0]}%s{propertyName.Substring 1}" ProvidedField(fieldName, ty) @@ -231,7 +231,12 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = and compileBySchema (ns: NamespaceAbstraction) tyName (schemaObj: IOpenApiSchema) isRequired registerNew fromByPathCompiler = let compileNewObject() = - if schemaObj.Properties.Count = 0 && schemaObj.AllOf.Count = 0 then + let hasProperties = + not(isNull schemaObj.Properties) && schemaObj.Properties.Count > 0 + + let hasAllOf = not(isNull schemaObj.AllOf) && schemaObj.AllOf.Count > 0 + + if not hasProperties && not hasAllOf then if not <| isNull tyName then ns.MarkTypeAsNameAlias tyName @@ -244,11 +249,6 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = registerNew(tyName, ty :> Type) // Combine composite schemas - let hasAllOf = - match schemaObj.AllOf with - | null -> false - | _ -> schemaObj.AllOf.Count > 0 - let schemaObjProperties = match hasAllOf with | true -> @@ -422,29 +422,32 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = if not schemaObj.Type.HasValue then failwithf $"Schema type is not specified for '%s{tyName}'" + let (|HasFlag|_|) (flag: JsonSchemaType) (value: JsonSchemaType) = + if value.HasFlag flag then Some() else None + match schemaObj.Type.Value, schemaObj.Format with - | JsonSchemaType.Integer, "int64" -> typeof - | JsonSchemaType.Integer, _ -> typeof - | JsonSchemaType.Number, "double" -> typeof - | JsonSchemaType.Number, _ -> typeof - | JsonSchemaType.Boolean, _ -> typeof - | JsonSchemaType.String, "byte" -> typeof.MakeArrayType 1 - | JsonSchemaType.String, "binary" -> + | HasFlag JsonSchemaType.Boolean, _ -> typeof + | HasFlag JsonSchemaType.Integer, "int64" -> typeof + | HasFlag JsonSchemaType.Integer, _ -> typeof + | HasFlag JsonSchemaType.Number, "double" -> typeof + | HasFlag JsonSchemaType.Number, _ -> typeof + | HasFlag JsonSchemaType.String, "byte" -> typeof.MakeArrayType 1 + | HasFlag JsonSchemaType.String, "binary" -> // for `application/octet-stream` request body // for `multipart/form-data` : https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#considerations-for-file-uploads typeof - | JsonSchemaType.String, "date" - | JsonSchemaType.String, "date-time" -> typeof - | JsonSchemaType.String, "uuid" -> typeof - | JsonSchemaType.String, _ -> typeof - | JsonSchemaType.Array, _ -> + | HasFlag JsonSchemaType.String, "date" + | HasFlag JsonSchemaType.String, "date-time" -> typeof + | HasFlag JsonSchemaType.String, "uuid" -> typeof + | HasFlag JsonSchemaType.String, _ -> typeof + | HasFlag JsonSchemaType.Array, _ -> ns.ReleaseNameReservation tyName let elSchema = schemaObj.Items let elTy = compileBySchema ns (ns.ReserveUniqueName tyName "Item") elSchema true ns.RegisterType false - elTy.MakeArrayType(1) + elTy.MakeArrayType 1 | ty, format -> failwithf $"Type %s{tyName}(%A{ty},%s{format}) should be caught by other match statement (%A{schemaObj.Type})" if fromByPathCompiler then diff --git a/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs b/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs index eedd7bf..5ec5a3c 100644 --- a/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs +++ b/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs @@ -66,11 +66,15 @@ type OperationCompiler(schema: OpenApiDocument, defCompiler: DefinitionCompiler, let unambiguousName(par: IOpenApiParameter) = $"%s{par.Name}In%A{par.In}" - let openApiParameters = [ yield! pathItem.Parameters; yield! operation.Parameters ] + let openApiParameters = + [ if not(isNull pathItem.Parameters) then + yield! pathItem.Parameters + if not(isNull operation.Parameters) then + yield! operation.Parameters ] let (|MediaType|_|) contentType (content: IDictionary) = match content.TryGetValue contentType with - | true, mediaTyObj -> Some(mediaTyObj) + | true, mediaTyObj -> Some mediaTyObj | _ -> None let (|NoMediaType|_|)(content: IDictionary) = From 562ece68146c28cf43697e07560745e65f5a3562 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sun, 28 Sep 2025 22:36:13 +0200 Subject: [PATCH 10/22] fix: unit tests --- .../v3/DefinitionCompiler.fs | 130 ++++++++++-------- .../v3/OperationCompiler.fs | 6 +- 2 files changed, 78 insertions(+), 58 deletions(-) diff --git a/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs b/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs index b51f228..85c2e9e 100644 --- a/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs +++ b/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs @@ -231,12 +231,13 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = and compileBySchema (ns: NamespaceAbstraction) tyName (schemaObj: IOpenApiSchema) isRequired registerNew fromByPathCompiler = let compileNewObject() = - let hasProperties = - not(isNull schemaObj.Properties) && schemaObj.Properties.Count > 0 + let inline toSeq x = + if isNull x then Seq.empty else x :> seq<_> - let hasAllOf = not(isNull schemaObj.AllOf) && schemaObj.AllOf.Count > 0 + let properties = schemaObj.Properties |> toSeq + let allOf = schemaObj.AllOf |> toSeq - if not hasProperties && not hasAllOf then + if Seq.isEmpty properties && Seq.isEmpty allOf then if not <| isNull tyName then ns.MarkTypeAsNameAlias tyName @@ -250,20 +251,21 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = // Combine composite schemas let schemaObjProperties = - match hasAllOf with - | true -> - schemaObj.AllOf - |> Seq.append [ schemaObj ] - |> Seq.collect _.Properties - | false -> schemaObj.Properties - |> fun x -> if isNull x then Seq.empty else x + let getProps(s: IOpenApiSchema) = + s.Properties |> toSeq + + match Seq.isEmpty allOf with + | false -> allOf |> Seq.append [ schemaObj ] |> Seq.collect getProps + | true -> getProps schemaObj let schemaObjRequired = - match hasAllOf with - | true -> schemaObj.AllOf |> Seq.append [ schemaObj ] |> Seq.collect _.Required - | false -> schemaObj.Required - |> fun x -> if isNull x then Seq.empty else x + let getReq(s: IOpenApiSchema) = + s.Required |> toSeq + + match Seq.isEmpty allOf with + | false -> allOf |> Seq.append [ schemaObj ] |> Seq.collect getReq + | true -> getReq schemaObj |> Set.ofSeq // Generate fields and properties @@ -301,14 +303,14 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = let ctorParams, fields = let required, optional = List.zip (List.ofSeq schemaObjProperties) members - |> List.partition(fun (x, _) -> schemaObjRequired.Contains(x.Key)) + |> List.partition(fun (x, _) -> schemaObjRequired.Contains x.Key) - (required @ optional) + required @ optional |> List.map(fun (x, (f, p)) -> let paramName = niceCamelName p.Name let prParam = - if schemaObjRequired.Contains(x.Key) then + if schemaObjRequired.Contains x.Key then ProvidedParameter(paramName, f.FieldType) else let paramDefaultValue = this.GetDefaultValue f.FieldType @@ -324,7 +326,7 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = fun args -> let this, args = match args with - | x :: xs -> (x, xs) + | x :: xs -> x, xs | _ -> failwith "Wrong constructor arguments" List.zip args fields @@ -354,7 +356,7 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = let pValuesArr = Expr.NewArray(typeof, List.ofArray pValues) <@@ - let values = (%%pValuesArr: array) + let values = %%pValuesArr: array let rec formatValue(v: obj) = if isNull v then @@ -386,10 +388,28 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = ty :> Type + let resolvedType = + // If schemaObj.Type is missing, but allOf is present and first allOf subschema has a type, use that + if + not schemaObj.Type.HasValue + && not(isNull schemaObj.AllOf) + && schemaObj.AllOf.Count > 0 + then + let firstAllOf = schemaObj.AllOf.[0] + + if not(isNull firstAllOf) && firstAllOf.Type.HasValue then + Some firstAllOf.Type.Value + else + None + else if schemaObj.Type.HasValue then + Some schemaObj.Type.Value + else + None + let tyType = match schemaObj with | null -> failwithf $"Cannot compile object '%s{tyName}' when schema is 'null'" - | :? OpenApiSchemaReference as schemaRef when not <| schemaRef.Reference.Id.EndsWith(tyName) -> + | :? OpenApiSchemaReference as schemaRef when not <| schemaRef.Reference.Id.EndsWith tyName -> ns.ReleaseNameReservation tyName compileByPath <| schemaRef.Reference.Id | :? OpenApiSchemaReference as schemaRef -> @@ -401,7 +421,7 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = // TODO: fail on external references //| _ when schemaObj.Reference <> null && tyName <> schemaObj.Reference.Id -> | _ when - schemaObj.Type.Value = JsonSchemaType.Object + resolvedType = Some JsonSchemaType.Object && not(isNull schemaObj.AdditionalProperties) -> // Dictionary -> ns.ReleaseNameReservation tyName @@ -411,44 +431,40 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = compileBySchema ns (ns.ReserveUniqueName tyName "Item") elSchema true ns.RegisterType false ProvidedTypeBuilder.MakeGenericType(typedefof>, [ typeof; elTy ]) - | _ when - not schemaObj.Type.HasValue - || schemaObj.Type.Value = JsonSchemaType.Object - -> // Object props -> - compileNewObject() + | _ when resolvedType.IsNone || resolvedType = Some JsonSchemaType.Object -> compileNewObject() | _ -> ns.MarkTypeAsNameAlias tyName - if not schemaObj.Type.HasValue then - failwithf $"Schema type is not specified for '%s{tyName}'" - - let (|HasFlag|_|) (flag: JsonSchemaType) (value: JsonSchemaType) = - if value.HasFlag flag then Some() else None - - match schemaObj.Type.Value, schemaObj.Format with - | HasFlag JsonSchemaType.Boolean, _ -> typeof - | HasFlag JsonSchemaType.Integer, "int64" -> typeof - | HasFlag JsonSchemaType.Integer, _ -> typeof - | HasFlag JsonSchemaType.Number, "double" -> typeof - | HasFlag JsonSchemaType.Number, _ -> typeof - | HasFlag JsonSchemaType.String, "byte" -> typeof.MakeArrayType 1 - | HasFlag JsonSchemaType.String, "binary" -> - // for `application/octet-stream` request body - // for `multipart/form-data` : https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#considerations-for-file-uploads - typeof - | HasFlag JsonSchemaType.String, "date" - | HasFlag JsonSchemaType.String, "date-time" -> typeof - | HasFlag JsonSchemaType.String, "uuid" -> typeof - | HasFlag JsonSchemaType.String, _ -> typeof - | HasFlag JsonSchemaType.Array, _ -> - ns.ReleaseNameReservation tyName - let elSchema = schemaObj.Items - - let elTy = - compileBySchema ns (ns.ReserveUniqueName tyName "Item") elSchema true ns.RegisterType false - - elTy.MakeArrayType 1 - | ty, format -> failwithf $"Type %s{tyName}(%A{ty},%s{format}) should be caught by other match statement (%A{schemaObj.Type})" + match resolvedType with + | None -> failwithf $"Schema type is not specified for '%s{tyName}'" + | Some t -> + let (|HasFlag|_|) (flag: JsonSchemaType) (value: JsonSchemaType) = + if value.HasFlag flag then Some() else None + + match t, schemaObj.Format with + | HasFlag JsonSchemaType.Boolean, _ -> typeof + | HasFlag JsonSchemaType.Integer, "int64" -> typeof + | HasFlag JsonSchemaType.Integer, _ -> typeof + | HasFlag JsonSchemaType.Number, "double" -> typeof + | HasFlag JsonSchemaType.Number, _ -> typeof + | HasFlag JsonSchemaType.String, "byte" -> typeof.MakeArrayType 1 + | HasFlag JsonSchemaType.String, "binary" -> + // for `application/octet-stream` request body + // for `multipart/form-data` : https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#considerations-for-file-uploads + typeof + | HasFlag JsonSchemaType.String, "date" + | HasFlag JsonSchemaType.String, "date-time" -> typeof + | HasFlag JsonSchemaType.String, "uuid" -> typeof + | HasFlag JsonSchemaType.String, _ -> typeof + | HasFlag JsonSchemaType.Array, _ -> + ns.ReleaseNameReservation tyName + let elSchema = schemaObj.Items + + let elTy = + compileBySchema ns (ns.ReserveUniqueName tyName "Item") elSchema true ns.RegisterType false + + elTy.MakeArrayType 1 + | ty, format -> failwithf $"Type %s{tyName}(%A{ty},%s{format}) should be caught by other match statement (%A{resolvedType})" if fromByPathCompiler then registerNew(tyName, tyType) diff --git a/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs b/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs index 5ec5a3c..9eea996 100644 --- a/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs +++ b/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs @@ -447,8 +447,12 @@ type OperationCompiler(schema: OpenApiDocument, defCompiler: DefinitionCompiler, // failwith // $"TP does not support unresolved paths / external references. Path '%s{path.Key}' refer to '%s{path.Value.Reference.ReferenceV3}'" - List.ofSeq path.Value.Operations + let safeSeq s = + if isNull s then Seq.empty else s + + List.ofSeq(safeSeq path.Value.Operations) |> List.map(fun kv -> path.Key, path.Value, kv.Key)) + |> List.groupBy(fun (_, pathItem, opTy) -> if ignoreControllerPrefix then String.Empty // From 0da59cc344914858633ec1487ddd4ef417d97995 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sun, 12 Oct 2025 00:10:11 +0200 Subject: [PATCH 11/22] update deps --- paket.lock | 86 +++++++++++++++++++++++++++--------------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/paket.lock b/paket.lock index f58a229..b315120 100644 --- a/paket.lock +++ b/paket.lock @@ -8,10 +8,10 @@ NUGET Microsoft.Bcl.AsyncInterfaces (9.0.9) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) Microsoft.NETCore.Platforms (7.0.4) - restriction: >= net461 - Microsoft.OpenApi (2.3.1) + Microsoft.OpenApi (2.3.4) System.Text.Json (>= 8.0.5) - restriction: >= netstandard2.0 - Microsoft.OpenApi.YamlReader (2.3.1) - Microsoft.OpenApi (>= 2.3.1) - restriction: >= netstandard2.0 + Microsoft.OpenApi.YamlReader (2.3.4) + Microsoft.OpenApi (>= 2.3.4) - restriction: >= netstandard2.0 SharpYaml (>= 2.1.3) - restriction: >= netstandard2.0 System.Text.Json (>= 8.0.5) - restriction: >= netstandard2.0 NETStandard.Library (2.0.3) - restriction: >= net461 @@ -453,7 +453,7 @@ NUGET Microsoft.Extensions.Options (>= 9.0.9) Microsoft.Net.Http.Headers (9.0.9) Microsoft.Extensions.Primitives (>= 9.0.9) - Microsoft.OpenApi (2.3.1) + Microsoft.OpenApi (2.3.4) System.Text.Json (>= 8.0.5) Newtonsoft.Json (13.0.4) Newtonsoft.Json.Bson (1.0.3) @@ -478,16 +478,16 @@ NUGET System.Text.Json (9.0.9) System.Threading.Tasks.Extensions (4.6.3) remote: https://www.myget.org/F/domaindrivendev/api/v3/index.json - Swashbuckle.AspNetCore (10.0.0-pr.3283.1771) + Swashbuckle.AspNetCore (10.0.0-pr.3283.1861) Microsoft.Extensions.ApiDescription.Server (>= 9.0) - Swashbuckle.AspNetCore.Swagger (>= 10.0.0-pr.3283.1771) - Swashbuckle.AspNetCore.SwaggerGen (>= 10.0.0-pr.3283.1771) - Swashbuckle.AspNetCore.SwaggerUI (>= 10.0.0-pr.3283.1771) - Swashbuckle.AspNetCore.Swagger (10.0.0-pr.3283.1771) + Swashbuckle.AspNetCore.Swagger (>= 10.0.0-pr.3283.1861) + Swashbuckle.AspNetCore.SwaggerGen (>= 10.0.0-pr.3283.1861) + Swashbuckle.AspNetCore.SwaggerUI (>= 10.0.0-pr.3283.1861) + Swashbuckle.AspNetCore.Swagger (10.0.0-pr.3283.1861) Microsoft.OpenApi (>= 2.0) - Swashbuckle.AspNetCore.SwaggerGen (10.0.0-pr.3283.1771) - Swashbuckle.AspNetCore.Swagger (>= 10.0.0-pr.3283.1771) - Swashbuckle.AspNetCore.SwaggerUI (10.0.0-pr.3283.1771) + Swashbuckle.AspNetCore.SwaggerGen (10.0.0-pr.3283.1861) + Swashbuckle.AspNetCore.Swagger (>= 10.0.0-pr.3283.1861) + Swashbuckle.AspNetCore.SwaggerUI (10.0.0-pr.3283.1861) GROUP Test RESTRICTION: == net9.0 @@ -511,21 +511,21 @@ NUGET NHamcrest (>= 4.0) xunit.v3 (>= 1.0) Microsoft.Bcl.AsyncInterfaces (9.0.9) - Microsoft.CodeCoverage (17.14.1) - Microsoft.NET.Test.Sdk (17.14.1) - Microsoft.CodeCoverage (>= 17.14.1) - Microsoft.TestPlatform.TestHost (>= 17.14.1) - Microsoft.OpenApi (2.3.1) + Microsoft.CodeCoverage (18.0) + Microsoft.NET.Test.Sdk (18.0) + Microsoft.CodeCoverage (>= 18.0) + Microsoft.TestPlatform.TestHost (>= 18.0) + Microsoft.OpenApi (2.3.4) System.Text.Json (>= 8.0.5) - Microsoft.Testing.Extensions.TrxReport.Abstractions (1.8.4) - Microsoft.Testing.Platform (>= 1.8.4) - Microsoft.Testing.Platform (1.8.4) - Microsoft.Testing.Platform.MSBuild (1.8.4) - Microsoft.Testing.Platform (>= 1.8.4) - Microsoft.TestPlatform.ObjectModel (17.14.1) + Microsoft.Testing.Extensions.TrxReport.Abstractions (2.0) + Microsoft.Testing.Platform (>= 2.0) + Microsoft.Testing.Platform (2.0) + Microsoft.Testing.Platform.MSBuild (2.0) + Microsoft.Testing.Platform (>= 2.0) + Microsoft.TestPlatform.ObjectModel (18.0) System.Reflection.Metadata (>= 8.0) - Microsoft.TestPlatform.TestHost (17.14.1) - Microsoft.TestPlatform.ObjectModel (>= 17.14.1) + Microsoft.TestPlatform.TestHost (18.0) + Microsoft.TestPlatform.ObjectModel (>= 18.0) Newtonsoft.Json (>= 13.0.3) Microsoft.Win32.Registry (5.0) System.Security.AccessControl (>= 5.0) @@ -543,24 +543,24 @@ NUGET System.Security.Principal.Windows (5.0) System.Text.Json (9.0.9) xunit.analyzers (1.24) - xunit.v3 (3.0.1) + xunit.v3 (3.1) xunit.analyzers (>= 1.24) - xunit.v3.assert (3.0.1) - xunit.v3.core (3.0.1) - xunit.v3.assert (3.0.1) - xunit.v3.common (3.0.1) + xunit.v3.assert (3.1) + xunit.v3.core (3.1) + xunit.v3.assert (3.1) + xunit.v3.common (3.1) Microsoft.Bcl.AsyncInterfaces (>= 6.0) - xunit.v3.core (3.0.1) - Microsoft.Testing.Platform.MSBuild (>= 1.8.2) - xunit.v3.extensibility.core (3.0.1) - xunit.v3.runner.inproc.console (3.0.1) - xunit.v3.extensibility.core (3.0.1) - xunit.v3.common (3.0.1) - xunit.v3.runner.common (3.0.1) + xunit.v3.core (3.1) + Microsoft.Testing.Platform.MSBuild (>= 1.8.4) + xunit.v3.extensibility.core (3.1) + xunit.v3.runner.inproc.console (3.1) + xunit.v3.extensibility.core (3.1) + xunit.v3.common (3.1) + xunit.v3.runner.common (3.1) Microsoft.Win32.Registry (5.0) - xunit.v3.common (3.0.1) - xunit.v3.runner.inproc.console (3.0.1) - Microsoft.Testing.Extensions.TrxReport.Abstractions (>= 1.8.2) - Microsoft.Testing.Platform (>= 1.8.2) - xunit.v3.extensibility.core (3.0.1) - xunit.v3.runner.common (3.0.1) + xunit.v3.common (3.1) + xunit.v3.runner.inproc.console (3.1) + Microsoft.Testing.Extensions.TrxReport.Abstractions (>= 1.8.4) + Microsoft.Testing.Platform (>= 1.8.4) + xunit.v3.extensibility.core (3.1) + xunit.v3.runner.common (3.1) From 06b1c8d8e20ec03fe1f6f2450cf77d3d3336243a Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sun, 12 Oct 2025 09:02:21 +0200 Subject: [PATCH 12/22] fix: schema generation --- tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs b/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs index 8341982..59a5f12 100644 --- a/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs +++ b/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs @@ -31,7 +31,7 @@ type BinaryContentFilter() = let att = ctx.MethodInfo.GetCustomAttributes(typeof, false) if att.Length > 0 then - op.RequestBody <- OpenApiRequestBody(Required = true) + op.RequestBody <- OpenApiRequestBody(Required = true, Content = System.Collections.Generic.Dictionary()) op.RequestBody.Content.Add( MediaTypes.ApplicationOctetStream, From 29c6f8c4ff3789ded184fda75b972f787271992c Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sat, 15 Nov 2025 20:39:15 +0100 Subject: [PATCH 13/22] feat: update to net20 --- .config/dotnet-tools.json | 2 +- .github/workflows/dotnetcore.yml | 4 +- AGENTS.md | 10 +- build.fsx | 6 +- global.json | 2 +- paket.dependencies | 7 +- paket.lock | 431 +++++++++--------- .../Provider.OpenApiClient.fs | 2 - .../v3/OperationCompiler.fs | 6 +- .../SwaggerProvider.ProviderTests.fsproj | 2 +- .../SwaggerProvider.Tests.fsproj | 2 +- .../Controllers/FileController.fs | 2 +- .../Swashbuckle.WebApi.Server.fsproj | 2 +- 13 files changed, 243 insertions(+), 235 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 929748a..ceef264 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "paket": { - "version": "9.0.2", + "version": "10.0.0-alpha011", "commands": [ "paket" ], diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index af150dd..aafc2b4 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -18,10 +18,10 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Setup .NET 9.0 SDK + - name: Setup .NET 10.0 SDK uses: actions/setup-dotnet@v4 with: - dotnet-version: "9.0.x" + dotnet-version: "10.0.x" - name: Install local tools run: dotnet tool restore - name: Paket Restore diff --git a/AGENTS.md b/AGENTS.md index 90ec38b..1b7b8fa 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,17 +4,17 @@ - **Format Check**: `dotnet fake build -t CheckFormat` (validates Fantomas formatting) - **Format**: `dotnet fake build -t Format` (applies Fantomas formatting) - **All Tests**: `dotnet fake build -t RunTests` (builds + starts test server + runs all tests) -- **Unit Tests Only**: `dotnet build && dotnet tests/SwaggerProvider.Tests/bin/Release/net9.0/SwaggerProvider.Tests.dll` +- **Unit Tests Only**: `dotnet build && dotnet tests/SwaggerProvider.Tests/bin/Release/net10.0/SwaggerProvider.Tests.dll` - **Provider Tests (Integration)**: 1. Build test server: `dotnet build tests/Swashbuckle.WebApi.Server/Swashbuckle.WebApi.Server.fsproj -c Release` - 2. Start server in background: `dotnet tests/Swashbuckle.WebApi.Server/bin/Release/net9.0/Swashbuckle.WebApi.Server.dll` + 2. Start server in background: `dotnet tests/Swashbuckle.WebApi.Server/bin/Release/net10.0/Swashbuckle.WebApi.Server.dll` 3. Build tests: `dotnet build SwaggerProvider.TestsAndDocs.sln -c Release` - 4. Run tests: `dotnet tests/SwaggerProvider.ProviderTests/bin/Release/net9.0/SwaggerProvider.ProviderTests.dll` + 4. Run tests: `dotnet tests/SwaggerProvider.ProviderTests/bin/Release/net10.0/SwaggerProvider.ProviderTests.dll` - **Single Test**: Run via xunit runner: `dotnet [assembly] [filter]` ## Code Style Guidelines -**Language**: F# (net9.0 target framework) +**Language**: F# (net10.0 target framework) **Imports & Namespaces**: @@ -60,4 +60,4 @@ - Type Providers use `ProvidedApiClientBase` and compiler pipeline (DefinitionCompiler, OperationCompiler) - SSRF protection enabled by default; disable with `SsrfProtection=false` static parameter -- Target net9.0; use implicit async/await (task expressions) +- Target net10.0; use implicit async/await (task expressions) diff --git a/build.fsx b/build.fsx index 363efc0..0729562 100644 --- a/build.fsx +++ b/build.fsx @@ -91,7 +91,7 @@ let webApiInputStream = StreamRef.Empty Target.create "StartServer" (fun _ -> Target.activateFinal "StopServer" - CreateProcess.fromRawCommandLine "dotnet" "tests/Swashbuckle.WebApi.Server/bin/Release/net9.0/Swashbuckle.WebApi.Server.dll" + CreateProcess.fromRawCommandLine "dotnet" "tests/Swashbuckle.WebApi.Server/bin/Release/net10.0/Swashbuckle.WebApi.Server.dll" |> CreateProcess.withStandardInput(CreatePipe webApiInputStream) |> Proc.start |> ignore @@ -116,9 +116,9 @@ Target.create "BuildTests" (fun _ -> dotnet "build" "SwaggerProvider.TestsAndDoc let runTests assembly = dotnet $"{assembly}" "" -Target.create "RunUnitTests" (fun _ -> runTests "tests/SwaggerProvider.Tests/bin/Release/net9.0/SwaggerProvider.Tests.dll") +Target.create "RunUnitTests" (fun _ -> runTests "tests/SwaggerProvider.Tests/bin/Release/net10.0/SwaggerProvider.Tests.dll") -Target.create "RunIntegrationTests" (fun _ -> runTests "tests/SwaggerProvider.ProviderTests/bin/Release/net9.0/SwaggerProvider.ProviderTests.dll") +Target.create "RunIntegrationTests" (fun _ -> runTests "tests/SwaggerProvider.ProviderTests/bin/Release/net10.0/SwaggerProvider.ProviderTests.dll") Target.create "RunTests" ignore diff --git a/global.json b/global.json index 45f790c..fcb4599 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.101", + "version": "10.0.100", "rollForward": "minor" } } diff --git a/paket.dependencies b/paket.dependencies index 61307cf..9b5a94d 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -20,14 +20,13 @@ github fsprojects/FSharp.Data:main src/FSharp.Data.Runtime.Utilities/Pluralizer. github fsprojects/FSharp.Data:main src/FSharp.Data.Runtime.Utilities/NameUtils.fs group Server - source https://www.myget.org/F/domaindrivendev/api/v3/index.json source https://api.nuget.org/v3/index.json - framework: net9.0 + framework: net10.0 nuget Microsoft.AspNetCore nuget Microsoft.AspNetCore.Mvc nuget Microsoft.AspNetCore.HttpsPolicy - nuget Swashbuckle.AspNetCore ~> 10.0.0-pr.3283 + nuget Swashbuckle.AspNetCore nuget Microsoft.OpenApi nuget FSharp.Core nuget System.Text.Json @@ -35,7 +34,7 @@ group Server group Test source https://api.nuget.org/v3/index.json - frameworks: net9.0 + frameworks: net10.0 nuget FSharp.Compiler.Service nuget FSharp.Core diff --git a/paket.lock b/paket.lock index b315120..811147c 100644 --- a/paket.lock +++ b/paket.lock @@ -5,21 +5,21 @@ NUGET FSharp.SystemTextJson (1.4.36) FSharp.Core (>= 4.7) - restriction: >= netstandard2.0 System.Text.Json (>= 6.0.10) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (9.0.9) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) + Microsoft.Bcl.AsyncInterfaces (10.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Threading.Tasks.Extensions (>= 4.6.3) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) Microsoft.NETCore.Platforms (7.0.4) - restriction: >= net461 - Microsoft.OpenApi (2.3.4) + Microsoft.OpenApi (3.0) System.Text.Json (>= 8.0.5) - restriction: >= netstandard2.0 - Microsoft.OpenApi.YamlReader (2.3.4) - Microsoft.OpenApi (>= 2.3.4) - restriction: >= netstandard2.0 - SharpYaml (>= 2.1.3) - restriction: >= netstandard2.0 + Microsoft.OpenApi.YamlReader (3.0) + Microsoft.OpenApi (>= 3.0) - restriction: >= netstandard2.0 + SharpYaml (>= 2.1.4) - restriction: >= netstandard2.0 System.Text.Json (>= 8.0.5) - restriction: >= netstandard2.0 NETStandard.Library (2.0.3) - restriction: >= net461 Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (>= net45) (< netstandard1.3)) (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0)) (&& (>= net46) (< netstandard1.4)) (>= net461) (>= netcoreapp2.0) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8) (< win8)) (&& (< netstandard1.0) (< portable-net45+win8) (>= portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard1.3) (< win8) (>= wpa81)) (&& (< netstandard1.5) (>= uap10.0)) (>= uap10.1) (>= wp8) NETStandard.Library.NETFramework (2.0.0-preview2-25405-01) Microsoft.NETCore.Platforms (>= 2.0.0-preview2-25405-01) - restriction: >= net461 NETStandard.Library (>= 2.0.0-preview2-25401-01) - restriction: >= net461 - SharpYaml (2.1.3) - restriction: >= netstandard2.0 + SharpYaml (2.1.4) - restriction: >= netstandard2.0 System.Buffers (4.6.1) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= net7.0) (< net8.0)) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) System.Memory (4.6.3) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= net7.0) (< net8.0)) System.Buffers (>= 4.6.1) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) @@ -27,10 +27,10 @@ NUGET System.Runtime.CompilerServices.Unsafe (>= 6.1.2) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) System.Numerics.Vectors (4.6.1) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) System.Runtime.CompilerServices.Unsafe (6.1.2) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= net7.0) (< net8.0)) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) - System.Text.Encodings.Web (9.0.9) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= net7.0) (< net8.0)) - System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.Text.Encodings.Web (10.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= net7.0) (< net8.0)) + System.Buffers (>= 4.6.1) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.Memory (>= 4.6.3) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.1.2) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) System.Text.Json (8.0.6) Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) @@ -51,10 +51,10 @@ GITHUB src/FSharp.Data.Runtime.Utilities/NameUtils.fs (9e8299ad6f940d29254620775c2c23983bdd797e) src/FSharp.Data.Runtime.Utilities/Pluralizer.fs (9e8299ad6f940d29254620775c2c23983bdd797e) GROUP Server -RESTRICTION: == net9.0 +RESTRICTION: == net10.0 NUGET remote: https://api.nuget.org/v3/index.json - FSharp.Core (9.0.303) + FSharp.Core (10.0.100) Microsoft.AspNetCore (2.3) Microsoft.AspNetCore.Diagnostics (>= 2.3) Microsoft.AspNetCore.HostFiltering (>= 2.3) @@ -87,31 +87,32 @@ NUGET Microsoft.AspNetCore.Authentication.Abstractions (>= 2.3) Microsoft.AspNetCore.Http (>= 2.3) Microsoft.AspNetCore.Http.Extensions (>= 2.3) - Microsoft.AspNetCore.Authorization (9.0.9) - Microsoft.AspNetCore.Metadata (>= 9.0.9) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.9) - Microsoft.Extensions.Options (>= 9.0.9) + Microsoft.AspNetCore.Authorization (10.0) + Microsoft.AspNetCore.Metadata (>= 10.0) + Microsoft.Extensions.Diagnostics (>= 10.0) + Microsoft.Extensions.Logging.Abstractions (>= 10.0) + Microsoft.Extensions.Options (>= 10.0) Microsoft.AspNetCore.Authorization.Policy (2.3) Microsoft.AspNetCore.Authentication.Abstractions (>= 2.3) Microsoft.AspNetCore.Authorization (>= 2.3) - Microsoft.AspNetCore.Connections.Abstractions (9.0.9) - Microsoft.Extensions.Features (>= 9.0.9) + Microsoft.AspNetCore.Connections.Abstractions (10.0) + Microsoft.Extensions.Features (>= 10.0) Microsoft.AspNetCore.Cors (2.3) Microsoft.AspNetCore.Http.Extensions (>= 2.3) Microsoft.Extensions.Configuration.Abstractions (>= 8.0) Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2) Microsoft.Extensions.Logging.Abstractions (>= 8.0.2) Microsoft.Extensions.Options (>= 8.0.2) - Microsoft.AspNetCore.Cryptography.Internal (9.0.9) - Microsoft.AspNetCore.DataProtection (9.0.9) - Microsoft.AspNetCore.Cryptography.Internal (>= 9.0.9) - Microsoft.AspNetCore.DataProtection.Abstractions (>= 9.0.9) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) - Microsoft.Extensions.Hosting.Abstractions (>= 9.0.9) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.9) - Microsoft.Extensions.Options (>= 9.0.9) - System.Security.Cryptography.Xml (>= 9.0.9) - Microsoft.AspNetCore.DataProtection.Abstractions (9.0.9) + Microsoft.AspNetCore.Cryptography.Internal (10.0) + Microsoft.AspNetCore.DataProtection (10.0) + Microsoft.AspNetCore.Cryptography.Internal (>= 10.0) + Microsoft.AspNetCore.DataProtection.Abstractions (>= 10.0) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) + Microsoft.Extensions.Hosting.Abstractions (>= 10.0) + Microsoft.Extensions.Logging.Abstractions (>= 10.0) + Microsoft.Extensions.Options (>= 10.0) + System.Security.Cryptography.Xml (>= 10.0) + Microsoft.AspNetCore.DataProtection.Abstractions (10.0) Microsoft.AspNetCore.Diagnostics (2.3) Microsoft.AspNetCore.Diagnostics.Abstractions (>= 2.3) Microsoft.AspNetCore.Hosting.Abstractions (>= 2.3) @@ -169,7 +170,7 @@ NUGET Microsoft.AspNetCore.Http.Features (5.0.17) Microsoft.Extensions.Primitives (>= 5.0.1) System.IO.Pipelines (>= 5.0.2) - Microsoft.AspNetCore.HttpOverrides (2.3.5) + Microsoft.AspNetCore.HttpOverrides (2.3.7) Microsoft.AspNetCore.Http.Extensions (>= 2.3) Microsoft.Extensions.Logging.Abstractions (>= 8.0.2) Microsoft.Extensions.Options (>= 8.0.2) @@ -179,15 +180,14 @@ NUGET Microsoft.AspNetCore.Http.Extensions (>= 2.3) Microsoft.Extensions.Configuration.Binder (>= 8.0.2) Microsoft.Extensions.Options (>= 8.0.2) - Microsoft.AspNetCore.JsonPatch (9.0.9) - Microsoft.CSharp (>= 4.7) + Microsoft.AspNetCore.JsonPatch (10.0) Newtonsoft.Json (>= 13.0.3) Microsoft.AspNetCore.Localization (2.3) Microsoft.AspNetCore.Http.Extensions (>= 2.3) Microsoft.Extensions.Localization.Abstractions (>= 8.0.11) Microsoft.Extensions.Logging.Abstractions (>= 8.0.2) Microsoft.Extensions.Options (>= 8.0.2) - Microsoft.AspNetCore.Metadata (9.0.9) + Microsoft.AspNetCore.Metadata (10.0) Microsoft.AspNetCore.Mvc (2.3) Microsoft.AspNetCore.Mvc.ApiExplorer (>= 2.3) Microsoft.AspNetCore.Mvc.Cors (>= 2.3) @@ -303,7 +303,7 @@ NUGET Microsoft.AspNetCore.Server.Kestrel.Https (>= 2.3) Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (>= 2.3) System.IO.Pipelines (>= 8.0) - Microsoft.AspNetCore.Server.Kestrel.Core (2.3) + Microsoft.AspNetCore.Server.Kestrel.Core (2.3.6) Microsoft.AspNetCore.Hosting.Abstractions (>= 2.3) Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions (>= 2.3) Microsoft.AspNetCore.WebUtilities (>= 2.3) @@ -327,8 +327,8 @@ NUGET Microsoft.AspNetCore.Hosting.Abstractions (>= 2.3) Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions (>= 2.3) Microsoft.Extensions.Options (>= 8.0.2) - Microsoft.AspNetCore.WebUtilities (9.0.9) - Microsoft.Net.Http.Headers (>= 9.0.9) + Microsoft.AspNetCore.WebUtilities (10.0) + Microsoft.Net.Http.Headers (>= 10.0) Microsoft.CodeAnalysis.Analyzers (4.14) Microsoft.CodeAnalysis.Common (4.14) Microsoft.CodeAnalysis.Analyzers (>= 3.11) @@ -343,158 +343,161 @@ NUGET Microsoft.AspNetCore.Razor.Language (>= 6.0.36) Microsoft.CodeAnalysis.Common (>= 4.0) Microsoft.CodeAnalysis.CSharp (>= 4.0) - Microsoft.CSharp (4.7) - Microsoft.Extensions.ApiDescription.Server (9.0.9) - Microsoft.Extensions.Caching.Abstractions (9.0.9) - Microsoft.Extensions.Primitives (>= 9.0.9) - Microsoft.Extensions.Caching.Memory (9.0.9) - Microsoft.Extensions.Caching.Abstractions (>= 9.0.9) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.9) - Microsoft.Extensions.Options (>= 9.0.9) - Microsoft.Extensions.Primitives (>= 9.0.9) - Microsoft.Extensions.Configuration (9.0.9) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) - Microsoft.Extensions.Primitives (>= 9.0.9) - Microsoft.Extensions.Configuration.Abstractions (9.0.9) - Microsoft.Extensions.Primitives (>= 9.0.9) - Microsoft.Extensions.Configuration.Binder (9.0.9) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) - Microsoft.Extensions.Configuration.CommandLine (9.0.9) - Microsoft.Extensions.Configuration (>= 9.0.9) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) - Microsoft.Extensions.Configuration.EnvironmentVariables (9.0.9) - Microsoft.Extensions.Configuration (>= 9.0.9) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) - Microsoft.Extensions.Configuration.FileExtensions (9.0.9) - Microsoft.Extensions.Configuration (>= 9.0.9) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) - Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.9) - Microsoft.Extensions.FileProviders.Physical (>= 9.0.9) - Microsoft.Extensions.Primitives (>= 9.0.9) - Microsoft.Extensions.Configuration.Json (9.0.9) - Microsoft.Extensions.Configuration (>= 9.0.9) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) - Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.9) - Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.9) - Microsoft.Extensions.Configuration.UserSecrets (9.0.9) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) - Microsoft.Extensions.Configuration.Json (>= 9.0.9) - Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.9) - Microsoft.Extensions.FileProviders.Physical (>= 9.0.9) - Microsoft.Extensions.DependencyInjection (9.0.9) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) - Microsoft.Extensions.DependencyInjection.Abstractions (9.0.9) - Microsoft.Extensions.DependencyModel (9.0.9) - Microsoft.Extensions.Diagnostics.Abstractions (9.0.9) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) - Microsoft.Extensions.Options (>= 9.0.9) - Microsoft.Extensions.Features (9.0.9) - Microsoft.Extensions.FileProviders.Abstractions (9.0.9) - Microsoft.Extensions.Primitives (>= 9.0.9) - Microsoft.Extensions.FileProviders.Composite (9.0.9) - Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.9) - Microsoft.Extensions.Primitives (>= 9.0.9) - Microsoft.Extensions.FileProviders.Physical (9.0.9) - Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.9) - Microsoft.Extensions.FileSystemGlobbing (>= 9.0.9) - Microsoft.Extensions.Primitives (>= 9.0.9) - Microsoft.Extensions.FileSystemGlobbing (9.0.9) - Microsoft.Extensions.Hosting.Abstractions (9.0.9) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) - Microsoft.Extensions.Diagnostics.Abstractions (>= 9.0.9) - Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.9) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.9) - Microsoft.Extensions.Localization (9.0.9) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) - Microsoft.Extensions.Localization.Abstractions (>= 9.0.9) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.9) - Microsoft.Extensions.Options (>= 9.0.9) - Microsoft.Extensions.Localization.Abstractions (9.0.9) - Microsoft.Extensions.Logging (9.0.9) - Microsoft.Extensions.DependencyInjection (>= 9.0.9) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.9) - Microsoft.Extensions.Options (>= 9.0.9) - Microsoft.Extensions.Logging.Abstractions (9.0.9) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) - Microsoft.Extensions.Logging.Configuration (9.0.9) - Microsoft.Extensions.Configuration (>= 9.0.9) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) - Microsoft.Extensions.Configuration.Binder (>= 9.0.9) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) - Microsoft.Extensions.Logging (>= 9.0.9) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.9) - Microsoft.Extensions.Options (>= 9.0.9) - Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.9) - Microsoft.Extensions.Logging.Console (9.0.9) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) - Microsoft.Extensions.Logging (>= 9.0.9) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.9) - Microsoft.Extensions.Logging.Configuration (>= 9.0.9) - Microsoft.Extensions.Options (>= 9.0.9) - Microsoft.Extensions.Logging.Debug (9.0.9) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) - Microsoft.Extensions.Logging (>= 9.0.9) - Microsoft.Extensions.Logging.Abstractions (>= 9.0.9) - Microsoft.Extensions.ObjectPool (9.0.9) - Microsoft.Extensions.Options (9.0.9) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) - Microsoft.Extensions.Primitives (>= 9.0.9) - Microsoft.Extensions.Options.ConfigurationExtensions (9.0.9) - Microsoft.Extensions.Configuration.Abstractions (>= 9.0.9) - Microsoft.Extensions.Configuration.Binder (>= 9.0.9) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) - Microsoft.Extensions.Options (>= 9.0.9) - Microsoft.Extensions.Primitives (>= 9.0.9) - Microsoft.Extensions.Primitives (9.0.9) - Microsoft.Extensions.WebEncoders (9.0.9) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.9) - Microsoft.Extensions.Options (>= 9.0.9) - Microsoft.Net.Http.Headers (9.0.9) - Microsoft.Extensions.Primitives (>= 9.0.9) - Microsoft.OpenApi (2.3.4) + Microsoft.Extensions.ApiDescription.Server (10.0) + Microsoft.Extensions.Caching.Abstractions (10.0) + Microsoft.Extensions.Primitives (>= 10.0) + Microsoft.Extensions.Caching.Memory (10.0) + Microsoft.Extensions.Caching.Abstractions (>= 10.0) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) + Microsoft.Extensions.Logging.Abstractions (>= 10.0) + Microsoft.Extensions.Options (>= 10.0) + Microsoft.Extensions.Primitives (>= 10.0) + Microsoft.Extensions.Configuration (10.0) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0) + Microsoft.Extensions.Primitives (>= 10.0) + Microsoft.Extensions.Configuration.Abstractions (10.0) + Microsoft.Extensions.Primitives (>= 10.0) + Microsoft.Extensions.Configuration.Binder (10.0) + Microsoft.Extensions.Configuration (>= 10.0) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0) + Microsoft.Extensions.Configuration.CommandLine (10.0) + Microsoft.Extensions.Configuration (>= 10.0) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0) + Microsoft.Extensions.Configuration.EnvironmentVariables (10.0) + Microsoft.Extensions.Configuration (>= 10.0) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0) + Microsoft.Extensions.Configuration.FileExtensions (10.0) + Microsoft.Extensions.Configuration (>= 10.0) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0) + Microsoft.Extensions.FileProviders.Abstractions (>= 10.0) + Microsoft.Extensions.FileProviders.Physical (>= 10.0) + Microsoft.Extensions.Primitives (>= 10.0) + Microsoft.Extensions.Configuration.Json (10.0) + Microsoft.Extensions.Configuration (>= 10.0) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0) + Microsoft.Extensions.Configuration.FileExtensions (>= 10.0) + Microsoft.Extensions.FileProviders.Abstractions (>= 10.0) + Microsoft.Extensions.Configuration.UserSecrets (10.0) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0) + Microsoft.Extensions.Configuration.Json (>= 10.0) + Microsoft.Extensions.FileProviders.Abstractions (>= 10.0) + Microsoft.Extensions.FileProviders.Physical (>= 10.0) + Microsoft.Extensions.DependencyInjection (10.0) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) + Microsoft.Extensions.DependencyInjection.Abstractions (10.0) + Microsoft.Extensions.DependencyModel (10.0) + Microsoft.Extensions.Diagnostics (10.0) + Microsoft.Extensions.Configuration (>= 10.0) + Microsoft.Extensions.Diagnostics.Abstractions (>= 10.0) + Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0) + Microsoft.Extensions.Diagnostics.Abstractions (10.0) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) + Microsoft.Extensions.Options (>= 10.0) + Microsoft.Extensions.Features (10.0) + Microsoft.Extensions.FileProviders.Abstractions (10.0) + Microsoft.Extensions.Primitives (>= 10.0) + Microsoft.Extensions.FileProviders.Composite (10.0) + Microsoft.Extensions.FileProviders.Abstractions (>= 10.0) + Microsoft.Extensions.Primitives (>= 10.0) + Microsoft.Extensions.FileProviders.Physical (10.0) + Microsoft.Extensions.FileProviders.Abstractions (>= 10.0) + Microsoft.Extensions.FileSystemGlobbing (>= 10.0) + Microsoft.Extensions.Primitives (>= 10.0) + Microsoft.Extensions.FileSystemGlobbing (10.0) + Microsoft.Extensions.Hosting.Abstractions (10.0) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) + Microsoft.Extensions.Diagnostics.Abstractions (>= 10.0) + Microsoft.Extensions.FileProviders.Abstractions (>= 10.0) + Microsoft.Extensions.Logging.Abstractions (>= 10.0) + Microsoft.Extensions.Localization (10.0) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) + Microsoft.Extensions.Localization.Abstractions (>= 10.0) + Microsoft.Extensions.Logging.Abstractions (>= 10.0) + Microsoft.Extensions.Options (>= 10.0) + Microsoft.Extensions.Localization.Abstractions (10.0) + Microsoft.Extensions.Logging (10.0) + Microsoft.Extensions.DependencyInjection (>= 10.0) + Microsoft.Extensions.Logging.Abstractions (>= 10.0) + Microsoft.Extensions.Options (>= 10.0) + Microsoft.Extensions.Logging.Abstractions (10.0) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) + Microsoft.Extensions.Logging.Configuration (10.0) + Microsoft.Extensions.Configuration (>= 10.0) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0) + Microsoft.Extensions.Configuration.Binder (>= 10.0) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) + Microsoft.Extensions.Logging (>= 10.0) + Microsoft.Extensions.Logging.Abstractions (>= 10.0) + Microsoft.Extensions.Options (>= 10.0) + Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0) + Microsoft.Extensions.Logging.Console (10.0) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) + Microsoft.Extensions.Logging (>= 10.0) + Microsoft.Extensions.Logging.Abstractions (>= 10.0) + Microsoft.Extensions.Logging.Configuration (>= 10.0) + Microsoft.Extensions.Options (>= 10.0) + Microsoft.Extensions.Logging.Debug (10.0) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) + Microsoft.Extensions.Logging (>= 10.0) + Microsoft.Extensions.Logging.Abstractions (>= 10.0) + Microsoft.Extensions.ObjectPool (10.0) + Microsoft.Extensions.Options (10.0) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) + Microsoft.Extensions.Primitives (>= 10.0) + Microsoft.Extensions.Options.ConfigurationExtensions (10.0) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0) + Microsoft.Extensions.Configuration.Binder (>= 10.0) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) + Microsoft.Extensions.Options (>= 10.0) + Microsoft.Extensions.Primitives (>= 10.0) + Microsoft.Extensions.Primitives (10.0) + Microsoft.Extensions.WebEncoders (10.0) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) + Microsoft.Extensions.Options (>= 10.0) + Microsoft.Net.Http.Headers (10.0) + Microsoft.Extensions.Primitives (>= 10.0) + Microsoft.OpenApi (3.0) System.Text.Json (>= 8.0.5) Newtonsoft.Json (13.0.4) Newtonsoft.Json.Bson (1.0.3) Newtonsoft.Json (>= 13.0.1) + Swashbuckle.AspNetCore (10.0.1) + Microsoft.Extensions.ApiDescription.Server (>= 10.0) + Swashbuckle.AspNetCore.Swagger (>= 10.0.1) + Swashbuckle.AspNetCore.SwaggerGen (>= 10.0.1) + Swashbuckle.AspNetCore.SwaggerUI (>= 10.0.1) + Swashbuckle.AspNetCore.Swagger (10.0.1) + Microsoft.OpenApi (>= 2.3) + Swashbuckle.AspNetCore.SwaggerGen (10.0.1) + Swashbuckle.AspNetCore.Swagger (>= 10.0.1) + Swashbuckle.AspNetCore.SwaggerUI (10.0.1) System.Buffers (4.6.1) - System.Collections.Immutable (9.0.9) + System.Collections.Immutable (10.0) System.ComponentModel.Annotations (5.0) - System.Diagnostics.DiagnosticSource (9.0.9) - System.Formats.Asn1 (9.0.9) - System.IO.Pipelines (9.0.9) + System.Diagnostics.DiagnosticSource (10.0) + System.Formats.Asn1 (10.0) + System.IO.Pipelines (10.0) System.Memory (4.6.3) System.Numerics.Vectors (4.6.1) - System.Reflection.Metadata (9.0.9) + System.Reflection.Metadata (10.0) System.Runtime.CompilerServices.Unsafe (6.1.2) System.Security.Cryptography.Cng (5.0) System.Formats.Asn1 (>= 5.0) - System.Security.Cryptography.Pkcs (9.0.9) - System.Security.Cryptography.Xml (9.0.9) - System.Security.Cryptography.Pkcs (>= 9.0.9) + System.Security.Cryptography.Pkcs (10.0) + System.Security.Cryptography.Xml (10.0) + System.Security.Cryptography.Pkcs (>= 10.0) System.Security.Principal.Windows (5.0) - System.Text.Encodings.Web (9.0.9) - System.Text.Json (9.0.9) + System.Text.Encodings.Web (10.0) + System.Text.Json (10.0) System.Threading.Tasks.Extensions (4.6.3) - remote: https://www.myget.org/F/domaindrivendev/api/v3/index.json - Swashbuckle.AspNetCore (10.0.0-pr.3283.1861) - Microsoft.Extensions.ApiDescription.Server (>= 9.0) - Swashbuckle.AspNetCore.Swagger (>= 10.0.0-pr.3283.1861) - Swashbuckle.AspNetCore.SwaggerGen (>= 10.0.0-pr.3283.1861) - Swashbuckle.AspNetCore.SwaggerUI (>= 10.0.0-pr.3283.1861) - Swashbuckle.AspNetCore.Swagger (10.0.0-pr.3283.1861) - Microsoft.OpenApi (>= 2.0) - Swashbuckle.AspNetCore.SwaggerGen (10.0.0-pr.3283.1861) - Swashbuckle.AspNetCore.Swagger (>= 10.0.0-pr.3283.1861) - Swashbuckle.AspNetCore.SwaggerUI (10.0.0-pr.3283.1861) GROUP Test -RESTRICTION: == net9.0 +RESTRICTION: == net10.0 NUGET remote: https://api.nuget.org/v3/index.json - FSharp.Compiler.Service (43.9.303) - FSharp.Core (9.0.303) + FSharp.Compiler.Service (43.10.100) + FSharp.Core (10.0.100) System.Buffers (>= 4.6) System.Collections.Immutable (>= 9.0) System.Diagnostics.DiagnosticSource (>= 9.0) @@ -502,7 +505,7 @@ NUGET System.Reflection.Emit (>= 4.7) System.Reflection.Metadata (>= 9.0) System.Runtime.CompilerServices.Unsafe (>= 6.1) - FSharp.Core (9.0.303) + FSharp.Core (10.0.100) FSharp.SystemTextJson (1.4.36) FSharp.Core (>= 4.7) System.Text.Json (>= 6.0.10) @@ -510,22 +513,27 @@ NUGET FSharp.Core (>= 5.0.2) NHamcrest (>= 4.0) xunit.v3 (>= 1.0) - Microsoft.Bcl.AsyncInterfaces (9.0.9) - Microsoft.CodeCoverage (18.0) - Microsoft.NET.Test.Sdk (18.0) - Microsoft.CodeCoverage (>= 18.0) - Microsoft.TestPlatform.TestHost (>= 18.0) - Microsoft.OpenApi (2.3.4) + Microsoft.ApplicationInsights (2.23) + System.Diagnostics.DiagnosticSource (>= 5.0) + Microsoft.Bcl.AsyncInterfaces (10.0) + Microsoft.CodeCoverage (18.0.1) + Microsoft.NET.Test.Sdk (18.0.1) + Microsoft.CodeCoverage (>= 18.0.1) + Microsoft.TestPlatform.TestHost (>= 18.0.1) + Microsoft.OpenApi (3.0) System.Text.Json (>= 8.0.5) - Microsoft.Testing.Extensions.TrxReport.Abstractions (2.0) - Microsoft.Testing.Platform (>= 2.0) - Microsoft.Testing.Platform (2.0) - Microsoft.Testing.Platform.MSBuild (2.0) - Microsoft.Testing.Platform (>= 2.0) - Microsoft.TestPlatform.ObjectModel (18.0) + Microsoft.Testing.Extensions.Telemetry (2.0.2) + Microsoft.ApplicationInsights (>= 2.23) + Microsoft.Testing.Platform (>= 2.0.2) + Microsoft.Testing.Extensions.TrxReport.Abstractions (2.0.2) + Microsoft.Testing.Platform (>= 2.0.2) + Microsoft.Testing.Platform (2.0.2) + Microsoft.Testing.Platform.MSBuild (2.0.2) + Microsoft.Testing.Platform (>= 2.0.2) + Microsoft.TestPlatform.ObjectModel (18.0.1) System.Reflection.Metadata (>= 8.0) - Microsoft.TestPlatform.TestHost (18.0) - Microsoft.TestPlatform.ObjectModel (>= 18.0) + Microsoft.TestPlatform.TestHost (18.0.1) + Microsoft.TestPlatform.ObjectModel (>= 18.0.1) Newtonsoft.Json (>= 13.0.3) Microsoft.Win32.Registry (5.0) System.Security.AccessControl (>= 5.0) @@ -533,34 +541,37 @@ NUGET Newtonsoft.Json (13.0.4) NHamcrest (4.0) System.Buffers (4.6.1) - System.Collections.Immutable (9.0.9) - System.Diagnostics.DiagnosticSource (9.0.9) + System.Collections.Immutable (10.0) + System.Diagnostics.DiagnosticSource (10.0) System.Memory (4.6.3) System.Reflection.Emit (4.7) - System.Reflection.Metadata (9.0.9) + System.Reflection.Metadata (10.0) System.Runtime.CompilerServices.Unsafe (6.1.2) System.Security.AccessControl (6.0.1) System.Security.Principal.Windows (5.0) - System.Text.Json (9.0.9) - xunit.analyzers (1.24) - xunit.v3 (3.1) - xunit.analyzers (>= 1.24) - xunit.v3.assert (3.1) - xunit.v3.core (3.1) - xunit.v3.assert (3.1) - xunit.v3.common (3.1) + System.Text.Json (10.0) + xunit.analyzers (1.25) + xunit.v3 (3.2) + xunit.v3.mtp-v1 (3.2) + xunit.v3.assert (3.2) + xunit.v3.common (3.2) Microsoft.Bcl.AsyncInterfaces (>= 6.0) - xunit.v3.core (3.1) - Microsoft.Testing.Platform.MSBuild (>= 1.8.4) - xunit.v3.extensibility.core (3.1) - xunit.v3.runner.inproc.console (3.1) - xunit.v3.extensibility.core (3.1) - xunit.v3.common (3.1) - xunit.v3.runner.common (3.1) + xunit.v3.core.mtp-v1 (3.2) + Microsoft.Testing.Extensions.Telemetry (>= 1.9) + Microsoft.Testing.Extensions.TrxReport.Abstractions (>= 1.9) + Microsoft.Testing.Platform (>= 1.9) + Microsoft.Testing.Platform.MSBuild (>= 1.9) + xunit.v3.extensibility.core (3.2) + xunit.v3.runner.inproc.console (3.2) + xunit.v3.extensibility.core (3.2) + xunit.v3.common (3.2) + xunit.v3.mtp-v1 (3.2) + xunit.analyzers (>= 1.25) + xunit.v3.assert (3.2) + xunit.v3.core.mtp-v1 (3.2) + xunit.v3.runner.common (3.2) Microsoft.Win32.Registry (5.0) - xunit.v3.common (3.1) - xunit.v3.runner.inproc.console (3.1) - Microsoft.Testing.Extensions.TrxReport.Abstractions (>= 1.8.4) - Microsoft.Testing.Platform (>= 1.8.4) - xunit.v3.extensibility.core (3.1) - xunit.v3.runner.common (3.1) + xunit.v3.common (3.2) + xunit.v3.runner.inproc.console (3.2) + xunit.v3.extensibility.core (3.2) + xunit.v3.runner.common (3.2) diff --git a/src/SwaggerProvider.DesignTime/Provider.OpenApiClient.fs b/src/SwaggerProvider.DesignTime/Provider.OpenApiClient.fs index dcc57fc..c0f93cd 100644 --- a/src/SwaggerProvider.DesignTime/Provider.OpenApiClient.fs +++ b/src/SwaggerProvider.DesignTime/Provider.OpenApiClient.fs @@ -69,8 +69,6 @@ type public OpenApiClientTypeProvider(cfg: TypeProviderConfig) as this = SchemaReader.readSchemaPath (not ssrfProtection) "" cfg.ResolutionFolder schemaPathRaw |> Async.RunSynchronously - let openApiReader = Microsoft.OpenApi.Readers.OpenApiStringReader() - let settings = OpenApiReaderSettings() settings.AddYamlReader() diff --git a/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs b/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs index 6688099..c99d7c1 100644 --- a/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs +++ b/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs @@ -72,7 +72,7 @@ type OperationCompiler(schema: OpenApiDocument, defCompiler: DefinitionCompiler, if not(isNull operation.Parameters) then yield! operation.Parameters ] - let (|MediaType|_|) contentType (content: IDictionary) = + let (|MediaType|_|) contentType (content: IDictionary) = match content.TryGetValue contentType with | true, mediaTyObj -> Some mediaTyObj | _ -> None @@ -80,10 +80,10 @@ type OperationCompiler(schema: OpenApiDocument, defCompiler: DefinitionCompiler, let (|TextReturn|_|)(input: string) = if input.StartsWith("text/") then Some(input) else None - let (|TextMediaType|_|)(content: IDictionary) = + let (|TextMediaType|_|)(content: IDictionary) = content.Keys |> Seq.tryPick (|TextReturn|_|) - let (|NoMediaType|_|)(content: IDictionary) = + let (|NoMediaType|_|)(content: IDictionary) = if content.Count = 0 then Some() else None let payloadMime, parameters = diff --git a/tests/SwaggerProvider.ProviderTests/SwaggerProvider.ProviderTests.fsproj b/tests/SwaggerProvider.ProviderTests/SwaggerProvider.ProviderTests.fsproj index 507352a..fe59d9e 100644 --- a/tests/SwaggerProvider.ProviderTests/SwaggerProvider.ProviderTests.fsproj +++ b/tests/SwaggerProvider.ProviderTests/SwaggerProvider.ProviderTests.fsproj @@ -2,7 +2,7 @@ Exe - net9.0 + net10.0 true true diff --git a/tests/SwaggerProvider.Tests/SwaggerProvider.Tests.fsproj b/tests/SwaggerProvider.Tests/SwaggerProvider.Tests.fsproj index 5b94161..7ed16ec 100644 --- a/tests/SwaggerProvider.Tests/SwaggerProvider.Tests.fsproj +++ b/tests/SwaggerProvider.Tests/SwaggerProvider.Tests.fsproj @@ -2,7 +2,7 @@ Exe - net9.0 + net10.0 true diff --git a/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs b/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs index 59a5f12..b786903 100644 --- a/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs +++ b/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs @@ -31,7 +31,7 @@ type BinaryContentFilter() = let att = ctx.MethodInfo.GetCustomAttributes(typeof, false) if att.Length > 0 then - op.RequestBody <- OpenApiRequestBody(Required = true, Content = System.Collections.Generic.Dictionary()) + op.RequestBody <- OpenApiRequestBody(Required = true, Content = System.Collections.Generic.Dictionary()) op.RequestBody.Content.Add( MediaTypes.ApplicationOctetStream, diff --git a/tests/Swashbuckle.WebApi.Server/Swashbuckle.WebApi.Server.fsproj b/tests/Swashbuckle.WebApi.Server/Swashbuckle.WebApi.Server.fsproj index b70e960..1aa8f41 100644 --- a/tests/Swashbuckle.WebApi.Server/Swashbuckle.WebApi.Server.fsproj +++ b/tests/Swashbuckle.WebApi.Server/Swashbuckle.WebApi.Server.fsproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 true true Swashbuckle.WebApi.Server From 2c861e94b0ffddf6bd2be2569d48fbbc737a7f69 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sat, 15 Nov 2025 20:42:56 +0100 Subject: [PATCH 14/22] feat: update notes --- docs/RELEASE_NOTES.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/RELEASE_NOTES.md b/docs/RELEASE_NOTES.md index 0e3a527..a53913f 100644 --- a/docs/RELEASE_NOTES.md +++ b/docs/RELEASE_NOTES.md @@ -1,6 +1,8 @@ -#### 2.4.0 - Aug 31, 2025 +#### 3.0.0 - Nov 15, 2025 -- Microsoft.OpenApi v2.3.0 with OpenAPI v3.1 Support +- Server-Side Request Forgery (SSRF) protection (#271) +- SSRF for IP V6 and Tests (#272) +- Microsoft.OpenApi v3.0 with OpenAPI v3.1 Support - Removed dependency on Microsoft.OpenApi.Readers - Dependencies update From d42e4c29534d9f45f164e45044cf3b4ea050c692 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sat, 15 Nov 2025 20:48:30 +0100 Subject: [PATCH 15/22] fix: update version --- src/Common/AssemblyInfo.fs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Common/AssemblyInfo.fs b/src/Common/AssemblyInfo.fs index 9b8f5a3..e50c7c7 100644 --- a/src/Common/AssemblyInfo.fs +++ b/src/Common/AssemblyInfo.fs @@ -5,13 +5,13 @@ open System.Reflection [] [] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "SwaggerProvider" let [] AssemblyProduct = "SwaggerProvider" let [] AssemblyDescription = "F# Type Provider for Swagger & Open API" - let [] AssemblyVersion = "2.4.0" - let [] AssemblyFileVersion = "2.4.0" + let [] AssemblyVersion = "3.0.0" + let [] AssemblyFileVersion = "3.0.0" From 33f46d6f57ad75a54b277a1dbfbcbc5570333214 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sun, 16 Nov 2025 14:00:23 +0100 Subject: [PATCH 16/22] fix: downgrade microsoft.openapi to v2 (supported by aspnet.core .net10) --- paket.dependencies | 6 +++--- paket.lock | 10 +++++----- src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs | 6 +++--- .../Controllers/FileController.fs | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/paket.dependencies b/paket.dependencies index 9b5a94d..edd4c21 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -5,7 +5,7 @@ storage: none nuget FSharp.Core ~> 8 nuget System.Text.Json ~> 8 nuget FSharp.SystemTextJson -nuget Microsoft.OpenApi +nuget Microsoft.OpenApi ~> 2 # https://github.com/microsoft/OpenAPI.NET/blob/main/CONTRIBUTING.md#branches-and-support-policy nuget Microsoft.OpenApi.YamlReader nuget NETStandard.Library.NETFramework @@ -27,7 +27,7 @@ group Server nuget Microsoft.AspNetCore.Mvc nuget Microsoft.AspNetCore.HttpsPolicy nuget Swashbuckle.AspNetCore - nuget Microsoft.OpenApi + nuget Microsoft.OpenApi ~> 2 nuget FSharp.Core nuget System.Text.Json @@ -42,5 +42,5 @@ group Test nuget Microsoft.NET.Test.Sdk nuget FsUnit.Xunit - nuget Microsoft.OpenApi + nuget Microsoft.OpenApi ~> 2 nuget FSharp.SystemTextJson diff --git a/paket.lock b/paket.lock index 811147c..1438183 100644 --- a/paket.lock +++ b/paket.lock @@ -8,10 +8,10 @@ NUGET Microsoft.Bcl.AsyncInterfaces (10.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Threading.Tasks.Extensions (>= 4.6.3) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) Microsoft.NETCore.Platforms (7.0.4) - restriction: >= net461 - Microsoft.OpenApi (3.0) + Microsoft.OpenApi (2.3.9) System.Text.Json (>= 8.0.5) - restriction: >= netstandard2.0 - Microsoft.OpenApi.YamlReader (3.0) - Microsoft.OpenApi (>= 3.0) - restriction: >= netstandard2.0 + Microsoft.OpenApi.YamlReader (2.3.9) + Microsoft.OpenApi (>= 2.3.9) - restriction: >= netstandard2.0 SharpYaml (>= 2.1.4) - restriction: >= netstandard2.0 System.Text.Json (>= 8.0.5) - restriction: >= netstandard2.0 NETStandard.Library (2.0.3) - restriction: >= net461 @@ -457,7 +457,7 @@ NUGET Microsoft.Extensions.Options (>= 10.0) Microsoft.Net.Http.Headers (10.0) Microsoft.Extensions.Primitives (>= 10.0) - Microsoft.OpenApi (3.0) + Microsoft.OpenApi (2.3.9) System.Text.Json (>= 8.0.5) Newtonsoft.Json (13.0.4) Newtonsoft.Json.Bson (1.0.3) @@ -520,7 +520,7 @@ NUGET Microsoft.NET.Test.Sdk (18.0.1) Microsoft.CodeCoverage (>= 18.0.1) Microsoft.TestPlatform.TestHost (>= 18.0.1) - Microsoft.OpenApi (3.0) + Microsoft.OpenApi (2.3.9) System.Text.Json (>= 8.0.5) Microsoft.Testing.Extensions.Telemetry (2.0.2) Microsoft.ApplicationInsights (>= 2.23) diff --git a/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs b/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs index c99d7c1..6688099 100644 --- a/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs +++ b/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs @@ -72,7 +72,7 @@ type OperationCompiler(schema: OpenApiDocument, defCompiler: DefinitionCompiler, if not(isNull operation.Parameters) then yield! operation.Parameters ] - let (|MediaType|_|) contentType (content: IDictionary) = + let (|MediaType|_|) contentType (content: IDictionary) = match content.TryGetValue contentType with | true, mediaTyObj -> Some mediaTyObj | _ -> None @@ -80,10 +80,10 @@ type OperationCompiler(schema: OpenApiDocument, defCompiler: DefinitionCompiler, let (|TextReturn|_|)(input: string) = if input.StartsWith("text/") then Some(input) else None - let (|TextMediaType|_|)(content: IDictionary) = + let (|TextMediaType|_|)(content: IDictionary) = content.Keys |> Seq.tryPick (|TextReturn|_|) - let (|NoMediaType|_|)(content: IDictionary) = + let (|NoMediaType|_|)(content: IDictionary) = if content.Count = 0 then Some() else None let payloadMime, parameters = diff --git a/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs b/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs index b786903..59a5f12 100644 --- a/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs +++ b/tests/Swashbuckle.WebApi.Server/Controllers/FileController.fs @@ -31,7 +31,7 @@ type BinaryContentFilter() = let att = ctx.MethodInfo.GetCustomAttributes(typeof, false) if att.Length > 0 then - op.RequestBody <- OpenApiRequestBody(Required = true, Content = System.Collections.Generic.Dictionary()) + op.RequestBody <- OpenApiRequestBody(Required = true, Content = System.Collections.Generic.Dictionary()) op.RequestBody.Content.Add( MediaTypes.ApplicationOctetStream, From d660ceb0d17bccc73add9a90d2ddd1031a54822f Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sun, 16 Nov 2025 14:03:03 +0100 Subject: [PATCH 17/22] fix: but runtime for net10 --- .../SwaggerProvider.DesignTime.fsproj | 4 ++-- src/SwaggerProvider.Runtime/SwaggerProvider.Runtime.fsproj | 2 +- src/SwaggerProvider.Runtime/paket.template | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SwaggerProvider.DesignTime/SwaggerProvider.DesignTime.fsproj b/src/SwaggerProvider.DesignTime/SwaggerProvider.DesignTime.fsproj index 3f8b70c..f37f165 100644 --- a/src/SwaggerProvider.DesignTime/SwaggerProvider.DesignTime.fsproj +++ b/src/SwaggerProvider.DesignTime/SwaggerProvider.DesignTime.fsproj @@ -2,7 +2,7 @@ Library - netstandard2.0;net8.0 + netstandard2.0;net10.0 true true true @@ -53,7 +53,7 @@ - + runtime;contentFiles diff --git a/src/SwaggerProvider.Runtime/SwaggerProvider.Runtime.fsproj b/src/SwaggerProvider.Runtime/SwaggerProvider.Runtime.fsproj index 7cabadf..f2d47f9 100644 --- a/src/SwaggerProvider.Runtime/SwaggerProvider.Runtime.fsproj +++ b/src/SwaggerProvider.Runtime/SwaggerProvider.Runtime.fsproj @@ -4,7 +4,7 @@ Library - netstandard2.0;net8.0 + netstandard2.0;net10.0 true TP_RUNTIME false diff --git a/src/SwaggerProvider.Runtime/paket.template b/src/SwaggerProvider.Runtime/paket.template index 10658fb..c38e1b0 100644 --- a/src/SwaggerProvider.Runtime/paket.template +++ b/src/SwaggerProvider.Runtime/paket.template @@ -24,9 +24,9 @@ description F# Type Providers for Swagger & OpenAPI files bin/Release/netstandard2.0/SwaggerProvider.Runtime.* ==> lib/netstandard2.0 - bin/Release/net8.0/SwaggerProvider.Runtime.* ==> lib/net8.0 + bin/Release/net10.0/SwaggerProvider.Runtime.* ==> lib/net10.0 bin/Release/typeproviders/fsharp41/netstandard2.0/*.dll ==> typeproviders/fsharp41/netstandard2.0 - bin/Release/typeproviders/fsharp41/net8.0/*.dll ==> typeproviders/fsharp41/net8.0 + bin/Release/typeproviders/fsharp41/net10.0/*.dll ==> typeproviders/fsharp41/net10.0 references SwaggerProvider.Runtime.dll dependencies From b881bb0848b72abe2d28a156413726c3ae9baa69 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Tue, 23 Dec 2025 12:44:29 +0100 Subject: [PATCH 18/22] feat: update deps --- .config/dotnet-tools.json | 2 +- .../Swashbuckle.WebApi.Server/Swashbuckle.WebApi.Server.fsproj | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index ceef264..7e80440 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -17,7 +17,7 @@ "rollForward": false }, "fantomas": { - "version": "7.0.3", + "version": "7.0.5", "commands": [ "fantomas" ], diff --git a/tests/Swashbuckle.WebApi.Server/Swashbuckle.WebApi.Server.fsproj b/tests/Swashbuckle.WebApi.Server/Swashbuckle.WebApi.Server.fsproj index 1aa8f41..912e48d 100644 --- a/tests/Swashbuckle.WebApi.Server/Swashbuckle.WebApi.Server.fsproj +++ b/tests/Swashbuckle.WebApi.Server/Swashbuckle.WebApi.Server.fsproj @@ -5,6 +5,7 @@ true true Swashbuckle.WebApi.Server + true From f0fe00f36b7b03142eb8f8b6c69e5558ce2d3a8a Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Tue, 23 Dec 2025 12:45:08 +0100 Subject: [PATCH 19/22] fix: paket lock --- paket.lock | 393 ++++++++++++++++++++++++++--------------------------- 1 file changed, 194 insertions(+), 199 deletions(-) diff --git a/paket.lock b/paket.lock index 1438183..6a83240 100644 --- a/paket.lock +++ b/paket.lock @@ -5,13 +5,13 @@ NUGET FSharp.SystemTextJson (1.4.36) FSharp.Core (>= 4.7) - restriction: >= netstandard2.0 System.Text.Json (>= 6.0.10) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (10.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + Microsoft.Bcl.AsyncInterfaces (10.0.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Threading.Tasks.Extensions (>= 4.6.3) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) Microsoft.NETCore.Platforms (7.0.4) - restriction: >= net461 - Microsoft.OpenApi (2.3.9) + Microsoft.OpenApi (2.4.1) System.Text.Json (>= 8.0.5) - restriction: >= netstandard2.0 - Microsoft.OpenApi.YamlReader (2.3.9) - Microsoft.OpenApi (>= 2.3.9) - restriction: >= netstandard2.0 + Microsoft.OpenApi.YamlReader (2.4.1) + Microsoft.OpenApi (>= 2.4.1) - restriction: >= netstandard2.0 SharpYaml (>= 2.1.4) - restriction: >= netstandard2.0 System.Text.Json (>= 8.0.5) - restriction: >= netstandard2.0 NETStandard.Library (2.0.3) - restriction: >= net461 @@ -27,7 +27,7 @@ NUGET System.Runtime.CompilerServices.Unsafe (>= 6.1.2) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) System.Numerics.Vectors (4.6.1) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) System.Runtime.CompilerServices.Unsafe (6.1.2) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= net7.0) (< net8.0)) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) - System.Text.Encodings.Web (10.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= net7.0) (< net8.0)) + System.Text.Encodings.Web (10.0.1) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= net7.0) (< net8.0)) System.Buffers (>= 4.6.1) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) System.Memory (>= 4.6.3) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.1.2) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) @@ -54,7 +54,7 @@ GROUP Server RESTRICTION: == net10.0 NUGET remote: https://api.nuget.org/v3/index.json - FSharp.Core (10.0.100) + FSharp.Core (10.0.101) Microsoft.AspNetCore (2.3) Microsoft.AspNetCore.Diagnostics (>= 2.3) Microsoft.AspNetCore.HostFiltering (>= 2.3) @@ -87,32 +87,32 @@ NUGET Microsoft.AspNetCore.Authentication.Abstractions (>= 2.3) Microsoft.AspNetCore.Http (>= 2.3) Microsoft.AspNetCore.Http.Extensions (>= 2.3) - Microsoft.AspNetCore.Authorization (10.0) - Microsoft.AspNetCore.Metadata (>= 10.0) - Microsoft.Extensions.Diagnostics (>= 10.0) - Microsoft.Extensions.Logging.Abstractions (>= 10.0) - Microsoft.Extensions.Options (>= 10.0) + Microsoft.AspNetCore.Authorization (10.0.1) + Microsoft.AspNetCore.Metadata (>= 10.0.1) + Microsoft.Extensions.Diagnostics (>= 10.0.1) + Microsoft.Extensions.Logging.Abstractions (>= 10.0.1) + Microsoft.Extensions.Options (>= 10.0.1) Microsoft.AspNetCore.Authorization.Policy (2.3) Microsoft.AspNetCore.Authentication.Abstractions (>= 2.3) Microsoft.AspNetCore.Authorization (>= 2.3) - Microsoft.AspNetCore.Connections.Abstractions (10.0) - Microsoft.Extensions.Features (>= 10.0) + Microsoft.AspNetCore.Connections.Abstractions (10.0.1) + Microsoft.Extensions.Features (>= 10.0.1) Microsoft.AspNetCore.Cors (2.3) Microsoft.AspNetCore.Http.Extensions (>= 2.3) Microsoft.Extensions.Configuration.Abstractions (>= 8.0) Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2) Microsoft.Extensions.Logging.Abstractions (>= 8.0.2) Microsoft.Extensions.Options (>= 8.0.2) - Microsoft.AspNetCore.Cryptography.Internal (10.0) - Microsoft.AspNetCore.DataProtection (10.0) - Microsoft.AspNetCore.Cryptography.Internal (>= 10.0) - Microsoft.AspNetCore.DataProtection.Abstractions (>= 10.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) - Microsoft.Extensions.Hosting.Abstractions (>= 10.0) - Microsoft.Extensions.Logging.Abstractions (>= 10.0) - Microsoft.Extensions.Options (>= 10.0) - System.Security.Cryptography.Xml (>= 10.0) - Microsoft.AspNetCore.DataProtection.Abstractions (10.0) + Microsoft.AspNetCore.Cryptography.Internal (10.0.1) + Microsoft.AspNetCore.DataProtection (10.0.1) + Microsoft.AspNetCore.Cryptography.Internal (>= 10.0.1) + Microsoft.AspNetCore.DataProtection.Abstractions (>= 10.0.1) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1) + Microsoft.Extensions.Hosting.Abstractions (>= 10.0.1) + Microsoft.Extensions.Logging.Abstractions (>= 10.0.1) + Microsoft.Extensions.Options (>= 10.0.1) + System.Security.Cryptography.Xml (>= 10.0.1) + Microsoft.AspNetCore.DataProtection.Abstractions (10.0.1) Microsoft.AspNetCore.Diagnostics (2.3) Microsoft.AspNetCore.Diagnostics.Abstractions (>= 2.3) Microsoft.AspNetCore.Hosting.Abstractions (>= 2.3) @@ -180,14 +180,14 @@ NUGET Microsoft.AspNetCore.Http.Extensions (>= 2.3) Microsoft.Extensions.Configuration.Binder (>= 8.0.2) Microsoft.Extensions.Options (>= 8.0.2) - Microsoft.AspNetCore.JsonPatch (10.0) + Microsoft.AspNetCore.JsonPatch (10.0.1) Newtonsoft.Json (>= 13.0.3) Microsoft.AspNetCore.Localization (2.3) Microsoft.AspNetCore.Http.Extensions (>= 2.3) Microsoft.Extensions.Localization.Abstractions (>= 8.0.11) Microsoft.Extensions.Logging.Abstractions (>= 8.0.2) Microsoft.Extensions.Options (>= 8.0.2) - Microsoft.AspNetCore.Metadata (10.0) + Microsoft.AspNetCore.Metadata (10.0.1) Microsoft.AspNetCore.Mvc (2.3) Microsoft.AspNetCore.Mvc.ApiExplorer (>= 2.3) Microsoft.AspNetCore.Mvc.Cors (>= 2.3) @@ -327,177 +327,172 @@ NUGET Microsoft.AspNetCore.Hosting.Abstractions (>= 2.3) Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions (>= 2.3) Microsoft.Extensions.Options (>= 8.0.2) - Microsoft.AspNetCore.WebUtilities (10.0) - Microsoft.Net.Http.Headers (>= 10.0) + Microsoft.AspNetCore.WebUtilities (10.0.1) + Microsoft.Net.Http.Headers (>= 10.0.1) Microsoft.CodeAnalysis.Analyzers (4.14) - Microsoft.CodeAnalysis.Common (4.14) + Microsoft.CodeAnalysis.Common (5.0) Microsoft.CodeAnalysis.Analyzers (>= 3.11) - System.Collections.Immutable (>= 9.0) - System.Reflection.Metadata (>= 9.0) - Microsoft.CodeAnalysis.CSharp (4.14) + Microsoft.CodeAnalysis.CSharp (5.0) Microsoft.CodeAnalysis.Analyzers (>= 3.11) - Microsoft.CodeAnalysis.Common (4.14) - System.Collections.Immutable (>= 9.0) - System.Reflection.Metadata (>= 9.0) + Microsoft.CodeAnalysis.Common (5.0) Microsoft.CodeAnalysis.Razor (6.0.36) Microsoft.AspNetCore.Razor.Language (>= 6.0.36) Microsoft.CodeAnalysis.Common (>= 4.0) Microsoft.CodeAnalysis.CSharp (>= 4.0) - Microsoft.Extensions.ApiDescription.Server (10.0) - Microsoft.Extensions.Caching.Abstractions (10.0) - Microsoft.Extensions.Primitives (>= 10.0) - Microsoft.Extensions.Caching.Memory (10.0) - Microsoft.Extensions.Caching.Abstractions (>= 10.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) - Microsoft.Extensions.Logging.Abstractions (>= 10.0) - Microsoft.Extensions.Options (>= 10.0) - Microsoft.Extensions.Primitives (>= 10.0) - Microsoft.Extensions.Configuration (10.0) - Microsoft.Extensions.Configuration.Abstractions (>= 10.0) - Microsoft.Extensions.Primitives (>= 10.0) - Microsoft.Extensions.Configuration.Abstractions (10.0) - Microsoft.Extensions.Primitives (>= 10.0) - Microsoft.Extensions.Configuration.Binder (10.0) - Microsoft.Extensions.Configuration (>= 10.0) - Microsoft.Extensions.Configuration.Abstractions (>= 10.0) - Microsoft.Extensions.Configuration.CommandLine (10.0) - Microsoft.Extensions.Configuration (>= 10.0) - Microsoft.Extensions.Configuration.Abstractions (>= 10.0) - Microsoft.Extensions.Configuration.EnvironmentVariables (10.0) - Microsoft.Extensions.Configuration (>= 10.0) - Microsoft.Extensions.Configuration.Abstractions (>= 10.0) - Microsoft.Extensions.Configuration.FileExtensions (10.0) - Microsoft.Extensions.Configuration (>= 10.0) - Microsoft.Extensions.Configuration.Abstractions (>= 10.0) - Microsoft.Extensions.FileProviders.Abstractions (>= 10.0) - Microsoft.Extensions.FileProviders.Physical (>= 10.0) - Microsoft.Extensions.Primitives (>= 10.0) - Microsoft.Extensions.Configuration.Json (10.0) - Microsoft.Extensions.Configuration (>= 10.0) - Microsoft.Extensions.Configuration.Abstractions (>= 10.0) - Microsoft.Extensions.Configuration.FileExtensions (>= 10.0) - Microsoft.Extensions.FileProviders.Abstractions (>= 10.0) - Microsoft.Extensions.Configuration.UserSecrets (10.0) - Microsoft.Extensions.Configuration.Abstractions (>= 10.0) - Microsoft.Extensions.Configuration.Json (>= 10.0) - Microsoft.Extensions.FileProviders.Abstractions (>= 10.0) - Microsoft.Extensions.FileProviders.Physical (>= 10.0) - Microsoft.Extensions.DependencyInjection (10.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) - Microsoft.Extensions.DependencyInjection.Abstractions (10.0) - Microsoft.Extensions.DependencyModel (10.0) - Microsoft.Extensions.Diagnostics (10.0) - Microsoft.Extensions.Configuration (>= 10.0) - Microsoft.Extensions.Diagnostics.Abstractions (>= 10.0) - Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0) - Microsoft.Extensions.Diagnostics.Abstractions (10.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) - Microsoft.Extensions.Options (>= 10.0) - Microsoft.Extensions.Features (10.0) - Microsoft.Extensions.FileProviders.Abstractions (10.0) - Microsoft.Extensions.Primitives (>= 10.0) - Microsoft.Extensions.FileProviders.Composite (10.0) - Microsoft.Extensions.FileProviders.Abstractions (>= 10.0) - Microsoft.Extensions.Primitives (>= 10.0) - Microsoft.Extensions.FileProviders.Physical (10.0) - Microsoft.Extensions.FileProviders.Abstractions (>= 10.0) - Microsoft.Extensions.FileSystemGlobbing (>= 10.0) - Microsoft.Extensions.Primitives (>= 10.0) - Microsoft.Extensions.FileSystemGlobbing (10.0) - Microsoft.Extensions.Hosting.Abstractions (10.0) - Microsoft.Extensions.Configuration.Abstractions (>= 10.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) - Microsoft.Extensions.Diagnostics.Abstractions (>= 10.0) - Microsoft.Extensions.FileProviders.Abstractions (>= 10.0) - Microsoft.Extensions.Logging.Abstractions (>= 10.0) - Microsoft.Extensions.Localization (10.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) - Microsoft.Extensions.Localization.Abstractions (>= 10.0) - Microsoft.Extensions.Logging.Abstractions (>= 10.0) - Microsoft.Extensions.Options (>= 10.0) - Microsoft.Extensions.Localization.Abstractions (10.0) - Microsoft.Extensions.Logging (10.0) - Microsoft.Extensions.DependencyInjection (>= 10.0) - Microsoft.Extensions.Logging.Abstractions (>= 10.0) - Microsoft.Extensions.Options (>= 10.0) - Microsoft.Extensions.Logging.Abstractions (10.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) - Microsoft.Extensions.Logging.Configuration (10.0) - Microsoft.Extensions.Configuration (>= 10.0) - Microsoft.Extensions.Configuration.Abstractions (>= 10.0) - Microsoft.Extensions.Configuration.Binder (>= 10.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) - Microsoft.Extensions.Logging (>= 10.0) - Microsoft.Extensions.Logging.Abstractions (>= 10.0) - Microsoft.Extensions.Options (>= 10.0) - Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0) - Microsoft.Extensions.Logging.Console (10.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) - Microsoft.Extensions.Logging (>= 10.0) - Microsoft.Extensions.Logging.Abstractions (>= 10.0) - Microsoft.Extensions.Logging.Configuration (>= 10.0) - Microsoft.Extensions.Options (>= 10.0) - Microsoft.Extensions.Logging.Debug (10.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) - Microsoft.Extensions.Logging (>= 10.0) - Microsoft.Extensions.Logging.Abstractions (>= 10.0) - Microsoft.Extensions.ObjectPool (10.0) - Microsoft.Extensions.Options (10.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) - Microsoft.Extensions.Primitives (>= 10.0) - Microsoft.Extensions.Options.ConfigurationExtensions (10.0) - Microsoft.Extensions.Configuration.Abstractions (>= 10.0) - Microsoft.Extensions.Configuration.Binder (>= 10.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) - Microsoft.Extensions.Options (>= 10.0) - Microsoft.Extensions.Primitives (>= 10.0) - Microsoft.Extensions.Primitives (10.0) - Microsoft.Extensions.WebEncoders (10.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0) - Microsoft.Extensions.Options (>= 10.0) - Microsoft.Net.Http.Headers (10.0) - Microsoft.Extensions.Primitives (>= 10.0) - Microsoft.OpenApi (2.3.9) + Microsoft.Extensions.ApiDescription.Server (10.0.1) + Microsoft.Extensions.Caching.Abstractions (10.0.1) + Microsoft.Extensions.Primitives (>= 10.0.1) + Microsoft.Extensions.Caching.Memory (10.0.1) + Microsoft.Extensions.Caching.Abstractions (>= 10.0.1) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1) + Microsoft.Extensions.Logging.Abstractions (>= 10.0.1) + Microsoft.Extensions.Options (>= 10.0.1) + Microsoft.Extensions.Primitives (>= 10.0.1) + Microsoft.Extensions.Configuration (10.0.1) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0.1) + Microsoft.Extensions.Primitives (>= 10.0.1) + Microsoft.Extensions.Configuration.Abstractions (10.0.1) + Microsoft.Extensions.Primitives (>= 10.0.1) + Microsoft.Extensions.Configuration.Binder (10.0.1) + Microsoft.Extensions.Configuration (>= 10.0.1) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0.1) + Microsoft.Extensions.Configuration.CommandLine (10.0.1) + Microsoft.Extensions.Configuration (>= 10.0.1) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0.1) + Microsoft.Extensions.Configuration.EnvironmentVariables (10.0.1) + Microsoft.Extensions.Configuration (>= 10.0.1) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0.1) + Microsoft.Extensions.Configuration.FileExtensions (10.0.1) + Microsoft.Extensions.Configuration (>= 10.0.1) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0.1) + Microsoft.Extensions.FileProviders.Abstractions (>= 10.0.1) + Microsoft.Extensions.FileProviders.Physical (>= 10.0.1) + Microsoft.Extensions.Primitives (>= 10.0.1) + Microsoft.Extensions.Configuration.Json (10.0.1) + Microsoft.Extensions.Configuration (>= 10.0.1) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0.1) + Microsoft.Extensions.Configuration.FileExtensions (>= 10.0.1) + Microsoft.Extensions.FileProviders.Abstractions (>= 10.0.1) + Microsoft.Extensions.Configuration.UserSecrets (10.0.1) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0.1) + Microsoft.Extensions.Configuration.Json (>= 10.0.1) + Microsoft.Extensions.FileProviders.Abstractions (>= 10.0.1) + Microsoft.Extensions.FileProviders.Physical (>= 10.0.1) + Microsoft.Extensions.DependencyInjection (10.0.1) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1) + Microsoft.Extensions.DependencyInjection.Abstractions (10.0.1) + Microsoft.Extensions.DependencyModel (10.0.1) + Microsoft.Extensions.Diagnostics (10.0.1) + Microsoft.Extensions.Configuration (>= 10.0.1) + Microsoft.Extensions.Diagnostics.Abstractions (>= 10.0.1) + Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.1) + Microsoft.Extensions.Diagnostics.Abstractions (10.0.1) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1) + Microsoft.Extensions.Options (>= 10.0.1) + Microsoft.Extensions.Features (10.0.1) + Microsoft.Extensions.FileProviders.Abstractions (10.0.1) + Microsoft.Extensions.Primitives (>= 10.0.1) + Microsoft.Extensions.FileProviders.Composite (10.0.1) + Microsoft.Extensions.FileProviders.Abstractions (>= 10.0.1) + Microsoft.Extensions.Primitives (>= 10.0.1) + Microsoft.Extensions.FileProviders.Physical (10.0.1) + Microsoft.Extensions.FileProviders.Abstractions (>= 10.0.1) + Microsoft.Extensions.FileSystemGlobbing (>= 10.0.1) + Microsoft.Extensions.Primitives (>= 10.0.1) + Microsoft.Extensions.FileSystemGlobbing (10.0.1) + Microsoft.Extensions.Hosting.Abstractions (10.0.1) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0.1) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1) + Microsoft.Extensions.Diagnostics.Abstractions (>= 10.0.1) + Microsoft.Extensions.FileProviders.Abstractions (>= 10.0.1) + Microsoft.Extensions.Logging.Abstractions (>= 10.0.1) + Microsoft.Extensions.Localization (10.0.1) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1) + Microsoft.Extensions.Localization.Abstractions (>= 10.0.1) + Microsoft.Extensions.Logging.Abstractions (>= 10.0.1) + Microsoft.Extensions.Options (>= 10.0.1) + Microsoft.Extensions.Localization.Abstractions (10.0.1) + Microsoft.Extensions.Logging (10.0.1) + Microsoft.Extensions.DependencyInjection (>= 10.0.1) + Microsoft.Extensions.Logging.Abstractions (>= 10.0.1) + Microsoft.Extensions.Options (>= 10.0.1) + Microsoft.Extensions.Logging.Abstractions (10.0.1) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1) + Microsoft.Extensions.Logging.Configuration (10.0.1) + Microsoft.Extensions.Configuration (>= 10.0.1) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0.1) + Microsoft.Extensions.Configuration.Binder (>= 10.0.1) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1) + Microsoft.Extensions.Logging (>= 10.0.1) + Microsoft.Extensions.Logging.Abstractions (>= 10.0.1) + Microsoft.Extensions.Options (>= 10.0.1) + Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.1) + Microsoft.Extensions.Logging.Console (10.0.1) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1) + Microsoft.Extensions.Logging (>= 10.0.1) + Microsoft.Extensions.Logging.Abstractions (>= 10.0.1) + Microsoft.Extensions.Logging.Configuration (>= 10.0.1) + Microsoft.Extensions.Options (>= 10.0.1) + Microsoft.Extensions.Logging.Debug (10.0.1) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1) + Microsoft.Extensions.Logging (>= 10.0.1) + Microsoft.Extensions.Logging.Abstractions (>= 10.0.1) + Microsoft.Extensions.ObjectPool (10.0.1) + Microsoft.Extensions.Options (10.0.1) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1) + Microsoft.Extensions.Primitives (>= 10.0.1) + Microsoft.Extensions.Options.ConfigurationExtensions (10.0.1) + Microsoft.Extensions.Configuration.Abstractions (>= 10.0.1) + Microsoft.Extensions.Configuration.Binder (>= 10.0.1) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1) + Microsoft.Extensions.Options (>= 10.0.1) + Microsoft.Extensions.Primitives (>= 10.0.1) + Microsoft.Extensions.Primitives (10.0.1) + Microsoft.Extensions.WebEncoders (10.0.1) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1) + Microsoft.Extensions.Options (>= 10.0.1) + Microsoft.Net.Http.Headers (10.0.1) + Microsoft.Extensions.Primitives (>= 10.0.1) + Microsoft.OpenApi (2.4.1) System.Text.Json (>= 8.0.5) Newtonsoft.Json (13.0.4) Newtonsoft.Json.Bson (1.0.3) Newtonsoft.Json (>= 13.0.1) - Swashbuckle.AspNetCore (10.0.1) + Swashbuckle.AspNetCore (10.1) Microsoft.Extensions.ApiDescription.Server (>= 10.0) - Swashbuckle.AspNetCore.Swagger (>= 10.0.1) - Swashbuckle.AspNetCore.SwaggerGen (>= 10.0.1) - Swashbuckle.AspNetCore.SwaggerUI (>= 10.0.1) - Swashbuckle.AspNetCore.Swagger (10.0.1) + Swashbuckle.AspNetCore.Swagger (>= 10.1) + Swashbuckle.AspNetCore.SwaggerGen (>= 10.1) + Swashbuckle.AspNetCore.SwaggerUI (>= 10.1) + Swashbuckle.AspNetCore.Swagger (10.1) Microsoft.OpenApi (>= 2.3) - Swashbuckle.AspNetCore.SwaggerGen (10.0.1) - Swashbuckle.AspNetCore.Swagger (>= 10.0.1) - Swashbuckle.AspNetCore.SwaggerUI (10.0.1) + Swashbuckle.AspNetCore.SwaggerGen (10.1) + Swashbuckle.AspNetCore.Swagger (>= 10.1) + Swashbuckle.AspNetCore.SwaggerUI (10.1) System.Buffers (4.6.1) - System.Collections.Immutable (10.0) System.ComponentModel.Annotations (5.0) - System.Diagnostics.DiagnosticSource (10.0) - System.Formats.Asn1 (10.0) - System.IO.Pipelines (10.0) + System.Diagnostics.DiagnosticSource (10.0.1) + System.Formats.Asn1 (10.0.1) + System.IO.Pipelines (10.0.1) System.Memory (4.6.3) System.Numerics.Vectors (4.6.1) - System.Reflection.Metadata (10.0) + System.Reflection.Metadata (10.0.1) System.Runtime.CompilerServices.Unsafe (6.1.2) System.Security.Cryptography.Cng (5.0) System.Formats.Asn1 (>= 5.0) - System.Security.Cryptography.Pkcs (10.0) - System.Security.Cryptography.Xml (10.0) - System.Security.Cryptography.Pkcs (>= 10.0) + System.Security.Cryptography.Pkcs (10.0.1) + System.Security.Cryptography.Xml (10.0.1) + System.Security.Cryptography.Pkcs (>= 10.0.1) System.Security.Principal.Windows (5.0) - System.Text.Encodings.Web (10.0) - System.Text.Json (10.0) + System.Text.Encodings.Web (10.0.1) + System.Text.Json (10.0.1) System.Threading.Tasks.Extensions (4.6.3) GROUP Test RESTRICTION: == net10.0 NUGET remote: https://api.nuget.org/v3/index.json - FSharp.Compiler.Service (43.10.100) - FSharp.Core (10.0.100) + FSharp.Compiler.Service (43.10.101) + FSharp.Core (10.0.101) System.Buffers (>= 4.6) System.Collections.Immutable (>= 9.0) System.Diagnostics.DiagnosticSource (>= 9.0) @@ -505,7 +500,7 @@ NUGET System.Reflection.Emit (>= 4.7) System.Reflection.Metadata (>= 9.0) System.Runtime.CompilerServices.Unsafe (>= 6.1) - FSharp.Core (10.0.100) + FSharp.Core (10.0.101) FSharp.SystemTextJson (1.4.36) FSharp.Core (>= 4.7) System.Text.Json (>= 6.0.10) @@ -515,12 +510,12 @@ NUGET xunit.v3 (>= 1.0) Microsoft.ApplicationInsights (2.23) System.Diagnostics.DiagnosticSource (>= 5.0) - Microsoft.Bcl.AsyncInterfaces (10.0) + Microsoft.Bcl.AsyncInterfaces (10.0.1) Microsoft.CodeCoverage (18.0.1) Microsoft.NET.Test.Sdk (18.0.1) Microsoft.CodeCoverage (>= 18.0.1) Microsoft.TestPlatform.TestHost (>= 18.0.1) - Microsoft.OpenApi (2.3.9) + Microsoft.OpenApi (2.4.1) System.Text.Json (>= 8.0.5) Microsoft.Testing.Extensions.Telemetry (2.0.2) Microsoft.ApplicationInsights (>= 2.23) @@ -541,37 +536,37 @@ NUGET Newtonsoft.Json (13.0.4) NHamcrest (4.0) System.Buffers (4.6.1) - System.Collections.Immutable (10.0) - System.Diagnostics.DiagnosticSource (10.0) + System.Collections.Immutable (10.0.1) + System.Diagnostics.DiagnosticSource (10.0.1) System.Memory (4.6.3) System.Reflection.Emit (4.7) - System.Reflection.Metadata (10.0) + System.Reflection.Metadata (10.0.1) System.Runtime.CompilerServices.Unsafe (6.1.2) System.Security.AccessControl (6.0.1) System.Security.Principal.Windows (5.0) - System.Text.Json (10.0) - xunit.analyzers (1.25) - xunit.v3 (3.2) - xunit.v3.mtp-v1 (3.2) - xunit.v3.assert (3.2) - xunit.v3.common (3.2) + System.Text.Json (10.0.1) + xunit.analyzers (1.26) + xunit.v3 (3.2.1) + xunit.v3.mtp-v1 (3.2.1) + xunit.v3.assert (3.2.1) + xunit.v3.common (3.2.1) Microsoft.Bcl.AsyncInterfaces (>= 6.0) - xunit.v3.core.mtp-v1 (3.2) - Microsoft.Testing.Extensions.Telemetry (>= 1.9) - Microsoft.Testing.Extensions.TrxReport.Abstractions (>= 1.9) - Microsoft.Testing.Platform (>= 1.9) - Microsoft.Testing.Platform.MSBuild (>= 1.9) - xunit.v3.extensibility.core (3.2) - xunit.v3.runner.inproc.console (3.2) - xunit.v3.extensibility.core (3.2) - xunit.v3.common (3.2) - xunit.v3.mtp-v1 (3.2) - xunit.analyzers (>= 1.25) - xunit.v3.assert (3.2) - xunit.v3.core.mtp-v1 (3.2) - xunit.v3.runner.common (3.2) + xunit.v3.core.mtp-v1 (3.2.1) + Microsoft.Testing.Extensions.Telemetry (>= 1.9.1) + Microsoft.Testing.Extensions.TrxReport.Abstractions (>= 1.9.1) + Microsoft.Testing.Platform (>= 1.9.1) + Microsoft.Testing.Platform.MSBuild (>= 1.9.1) + xunit.v3.extensibility.core (3.2.1) + xunit.v3.runner.inproc.console (3.2.1) + xunit.v3.extensibility.core (3.2.1) + xunit.v3.common (3.2.1) + xunit.v3.mtp-v1 (3.2.1) + xunit.analyzers (>= 1.26) + xunit.v3.assert (3.2.1) + xunit.v3.core.mtp-v1 (3.2.1) + xunit.v3.runner.common (3.2.1) Microsoft.Win32.Registry (5.0) - xunit.v3.common (3.2) - xunit.v3.runner.inproc.console (3.2) - xunit.v3.extensibility.core (3.2) - xunit.v3.runner.common (3.2) + xunit.v3.common (3.2.1) + xunit.v3.runner.inproc.console (3.2.1) + xunit.v3.extensibility.core (3.2.1) + xunit.v3.runner.common (3.2.1) From 6c931561d604221d411432cd426ef9d3adeebb18 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Tue, 23 Dec 2025 22:14:39 +0100 Subject: [PATCH 20/22] fixes by Claude Opus 4.5 --- .../v3/DefinitionCompiler.fs | 27 +++++++++++++++---- .../v3/OperationCompiler.fs | 16 +++++++---- .../v2/Swagger.PetStore.Tests.fs | 4 +-- .../v2/Swashbuckle.ReturnControllers.Tests.fs | 20 +++----------- 4 files changed, 39 insertions(+), 28 deletions(-) diff --git a/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs b/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs index 85c2e9e..c7cad43 100644 --- a/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs +++ b/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs @@ -406,14 +406,26 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = else None + // Helper to get full definition path from reference ID + let getFullPath(refId: string) = + if refId.StartsWith DefinitionPath.DefinitionPrefix then + refId + else + DefinitionPath.DefinitionPrefix + refId + let tyType = match schemaObj with | null -> failwithf $"Cannot compile object '%s{tyName}' when schema is 'null'" - | :? OpenApiSchemaReference as schemaRef when not <| schemaRef.Reference.Id.EndsWith tyName -> + | :? OpenApiSchemaReference as schemaRef when + not(isNull schemaRef.Reference) + && not <| schemaRef.Reference.Id.EndsWith tyName + -> ns.ReleaseNameReservation tyName - compileByPath <| schemaRef.Reference.Id - | :? OpenApiSchemaReference as schemaRef -> - match pathToType.TryGetValue schemaRef.Reference.Id with + compileByPath <| getFullPath schemaRef.Reference.Id + | :? OpenApiSchemaReference as schemaRef when not(isNull schemaRef.Reference) -> + let fullPath = getFullPath schemaRef.Reference.Id + + match pathToType.TryGetValue fullPath with | true, ty -> ns.ReleaseNameReservation tyName ty @@ -431,7 +443,12 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = compileBySchema ns (ns.ReserveUniqueName tyName "Item") elSchema true ns.RegisterType false ProvidedTypeBuilder.MakeGenericType(typedefof>, [ typeof; elTy ]) - | _ when resolvedType.IsNone || resolvedType = Some JsonSchemaType.Object -> compileNewObject() + | _ when + resolvedType.IsNone + || resolvedType = Some JsonSchemaType.Object + || resolvedType = Some(JsonSchemaType.Null ||| JsonSchemaType.Object) + -> + compileNewObject() | _ -> ns.MarkTypeAsNameAlias tyName diff --git a/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs b/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs index 2e2472d..f7dfa8f 100644 --- a/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs +++ b/src/SwaggerProvider.DesignTime/v3/OperationCompiler.fs @@ -77,18 +77,24 @@ type OperationCompiler(schema: OpenApiDocument, defCompiler: DefinitionCompiler, yield! operation.Parameters ] let (|MediaType|_|) contentType (content: IDictionary) = - match content.TryGetValue contentType with - | true, mediaTyObj -> Some mediaTyObj - | _ -> None + if isNull content then + None + else + match content.TryGetValue contentType with + | true, mediaTyObj -> Some mediaTyObj + | _ -> None let (|TextReturn|_|)(input: string) = if input.StartsWith("text/") then Some(input) else None let (|TextMediaType|_|)(content: IDictionary) = - content.Keys |> Seq.tryPick (|TextReturn|_|) + if isNull content then + None + else + content.Keys |> Seq.tryPick (|TextReturn|_|) let (|NoMediaType|_|)(content: IDictionary) = - if content.Count = 0 then Some() else None + if isNull content || content.Count = 0 then Some() else None let payloadMime, parameters = /// handles de-duplicating Swagger parameter names if the same parameter name diff --git a/tests/SwaggerProvider.ProviderTests/v2/Swagger.PetStore.Tests.fs b/tests/SwaggerProvider.ProviderTests/v2/Swagger.PetStore.Tests.fs index 8e61d59..7e6fe5c 100644 --- a/tests/SwaggerProvider.ProviderTests/v2/Swagger.PetStore.Tests.fs +++ b/tests/SwaggerProvider.ProviderTests/v2/Swagger.PetStore.Tests.fs @@ -45,7 +45,7 @@ let ``Instantiate provided objects``() = let ``throw custom exceptions from async``() = task { try - let! _ = store.GetPetById(253L) + let! _ = store.GetPetById(-253L) failwith "Call should fail" with :? System.AggregateException as aex -> match aex.InnerException with @@ -57,7 +57,7 @@ let ``throw custom exceptions from async``() = let ``throw custom exceptions from task``() = task { try - let! _ = storeTask.GetPetById(342L) + let! _ = storeTask.GetPetById(-342L) failwith "Call should fail" with :? System.Net.Http.HttpRequestException as ex -> ex.Message |> shouldContainText "Not Found" diff --git a/tests/SwaggerProvider.ProviderTests/v2/Swashbuckle.ReturnControllers.Tests.fs b/tests/SwaggerProvider.ProviderTests/v2/Swashbuckle.ReturnControllers.Tests.fs index 97b7009..8bb09eb 100644 --- a/tests/SwaggerProvider.ProviderTests/v2/Swashbuckle.ReturnControllers.Tests.fs +++ b/tests/SwaggerProvider.ProviderTests/v2/Swashbuckle.ReturnControllers.Tests.fs @@ -169,19 +169,7 @@ let ``Return FileDescription POST Test``() = file.Bytes |> shouldEqual([| 1uy; 2uy; 3uy |]) } -[] -let ``Return String Dictionary GET Test``() = - task { - let! dict = api.GetApiReturnStringDictionary() - dict |> shouldEqual(Map [ "hello", "world" ]) - } - -[] -let ``Return Object Point Dictionary GET Test``() = - task { - let! dict = api.GetApiReturnObjectPointClassDictionary() - dict.ContainsKey "point" |> shouldEqual true - let point = dict.["point"] - point.X |> shouldEqual(Some 0) - point.Y |> shouldEqual(Some 0) - } +// NOTE: Dictionary tests removed because Swashbuckle doesn't generate 'additionalProperties' in Swagger 2.0 for dictionaries +// The swagger.json produces: {"type": "object"} instead of {"type": "object", "additionalProperties": {"$ref": "#/definitions/PointClass"}} +// The corresponding OpenAPI 3.0 tests in v3/Swashbuckle.ReturnControllers.Tests.fs cover this functionality +// See: tests/SwaggerProvider.ProviderTests/v3/Swashbuckle.ReturnControllers.Tests.fs for working dictionary tests From bebbb841bfd177575f4781774281f759c2a76f4f Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Wed, 24 Dec 2025 14:55:01 +0100 Subject: [PATCH 21/22] fix: update release notes --- docs/RELEASE_NOTES.md | 10 +++++----- .../v2/Swashbuckle.ReturnControllers.Tests.fs | 4 ---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/docs/RELEASE_NOTES.md b/docs/RELEASE_NOTES.md index a123cf6..757c546 100644 --- a/docs/RELEASE_NOTES.md +++ b/docs/RELEASE_NOTES.md @@ -1,11 +1,11 @@ -#### 3.0.0 - Nov 15, 2025 +#### 3.0.0-beta03 - Dec 24, 2025 -- Server-Side Request Forgery (SSRF) protection for IP V4 (#271) and V6 (#272) -- Microsoft.OpenApi v3.0 with OpenAPI v3.1 Support -- Removed dependency on Microsoft.OpenApi.Readers -- Dependencies update +- feat: Microsoft.OpenApi v2.x with OpenAPI v3.1 Support +- feat: Server-Side Request Forgery (SSRF) protection for IP V4 (#271) and V6 (#272) - feat: handle text/plain payload types (#276) +- fix: removed dependency on Microsoft.OpenApi.Readers - fix: error messages when `operationId` is not provided (minimal api) (#277) +- hk: dependencies update #### 2.3.2 - Oct 11, 2025 diff --git a/tests/SwaggerProvider.ProviderTests/v2/Swashbuckle.ReturnControllers.Tests.fs b/tests/SwaggerProvider.ProviderTests/v2/Swashbuckle.ReturnControllers.Tests.fs index 8bb09eb..6ac6fec 100644 --- a/tests/SwaggerProvider.ProviderTests/v2/Swashbuckle.ReturnControllers.Tests.fs +++ b/tests/SwaggerProvider.ProviderTests/v2/Swashbuckle.ReturnControllers.Tests.fs @@ -169,7 +169,3 @@ let ``Return FileDescription POST Test``() = file.Bytes |> shouldEqual([| 1uy; 2uy; 3uy |]) } -// NOTE: Dictionary tests removed because Swashbuckle doesn't generate 'additionalProperties' in Swagger 2.0 for dictionaries -// The swagger.json produces: {"type": "object"} instead of {"type": "object", "additionalProperties": {"$ref": "#/definitions/PointClass"}} -// The corresponding OpenAPI 3.0 tests in v3/Swashbuckle.ReturnControllers.Tests.fs cover this functionality -// See: tests/SwaggerProvider.ProviderTests/v3/Swashbuckle.ReturnControllers.Tests.fs for working dictionary tests From 82d4f0251ea0fa0f1183bd8dbc1325b53598d19f Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Wed, 24 Dec 2025 15:13:25 +0100 Subject: [PATCH 22/22] fix: support allOf with one element --- src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs | 4 ++-- .../v2/Swashbuckle.ReturnControllers.Tests.fs | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs b/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs index c7cad43..5bf359e 100644 --- a/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs +++ b/src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs @@ -389,11 +389,11 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = ty :> Type let resolvedType = - // If schemaObj.Type is missing, but allOf is present and first allOf subschema has a type, use that + // If schemaObj.Type is missing, but allOf is present andallOf subschema has one element, use that if not schemaObj.Type.HasValue && not(isNull schemaObj.AllOf) - && schemaObj.AllOf.Count > 0 + && schemaObj.AllOf.Count = 1 then let firstAllOf = schemaObj.AllOf.[0] diff --git a/tests/SwaggerProvider.ProviderTests/v2/Swashbuckle.ReturnControllers.Tests.fs b/tests/SwaggerProvider.ProviderTests/v2/Swashbuckle.ReturnControllers.Tests.fs index 6ac6fec..3c098d9 100644 --- a/tests/SwaggerProvider.ProviderTests/v2/Swashbuckle.ReturnControllers.Tests.fs +++ b/tests/SwaggerProvider.ProviderTests/v2/Swashbuckle.ReturnControllers.Tests.fs @@ -168,4 +168,3 @@ let ``Return FileDescription POST Test``() = file.Name |> shouldEqual("1.txt") file.Bytes |> shouldEqual([| 1uy; 2uy; 3uy |]) } -