You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add option to not throw exception when route parameter does not have a matching argument. #1968
There might be another way to solve my problem, so if there is please advise. Currently I have a Blazor application with a WASM frontend and a server hosting with my API endpoints on the backend. Seeing as these are in the same VS solution, I have created a Endpoints class to maintain all of my base routes.
For example:
These base endpoints are then used as the base to defining my routes within Refit and the endpoints on the server. However, I would like to use Api Versioning which as far as I can tell, the route needs to have v1 replaced with v{version:apiVersion}. While this works for the serve routes, Refit complains about not having a matching parameter in its argument list.
If my approach is incorrect let me know. If this approach is valid, then it would be nice to be able to specify a setting in Refit that prevents the runtime from throwing when a parameter does not match in the argument list. This way I can replace the unused parameter myself inside a delegating handler.
Alternatively, it would also work if I could specify a parameter in the route, and have it replaced by an attribute, as opposed to an argument.
I think the easiest solution would be to add a setting to the RefitSettings, that prevents an exception from being thrown when not all parameters are matched.
Activity
github-actions commentedon Jul 8, 2026
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.