2

I would like to know if there are any publicly available APIs documented with RAML.

I have these 2 which are working fine:

https://raw.githubusercontent.com/raml-org/raml-tutorial-200/step8/jukebox-api.raml

http://api-portal.anypoint.mulesoft.com/onpositive/api/gmail-raml-api/gmail.raml

These 3 are not working for some reason:

http://api.apihub.com/onpositive/api/espn-raml-api/espn.raml >> stackoverflow question

http://api-portal.anypoint.mulesoft.com/github/api/github-api-v3/github-api-v3.raml

http://api-portal.anypoint.mulesoft.com/instagram/api/instagram-api/instagram-api.raml

Can someone help me?

agm1984
  • 15,500
  • 6
  • 89
  • 113
tk_
  • 16,415
  • 8
  • 80
  • 90
  • Do you mean that you want some public examples of RAML files? And what do you mean by "not working"? – cybersam Sep 19 '15 at 00:48
  • In the java parser validation those 3 are failing. – tk_ Sep 19 '15 at 02:47
  • Not sure what you're trying to achieve here. If you're concerned with an issue in the parser, ask a new question with the violations received so we can discuss what's happening. – David Dossot Sep 19 '15 at 17:50
  • Im just creating rest service metadata xml by reading raml. While doing that I uncounted some problems. Please find below question http://stackoverflow.com/questions/32570593/raml-validator-throws-an-error-in-javax-xml-validation-schemafactory-newschema – tk_ Sep 21 '15 at 17:08

2 Answers2

1

Some valid RAML specs I know of:

David Dossot
  • 33,403
  • 4
  • 38
  • 72
  • Hi David, 2nd one looks fine and validation passes successfully. but the 2nd one gives me "mapping values are not allowed here" error. why is that?? Thanks, – tk_ Sep 21 '15 at 17:15
  • Both are used in production and consumed by tools like RAML Tester and API Console so this is strange. Anyway, I'm unclear about what you report: is it the first one of the second one that gives this error? – David Dossot Sep 21 '15 at 19:32
  • sorry for the typo, My above comment should corrected like this >>>> 2nd one looks fine and validation passes successfully. but the 1st one(api_v1.raml) gives me "mapping values are not allowed here" error. why is that?? Thanks, – tk_ Sep 23 '15 at 18:39
  • OK, and where is "here" as reported in the exception? This is maybe due to the templated `baseUri`. – David Dossot Sep 23 '15 at 19:31
  • looks like I'm getting that validation error for all the ramls that are hosted in github, Here is a another one with the same error >> http://postimg.org/image/4wresdq6b/ – tk_ Sep 23 '15 at 20:43
  • 1
    Of course, you're trying to validate the HTML page from Github. You need to load the raw content, like from here: https://raw.githubusercontent.com/openanalytics/RPooli/master/webapp/src/main/webapp/raml/api_v1.raml – David Dossot Sep 23 '15 at 22:47
  • that was the issue! thanks! I have one other question in api_v1.raml the baseURI is "${baseUri}/api/{version}" I cant find the value for the {baseUri}.. – tk_ Sep 23 '15 at 23:19
  • 1
    It's dynamically injected when the RAML spec is served over HTTP: https://github.com/openanalytics/RPooli/blob/master/webapp/src/main/java/eu/openanalytics/rpooli/web/BaseUriInjectionFilter.java#L44 – David Dossot Sep 24 '15 at 02:08
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/90554/discussion-between-thusharak-and-david-dossot). – tk_ Sep 24 '15 at 17:58
1

There are also some valid RAMLs here https://github.com/mulesoft/api-console/tree/master/dist/examples

christian.vogel
  • 2,117
  • 18
  • 22
  • Only https://raw.githubusercontent.com/mulesoft/api-console/master/dist/examples/stripe.raml is working for me. Are you sure these should work out of the box? – tk_ Sep 23 '15 at 23:21
  • Yep, you need to use the raw version - otherwise it's not working. – christian.vogel Oct 05 '15 at 15:37