-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Observe the route template constraints in the Swagger middleware #2418
Observe the route template constraints in the Swagger middleware #2418
Conversation
7d0b067
to
f686663
Compare
f686663
to
73d80ef
Compare
Thanks for contributing - if you'd like to continue with this pull request, please rebase against the default branch to pick up our new CI. Are any more specific asserts needed in the integration test you've added? |
The default route template, i.e. `swagger/{documentName}/swagger.{json|yaml}` which is used by the `SwaggerMiddleware` is problematic because it matches any file extension. Even though it *looks like* only `json` and `yaml` extensions are supported, actually **any** extension matches. Trying to hit the following endpoints all return the JSON swagger document: * `swagger/v1/swagger.xml` * `swagger/v1/swagger.yml` * `swagger/v1/swagger.anything` This is not a very big deal, until the `SwaggerUIMiddleware` is also used and one chooses to modify the default route to `swagger/{documentName}.{json|yaml}`. This is the problematic configuration: ```csharp var builder = WebApplication.CreateBuilder(args); builder.Services.AddMvcCore().AddApiExplorer(); builder.Services.AddSwaggerGen(c => c.SwaggerDoc("v1", new OpenApiInfo { Title = "Test API", Version = "1" })); var app = builder.Build(); app.UseSwagger(c => c.RouteTemplate = "swagger/{documentName}.{json|yaml}"); app.UseSwaggerUI(c => c.SwaggerEndpoint("v1.json", "Test API")); app.Run(); ``` At this point, the `SwaggerMiddleware` will try to serve `swagger/index.html` because the route template matches (`documentName` = `index` and `json|yaml` = `html`) but the `index` document doesn't exist and this results in a 404 instead of calling the next (SwaggerUI) middleware. To fix this issue, the default route template has been modified to `swagger/{documentName}/swagger.{extension:regex(^(json|ya?ml)$)}`, leveraging ASP.NET Core [route constraints](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-6.0#route-constraints) and the constraints are actually enforced in the `SwaggerMiddleware` implementation. The default route template has also been modified in the `MapSwagger` method to ensure that only `json`, `yaml` and `yml` extensions are supported by default.
73d80ef
to
94b2ef7
Compare
Great to see that I don't think more asserts are warranted as the new integration test fully covers the problem described. (It would not pass without the changes in the route constraint handling.) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #2418 +/- ##
==========================================
+ Coverage 91.66% 91.99% +0.33%
==========================================
Files 91 91
Lines 3010 3036 +26
Branches 517 522 +5
==========================================
+ Hits 2759 2793 +34
+ Misses 251 243 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
In order to avoid a binary breaking change.
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [Swashbuckle.AspNetCore](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore) | `6.5.0` -> `6.6.1` | [![age](https://developer.mend.io/api/mc/badges/age/nuget/Swashbuckle.AspNetCore/6.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/Swashbuckle.AspNetCore/6.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/Swashbuckle.AspNetCore/6.5.0/6.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Swashbuckle.AspNetCore/6.5.0/6.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>domaindrivendev/Swashbuckle.AspNetCore (Swashbuckle.AspNetCore)</summary> ### [`v6.6.1`](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/releases/tag/v6.6.1) ##### What's Changed - Modernise build and migrate to GitHub Actions for CI by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2775](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2775) - Update Redoc spelling in docs by [@​Quppa](https://togithub.com/Quppa) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2568](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2568) - C# 9 Record - Read example/summary from positional record by [@​pixellos](https://togithub.com/pixellos) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2546](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2546) - Grammatical correction of some comments by [@​mokarchi](https://togithub.com/mokarchi) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2768](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2768) - Update README.md for nested types custom schemaId support by [@​antmeehan](https://togithub.com/antmeehan) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2746](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2746) - Add support for `WithSummary` and `WithDescription` metadata by [@​hwoodiwiss](https://togithub.com/hwoodiwiss) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2414](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2414) - Update README.md - Fix `Add Security Definitions and Requirements for Bearer auth` URL by [@​Saibamen](https://togithub.com/Saibamen) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2705](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2705) - Replace <see href="link">text</see> with Markdown link format by [@​mburumaxwell](https://togithub.com/mburumaxwell) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2392](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2392) - Add support for required keyword by [@​keahpeters](https://togithub.com/keahpeters) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2810](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2810) - Resolves [#​2717](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/issues/2717) by [@​MerickOWA](https://togithub.com/MerickOWA) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2718](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2718) - Observe the route template constraints in the Swagger middleware by [@​0xced](https://togithub.com/0xced) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2418](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2418) - Added Swashbuckle.AspNetCore.Annotations.SwaggerIgnoreAttribute by [@​jcracknell](https://togithub.com/jcracknell) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2610](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2610) - Fix schema generation with allOf inheritance by [@​bkoelman](https://togithub.com/bkoelman) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2815](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2815) - avoid triple enumeration of formParameters by [@​SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2823](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2823) - reduce some linq allocation by [@​SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2819](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2819) - remove some duplicate dictionary lookups by [@​SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2822](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2822) - remove redundant any check in InferRequestContentTypes by [@​SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2824](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2824) - Correctly respect interfaces in `GetInheritanceChain` by [@​angelaki](https://togithub.com/angelaki) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2826](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2826) - Generate Enum-Dictionary-Keys (analogous to Newtonsoft) by [@​angelaki](https://togithub.com/angelaki) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2825](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2825) - Fix build badge by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2782](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2782) - Fix preview package versions by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2783](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2783) - Handle Stream and PipeReader content types correctly by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2784](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2784) - Add NuGet package READMEs by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2808](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2808) - Bump redoc to 2.1.3 by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2807](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2807) - Sort system usings first by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2790](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2790) - Throw if unsupported HTTP method used by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2797](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2797) - Fix configuration properties not being copied by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2796](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2796) - Add security policy by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2785](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2785) - Bump Microsoft.OpenApi by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2795](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2795) - Update to Swagger UI v5 by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2806](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2806) - Add customized document serialization support by [@​remcolam](https://togithub.com/remcolam) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2677](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2677) - Added documentation for ISwaggerDocumentSerializer by [@​remcolam](https://togithub.com/remcolam) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2837](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2837) - Fix flaky tests by locking on the statup type by [@​remcolam](https://togithub.com/remcolam) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2838](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2838) - [#​2765](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/issues/2765) Allow Filter instance reuse by [@​remcolam](https://togithub.com/remcolam) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2839](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2839) - Throw an error when a user uses FromForm attribute with IFormFile in … by [@​nikunjbhargava](https://togithub.com/nikunjbhargava) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2840](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2840) - Filter illegal header fields by [@​keahpeters](https://togithub.com/keahpeters) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2842](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2842) - Fix handling of FileResult's with content types by [@​IGx89](https://togithub.com/IGx89) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2841](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2841) - Adding additional responses when 5XX errors are thrown. by [@​say25](https://togithub.com/say25) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2852](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2852) - Fix that XML comment examples do not show up if the type is string and the example contains quotation marks by [@​dldl-cmd](https://togithub.com/dldl-cmd) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2727](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2727) - Exclude unused Swagger-UI files by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2851](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2851) - Fix RequestBodyFilters not being deep copied by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2850](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2850) - Avoid GitHub step summary file write conflicts by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2848](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2848) - Extend built-in supported types by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2804](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2804) - Update compatibility table by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2856](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2856) - Add GitHub issue and PR templates by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2788](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2788) - Fix stale permissions by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2855](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2855) - Add .NET 8 support by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2799](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2799) - Release automation workflows by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2809](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2809) - Support native AoT with SwaggerUI by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2800](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2800) - Bump some NuGet packages by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2868](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2868) - Fix stale permissions by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2863](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2863) - Attestation by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2869](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2869) - Add descriptions for more HTTP status codes by [@​cremor](https://togithub.com/cremor) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2872](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2872) - Only attest packages by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2870](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2870) - Fix tag version by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2875](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2875) ##### New Contributors - [@​mokarchi](https://togithub.com/mokarchi) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2768](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2768) - [@​hwoodiwiss](https://togithub.com/hwoodiwiss) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2414](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2414) - [@​Saibamen](https://togithub.com/Saibamen) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2705](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2705) - [@​keahpeters](https://togithub.com/keahpeters) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2810](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2810) - [@​MerickOWA](https://togithub.com/MerickOWA) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2718](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2718) - [@​0xced](https://togithub.com/0xced) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2418](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2418) - [@​jcracknell](https://togithub.com/jcracknell) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2610](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2610) - [@​bkoelman](https://togithub.com/bkoelman) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2815](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2815) - [@​angelaki](https://togithub.com/angelaki) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2826](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2826) - [@​remcolam](https://togithub.com/remcolam) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2677](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2677) - [@​nikunjbhargava](https://togithub.com/nikunjbhargava) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2840](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2840) - [@​IGx89](https://togithub.com/IGx89) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2841](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2841) - [@​dldl-cmd](https://togithub.com/dldl-cmd) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2727](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2727) - [@​cremor](https://togithub.com/cremor) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2872](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2872) **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v6.5.0...v6.6.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/gritcsenko/HomeInventory). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjMuNSIsInVwZGF0ZWRJblZlciI6IjM3LjM2My41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [Swashbuckle.AspNetCore](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore) | `6.5.0` -> `6.6.1` | [![age](https://developer.mend.io/api/mc/badges/age/nuget/Swashbuckle.AspNetCore/6.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/Swashbuckle.AspNetCore/6.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/Swashbuckle.AspNetCore/6.5.0/6.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Swashbuckle.AspNetCore/6.5.0/6.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>domaindrivendev/Swashbuckle.AspNetCore (Swashbuckle.AspNetCore)</summary> ### [`v6.6.1`](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/releases/tag/v6.6.1) ##### What's Changed - Modernise build and migrate to GitHub Actions for CI by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2775](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2775) - Update Redoc spelling in docs by [@​Quppa](https://togithub.com/Quppa) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2568](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2568) - C# 9 Record - Read example/summary from positional record by [@​pixellos](https://togithub.com/pixellos) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2546](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2546) - Grammatical correction of some comments by [@​mokarchi](https://togithub.com/mokarchi) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2768](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2768) - Update README.md for nested types custom schemaId support by [@​antmeehan](https://togithub.com/antmeehan) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2746](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2746) - Add support for `WithSummary` and `WithDescription` metadata by [@​hwoodiwiss](https://togithub.com/hwoodiwiss) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2414](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2414) - Update README.md - Fix `Add Security Definitions and Requirements for Bearer auth` URL by [@​Saibamen](https://togithub.com/Saibamen) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2705](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2705) - Replace <see href="link">text</see> with Markdown link format by [@​mburumaxwell](https://togithub.com/mburumaxwell) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2392](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2392) - Add support for required keyword by [@​keahpeters](https://togithub.com/keahpeters) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2810](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2810) - Resolves [#​2717](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/issues/2717) by [@​MerickOWA](https://togithub.com/MerickOWA) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2718](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2718) - Observe the route template constraints in the Swagger middleware by [@​0xced](https://togithub.com/0xced) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2418](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2418) - Added Swashbuckle.AspNetCore.Annotations.SwaggerIgnoreAttribute by [@​jcracknell](https://togithub.com/jcracknell) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2610](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2610) - Fix schema generation with allOf inheritance by [@​bkoelman](https://togithub.com/bkoelman) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2815](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2815) - avoid triple enumeration of formParameters by [@​SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2823](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2823) - reduce some linq allocation by [@​SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2819](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2819) - remove some duplicate dictionary lookups by [@​SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2822](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2822) - remove redundant any check in InferRequestContentTypes by [@​SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2824](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2824) - Correctly respect interfaces in `GetInheritanceChain` by [@​angelaki](https://togithub.com/angelaki) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2826](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2826) - Generate Enum-Dictionary-Keys (analogous to Newtonsoft) by [@​angelaki](https://togithub.com/angelaki) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2825](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2825) - Fix build badge by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2782](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2782) - Fix preview package versions by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2783](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2783) - Handle Stream and PipeReader content types correctly by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2784](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2784) - Add NuGet package READMEs by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2808](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2808) - Bump redoc to 2.1.3 by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2807](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2807) - Sort system usings first by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2790](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2790) - Throw if unsupported HTTP method used by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2797](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2797) - Fix configuration properties not being copied by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2796](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2796) - Add security policy by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2785](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2785) - Bump Microsoft.OpenApi by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2795](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2795) - Update to Swagger UI v5 by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2806](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2806) - Add customized document serialization support by [@​remcolam](https://togithub.com/remcolam) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2677](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2677) - Added documentation for ISwaggerDocumentSerializer by [@​remcolam](https://togithub.com/remcolam) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2837](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2837) - Fix flaky tests by locking on the statup type by [@​remcolam](https://togithub.com/remcolam) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2838](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2838) - [#​2765](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/issues/2765) Allow Filter instance reuse by [@​remcolam](https://togithub.com/remcolam) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2839](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2839) - Throw an error when a user uses FromForm attribute with IFormFile in … by [@​nikunjbhargava](https://togithub.com/nikunjbhargava) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2840](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2840) - Filter illegal header fields by [@​keahpeters](https://togithub.com/keahpeters) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2842](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2842) - Fix handling of FileResult's with content types by [@​IGx89](https://togithub.com/IGx89) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2841](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2841) - Adding additional responses when 5XX errors are thrown. by [@​say25](https://togithub.com/say25) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2852](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2852) - Fix that XML comment examples do not show up if the type is string and the example contains quotation marks by [@​dldl-cmd](https://togithub.com/dldl-cmd) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2727](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2727) - Exclude unused Swagger-UI files by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2851](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2851) - Fix RequestBodyFilters not being deep copied by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2850](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2850) - Avoid GitHub step summary file write conflicts by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2848](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2848) - Extend built-in supported types by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2804](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2804) - Update compatibility table by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2856](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2856) - Add GitHub issue and PR templates by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2788](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2788) - Fix stale permissions by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2855](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2855) - Add .NET 8 support by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2799](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2799) - Release automation workflows by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2809](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2809) - Support native AoT with SwaggerUI by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2800](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2800) - Bump some NuGet packages by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2868](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2868) - Fix stale permissions by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2863](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2863) - Attestation by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2869](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2869) - Add descriptions for more HTTP status codes by [@​cremor](https://togithub.com/cremor) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2872](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2872) - Only attest packages by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2870](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2870) - Fix tag version by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2875](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2875) ##### New Contributors - [@​mokarchi](https://togithub.com/mokarchi) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2768](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2768) - [@​hwoodiwiss](https://togithub.com/hwoodiwiss) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2414](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2414) - [@​Saibamen](https://togithub.com/Saibamen) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2705](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2705) - [@​keahpeters](https://togithub.com/keahpeters) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2810](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2810) - [@​MerickOWA](https://togithub.com/MerickOWA) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2718](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2718) - [@​0xced](https://togithub.com/0xced) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2418](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2418) - [@​jcracknell](https://togithub.com/jcracknell) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2610](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2610) - [@​bkoelman](https://togithub.com/bkoelman) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2815](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2815) - [@​angelaki](https://togithub.com/angelaki) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2826](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2826) - [@​remcolam](https://togithub.com/remcolam) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2677](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2677) - [@​nikunjbhargava](https://togithub.com/nikunjbhargava) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2840](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2840) - [@​IGx89](https://togithub.com/IGx89) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2841](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2841) - [@​dldl-cmd](https://togithub.com/dldl-cmd) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2727](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2727) - [@​cremor](https://togithub.com/cremor) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2872](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2872) **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v6.5.0...v6.6.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 10pm every weekday,every weekend,before 5am every weekday" in timezone Europe/Berlin, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/orso-co/Orso.Arpa.Api). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM1MS4yIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [Swashbuckle.AspNetCore](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore) | `6.5.0` -> `6.6.2` | [![age](https://developer.mend.io/api/mc/badges/age/nuget/Swashbuckle.AspNetCore/6.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/Swashbuckle.AspNetCore/6.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/Swashbuckle.AspNetCore/6.5.0/6.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Swashbuckle.AspNetCore/6.5.0/6.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [Swashbuckle.AspNetCore.Annotations](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore) | `6.5.0` -> `6.6.2` | [![age](https://developer.mend.io/api/mc/badges/age/nuget/Swashbuckle.AspNetCore.Annotations/6.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/Swashbuckle.AspNetCore.Annotations/6.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/Swashbuckle.AspNetCore.Annotations/6.5.0/6.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Swashbuckle.AspNetCore.Annotations/6.5.0/6.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>domaindrivendev/Swashbuckle.AspNetCore (Swashbuckle.AspNetCore)</summary> ### [`v6.6.2`](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/releases/tag/v6.6.2) #### What's Changed - Fix to make required and nullable properties nullable in schema by [@​keahpeters](https://togithub.com/keahpeters) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2879](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2879) - Update Swagger UI section in README by [@​cremor](https://togithub.com/cremor) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2883](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2883) - Add support for the `[Length]`attribute. by [@​satma0745](https://togithub.com/satma0745) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2882](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2882) - Existing output file should be deleted/overwritten by [@​patrikwlund](https://togithub.com/patrikwlund) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2886](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2886) - Fix libraries being handled as test projects by [@​patrikwlund](https://togithub.com/patrikwlund) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2898](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2898) - Avoid competing swagger generation during test build by [@​patrikwlund](https://togithub.com/patrikwlund) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2897](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2897) - Replace `<br />`, `<br/>`, and `<br>` in XML comments with `Environment.Newline` by [@​mburumaxwell](https://togithub.com/mburumaxwell) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2899](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2899) - Fix schema generation for [c#9](https://togithub.com/c/Swashbuckle.AspNetCore/issues/9) positional record with param tag without example property creating unexpected empty example by [@​stb-co](https://togithub.com/stb-co) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2901](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2901) - Fix serialization of `AdditionalItems` by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2890](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2890) - Disable parallel build by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2894](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2894) - Do not run `IHostedService` implementations by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2880](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2880) - Fix interceptor JSON casing by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2907](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2907) - Fix generation when `[DefaultValue]`'s type differs by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2895](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2895) #### New Contributors - [@​satma0745](https://togithub.com/satma0745) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2882](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2882) - [@​patrikwlund](https://togithub.com/patrikwlund) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2886](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2886) - [@​stb-co](https://togithub.com/stb-co) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2901](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2901) **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v6.6.1...v6.6.2 ### [`v6.6.1`](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/releases/tag/v6.6.1) #### What's Changed - Modernise build and migrate to GitHub Actions for CI by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2775](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2775) - Update Redoc spelling in docs by [@​Quppa](https://togithub.com/Quppa) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2568](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2568) - C# 9 Record - Read example/summary from positional record by [@​pixellos](https://togithub.com/pixellos) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2546](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2546) - Grammatical correction of some comments by [@​mokarchi](https://togithub.com/mokarchi) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2768](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2768) - Update README.md for nested types custom schemaId support by [@​antmeehan](https://togithub.com/antmeehan) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2746](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2746) - Add support for `WithSummary` and `WithDescription` metadata by [@​hwoodiwiss](https://togithub.com/hwoodiwiss) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2414](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2414) - Update README.md - Fix `Add Security Definitions and Requirements for Bearer auth` URL by [@​Saibamen](https://togithub.com/Saibamen) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2705](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2705) - Replace <see href="link">text</see> with Markdown link format by [@​mburumaxwell](https://togithub.com/mburumaxwell) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2392](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2392) - Add support for required keyword by [@​keahpeters](https://togithub.com/keahpeters) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2810](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2810) - Resolves [#​2717](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/issues/2717) by [@​MerickOWA](https://togithub.com/MerickOWA) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2718](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2718) - Observe the route template constraints in the Swagger middleware by [@​0xced](https://togithub.com/0xced) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2418](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2418) - Added Swashbuckle.AspNetCore.Annotations.SwaggerIgnoreAttribute by [@​jcracknell](https://togithub.com/jcracknell) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2610](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2610) - Fix schema generation with allOf inheritance by [@​bkoelman](https://togithub.com/bkoelman) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2815](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2815) - avoid triple enumeration of formParameters by [@​SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2823](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2823) - reduce some linq allocation by [@​SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2819](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2819) - remove some duplicate dictionary lookups by [@​SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2822](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2822) - remove redundant any check in InferRequestContentTypes by [@​SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2824](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2824) - Correctly respect interfaces in `GetInheritanceChain` by [@​angelaki](https://togithub.com/angelaki) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2826](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2826) - Generate Enum-Dictionary-Keys (analogous to Newtonsoft) by [@​angelaki](https://togithub.com/angelaki) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2825](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2825) - Fix build badge by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2782](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2782) - Fix preview package versions by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2783](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2783) - Handle Stream and PipeReader content types correctly by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2784](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2784) - Add NuGet package READMEs by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2808](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2808) - Bump redoc to 2.1.3 by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2807](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2807) - Sort system usings first by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2790](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2790) - Throw if unsupported HTTP method used by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2797](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2797) - Fix configuration properties not being copied by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2796](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2796) - Add security policy by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2785](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2785) - Bump Microsoft.OpenApi by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2795](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2795) - Update to Swagger UI v5 by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2806](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2806) - Add customized document serialization support by [@​remcolam](https://togithub.com/remcolam) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2677](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2677) - Added documentation for ISwaggerDocumentSerializer by [@​remcolam](https://togithub.com/remcolam) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2837](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2837) - Fix flaky tests by locking on the statup type by [@​remcolam](https://togithub.com/remcolam) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2838](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2838) - [#​2765](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/issues/2765) Allow Filter instance reuse by [@​remcolam](https://togithub.com/remcolam) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2839](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2839) - Throw an error when a user uses FromForm attribute with IFormFile in … by [@​nikunjbhargava](https://togithub.com/nikunjbhargava) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2840](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2840) - Filter illegal header fields by [@​keahpeters](https://togithub.com/keahpeters) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2842](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2842) - Fix handling of FileResult's with content types by [@​IGx89](https://togithub.com/IGx89) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2841](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2841) - Adding additional responses when 5XX errors are thrown. by [@​say25](https://togithub.com/say25) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2852](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2852) - Fix that XML comment examples do not show up if the type is string and the example contains quotation marks by [@​dldl-cmd](https://togithub.com/dldl-cmd) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2727](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2727) - Exclude unused Swagger-UI files by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2851](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2851) - Fix RequestBodyFilters not being deep copied by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2850](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2850) - Avoid GitHub step summary file write conflicts by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2848](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2848) - Extend built-in supported types by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2804](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2804) - Update compatibility table by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2856](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2856) - Add GitHub issue and PR templates by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2788](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2788) - Fix stale permissions by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2855](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2855) - Add .NET 8 support by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2799](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2799) - Release automation workflows by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2809](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2809) - Support native AoT with SwaggerUI by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2800](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2800) - Bump some NuGet packages by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2868](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2868) - Fix stale permissions by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2863](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2863) - Attestation by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2869](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2869) - Add descriptions for more HTTP status codes by [@​cremor](https://togithub.com/cremor) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2872](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2872) - Only attest packages by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2870](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2870) - Fix tag version by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2875](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2875) #### New Contributors - [@​mokarchi](https://togithub.com/mokarchi) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2768](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2768) - [@​hwoodiwiss](https://togithub.com/hwoodiwiss) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2414](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2414) - [@​Saibamen](https://togithub.com/Saibamen) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2705](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2705) - [@​keahpeters](https://togithub.com/keahpeters) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2810](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2810) - [@​MerickOWA](https://togithub.com/MerickOWA) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2718](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2718) - [@​0xced](https://togithub.com/0xced) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2418](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2418) - [@​jcracknell](https://togithub.com/jcracknell) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2610](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2610) - [@​bkoelman](https://togithub.com/bkoelman) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2815](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2815) - [@​angelaki](https://togithub.com/angelaki) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2826](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2826) - [@​remcolam](https://togithub.com/remcolam) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2677](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2677) - [@​nikunjbhargava](https://togithub.com/nikunjbhargava) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2840](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2840) - [@​IGx89](https://togithub.com/IGx89) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2841](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2841) - [@​dldl-cmd](https://togithub.com/dldl-cmd) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2727](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2727) - [@​cremor](https://togithub.com/cremor) made their first contribution in [https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2872](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2872) **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v6.5.0...v6.6.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 9pm,before 6am" in timezone Europe/Zurich, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/smartive/cas-fee-adv-mumble-api). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM2OC4xMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
The default route template, i.e.
swagger/{documentName}/swagger.{json|yaml}
which is used by theSwaggerMiddleware
is problematic because it matches any file extension. Even though it looks like onlyjson
andyaml
extensions are supported, actually any extension matches. Trying to hit the following endpoints all return the JSON swagger document:swagger/v1/swagger.xml
swagger/v1/swagger.yml
swagger/v1/swagger.anything
This is not a very big deal, until the
SwaggerUIMiddleware
is also used and one chooses to modify the default route toswagger/{documentName}.{json|yaml}
.This is the problematic configuration:
At this point, the
SwaggerMiddleware
will try to serveswagger/index.html
because the route template matches (documentName
=index
andjson|yaml
=html
) but theindex
document doesn't exist and this results in a 404 instead of calling the next (SwaggerUI) middleware.To fix this issue, the default route template has been modified to
swagger/{documentName}/swagger.{extension:regex(^(json|ya?ml)$)}
, leveraging ASP.NET Core route constraints and the constraints are actually enforced in theSwaggerMiddleware
implementation.The default route template has also been modified in the
MapSwagger
method to ensure that onlyjson
,yaml
andyml
extensions are supported by default.