Skip to content
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

Add .NET 8 support #2799

Merged
merged 9 commits into from May 12, 2024
Merged

Conversation

martincostello
Copy link
Collaborator

@martincostello martincostello commented Apr 14, 2024

  • Add support for .NET 8.
  • Bump version to 6.6.0.

Resolves #2792
Resolves #2791
Resolves #2771
Resolves #2794

@martincostello martincostello added dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code labels Apr 14, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.08%. Comparing base (4d5625f) to head (c29aeef).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2799      +/-   ##
==========================================
- Coverage   92.42%   86.08%   -6.35%     
==========================================
  Files          94       73      -21     
  Lines        3183     2795     -388     
  Branches      556      449     -107     
==========================================
- Hits         2942     2406     -536     
- Misses        241      389     +148     
Flag Coverage Δ
Linux 86.08% <100.00%> (-6.35%) ⬇️
Windows 86.08% <100.00%> (-6.35%) ⬇️
macOS 86.08% <100.00%> (-6.35%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -33,8 +32,16 @@ public static class SwaggerGenServiceCollectionExtensions
services.TryAddTransient<ISerializerDataContractResolver>(s =>
{
#if (!NETSTANDARD2_0)
var serializerOptions = s.GetService<IOptions<JsonOptions>>()?.Value?.JsonSerializerOptions
var serializerOptions =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be a good idea to document this order of options somewhere, because not documenting it will most likely raise questions about what options are used.

- Add support for .NET 8.
- Bump version to `6.6.0`.
Add WeatherForecast .NET 8 Minimal API test application.
Resolves domaindrivendev#2791.
Add test for domaindrivendev#2771 for `DateOnly` values.
Use JsonOptions for Minimal APIs in .NET 8+ if not available from MVC.
Use `JsonSerializerOptions.Default` where available.
See domaindrivendev#2593 (comment).
Use the Regex source generator for .NET 7+.
Resolves domaindrivendev#2794.
Fix copy-pasta during rebase.
Use xunit's `Assert.Multiple()` method to combine failed assertions together.
- Move resolution to own private class.
- Only resolve the value once.
- Add comments about resolution.
- Make `ISerializerDataContractResolver` a singleton by default.
Fix tests for `net8.0`.
Copy link
Collaborator

@mesMess mesMess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Targeting necessary libraries in support of .NET 8
Dropping extraneous class objects (envs)
Method removal/cleanup

@martincostello martincostello merged commit 3ce85e7 into domaindrivendev:master May 12, 2024
9 checks passed
@martincostello martincostello deleted the add-net8.0 branch May 12, 2024 07:07
gritcsenko added a commit to gritcsenko/HomeInventory that referenced this pull request May 15, 2024
[![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
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2775
- Update Redoc spelling in docs by
[@&#8203;Quppa](https://togithub.com/Quppa) in
[domaindrivendev/Swashbuckle.AspNetCore#2568
- C# 9 Record - Read example/summary from positional record by
[@&#8203;pixellos](https://togithub.com/pixellos) in
[domaindrivendev/Swashbuckle.AspNetCore#2546
- Grammatical correction of some comments by
[@&#8203;mokarchi](https://togithub.com/mokarchi) in
[domaindrivendev/Swashbuckle.AspNetCore#2768
- Update README.md for nested types custom schemaId support by
[@&#8203;antmeehan](https://togithub.com/antmeehan) in
[domaindrivendev/Swashbuckle.AspNetCore#2746
- Add support for `WithSummary` and `WithDescription` metadata by
[@&#8203;hwoodiwiss](https://togithub.com/hwoodiwiss) in
[domaindrivendev/Swashbuckle.AspNetCore#2414
- Update README.md - Fix `Add Security Definitions and Requirements for
Bearer auth` URL by [@&#8203;Saibamen](https://togithub.com/Saibamen) in
[domaindrivendev/Swashbuckle.AspNetCore#2705
- Replace <see href="link">text</see> with Markdown link format by
[@&#8203;mburumaxwell](https://togithub.com/mburumaxwell) in
[domaindrivendev/Swashbuckle.AspNetCore#2392
- Add support for required keyword by
[@&#8203;keahpeters](https://togithub.com/keahpeters) in
[domaindrivendev/Swashbuckle.AspNetCore#2810
- Resolves
[#&#8203;2717](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/issues/2717)
by [@&#8203;MerickOWA](https://togithub.com/MerickOWA) in
[domaindrivendev/Swashbuckle.AspNetCore#2718
- Observe the route template constraints in the Swagger middleware by
[@&#8203;0xced](https://togithub.com/0xced) in
[domaindrivendev/Swashbuckle.AspNetCore#2418
- Added Swashbuckle.AspNetCore.Annotations.SwaggerIgnoreAttribute by
[@&#8203;jcracknell](https://togithub.com/jcracknell) in
[domaindrivendev/Swashbuckle.AspNetCore#2610
- Fix schema generation with allOf inheritance by
[@&#8203;bkoelman](https://togithub.com/bkoelman) in
[domaindrivendev/Swashbuckle.AspNetCore#2815
- avoid triple enumeration of formParameters by
[@&#8203;SimonCropp](https://togithub.com/SimonCropp) in
[domaindrivendev/Swashbuckle.AspNetCore#2823
- reduce some linq allocation by
[@&#8203;SimonCropp](https://togithub.com/SimonCropp) in
[domaindrivendev/Swashbuckle.AspNetCore#2819
- remove some duplicate dictionary lookups by
[@&#8203;SimonCropp](https://togithub.com/SimonCropp) in
[domaindrivendev/Swashbuckle.AspNetCore#2822
- remove redundant any check in InferRequestContentTypes by
[@&#8203;SimonCropp](https://togithub.com/SimonCropp) in
[domaindrivendev/Swashbuckle.AspNetCore#2824
- Correctly respect interfaces in `GetInheritanceChain` by
[@&#8203;angelaki](https://togithub.com/angelaki) in
[domaindrivendev/Swashbuckle.AspNetCore#2826
- Generate Enum-Dictionary-Keys (analogous to Newtonsoft) by
[@&#8203;angelaki](https://togithub.com/angelaki) in
[domaindrivendev/Swashbuckle.AspNetCore#2825
- Fix build badge by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2782
- Fix preview package versions by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2783
- Handle Stream and PipeReader content types correctly by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2784
- Add NuGet package READMEs by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2808
- Bump redoc to 2.1.3 by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2807
- Sort system usings first by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2790
- Throw if unsupported HTTP method used by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2797
- Fix configuration properties not being copied by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2796
- Add security policy by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2785
- Bump Microsoft.OpenApi by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2795
- Update to Swagger UI v5 by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2806
- Add customized document serialization support by
[@&#8203;remcolam](https://togithub.com/remcolam) in
[domaindrivendev/Swashbuckle.AspNetCore#2677
- Added documentation for ISwaggerDocumentSerializer by
[@&#8203;remcolam](https://togithub.com/remcolam) in
[domaindrivendev/Swashbuckle.AspNetCore#2837
- Fix flaky tests by locking on the statup type by
[@&#8203;remcolam](https://togithub.com/remcolam) in
[domaindrivendev/Swashbuckle.AspNetCore#2838
-
[#&#8203;2765](https://togithub.com/domaindrivendev/Swashbuckle.AspNetCore/issues/2765)
Allow Filter instance reuse by
[@&#8203;remcolam](https://togithub.com/remcolam) in
[domaindrivendev/Swashbuckle.AspNetCore#2839
- Throw an error when a user uses FromForm attribute with IFormFile in …
by [@&#8203;nikunjbhargava](https://togithub.com/nikunjbhargava) in
[domaindrivendev/Swashbuckle.AspNetCore#2840
- Filter illegal header fields by
[@&#8203;keahpeters](https://togithub.com/keahpeters) in
[domaindrivendev/Swashbuckle.AspNetCore#2842
- Fix handling of FileResult's with content types by
[@&#8203;IGx89](https://togithub.com/IGx89) in
[domaindrivendev/Swashbuckle.AspNetCore#2841
- Adding additional responses when 5XX errors are thrown. by
[@&#8203;say25](https://togithub.com/say25) in
[domaindrivendev/Swashbuckle.AspNetCore#2852
- Fix that XML comment examples do not show up if the type is string and
the example contains quotation marks by
[@&#8203;dldl-cmd](https://togithub.com/dldl-cmd) in
[domaindrivendev/Swashbuckle.AspNetCore#2727
- Exclude unused Swagger-UI files by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2851
- Fix RequestBodyFilters not being deep copied by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2850
- Avoid GitHub step summary file write conflicts by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2848
- Extend built-in supported types by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2804
- Update compatibility table by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2856
- Add GitHub issue and PR templates by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2788
- Fix stale permissions by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2855
- Add .NET 8 support by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2799
- Release automation workflows by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2809
- Support native AoT with SwaggerUI by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2800
- Bump some NuGet packages by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2868
- Fix stale permissions by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2863
- Attestation by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2869
- Add descriptions for more HTTP status codes by
[@&#8203;cremor](https://togithub.com/cremor) in
[domaindrivendev/Swashbuckle.AspNetCore#2872
- Only attest packages by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2870
- Fix tag version by
[@&#8203;martincostello](https://togithub.com/martincostello) in
[domaindrivendev/Swashbuckle.AspNetCore#2875

##### New Contributors

- [@&#8203;mokarchi](https://togithub.com/mokarchi) made their first
contribution in
[domaindrivendev/Swashbuckle.AspNetCore#2768
- [@&#8203;hwoodiwiss](https://togithub.com/hwoodiwiss) made their first
contribution in
[domaindrivendev/Swashbuckle.AspNetCore#2414
- [@&#8203;Saibamen](https://togithub.com/Saibamen) made their first
contribution in
[domaindrivendev/Swashbuckle.AspNetCore#2705
- [@&#8203;keahpeters](https://togithub.com/keahpeters) made their first
contribution in
[domaindrivendev/Swashbuckle.AspNetCore#2810
- [@&#8203;MerickOWA](https://togithub.com/MerickOWA) made their first
contribution in
[domaindrivendev/Swashbuckle.AspNetCore#2718
- [@&#8203;0xced](https://togithub.com/0xced) made their first
contribution in
[domaindrivendev/Swashbuckle.AspNetCore#2418
- [@&#8203;jcracknell](https://togithub.com/jcracknell) made their first
contribution in
[domaindrivendev/Swashbuckle.AspNetCore#2610
- [@&#8203;bkoelman](https://togithub.com/bkoelman) made their first
contribution in
[domaindrivendev/Swashbuckle.AspNetCore#2815
- [@&#8203;angelaki](https://togithub.com/angelaki) made their first
contribution in
[domaindrivendev/Swashbuckle.AspNetCore#2826
- [@&#8203;remcolam](https://togithub.com/remcolam) made their first
contribution in
[domaindrivendev/Swashbuckle.AspNetCore#2677
- [@&#8203;nikunjbhargava](https://togithub.com/nikunjbhargava) made
their first contribution in
[domaindrivendev/Swashbuckle.AspNetCore#2840
- [@&#8203;IGx89](https://togithub.com/IGx89) made their first
contribution in
[domaindrivendev/Swashbuckle.AspNetCore#2841
- [@&#8203;dldl-cmd](https://togithub.com/dldl-cmd) made their first
contribution in
[domaindrivendev/Swashbuckle.AspNetCore#2727
- [@&#8203;cremor](https://togithub.com/cremor) made their first
contribution in
[domaindrivendev/Swashbuckle.AspNetCore#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-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code
Projects
None yet
6 participants