-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception while getting simple string from Web API #196
Comments
Workaround here will be to modify server to return JSON It can be done using [<ApiController>]
type YatpApiController() =
inherit ControllerBase()
[<HttpGet("version"); Produces(MediaTypes.ApplicationJson)>]
member __.Get() = "0.0" another option here is to inherit from provided client and override member Deserialize, basically do nothing with response instead of default behavior |
* feat: add tests that repro #196 * feat: add Accept header
Fixed in v2.0.0-beta3 by adding |
Description
Failure when calling a simple string returning GET call
Repro steps
Schema
Expected behavior
the value "0.0" should be returned and then printed
Actual behavior
An exception is raised in the client.GetVersion().Result line
One or more errors occurred. (The JSON value could not be converted to System.String. Path: $ | LineNumber: 0 | BytePositionInLine: 3.)
Known workarounds
None
Affected Type Providers
Related information
NOTE: C# client generated with NSwag or Visual Studio works as expected
The text was updated successfully, but these errors were encountered: