AndrewWalsh / openapi-devtools

Browser extension that generates API specs for any app or website
https://chrome.google.com/webstore/detail/openapi-devtools/jelghndoknklgabjgaeppjhommkkmdii
MIT License
3.92k stars 72 forks source link

Check for valid JSON content in addition to mime type #8

Closed debakarr closed 11 months ago

debakarr commented 11 months ago

Some site like this: https://bmtcwebportal.amnex.com/commuter/dashboard does not have mime type set to JSON but they still have the content of API response as JSON.

Here I am additionally adding condition to validate in case the mime type is not JSON, we validate that the response body also is not JSON.

AndrewWalsh commented 11 months ago

Thanks for raising this PR @debakarr, good catch. I'll include this in the next release 👍 .