mulesoft-labs / raml-generator

Generate files from a RAML document and Handlebars templates
Other
31 stars 11 forks source link

Update to latest RAML 1.0 #18

Open kevinduffey opened 7 years ago

kevinduffey commented 7 years ago

I see the last update was several months ago to over a year ago. It is not clear if this now supports the latest RAML 1.0 completely or not? Can I parse any RAML 1.0 document, including those with libraries, extensions and more? If not, what will it take to update this project to support RAML 1.0 completely?

sichvoge commented 7 years ago

We will come back to this soon. No worries ;) In the meantime, any contribution is very welcome of course. Since that project only parses and handles the generation, you would only need to update the parser afaik. But would need to do some testing of course.

kevinduffey commented 7 years ago

So, I see it was updated to RAML 1.0 AST, but I am not quite clear if that means it supports the ability to fully parse RAML 1.0, including annotations, types, includes, etc.. giving the user of this tool the ability to fully support RAML 1.0 or only a subset of it?

sichvoge commented 7 years ago

What do you mean by "fully parse RAML 1.0"? It's using the official parser and this project does nothing more than creating all necessary functions for generating something based on your favorite templating framework on a given RAML input. The RAML input is the output of the parser.

kevinduffey commented 7 years ago

Well.. I was under the assumption that updates/fixes to the RAML 1.0 JS engine have been done in the past few months, and the last update shows RAML 1.0 AST. Maybe I am misunderstanding.. but I assumed for any additions/fixes to RAML 1.0 JS parser to be incorporated, there would be more recent updates to this project regarding those. I could totally be wrong.

What I mean by fully parse RAML 1.0 is that if I feed a fully baked RAML 1.0 set of files, including included files, RAML types, annotations, etc.. can I use this project to get at the entire RAML 1.0 structure... can I set up templating (e.g. via Handlebars) to access the list of uses.. files, which if they are RAML types, can I then access the details of each type.. e.g. is it a String or Enum,, the name of it, any min/max properties, etc? Can I parse the annotation types, and then find them in the RAML file(s) and make use of them in my template?

In other words, can I essentially use this tool, as is, like I did in the past with RAML 0.8, to generate any sort of output utilzing the full RAML 1.0 spec (assuming the input files make up a valid RAML 1.0 document)

On Tue, Apr 11, 2017 at 10:30 PM, Christian Vogel notifications@github.com wrote:

What do you mean by "fully parse RAML 1.0"? It's using the official parser and this project does nothing more than creating all necessary functions for generating something based on your favorite templating framework on a given RAML input. The RAML input is the output of the parser.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mulesoft-labs/raml-generator/issues/18#issuecomment-293477845, or mute the thread https://github.com/notifications/unsubscribe-auth/ANJeg8UXk8RUiG4Hl0q9D1lpJ3gMGY0Gks5rvGFdgaJpZM4Mkvvg .

sichvoge commented 7 years ago

In short, yes.