Releases: reactiveui/refit
11.2.0
🗞️ What's Changed
🐛 Fixes
- 13882da fix: honor parameter-level CollectionFormat for inner collections (#2144) @glennawatson
- 54a8e62 fix: ValidationApiException propagates ContentHeaders and uses configured serializer (#2146) @glennawatson
- d694baf fix: populate ApiException.Content when deserialization fails (#2145) @glennawatson
🔗 Full Changelog: v11.1.0...v11.2.0
🙌 Contributions
💖 Thanks to all the contributors: @glennawatson
11.1.0
🗞️ What's Changed
🐛 Fixes
- be08706 Fix: serialize body by runtime type for interface/abstract parameters (#2118) (#2119) @HulinCedric
- d58ce5a fix: keep only baseline analyzer on legacy toolchains (#2136) @glennawatson
- 10ab2ce fix: handle empty responses and edge cases in JSON serialization (#2138) @ChrisPulman @glennawatson
- f9a24ab fix: clearer error when a response has no request message (#2141) @glennawatson
- 98868fa fix: detect nullable CancellationToken parameters (#2139) @glennawatson
- 7a3489e fix: correct URL and query string building edge cases (#2137) @glennawatson
- 8f9b460 fix: request building edge cases for headers, query and enum params (#2140) @glennawatson
🧹 General Changes
- 988d17a build: adopt central package management and modernize MSBuild (#2142) @glennawatson
📝 Documentation
- 2989a5e docs: Fix Refit 10 typo that should be Refit 11 (#2143) @PressXtoChris
📦 Dependencies
- b71c90c Update dotnet monorepo (#2123) @renovate[bot]
- b2e3c17 Update ASP.NET Core (#2122) @renovate[bot]
- 5f67752 chore(deps): update dotnet monorepo to v8 (#2130) @renovate[bot]
- 780979c Update Microsoft.Testing to 18.8.0 (#2126) @renovate[bot]
🔗 Full Changelog: 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]
11.0.1
🗞️ What's Changed
🧹 General Changes
- 484edf6 build: default examples to IsPackable=false @glennawatson
📌 Other
🔗 Full Changelog: v11.0.0...11.0.1
🙌 Contributions
🌱 New contributors since the last release: @xIceFox
💖 Thanks to all the contributors: @glennawatson, @xIceFox
11.0.0
⚠️ This is a breaking release (major: 10.x → 11.0.0)
11.0.0 reworks Refit's error/exception model and tightens interface validation. Most apps will compile, but code that inspects ApiResponse.Error, reads StatusCode, or catches transport exceptions around Refit calls will need changes. These are the same breaking changes that briefly shipped in the now‑delisted 10.1.7 and were reported by the community in #2114.
💡 Need a drop‑in, non‑breaking replacement for
10.1.6? Use10.2.0— it is10.1.6re‑signed with a valid certificate (the10.1.6cert was revoked, see #2114). Move to11.0.0when you're ready to adopt the changes below.
💥 What changed & how to migrate
1. ApiResponse<T>.Error is now ApiExceptionBase? (was ApiException?) (#2052)
A new abstract base ApiExceptionBase now sits under both ApiException and the new ApiRequestException. ApiExceptionBase does not expose Content / HasContent — those still live on ApiException.
// before
string? body = response.Error?.Content;
// after — narrow to ApiException first
if (response.Error is ApiException apiEx)
{
string? body = apiEx.Content; // Content/HasContent are on ApiException
}2. New ApiRequestException wraps transport/connection failures (#2052)
Exceptions thrown by HttpClient.SendAsync before a response arrives — HttpRequestException (DNS/host unreachable), TaskCanceledException (timeouts), etc. — are now wrapped in ApiRequestException : ApiExceptionBase, carrying the full request context. For ApiResponse<T> return types these are now surfaced via .Error instead of only being thrown, so you no longer need a separate try/catch and IsSuccessful check.
// catching transport errors: catch the base (or ApiRequestException) now
catch (ApiExceptionBase ex) { /* covers ApiException + ApiRequestException */ }3. ApiResponse<T>.StatusCode is 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:
int code = (int)response.StatusCode; // ❌ won't compile / may throw
int? code = (int?)response.StatusCode; // ✅ handle the no-response case4. Stricter interface validation + enum name handling (#2068)
Synchronous return types are now only permitted for generated/non‑public interface members (RestMethodInfo enforces the rule), and the System.Text.Json enum converter now maps serialized names both ways (including JsonStringEnumMemberName on .NET 9+). Interfaces that previously relied on unsupported sync members may now fail generation.
🗞️ What's Changed
✨ Features & Enhancements
- Create
ApiRequestExceptionfor wrappingSendAsyncexceptions (new error model) by @PressXtoChris in #2052 - Support sync interface members & enum names by @ChrisPulman in #2068
- Add
AddRefitClientoverloads and tests by @ChrisPulman in #2084
⚡ Performance
- Replace
Activator.CreateInstancewith direct constructor inApiResponse.Createby @james-s-tayler in #2071 - Avoid extra allocations when deserializing with Newtonsoft.Json by @yzhoholiev in #2085
🐛 Fixes
- Fix for #1959 by @ChrisPulman in #2064
- Fix freezing when reading a string response by @dyatlov-a in #2096
🧹 General & Housekeeping
- Modernize the Refit solution for TUnit, source‑gen AOT, and theme support by @ChrisPulman in #2092
- Add sponsors section and update platforms by @ChrisPulman in #2073, #2074
- Simplify sponsor logos layout in README by @ChrisPulman in #2075
📦 Dependencies
- Update .NET test stack to v10 (TUnit → 1.47.0, Verify.TUnit, Microsoft.Testing CodeCoverage, Test.Sdk) by @renovate[bot] in #2080, #2078, #2097, #2102, #2104, #2106, #2107, #2113, #2086, #2108, #2105, #2112
- Update dotnet monorepo to 10.0.8 by @renovate[bot] in #2076, #2103
- Update Microsoft.Extensions.Http, AspNetCore.WebUtilities, System.Formats.Asn1 to v10 by @renovate[bot] in #2088, #2087, #2090, #2091, #2077
- Update Microsoft.SourceLink.GitHub to 10.0.300 by @renovate[bot] in #2093, #2101
🙌 New Contributors
- @PressXtoChris made their first contribution in #2052
- @yzhoholiev made their first contribution in #2085
- @dyatlov-a made their first contribution in #2096
💖 Contributions
Thanks to everyone who contributed: @ChrisPulman, @PressXtoChris, @james-s-tayler, @yzhoholiev, @dyatlov-a
🤖 Automated services that contributed: @renovate[bot]
🔗 Full Changelog: v10.2.0...v11.0.0
10.2.0
NOTE
This is a re-release of v10.1.6 which had a certificate revoked.
🗞️ What's Changed
🐛 Fixes
- cfe6862 Fixes examples, issues 2058, 1761, 1889, and 2056 (#2061) @ChrisPulman
- 71e7a32 Fix is packable (#2063) @ChrisPulman
🧹 General Changes
- c945712 Update AoT, Add Roslyn 5.0, Update serialisation (#2062) @ChrisPulman
📦 Dependencies
- d3b9f6e chore(deps): update .net test stack (#2054) @ChrisPulman @renovate[bot]
- 804eb41 chore(deps): update .net test stack to v8 (#2057) @renovate[bot]
📌 Other
- 14811e0 Enhance release workflow with new jobs and permissions @ChrisPulman
- 49858e3 Bump version from 10.0 to 10.1 @ChrisPulman
- 2f43b67 Remove productNamespacePrefix from release workflow @ChrisPulman
🔗 Full Changelog: 10.0.1...10.1.6
🙌 Contributions
💖 Thanks to all the contributors: @ChrisPulman
🤖 Automated services that contributed: @renovate[bot]
10.0.1
🗞️ What's Changed
♻️ Refactoring
- af972dd Refactor HttpClientFactoryExtensions to simplify code structure (#2042) @ChrisPulman @zms9110750
🐛 Fixes
- f1af4a5 fix: stop removing trailing single chars from query string (#2045) @baynezy @ChrisPulman
🧹 General Changes
- 0155eeb chore: Bump version from 9.0 to 10.0.x @glennawatson
📦 Dependencies
- dd90c34 chore(deps): update dependency microsoft.codeanalysis.csharp.sourcegenerators.testing to 1.1.3 (#2047) @renovate[bot]
- 6cd4eab chore(deps): update dependency publicapigenerator to 11.5.4 (#2031) @renovate[bot]
- 52d9504 chore(deps): update dependency verify.xunit to 31.8.0 (#2028) @renovate[bot]
- 1b67a8c chore(deps): update dependency verify.xunit to 31.10.0 (#2048) @renovate[bot]
- 49a6731 chore(deps): update dependency verify.xunit to 31.9.3 (#2039) @renovate[bot]
- bce9ae0 chore(deps): update dependency verify.xunit to 31.9.2 (#2038) @renovate[bot]
- ea1ff78 chore(deps): update dependency verify.xunit to 31.9.0 (#2037) @renovate[bot]
- 7f9c7a6 chore(deps): update dessant/lock-threads action to v6 (#2035) @renovate[bot]
- 55783dd chore(deps): update dependency serilog.sinks.console to 6.1.1 (#2023) @renovate[bot]
- e50bf61 chore(deps): update dependency publicapigenerator to 11.5.3 (#2027) @renovate[bot]
🔗 Full Changelog: 9.0.2...10.0.1
🙌 Contributions
🌱 New contributors since the last release: @baynezy, @zms9110750
💖 Thanks to all the contributors: @baynezy, @ChrisPulman, @glennawatson, @zms9110750
🤖 Automated services that contributed: @renovate[bot]
9.0.2
🗞️ What's Changed
✨ Features
- 6654c95 feat: add url query tests for
Refit.Tests/RestService(#1904) @ChrisPulman @TimothyMakkison - a56e9d8 feat: cache
RestMethodInfo(#1903) @ChrisPulman @TimothyMakkison - 9418be1 feat: added
WellKnownType(#1962) @TimothyMakkison - 6c575e3 feat: add
SourceWriter(#1966) @TimothyMakkison - 2d13fff feat: replace
AppendwithWriteLine, remove empty lines and align generics (#1967) @TimothyMakkison - da64f1f feat: test Named HttpClient reuse by AddRefitClient (#1910) @ChrisPulman @derekm
- 61f2973 feat: add verify snapshot testing for
InterfaceStubGeneratorTests(#1976) @TimothyMakkison - 4bbe565 feat: add
DynamicallyAccessedMembersattribute (#1973) @ChrisPulman @TimothyMakkison - fa3a57b feat: calculate path substitutions in
RestMethodInfo(#1897) @ChrisPulman @TimothyMakkison - 3dba936 feat: prevent serialization of
CancellationToken?(#1917) @ChrisPulman @TimothyMakkison - e13386f feat: add URL fragment tests (#1900) @TimothyMakkison
- e45c5f7 feat: lazy initialize
queryParamsToAdd(#1907) @ChrisPulman @TimothyMakkison
🐛 Fixes
- 9170047 Fixed typos (#1996) @AldeRoberge @ChrisPulman
- 5e7b693 fix: support - symbols in csproj names (#1921) @ChrisPulman @TimothyMakkison
- 8b53387 fix: support nullable value type collection in queries (#1926) @TimothyMakkison
- b627a6b Fix explicit interface method emission and diagnostics (#2017) @ChrisPulman
- f8bf4bb fix: support interfaces with different name casing (#1930) @TimothyMakkison
- 860a332 Fix path for groupid (about case insensitive) in readme (#1938) @Krzysztof318
🧹 General Changes
- bc3516a chore: small format change to
RequestBuilderImplementation(#1902) @ChrisPulman @Glenn @TimothyMakkison - fab497c Update version to 9.0.x @glennawatson
- c302e1c chore: delete broken test (#1911) @ChrisPulman @TimothyMakkison
- 9d19ed7 Update README for HttpRequestMessage.Options usage (#2025) @ChrisPulman @DavidGarton8
- b5ee2af chore: fix typo
MathodTests->MethodTests(#1928) @ChrisPulman @TimothyMakkison - c07f319 Update version from 8.0.0 to 9.0.x @glennawatson
- 1e4e9c5 Update version.json for release branch patterns @glennawatson
- e954c18 Update Refit.Tests to use net 4.8 (#1953) @ChrisPulman
✅ Tests
- 367838e test: add unsupported return type test (#1963) @TimothyMakkison
- 9342107 test: add
IObservable<IApiResponse<T>>test (#1964) @TimothyMakkison - 5331648 test: add IObservable generator test (#1960) @ChrisPulman @TimothyMakkison
📦 Dependencies
- 113d21f chore(deps): update dependency verify.xunit to 29.5.0 (#1986) @renovate[bot]
- 68f6f36 chore(deps): update dependency verify.xunit to 28.16.0 (#1927) @renovate[bot]
- b0bd79a chore(deps): update dependency verify.xunit to 29.3.0 (#1984) @renovate[bot]
- 2440200 chore(deps): update dependency refit to v8 [security] (#1912) @renovate[bot]
- a20dbb2 chore(deps): update dependency verify.xunit to v29 (#1978) @renovate[bot]
- 4e28ed9 chore(deps): update dependency microsoft.visualstudio.threading.analyzers to 17.13.61 (#1958) @renovate[bot]
- cb25774 chore(deps): update dependency publicapigenerator to 11.5.0 (#2020) @renovate[bot]
- 95bba78 chore(deps): update .net test stack (#2012) @renovate[bot]
- 97848fb chore(deps): update dependency microsoft.net.test.sdk to 17.12.0 (#1936) @renovate[bot]
- 3d448d1 chore(deps): update dependency verify.xunit to 29.2.0 (#1971) @renovate[bot]
- 3cd289d chore(deps): update dependency verify.xunit to v29 (#1970) @renovate[bot]
- e99cde0 chore(deps): update dependency verify.xunit to v31 (#2019) @renovate[bot]
- b9c0bd6 chore(deps): update dependency xunit.runner.visualstudio to 3.1.3 (#2003) @renovate[bot]
- 57ecce2 chore(deps): update dependency microsoft.visualstudio.threading.analyzers to 17.12.19 (#1934) @renovate[bot]
- a364148 chore(deps): update dependency nerdbank.gitversioning to 3.9.50 (#2024) @renovate[bot]
- dcee3a8 chore(deps): update dependency xunit.runner.visualstudio to 3.1.2 (#2001) @renovate[bot]
- 65793cf chore(deps): update dependency system.reactive to 6.1.0 (#2015) @renovate[bot]
- 7e22cd6 chore(deps): update dependency microsoft.net.test.sdk to 17.14.1 (#1993) @renovate[bot]
- 4bb111e chore(deps): update dependency verify.xunit to 30.6.1 (#2004) @renovate[bot]
- c68f581 chore(deps): update dependency serilog to 4.2.0 (#1939) @renovate[bot]
- a6a1304 chore(deps): update dependency microsoft.net.test.sdk to v18 (#2014) @renovate[bot]
- 63e9069 chore(deps): update dependency verify.xunit to v30 (#1987) @renovate[bot]
- 8a48c63 chore(deps): update dependency publicapigenerator to 11.4.6 (#1985) @renovate[bot]
- 9c59d98 chore(deps): update dependency newtonsoft.json to 13.0.4 (#2011) @renovate[bot]
- 2278e97 chore(deps): update dependency system.reactive to 6.0.2 (#2009) @renovate[bot]
- 1199c62 chore(deps): update dependency nerdbank.gitversioning to 3.8.118 (#2013) @renovate[bot]
- 02fd5a2 chore(deps): update dependency microsoft.visualstudio.threading.analyzers to 17.14.15 (#1991) @renovate[bot]
- 8cb6f75 chore(deps): update dependency verify.xunit to 27.1.0 (#1908) @renovate[bot]
- 5aff94c chore(deps): update dependency xunit.runner.visualstudio to 3.1.1 (#1988) @renovate[bot]
- 673db39 chore(deps): update dependency serilog to 4.3.0 (#1992) @renovate[bot]
📌 Other
- 8257b37 Add the ability to register Refit clients as keyed services (#1981) @fubar-coder
- 770ad61 Quote types in README.md (#2026) @TimothyMakkison
- 448faa0 typo:
WellKnownTYpestoWellKnownTypes(#1977) @ChrisPulman @TimothyMakkison - f599693 Correct the wrong example about JSON source generator in the readme (#1983) @ChrisPulman @KodamaSakuno
- 769e952 Add AOT and trimming support for .NET 10+ (#2018) @ChrisPulman
- acd0af6 Proposal: Add a
TreatAsStringfield toQueryAttribute(#1943) @mark-pro - 8eb13ef rename: sampleUsngLocalApi to SampleUsingLocalApi (#1999) @ChrisPulman @rdeveen
🔗 Full Changelog: 8.0.0...9.0.2
🙌 Contributions
🌱 New contributors since the last release: @AldeRoberge, @DavidGarton8, @derekm, @fubar-coder, @KodamaSakuno, @Krzysztof318, @mark-pro, @rdeveen
💖 Thanks to all the contributors: @AldeRoberge, @ChrisPulman, @DavidGarton8, @derekm, @fubar-coder, @Glenn, @glennawatson, @KodamaSakuno, @Krzysztof318, @mark-pro, @rdeveen, @TimothyMakkison
🤖 Automated services that contributed: @renovate[bot]
7.2.22
Fixes:
- Fix to 7.2.22 16a5754 @glennawatson
- Fix version 4185be3 @glennawatson
- Fix for CRLF injection vulnerability (#1834) 155153e @ChrisPulman
- chore: update nuget package versions 155153e @glennawatson
8.0.0
Features
- ebc7954 feat: add parameter substitution tests (#1896) @ChrisPulman @TimothyMakkison
- 0ba7394 feat: add
UniqueNameBuilder(#1894) @TimothyMakkison - c1d7aa1 feat: add more incremental tests (#1871) @TimothyMakkison
- 606a6c6 feat: added nullable and parameter tests (#1863) @ChrisPulman @TimothyMakkison
- faa1f68 feat: added source gen tests for generic constraints (#1859) @TimothyMakkison
- 7e53d81 feat: fix invalid
unmanaged structconstraint generation (#1861) @ChrisPulman @TimothyMakkison - 93b4ee2 feat: add non refit method raises diagnostic test (#1860) @ChrisPulman @TimothyMakkison
- d03121d feat: add
IDisposabletest (#1855) @TimothyMakkison - 6de1dbb feat: change
IPerformanceServiceto returnHttpResponseMessage(#1893) @TimothyMakkison - 27b436c feat: added larger benchmark (#1848) @ChrisPulman @TimothyMakkison
- 7ea950a feat: add
ReflectionTestsforIUrlParameterFormatter(#1888) @TimothyMakkison - a831dac feat: add
ShouldNotEmitFilestest (#1843) @TimothyMakkison - 56d7bcd feat: generate code for derived non refit methods and update tests. (#1875) @TimothyMakkison
- f2ab216 feat: add incremental generator tests (#1829) @ChrisPulman @TimothyMakkison
- a01cb84 feat: add
RestServiceExceptions(#1886) @TimothyMakkison - 396c2bf feat: added default interface method tests (#1881) @TimothyMakkison
- c72fa3a feat: upgrade roslyn 4.0 to 4.1 (#1828) @ChrisPulman @TimothyMakkison
- b32c305 feat: added derived type argument tests (#1883) @TimothyMakkison
- 26cfb28 feat: add incremental generator (#1864) @TimothyMakkison
Refactoring
- 1869ca6 refactor: move diagnostics to dedicated class (#1842) @ChrisPulman @TimothyMakkison
Fixes
- 84d226f Fix for unused reference System.Net.Http (#1830) @ChrisPulman
- 040ecc6 Fix some typos in the codebase (#1852) @ChrisPulman @mithileshz
- 483b1d8 Fix for CRLF injection vulnerability (#1834) @ChrisPulman
General Changes
- 057ba9e Housekeeping fix some of the code analyser warnings (#1869) @ChrisPulman
- b6f8eeb chore: added generic constrained method tests (#1868) @TimothyMakkison
- f7f9c00 Housekeeping fix some of the code analyser warnings (#1866) @ChrisPulman
- 418092e Housekeeping Update Version for release @ChrisPulman
- 9b19657 Housekeeping Fix API Tests (#1865) @ChrisPulman
- 2c2e596 Housekeeping Update build (#1835) @ChrisPulman
- 30664b6 chore: update to
Microsoft.CodeAnalysis.CSharpto4.1.0(#1857) @ChrisPulman @TimothyMakkison - 6cb59cf chore: target correct StubGenerator (#1847) @ChrisPulman @TimothyMakkison
- 2978e37 Update release.yml (#1839) @ChrisPulman
- 5df30d9 chore: upgrade
Verify.SourceGeneratorsand update tests (#1874) @ChrisPulman @TimothyMakkison
Dependencies
- 8861dec chore(deps): update dependency microsoft.codeanalysis.csharp.workspaces to 4.12.0-3.24476.2 (#1849) @renovate[bot]
- 2d2169c chore(deps): update dependency verify.xunit to v27 (#1890) @ChrisPulman @renovate[bot]
- 440e236 chore(deps): update dependency xunit to 2.9.1 (#1858) @renovate[bot]
- 1183b0d chore(deps): update dependency verify.xunit to 26.4.2 (#1827) @renovate[bot]
- 8b915fa chore(deps): update dependency verify.xunit to 26.6.0 (#1854) @renovate[bot]
- 58992b0 chore(deps): update dotnet monorepo (#1836) @renovate[bot]
- ef9b830 chore(deps): update dependency system.text.json to 8.0.5 [security] (#1873) @renovate[bot]
- 48d1256 chore(deps): update dependency xunit to 2.9.2 (#1870) @renovate[bot]
- 9619841 chore(deps): update dependency nerdbank.gitversioning to 3.6.146 (#1895) @renovate[bot]
- 10bd63a chore(deps): update dependency serilog to 4.0.2 (#1872) @renovate[bot]
- f7feafc chore(deps): update dependency verify.diffplex to 3.1.2 (#1887) @renovate[bot]
- 9c4dbc3 chore(deps): update dependency verify.sourcegenerators to 2.4.2 (#1833) @renovate[bot]
- 704ee4c chore(deps): update dependency microsoft.codeanalysis.csharp.workspaces to 4.12.0-3.24463.9 (#1838) @renovate[bot]
- 2b8fca6 chore(deps): update dependency microsoft.codeanalysis.csharp.workspaces to 4.12.0-3.24466.4 (#1845) @ChrisPulman @renovate[bot]
- fd0dd65 chore(deps): update dependency verify.xunit to 26.4.5 (#1841) @renovate[bot]
- b8bb6cf chore(deps): update dependency verify.sourcegenerators to 2.4.3 (#1840) @renovate[bot]
- ecb325d chore(deps): update dependency verify.xunit to 26.4.4 (#1831) @renovate[bot]
- 30f41ac chore(deps): update dependency refit to 7.2.1 (#1844) @renovate[bot]
- f02e004 chore(deps): update dotnet monorepo (#1867) @renovate[bot]
- 24e0444 chore(deps): update dependency serilog to 4.1.0 (#1899) @renovate[bot]
- 101afad chore(deps): update dependency verify.xunit to 26.5.0 (#1851) @renovate[bot]
Contributions
New contributors since the last release: @mithileshz, @ted-ccm, @teddyassefa
Thanks to all the contributors: @ChrisPulman, @marcominerva, @mithileshz, @sguryev, @ted-ccm, @teddyassefa, @TimothyMakkison
The following automated services have also contributed to this release: @renovate[bot]
7.2.1
What's Changed
- chore(deps): update dependency microsoft.codeanalysis.csharp.workspaces to 4.12.0-3.24456.2 by @renovate in #1810
- chore: rename tests add derived interface test by @TimothyMakkison in #1816
- Remove Dependency System.Net.Http.Json from Net 6+ by @ChrisPulman in #1818
- feat: revert 29e0e1c by @TimothyMakkison in #1819
- Housekeeping Update Version by @ChrisPulman in #1821
Full Changelog: 7.2.0...7.2.1