Cannot successfully run queries through SmartAPI editor or registration page
This is not urgent.
For CTD API (just registered https://smart-api.info/registry?q=0212611d1c670f9107baf00b77f0889a), when I "try an example" query, I get TypeError: NetworkError when attempting to fetch resource. This also happens if I copy the SmartAPI yaml into the Editor.
However, the uptime-checking with those same example values seems to be successful. I can run the same query successfully in Postman, the browser, and through BTE (testing on a local instance). With the browser, I get prompted to download the response as a file.
I'm wondering if this is related to the setup of the SmartAPI Editor/UI (references: https://github.com/swagger-api/swagger-editor/issues/1861 and https://github.com/swagger-api/swagger-ui/issues/5750).
Other notes I took
- I think the CTD API is returning responses as files and Postman is unpacking / displaying those files. I therefore tried to represent this in the endpoint spec using this OpenAPI reference and these links on media-types.
- I don't know whether this behavior can be changed by providing different headers in the request
- I notice response-headers that I'm not used to (see screenshot below). I'm not sure how to add them to the endpoint spec, and whether that will help.
Came across while reviewing a potential uptime-checking issue https://github.com/biothings/BioThings_Explorer_TRAPI/issues/558#issuecomment-1459097534
This is a CORS related issue :(