Using external libraries referenced from a URL


#1

I have a very large team distributed globally developing a REST based cloud application. To make things more consistent, I have created a number of common types to be used by all teams. I have put these files on our internal web server for developers to reference and link to. The problem we are having is that we cannot find a way to get API Workbench to resolve a reference using the URL. For example

uses:
common-types: http://someserver.com/raml/common-types.raml

Does the spec support referencing libraries that are not local to the folder structure? If not, then I will have to find a way (possibly using git sub-modules) to have every team pull these down locally. This will work, but is not optimal.


#2

I’ve come across the exact same issue. Did you find a solution?


#3

This should work @tamm0r. Are you seeing a different behaviour?


#4

I try to include an (intranet-internal) library similar to the following:

uses:
  myLib: http://internalhost/myLib.raml

API Workbench complains with the following message:

Can not resolve library from path: 'http://internalhost/myLib.raml'

The same RAML file works fine with raml2html though and the library is correctly resolved.


#5

Maybe an issue with CORS. You can always file an issue on the repos since it should work :slight_smile: