Bump Refit from 11.0.1 to 12.1.0#35
Conversation
--- updated-dependencies: - dependency-name: Refit dependency-version: 12.1.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull Request Overview
This PR updates Refit to version 12.1.0. While the change itself is technically 'up to standards' according to Codacy, this major version upgrade introduces several breaking changes that are not addressed in the current diff.
Specifically, Refit 12 removes several shadowed members from the IApiResponse interface and drops support for .NET Standard 2.0 and 2.1. Since the PR only modifies the package version without accompanying code refactoring or verification tests, there is a risk of build failures or runtime regressions in projects consuming this package. The missing test scenarios suggest that the impact on response handling and JSON serialization has not been fully verified.
About this PR
- This version of Refit no longer supports netstandard2.0 or netstandard2.1. Ensure that none of the projects within this solution target these frameworks, as they will no longer be compatible with Refit 12.1.0.
- Major version 12 removes several shadowed members from IApiResponse. If any service implementation or consumer relies on these specific members, this change will cause compilation errors or runtime issues. Please verify that all usages of IApiResponse in the repository are compatible with these removals.
Test suggestions
- Verify that existing code using IApiResponse still functions correctly given the removal of shadowed members (Error, ContentHeaders, IsSuccessStatusCode, IsSuccessful).
- Validate that the change in System.Text.Json default number handling (now allowing reading from strings) does not conflict with existing domain logic or validation.
- Confirm that the project does not target netstandard2.0 or netstandard2.1, which are no longer supported in this version of Refit.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify that existing code using IApiResponse<T> still functions correctly given the removal of shadowed members (Error, ContentHeaders, IsSuccessStatusCode, IsSuccessful).
2. Validate that the change in System.Text.Json default number handling (now allowing reading from strings) does not conflict with existing domain logic or validation.
3. Confirm that the project does not target netstandard2.0 or netstandard2.1, which are no longer supported in this version of Refit.
Low confidence findings
- The change in System.Text.Json default number handling may impact how numeric values are parsed from API responses. Verify that this does not conflict with existing domain validation or expectation of strict type handling.
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
Updated Refit from 11.0.1 to 12.1.0.
Release notes
Sourced from Refit's releases.
12.1.0
🗞️ What's Changed
✨ Features
🐛 Fixes
📝 Documentation
📦 Dependencies
🔗 Full Changelog: reactiveui/refit@v12.0.0...12.1.0
🙌 Contributions
💖 Thanks to all the contributors: @ChrisPulman, @glennawatson, @HulinCedric
🤖 Automated services that contributed: @renovate[bot]
12.0.0
Overview
Refit 12.0 is a large release centred on a near-complete rewrite of how requests are built. The source generator now constructs HTTP requests inline at compile time instead of going through the reflection pipeline, making generated clients faster and friendly to trimming and Native AOT. On top of that foundation it adds response streaming, JSON Lines, naming-convention presets, and a batch of long-standing fixes. Two small, well-scoped breaking changes are called out below.
This release also removed netstandard2.0 and netstandard2.1 support. You should to use net462/net8 as your base lines, and use multiple targets if you need to target both.
Highlights
IAsyncEnumerable<T>response streaming. Stream large responses, auto-detecting a JSON array vs JSON Lines from the content type, generated inline on the hot path.[Body(BodySerializationMethod.JsonLines)]plus a streamingJsonLinesContent(application/x-ndjson), wired through both the reflection and source-gen paths.RefitSettings.CamelCase()/SnakeCase()/KebabCase()configure query keys, form-url-encoded keys, and JSON body property names consistently, plus snake/kebab URL key formatters. Opt-in, so existing behaviour is unchanged.EnsureSuccessStatusCodeAsync()/EnsureSuccessfulAsync()are now available directly onIApiResponse<T>; a newIsSuccessfulWithContent(andHasContent) gives a single, mock-safe success-with-content check; nullable annotations onIApiResponse<T>were corrected to be sound.RefitSettings.UrlResolution, andRefitSettings.AllowUnmatchedRouteParametersto leave an unmatched{token}for aDelegatingHandlerto rewrite.SystemTextJsonContentSerializer.GetFastPathJsonSerializerOptions()) and buffered/streamed request-body modes that run through it.[Query(SerializeNull = true)]to send a null property askey=instead of omitting it, and a publicUniqueName.ForType<T>()to resolve the generatedIHttpClientFactoryclient name.Guid/DateTime/DateTimeOffset/TimeSpan(andDateOnly/TimeOnly) are sent as plain text (#2016); property-level[Query(delimiter, prefix)]is honoured when flattening complex objects (#1334);[Query(Format = "")]serializes a complex value viaToString()(#1281); andIApiResponse<T>no longer shadows base members (#1933).Breaking changes and migration
IApiResponse<T>no longer shadows base members. Thenew-shadowedError,ContentHeaders,IsSuccessStatusCode, andIsSuccessfulmembers are removed from the generic interface. Source that reads these still compiles (they bind to the inherited base members), but code compiled against v8-v11 that bound to the generic-interface slots needs a recompile. If you relied onIsSuccessfulto narrowContentto non-null on anIApiResponse<T>-typed value, switch toHasContent/IsSuccessfulWithContent.System.Text.Jsonserializer now reads numbers from JSON strings (NumberHandling = AllowReadingFromString). Opt back out withNumberHandling = JsonNumberHandling.Stricton yourJsonSerializerOptions.🗞️ What's Changed
💥 Breaking Changes
✨ Features
♻️ Refactoring
⚡ Performance
🧹 General Changes
🔗 Full Changelog: reactiveui/refit@v11.2.0...v12.0.0
... (truncated)
11.2.0
🗞️ What's Changed
🐛 Fixes
🔗 Full Changelog: reactiveui/refit@v11.1.0...v11.2.0
🙌 Contributions
💖 Thanks to all the contributors: @glennawatson
11.1.0
🗞️ What's Changed
🐛 Fixes
🧹 General Changes
📝 Documentation
📦 Dependencies
🔗 Full Changelog: reactiveui/refit@v11.0.1...v11.1.0
🙌 Contributions
🌱 New contributors since the last release: @HulinCedric
💖 Thanks to all the contributors: @ChrisPulman, @glennawatson, @HulinCedric, @PressXtoChris
🤖 Automated services that contributed: @renovate[bot]
Commits viewable in compare view.
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 commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)