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

Page Not Found error when trying to open an existent model from github. #208

Closed
cvgaviao opened this issue Dec 5, 2017 · 6 comments
Closed
Labels

Comments

@cvgaviao
Copy link

cvgaviao commented Dec 5, 2017

I'm trying to open an example from OpenApi spec that is hosted in github and I'm getting a Page Not Found error.

You attempted to navigate to a page that does not exist! I guess you should either hit the back button or go back to the Dashboard (button below).

The file is here: https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v3.0/callback-example.yaml

Tried to open an example from apicurio repository and it worked: https://github.com/Apicurio/apicurio-studio/blob/master/back-end/hub-api/src/test/resources/io/apicurio/hub/api/beans/simple-api-3.0.json
would be the type of the file, json vs yaml ?

@EricWittmann
Copy link
Member

Hi thanks for the feedback. Unfortunately right now Apicurio doesn't support reading/writing YAML (as you have discovered). There is a feature request in for that here:

#165

It's not difficult to do but there are a few other enhancements ahead of that one in the queue. :)

As a workaround you could try converting from YAML to JSON, storing the result in GitHub, and then opening that. Annoying I know, but that would work until we can get additional features into apicurio.

@EricWittmann
Copy link
Member

Note: this is still a valid bug report because we need better error messages when Adding/Importing an API. If the resource cannot be found (e.g. when importing from a URL) then we should report that (not report a "Page Not Found" error). If the resource exists but is an incorrect format, we should report that differently.

@david4096
Copy link

david4096 commented Dec 20, 2017

@EricWittmann
Copy link
Member

Hi @david4096 - the first URL is failing because there really isn't any content at that URL. At least when I click on that link there's no file. In fact, there is no resources folder within src/test for that module:

https://github.com/Apicurio/apicurio-studio/tree/master/back-end/hub-api/src/test

However, there is obviously content at the second URL. The reason it's not working in Apicurio is that we unfortunately don't yet support pulling in content from branches (only master). This is clearly missing functionality, as it's not difficult to support branches.

That said, I think we're going in the direction of being able to Add/Import an API design from an arbitrary URL instead of from the various source control systems via their respective APIs (which is what we do now, purely as a holdover from when we more heavily leaned on those systems to store the data). I'll bump up the priority of the "import from URL" feature and have it included in the next version.

For now, what you can do as a workaround is store any APIs you want to Add/Import into the master branch of any github repository (perhaps create a repository for this purpose) and import from there.

@EricWittmann
Copy link
Member

I've added a ticket to support branches in source control:

#222

However I think that importing content from arbitrary URL will be a more useful feature, so I'll address that first.

@david4096
Copy link

Hi @EricWittmann thanks for the explanation!

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

No branches or pull requests

3 participants