-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Support .NET 10 #3283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support .NET 10 #3283
Conversation
Cherry-pick refactoring from #3283 to make multi-targeting easier for ASP.NET Core 10 and Microsoft.OpenApi v2.
86395ee to
eaa77f6
Compare
|
Some of the failing tests are microsoft/OpenAPI.NET#2109. Probably need to wait until .NET 10 preview 2 updates to a newer version of Microsoft.OpenApi to ingest any fixes. |
|
Moved some of the changes into #3286 so we can prepare users for the change and also then change this PR to remove |
|
@martincostello It seems like based on this changeset Swashbuckle.AspNetCore will have a similar constraint to Microsoft.AspNetCore.OpenApi in that OpenAPI 2.0 is only used for .NET 10+ above. Any thoughts about figuring out a way to support 2.0 in .NET 8 and .NET 9? |
|
Not yet - I figured I'd start with the "easiest" option and get everything compiling and passing to unblock any apps using .NET 10, and then go from there. I'm going to do some more work on this tomorrow(?) probably to try and get the tests passing, though I imagine I'll have to rejig a bunch of stuff next week anyway when 10.0.0-preview.2/2.0.0-preview7(?) ship. Ideally OpenAPI 3.1 can be made available for our 8 and 9 users, but I'm slightly wary of the bigger "compatibility cliff" that creates with all the breaking changes and any other libraries that might extend Swashbuckle. Good job there's another 7-8 months left to work that out on our side 😆 |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3283 +/- ##
==========================================
+ Coverage 94.28% 94.75% +0.46%
==========================================
Files 110 110
Lines 3816 3831 +15
Branches 723 760 +37
==========================================
+ Hits 3598 3630 +32
+ Misses 218 201 -17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Issue discovered via martincostello/aspnetcore-openapi#231 is that in some cases schema references go missing (like this one). I'm not sure why and there's been a lot of API changes in that area since 2.0.0-preview5, so will have to wait until I've reacted to whatever changes ASP.NET Core 10 preview 2 brings and go from there. |
|
Also, |
|
@martincostello Yes, I should've warned you that the preview6 breaking changes are a bit of a pain to wrangle. Here's the PR where I did it for ASP.NET Core in case it is helpful (dotnet/aspnetcore#60269). The code surface in ASP.NET Core is admittedly smaller so most of the changes needed to be made in tests where I took shortcuts and used explicit casts for things I knew should be
You've probably already gleened this from the implementation, but This is assuming that the reference has been correctly initialized in the OpenAPI document's workspace. Here is an extension method that I wrote in ASP.NET Core to help with this registration. |
|
Thanks for the pointers @captainsafia - I'll use those for reference once I start reacting to 10.0.0-preview.2 changes 🙇 |
- Cherry-pick refactoring from #3283 to make multi-targeting easier for ASP.NET Core 10 and Microsoft.OpenApi v2. - Make Verify snapshots unique per target framework. This is to when .NET 10 introduces OpenAPI 3.1, it doesn't cause issues with the snapshots being intentionally different. - Apply IDE suggestion to use collection expressions. - Shorten test names to avoid `MAX_PATH` issues on Windows in GitHub Actions. - Bump coverlet, Microsoft.NET.Test.Sdk, ReportGenerator, and xunit to their latest stable versions. - Update more NuGet package version overrides for tests to the latest versions. - Drop leftover `net6.0` reference in tests.
- Add support for ASP.NET Core 10 and Microsoft.OpenApi v2. - Add opt-in support for OpenAPI 3.1 when targeting `net10.0`.
ef09eab to
18458de
Compare
Updated [Swashbuckle.AspNetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) from 6.9.0 to 10.1.0. <details> <summary>Release notes</summary> _Sourced from [Swashbuckle.AspNetCore's releases](https://github.com/domaindrivendev/Swashbuckle.AspNetCore/releases)._ ## 10.1.0 ## What's Changed ### New Features * Add public method `SchemaRepository.ReplaceSchemaId` by @bkoelman in domaindrivendev/Swashbuckle.AspNetCore#3708 ### Bug Fixes * Exclude inherited properties only when base added to `AllOf` by @John-Paul-R in domaindrivendev/Swashbuckle.AspNetCore#3692 ### Miscellaneous * Add clarifying example in migration guide to v10 by @markuspalme in domaindrivendev/Swashbuckle.AspNetCore#3672 * Add markdown linter by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3673 * Update dependencies by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3685 * Validate OpenAPI documents create valid C# clients by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3686 * End-to-end client validation tests by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3687 * Add NSwag client test by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3689 * Fix GitHub step summaries by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3691 * Clarify compatibility by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3694 * Update zizmor by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3695 * Suppress zizmor false-positive by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3696 * Refactor tests by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3705 * Use NuGet Trusted Publishing by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3574 * Annotate `TryLookupByType` with nullability hints by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3719 * Bump swagger-ui-dist to 5.31.0 by @dependabot in domaindrivendev/Swashbuckle.AspNetCore#3720 ## New Contributors * @markuspalme made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3672 * @John-Paul-R made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3692 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v10.0.1...v10.1.0 ## 10.0.1 ## What's Changed * Prepare for OpenAPI.NET 3.0 by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3647 * Fix exception sorting operation tags by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3652 * Improve version table by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3653 * Update migration guide by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3654 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v10.0.0...v10.0.1 ## 10.0.0 # Swashbuckle.AspNetCore v10.0.0 > [!IMPORTANT] > This release contains major breaking changes. > > Read our [v10 migration guide](https://github.com/domaindrivendev/Swashbuckle.AspNetCore/blob/HEAD/docs/migrating-to-v10.md) for further information. With this release, Swashbuckle.AspNetCore adds support for generating OpenAPI 3.1 documents and for ASP.NET Core 10. Swashbuckle.AspNetCore v10 depends on [OpenAPI.NET v2.3](https://github.com/microsoft/OpenAPI.NET/releases/tag/v2.3.0) which introduces many breaking changes to the public API surface. More information can be found in their [OpenAPI.NET v2 Upgrade Guide](https://github.com/microsoft/OpenAPI.NET/blob/main/docs/upgrade-guide-2.md). To reduce the number of breaking behavioural changes in Swashbuckle.AspNetCore v10, generation of OpenAPI 3.1 documents is **opt-in**. To generate OpenAPI 3.1 documents, change the OpenAPI version as shown in the code snippet below: ```csharp app.UseSwagger(options => { options.OpenApiVersion = OpenApiSpecVersion.OpenApi3_1; }); ``` > [!TIP] > It is strongly recommended that you upgrade to [Swashbuckle.AspNetCore v9.0.6](https://github.com/domaindrivendev/Swashbuckle.AspNetCore/releases/tag/v9.0.6) **before** upgrading to v10. > [!IMPORTANT] > Use of Swashbuckle.AspNetCore with the ASP.NET Core [`WithOpenApi()` method](https://learn.microsoft.com/dotnet/core/compatibility/aspnet-core/10/withopenapi-deprecated) is no longer supported. ## What's Changed * Update README badges by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3597 * Extend NuGet package validation by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3602 * Support .NET 10 by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3283 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v9.0.6...v10.0.0 ## 9.0.6 ## What's Changed * Bump redoc from 2.5.0 to 2.5.1 by @dependabot in domaindrivendev/Swashbuckle.AspNetCore#3587 * Bump swagger-ui from 5.29.1 to 5.29.2 by @dependabot in domaindrivendev/Swashbuckle.AspNetCore#3595 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v9.0.5...v9.0.6 ## 9.0.5 ## What's Changed * .NET 10 preparation by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3565 * Update NuGet packages by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3573 * Fix anchors by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3577 * Bump swagger-ui-dist from 5.27.1 to 5.29.1 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v9.0.4...v9.0.5 ## 9.0.4 ## What's Changed * Fix incorrect `ETag` values by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3490 * Fix `Accept-Encoding` parsing by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3492 * Check `Accept-Encoding` quality by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3493 * Update xunit packages by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3500 * Add release notes configuration by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3502 * Simplify release workflow by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3503 * Bump xunit dependencies by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3508 * Update NuGet dependencies by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3513 * Remove `WebHost` usage from tests by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3517 * Fix typos by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3520 * Sign-off commits by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3526 * Add zizmor by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3528 * Fix permissions by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3529 * Bump zizmor by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3535 * Add default `$type` discriminator for `[JsonPolymorphic]` by @lilinus in domaindrivendev/Swashbuckle.AspNetCore#3496 * Update NuGet dependencies by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3545 ## New Contributors * @lilinus made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3496 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v9.0.3...v9.0.4 ## 9.0.3 ## What's Changed * Fix incorrect `Content-Length` for swagger-ui and Redoc static assets by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3488 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v9.0.2...v9.0.3 ## 9.0.2 ## What's Changed * Generate SBOM by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3468 * Compress swagger-ui and Redoc files in embedded resources with GZip by @stratosblue in domaindrivendev/Swashbuckle.AspNetCore#3399 * Refactor GZip compression by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3480 ## New Contributors * @stratosblue made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3399 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v9.0.1...v9.0.2 ## 9.0.1 ## What's Changed * Fix missing Swashbuckle.AspNetCore metapackage dependencies by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3460 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v9.0.0...v9.0.1 ## 9.0.0 📣 This release contains the following **breaking changes**: - Drops support for `netstandard2.0` and thus .NET Framework - now only `net8.0` and `net9.0` are supported. - Removes all public members annotated as `[Obsolete]` in previous releases. - Removes the deprecated `--serializeasv2` option from Swashbuckle.AspNetCore.Cli, which was superseded by `--openapiversion` from version 8.0.0. ## What's Changed * Add tests for `[Range]` and respect `ParseLimitsInInvariantCulture` property by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3448 * Fix `[Range]` behaviour by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3449 * Refactor sample websites by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3450 * Drop netstandard support by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3422 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v8.1.4...v9.0.0 ## 8.1.4 ## What's Changed * Avoid `ArgumentNullException` being thrown generating examples by @skironDotNet in domaindrivendev/Swashbuckle.AspNetCore#3444 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v8.1.3...v8.1.4 ## 8.1.3 ## What's Changed * Re-enable MyGet publishing by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3421 * Improve test reliability by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3423 * Fix conflicting Git/EditorConfig settings by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3430 * Add integration test logging by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3431 * Disable Static Web Assets by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3432 * Typo fixes by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3433 * Fix HumanizeHrefTags not working when see tag spans over multiple lines by @Focus1337 in domaindrivendev/Swashbuckle.AspNetCore#3435 * Revert #3377 by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3436 ## New Contributors * @Focus1337 made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3435 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v8.1.2...v8.1.3 ## 8.1.2 ## What's Changed * Update to fix Lists/Arrays of nullables not getting marked as nullable by @Scarecrow7250 in domaindrivendev/Swashbuckle.AspNetCore#3364 * Add build timeout by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3370 * Bump redoc to 2.5.0 by @dependabot in domaindrivendev/Swashbuckle.AspNetCore#3374 * Add test analytics by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3376 * Fix schema for nullable enums by @ItsVeryWindy in domaindrivendev/Swashbuckle.AspNetCore#3377 * [Docs] Split readme md by @peter-csala in domaindrivendev/Swashbuckle.AspNetCore#3405 * [Docs] Improve the formatting of documentation files by @peter-csala in domaindrivendev/Swashbuckle.AspNetCore#3409 * Spruce-up the READMEs by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3410 * Migrate to slnx by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3411 * Documentation refresh by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3412 * Bump swagger-ui to 5.22.0 by @dependabot in domaindrivendev/Swashbuckle.AspNetCore#3417 ## New Contributors * @Scarecrow7250 made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3364 * @ItsVeryWindy made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3377 * @peter-csala made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3405 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v8.1.1...v8.1.2 ## 8.1.1 ## What's Changed * Bump swagger-ui to 5.20.8 by @dependabot in domaindrivendev/Swashbuckle.AspNetCore#3359 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v8.1.0...v8.1.1 ## 8.1.0 ## What's Changed * Adopt File-scoped namespaces by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3331 * Apply analyzer suggestions by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3334 * Add cache headers for ReDoc and SwaggerUI by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3341 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v8.0.0...v8.1.0 ## 8.0.0 > [!IMPORTANT] > Swashbuckle.AspNetCore drops support for .NET 6. Swashbuckle.AspNetCore v8.0.0 makes the following notable changes: - Drops support for `net6.0`. - The `netstandard2.0` TFM now depends on [ASP.NET Core 2.3](dotnet/announcements#331) instead of ASP.NET Core 2.1. - Updates Microsoft.OpenApi to [v1.6.23](https://github.com/microsoft/OpenAPI.NET/releases/tag/1.6.23). This update requires the use of swagger-ui [v5.19.0](https://github.com/swagger-api/swagger-ui/releases/tag/v5.19.0) or later ([v5.20.1](https://github.com/swagger-api/swagger-ui/releases/tag/v5.20.1) is included in the Swashbuckle.AspNetCore.SwaggerUI NuGet package). You may need to clear your browser's cache to pick up the latest JavaScript files for swagger-ui. - To prepare for future support for OpenAPI 3.1 documents, deprecates the `SerializeAsV2` property by marking it as `[Obsolete]`. Users should update their code as illustrated below, depending on their use case: ```diff - options.SerializeAsV2 = true; + options.OpenApiVersion = Microsoft.OpenApi.OpenApiSpecVersion.OpenApi2_0; // or if explicitly disabling (the same as the default behaviour) - options.SerializeAsV2 = false; + options.OpenApiVersion = Microsoft.OpenApi.OpenApiSpecVersion.OpenApi3_0; ``` - To prepare for future support for OpenAPI 3.1 documents, the [Swashbuckle.AspNetCore.Cli](https://www.nuget.org/packages/Swashbuckle.AspNetCore.Cli) tool has deprecated the `--serializeasv2` option and logs a warning to the console. Users should update their usage as illustrated below, depending on their use case: ```diff - swagger tofile --output [output] [startupassembly] [swaggerdoc] --serializeasv2 + swagger tofile --output [output] [startupassembly] [swaggerdoc] --openapiversion "2.0" ``` ## What's Changed * More reliable coverage by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3294 * Apply IDE refactoring suggestions by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3254 * .NET 10 preparation by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3285 * Move snapshots by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3314 * Snapshot OpenApiDocument as JSON by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3315 * Enable implicit usings by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3316 * Drop .NET 6 by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3183 * Deprecate `SerializeAsV2` by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3286 * Improve release automation by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3317 * Bump NuGet packages by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3319 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v7.3.2...v8.0.0 ## 7.3.2 ## What's Changed * Fix humanize for multiline `code` and `<para>` tags by @EvgeniyZ in domaindrivendev/Swashbuckle.AspNetCore#3295 * Fix `DescribeAllParametersInCamelCase` usage for parameters by @maksim-sovkov in domaindrivendev/Swashbuckle.AspNetCore#3309 ## New Contributors * @maksim-sovkov made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3309 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v7.3.1...v7.3.2 ## 7.3.1 ## What's Changed * Fix for ApiDescriptionProvider throws NRE by @EvgeniyZ in domaindrivendev/Swashbuckle.AspNetCore#3280 * Bump swagger-ui-dist from 5.19.0 to 5.20.0 by @dependabot in domaindrivendev/Swashbuckle.AspNetCore#3279 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v7.3.0...v7.3.1 ## 7.3.0 ## What's Changed * Add `CreateFromJson` options overload by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3218 * Stop testing with .NET 6 by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3219 * Replace IdentityServer4 with Duende.IdentityServer (#3008) by @pseudometalhead in domaindrivendev/Swashbuckle.AspNetCore#3184 * Fix JWT version for .NET 9 by @Saibamen in domaindrivendev/Swashbuckle.AspNetCore#3227 * Adjust readme for issue #1014 by @EvgeniyZ in domaindrivendev/Swashbuckle.AspNetCore#3233 * Humanize multiline para tag by @EvgeniyZ in domaindrivendev/Swashbuckle.AspNetCore#3234 * Humanize multi line code tag by @EvgeniyZ in domaindrivendev/Swashbuckle.AspNetCore#3239 * Fix `JsonSerializerDataContractResolver` so that it handles jagged arrays correctly by @ozziepeeps in domaindrivendev/Swashbuckle.AspNetCore#3245 * Use `DeepObject` parameter style for dictionary by @EvgeniyZ in domaindrivendev/Swashbuckle.AspNetCore#3241 * Remove `MvcOptions` from `SchemaGenerator` by @EvgeniyZ in domaindrivendev/Swashbuckle.AspNetCore#3242 * Optional EOL for XML comments (#2947) by @RainDance74 in domaindrivendev/Swashbuckle.AspNetCore#3255 * Add support for listing available OpenAPI documents by @rassilon in domaindrivendev/Swashbuckle.AspNetCore#3263 * Bump swagger-ui-dist from 5.18.3 to 5.19.0 by @dependabot in domaindrivendev/Swashbuckle.AspNetCore#3266 ## New Contributors * @pseudometalhead made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3184 * @RainDance74 made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3255 * @rassilon made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3263 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v7.2.0...v7.3.0 ## 7.2.0 ## What's Changed * Path grouping strategy by @Saibamen in domaindrivendev/Swashbuckle.AspNetCore#3152 * Add package README by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3178 * Allow no match to be found to avoid throwing an exception by @moni-dips in domaindrivendev/Swashbuckle.AspNetCore#3188 ## New Contributors * @moni-dips made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3188 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v7.1.0...v7.2.0 ## 7.1.0 ## What's Changed * Update some nugets by @Saibamen in domaindrivendev/Swashbuckle.AspNetCore#3143 * Recreate package lock files by @Saibamen in domaindrivendev/Swashbuckle.AspNetCore#3146 * More asserts for `SwaggerGeneratorTests` by @Saibamen in domaindrivendev/Swashbuckle.AspNetCore#3147 * Add more HTTP codes to `ResponseDescriptionMap` by @Saibamen in domaindrivendev/Swashbuckle.AspNetCore#3148 * Test more WebAPI examples by @Saibamen in domaindrivendev/Swashbuckle.AspNetCore#3149 * Fix issue with `[FromForm]` and enums for Controllers by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#3164 * Support `[Description]` and `[ReadOnly]` by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#3162 * Second level inheritance for `UseOneOfForPolymorphism` by @k0ka in domaindrivendev/Swashbuckle.AspNetCore#3155 * Avoid exception checking nullability by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3119 * Fix `NotSupportedException` in AoT test project by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3171 * Create `snupkg` files by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3168 * Support of `[JsonPolymorphic]` and `[JsonDerivedType]` attributes by @k0ka in domaindrivendev/Swashbuckle.AspNetCore#3170 ## New Contributors * @k0ka made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3155 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v7.0.0...v7.1.0 ## 7.0.0 ## What's Changed * Refactor filter descriptor type checks in SwaggerGen by @iskandersierra in domaindrivendev/Swashbuckle.AspNetCore#3125 * Apply SwaggerIgnore on Newtonsoft by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#3134 * Support .NET 9 by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3007 * Drop support for .NET (Core) versions prior to 8 (except 6) by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3007 * Fix FromForm without WithOpenApi schemas by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#3133 ## New Contributors * @iskandersierra made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3125 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v6.9.0...v7.0.0 Commits viewable in [compare view](domaindrivendev/Swashbuckle.AspNetCore@v6.9.0...v10.1.0). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Add support for .NET 10 and update Microsoft.OpenApi from v1 to v2.
This was started from #3252
and is very much a work-in-progress at this stage. The tests need more work to get them passing.The general idea is to factor out any differences into shared helped classes that can be used to localise the Microsoft.OpenApi differences to as few places as possible. Once this gets further along, some of these changes can be cherry-picked into a new branch and merged into the default branch to minimise the diff for adding .NET 10 support.#3285TODO
Before merge:
Use stable version of .NET 10 SDKUse stable versions of Microsoft.AspNetCore NuGet packagesUse stable version of Microsoft.OpenApi 2.x.xRemove NU5104 suppressionRemoveWebHostBuilderfrom testsRemove workarounds for prerelease issuesCheckVersionPrefixis correct for the next major version at the time of mergeUseOpenApiDocument.SerializeAs()methodRemove any members decorated with[Obsolete]that are appropriateUpdate documentation samples (e.g.IOpenApiSchematoOpenApiSchema) (Update documentation for v10 and OpenAPI 3.1 #3585)Create migration guide (see 📖 De-monolith the README #3365)Include details such as for [Question]: With dotnet-vnext what's the equivalent code for .AddSecurityRequirement(...)? #3382Consume new .NET 10Descriptionproperties where appropriate (see [Feature request]: Support for OpenAPI Description in [ProducesResponseType], [Produces], and [ProducesDefaultResponseType] Attributes #3099)Prerelease builds from this PR can be consumed from MyGet: