Update dependency Refit.HttpClientFactory to v12#143
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
10.0.1→12.0.0Release Notes
reactiveui/refit (Refit.HttpClientFactory)
v12.0.0: 12.0.0Overview
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.
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
8b70ca1break: request-building fixes, JSON Lines, and response ergonomics (#2155) @glennawatson3881cc6break: add IAsyncEnumerable streaming and opt-in URL, route and JSON serialization modes (#2157) @glennawatson✨ Features
6f2e43dfeat: respect naming conventions across query, form and JSON body (#2154) @glennawatson196cd49feat: add IsSuccessfulWithContent and correct IApiResponse nullable annotations (#2159) @glennawatsone28a384feat: generate request construction to avoid reflection pipeline (#2150) @glennawatson98982b4feat: reflection-free generated form serialization, opt-in null values, and public UniqueName (#2164) @glennawatsonbf488d6feat: improve generated clients for AOT (#2151) @glennawatson♻️ Refactoring
3fd4ce6refactor: replace System.Reactive with ReactiveUI.Primitives and integrate observable test helpers (#2152) @glennawatsonc7c14b4refactor: align Refit with rxui coding standards and modernize (#2149) @glennawatson⚡ Performance
3717256perf: modernize and optimize the Refit source generator (#2148) @glennawatson🧹 General Changes
0aae034build: update StyleSharp.Analyzers to 3.13.4 and align editorconfig (#2163) @glennawatson🔗 Full Changelog: reactiveui/refit@v11.2.0...v12.0.0
🙌 Contributions
💖 Thanks to all the contributors: @glennawatson
v11.2.0: 11.2.0🗞️ What's Changed
🐛 Fixes
13882dafix: honor parameter-level CollectionFormat for inner collections (#2144) @glennawatson54a8e62fix: ValidationApiException propagates ContentHeaders and uses configured serializer (#2146) @glennawatsond694baffix: populate ApiException.Content when deserialization fails (#2145) @glennawatson🔗 Full Changelog: reactiveui/refit@v11.1.0...v11.2.0
🙌 Contributions
💖 Thanks to all the contributors: @glennawatson
v11.1.0: 11.1.0🗞️ What's Changed
🐛 Fixes
be08706Fix: serialize body by runtime type for interface/abstract parameters (#2118) (#2119) @HulinCedricd58ce5afix: keep only baseline analyzer on legacy toolchains (#2136) @glennawatson10ab2cefix: handle empty responses and edge cases in JSON serialization (#2138) @ChrisPulman @glennawatsonf9a24abfix: clearer error when a response has no request message (#2141) @glennawatson98868fafix: detect nullable CancellationToken parameters (#2139) @glennawatson7a3489efix: correct URL and query string building edge cases (#2137) @glennawatson8f9b460fix: request building edge cases for headers, query and enum params (#2140) @glennawatson🧹 General Changes
988d17abuild: adopt central package management and modernize MSBuild (#2142) @glennawatson📝 Documentation
2989a5edocs: Fix Refit 10 typo that should be Refit 11 (#2143) @PressXtoChris📦 Dependencies
b71c90cUpdate dotnet monorepo (#2123) @renovate[bot]b2e3c17Update ASP.NET Core (#2122) @renovate[bot]5f67752chore(deps): update dotnet monorepo to v8 (#2130) @renovate[bot]780979cUpdate Microsoft.Testing to 18.8.0 (#2126) @renovate[bot]🔗 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]
v11.0.1: 11.0.1🗞️ What's Changed
🧹 General Changes
484edf6build: default examples to IsPackable=false @glennawatson📌 Other
8652c5eProposal to fix 2115 (#2116) @xIceFox🔗 Full Changelog: reactiveui/refit@v11.0.0...11.0.1
🙌 Contributions
🌱 New contributors since the last release: @xIceFox
💖 Thanks to all the contributors: @glennawatson, @xIceFox
v11.0.0: 11.0.011.0.0 reworks Refit's error/exception model and tightens interface validation. Most apps will compile, but code that inspects
ApiResponse.Error, readsStatusCode, or catches transport exceptions around Refit calls will need changes. These are the same breaking changes that briefly shipped in the now‑delisted10.1.7and were reported by the community in #2114.💥 What changed & how to migrate
1.
ApiResponse<T>.Erroris nowApiExceptionBase?(wasApiException?) (#2052)A new abstract base
ApiExceptionBasenow sits under bothApiExceptionand the newApiRequestException.ApiExceptionBasedoes not exposeContent/HasContent— those still live onApiException.2. New
ApiRequestExceptionwraps transport/connection failures (#2052)Exceptions thrown by
HttpClient.SendAsyncbefore a response arrives —HttpRequestException(DNS/host unreachable),TaskCanceledException(timeouts), etc. — are now wrapped inApiRequestException : ApiExceptionBase, carrying the full request context. ForApiResponse<T>return types these are now surfaced via.Errorinstead of only being thrown, so you no longer need a separatetry/catchandIsSuccessfulcheck.3.
ApiResponse<T>.StatusCodeis now nullable (HttpStatusCode?) (#2052)When the request never reached the server there is no status code. Code that assumed a non‑null value must handle
null:4. Stricter interface validation + enum name handling (#2068)
Synchronous return types are now only permitted for generated/non‑public interface members (
RestMethodInfoenforces the rule), and the System.Text.Json enum converter now maps serialized names both ways (includingJsonStringEnumMemberNameon .NET 9+). Interfaces that previously relied on unsupported sync members may now fail generation.🗞️ What's Changed
✨ Features & Enhancements
ApiRequestExceptionfor wrappingSendAsyncexceptions (new error model) by @PressXtoChris in #2052AddRefitClientoverloads and tests by @ChrisPulman in #2084⚡ Performance
Activator.CreateInstancewith direct constructor inApiResponse.Createby @james-s-tayler in #2071🐛 Fixes
🧹 General & Housekeeping
📦 Dependencies
🙌 New Contributors
💖 Contributions
Thanks to everyone who contributed: @ChrisPulman, @PressXtoChris, @james-s-tayler, @yzhoholiev, @dyatlov-a
🤖 Automated services that contributed: @renovate[bot]
🔗 Full Changelog: reactiveui/refit@v10.2.0...v11.0.0
v10.2.0: 10.2.0NOTE
This is a re-release of v10.1.6 which had a certificate revoked.
🗞️ What's Changed
🐛 Fixes
cfe6862Fixes examples, issues 2058, 1761, 1889, and 2056 (#2061) @ChrisPulman71e7a32Fix is packable (#2063) @ChrisPulman🧹 General Changes
c945712Update AoT, Add Roslyn 5.0, Update serialisation (#2062) @ChrisPulman📦 Dependencies
d3b9f6echore(deps): update .net test stack (#2054) @ChrisPulman @renovate[bot]804eb41chore(deps): update .net test stack to v8 (#2057) @renovate[bot]📌 Other
14811e0Enhance release workflow with new jobs and permissions @ChrisPulman49858e3Bump version from 10.0 to 10.1 @ChrisPulman2f43b67Remove productNamespacePrefix from release workflow @ChrisPulman🔗 Full Changelog: reactiveui/refit@10.0.1...10.1.6
🙌 Contributions
💖 Thanks to all the contributors: @ChrisPulman
🤖 Automated services that contributed: @renovate[bot]
v10.1.6Compare Source
Configuration
📅 Schedule: (UTC)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.