-
-
Notifications
You must be signed in to change notification settings - Fork 783
Support non-string round-tripping parameters #2046
Copy link
Copy link
Open
Labels
✨ enhancement🔗 area: url-routingURL building, path/query params, segments, collection formatURL building, path/query params, segments, collection format🟢 priority: lowNiche feature, edge case, or low-impact requestNiche feature, edge case, or low-impact request
Description
Metadata
Metadata
Assignees
Labels
✨ enhancement🔗 area: url-routingURL building, path/query params, segments, collection formatURL building, path/query params, segments, collection format🟢 priority: lowNiche feature, edge case, or low-impact requestNiche feature, edge case, or low-impact request
Type
Fields
Give feedbackNo fields configured for issues without a type.
Is your feature request related to a problem? Please describe.
I have several "string wrapper" record structs for which the value contains a
/which I would like to be part of the generated url. It seems from:https://github.com/reactiveui/refit/blob/main/Refit/RestMethodInfo.cs#L319-L324
that the only supported parameter type supporting the "Round-tripping"
**syntax is string.What I want is something like:
(either with or without the
**)Repositoryis a record struct that has a string in thesome/repoformat, that is with a/that I do not want to be url encoded.Describe the solution you'd like
I can see three solutions (maybe there are more).
RepositoryinRefitSettingsand have an explicit formatter associated with it.IUrlParameterFormatterto return the raw string somehow. Currently theIUrlParameterFormatteris not invoked when the parameter is part of the path.Describe alternatives you've considered
None
Describe suggestions on how to achieve the feature
None
Additional context
None