Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

Working example of ... schemas: template !include example.json #27

Closed
BranchyMcBranchface opened this issue Jan 8, 2014 · 4 comments
Closed

Comments

@BranchyMcBranchface
Copy link

I've been working on a basic API with an included JSON schema file but I can't get the !include to work as expected.
I get an error in API Designer that says:
error: cannot fetch http://localhost:8080/schema/name.json, check that server is up and that CORS is enabled
I have attempted to enable CORS on the node.js server at port:8080 and even attempted to disable CORS blocking in Chrome. What am I missing? Is this a missing feature in API Designer?
Can someone provide a working example using !include ?

@usarid
Copy link
Contributor

usarid commented Jan 9, 2014

Jake, when you use Chrome's developer tools, and go to the network tab, do you see calls being made to http://localhost:8080/schema/name.json and failing? Can you attach whatever you're seeing in there, and anything from the JavaScript console too?

@BranchyMcBranchface
Copy link
Author

My static server at 8080 is up and responding 200's for existing files. I can also see from the console that API Designer is GETing the file and the server is responding 200.

@dmartinezg
Copy link

Hi @JakeHertenstein which designer are you using? If you are self hosting it, can you try using this branch of the api-designer? https://github.com/mulesoft/api-designer/tree/bugs/JSON-remote-includes-parsing-errors

I'm opening an issue for this in the api-designer and close this one: mulesoft/api-designer#163

@BranchyMcBranchface
Copy link
Author

Was using self hosted version: 518ab206799123806e1bdbd8bf4d7c499d01ce0e
Tried suggested branch and seems to have the same problem: 7ce3cf291123765a01a0089349f5e90634a1b76b

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

No branches or pull requests

3 participants