Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot successfully run queries through SmartAPI editor or registration page #187

Open
colleenXu opened this issue Mar 14, 2023 · 2 comments

Comments

@colleenXu
Copy link
Contributor

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: swagger-api/swagger-editor#1861 and swagger-api/swagger-ui#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.
    Screen Shot 2023-03-13 at 10 22 59 PM
@colleenXu
Copy link
Contributor Author

colleenXu commented Mar 14, 2023

Came across while reviewing a potential uptime-checking issue biothings/biothings_explorer#558 (comment)

@marcodarko
Copy link
Collaborator

This is a CORS related issue :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants