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
The generated function has correct signature: myFunc(arg: string).
However, fetcher.ts only handles objects and arrays. The string "foo" is this serialized as {"0":"f","1":o","2":"o"}
Is there any workaround atm?
The text was updated successfully, but these errors were encountered:
I don't think your spec is correct. It doesn't return application/json. It should be text/plain`.
The fetch function will return a type of unknown, which you can cast to a string. At least, that is what I am seeing. That isn't ideal, but you don't need the middleware.
@studiosciences it's requestBody specification, not responseBody specification. Also, it's not text/plain, it really is application/json - it is actually possible, although adimttedly unusual, to JSON serialize non-objects ('42' is valid JSON containing number 42, '"foo"' is valid JSON containing string "foo").
Relevant part of api.yml:
The generated function has correct signature: myFunc(arg: string).
However, fetcher.ts only handles objects and arrays. The string "foo" is this serialized as
{"0":"f","1":o","2":"o"}
Is there any workaround atm?
The text was updated successfully, but these errors were encountered: