mulesoft / api-console

An interactive REST console based on RAML/OAS files
Other
911 stars 236 forks source link

RAML from URL doesn't work #50

Closed danielb2 closed 4 years ago

danielb2 commented 10 years ago

I put up a copy of this project on heroku today to demonstrate the issue:

http://raml.herokuapp.com/

If I put in https://raw.githubusercontent.com/kevinrenskers/raml2html/master/example.raml

The URL, it does not work. I've also tried using http://pastie.org with raw content and it also fails.

Furthermore, it would be nice if something like: http://raml.herokuapp.com/?raml_location=https://raw.githubusercontent.com/kevinrenskers/raml2html/master/example.raml

Actually worked so I could share a link to documentation with people directly.

dmartinezg commented 10 years ago

hi @danielb2 that is a CORS issue, you can check my explanation here and test that CORS is disabled here

As for your second question, the parameter name is raml: http://raml.herokuapp.com/?raml=https://raw.githubusercontent.com/kevinrenskers/raml2html/master/example.raml

danielb2 commented 10 years ago

Hm, maybe the error message could be a bit nicer at least?

dmartinezg commented 10 years ago

What? You mean check that the server is up and that CORS is enabled is not clear enough? :wink:

Actually, the api-console project is really the <raml-console with-root-documentation></raml-console> directive.

index.html is a sample implementation of how you can embed it in an application, it is not meant to be used as a debugging/designing environment, thats what the designer is for, or as a hosting environment, you should write that one.

The URL and the RAML fields were put in there to help in developing the console itself.

danielb2 commented 10 years ago

Well, frankly when I first look at RAML I dismissed it because the main point of value for me was no tool to actually make documentation for me, which is, for me, the project's biggest charm. How else do you share the design? The spec is too noisy just for someone to easily look at and understand it. It requires effort.

The project has come a long way since, and I thought this tool was going to be perfect to share design with. But, it's too clunky to ask someone to copy and paste code into it only to have it not persist. All it really needs is a way to save state so it can be shared. The other alternative, the one I assumed would be the first to be ready, html generation, isn't completely done either. So I've made two commits on code this weekend to help it along.

And if I didn't bore you with all that. The message, while clear when read, is such a jumble and not presented in an expected fashion, that I wasn't sure if it was even expected. If it were just styled up and didn't look like something which didn't even belong there, then I probably, while still undesired, be more inclined to believe it. I still don't want to believe it. This is an awesome tool when it actually works. I think all of this is fantastic. Just has a little further to go before it's going to so way much more awesome.

clonq commented 9 years ago

Feeding the console from the url e.g. ?raml=/examples/simple.raml seems to be very slow. I takes over 5 seconds on my machine before anything shows up. Is that a known issue?

jcenturion commented 9 years ago

@clonq: Are you using the latest version? which browser? version?

Thanks in advance.

jarrodek commented 4 years ago

API Console version 3 is no longer supported. We are at version 6 right now. Please, upgrade your version of the console to have latest updates.

danielb2 commented 4 years ago

When I filed the ticket 6 (!!!) years ago, version 6 wasn't available 😉

jarrodek commented 4 years ago

I know. I wasn't working on this project either :) I am cleaning up stale issues. Apologies.