Open TylerLeonhardt opened 5 years ago
await onOk(_response,null /* deserializeFromResponse doesn't support '-none-' /Users/tyler/.autorest/@microsoft.azure_autorest.csharp-v2@2.0.227/node_modules/@microsoft.azure/autorest.csharp-v2/dist/schema/string.js*/);
null is passed into onOk
it seems... I changed that to:
await onOk(_response,_response.Content.ReadAsStringAsync());
and the cmdlet worked as expected.
We don't currently handle response content type text/html
. Probably will handle that when I get back to finishing streams.
I also get this with text/plain
. Is that in the same boat?
Yes, given that we don't have content handling for anything other than JSON at the moment.
The serializer stuff is 'pluggable', but not fully complete yet.
Thanks for the info! I'm giving a talk today on AutoRest.powershell in Seattle and I'll be sure to call out that caveat.
Where Today?
This meetup downtown: https://www.meetup.com/Seattle-Web-App-Developers-Group/events/259603088/
Hello @TylerLeonhardt , @fearthecowboy , @markcowl
is it supported now? what do I do if API returns just a plain text?
@dolauli Do you have any status update on this item? There are a number of APIs in Graph that require us to send and receive non-json payloads.
I have the following openapi.yml:
Note, the
/
route (ignore the/api
route). It returns a:When I generate and run the command, I get an NullRef.:
Side issue... I expected the cmdlet name to be
Invoke-MtRainier
notInvoke-InvokeMtRainer
...FWIW, the
Get-MtRainier
cmdlet works with the output type of object.