raml-org / raml-js-parser

(deprecated) A RAML parser based on PyYAML written in CoffeScript and available for use as NodeJs module or in-browser.
195 stars 53 forks source link

object2raml #167

Closed JaniszM closed 8 years ago

JaniszM commented 8 years ago

How can I parse loaded raml file again into raml file?

I did ramlParser.loadFile(raml).then(function(data){...stuff...} and I changed raml file and now I want to convert it again into raml. How can I do this ? :)

dmartinezg commented 8 years ago

You can use this library:

https://github.com/mulesoft/raml-object-to-raml

It will only serialize, visible data, comments, will get lost, and it will probably export traits and resource types mixed in with the resources.

JaniszM commented 8 years ago

Looks like this not working at all. Among all file exported only:

#%RAML 0.8
title: changed
version: 1.0.0
baseUri: /v1
schemas: []

:D

Edit: Ok, this lib works in final :) But you need to pass as argument object from raml-js-parser. I gave him yaml before thats why it didn't work. So far I see this stuff don't move schemas :( Rest looks fine.