String responses are not passed to Response Deserializer
- Dominant language
- C#
- Stars
- 1.1k
- Forks
- 114
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm finding that if a route has a return type as string, the http content from the response is directly passed back instead of being first sent to the deserializer. It might be a saving but it's wrong in the case of custom deserializers.
I use restease exclusively with a protobuf-net serializer and this causes a rather unexpected gotcha as you can imagine. As i get the protobuf message directly interpreted as a string...
Let me know if that makes sense? Can dig around and make the PR if it helps. Thanks.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the response-handling path and its deserializer selection logic in the RestEase codebase. Reproduce a route returning a string with a custom protobuf-net deserializer, then add a regression test showing that the response content is deserialized before it is returned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100