Hi all, I’m having a bit of grief with AnyPoint Studio. Here’s my story.
I’ve been using API Designer to model my APIs in RAML, then publishing the rendered RAML to my team using the AnyPoint Server an dAnyPoint Studio. I do this by creating an APIKit-enabled Mule project, and importing the RAML document I created in API Designer. Any time I need to update the RAML, I just make the updates in Designer, copy the contents of the editor window to the clipboard, open the RAML document in Studio, paste in the new content, and then export to a package that I upload to the server. Pretty straightforward, and working fine so far.
I have recently come across the wonderful concept of
!include in RAML and have adopted it in API Designer. I took my original RAML file which was over 2800 lines long and reduced it to under 1800 just be reduing the redundant stuff with !include. Great!
Now the problem. When I paste my happy new RAML into my existing project in Studio, it freaks out over every one of my !includes, saying that it can’t resolve the include. Now in Designer, I have created a folder called /includes and have put all my snippets in there. So naturally I thought that I should create a folder in my project in Studio under the folder where the parent RAML file is. I put the snippets into that folder and still nothing.
I’d chalk it up to being a noob, but the RAML spec itself says,
If a relative path is used for the included file, the path is interpreted relative to the location of the original (including) file.
I take this to mean that whatever is parsing my main RAML file must understand the relative path in the !include statement.
It looks to me like AnyPoint Studio is either unable to handle !includes (very unlikely I think) or I’m unable to find the secret sauce. If any one of you has conquered this challenge, please share.