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 parsing of the response fails when the response is not json.
Subsequently responses of text/plain and text/csv throw an error, which is not returned, but remains uncaught.
Reproduction
Query an api endpoint which return text/*, like https://api64.ipify.org.
@drwpow is there a parse-as flag for the openapi-typescript CLI?
There’s not. It sounds like your server isn’t sending the right MIME types. The best solution is fixing that. But as a workaround you could write a short script that saves that file to a temporary local .json file and just running openapi-typescript locally.
Making the wrong “guess” of whether something is JSON or YAML is expensive and slows down everyone, hence that bit of code you referenced
Description
The parsing of the response fails when the response is not
json
.Subsequently responses of
text/plain
andtext/csv
throw an error, which is not returned, but remains uncaught.Reproduction
Query an api endpoint which return
text/*
, likehttps://api64.ipify.org
.Checklist
The text was updated successfully, but these errors were encountered: