Assuming the I have justified scenario to build from some meta model again the Raml in-memory model structure in order to generate the flat raml file representation.
I have created very simple code to render me the raml content
final Raml raml = .... load here RAML file via RamlDocumentBuilder final DumperOptions options = new DumperOptions(); final Yaml yaml = new Yaml(options); final String output = yaml.dump(raml); System.out.println("========"); System.out.println(output); System.out.println("========");
It looks like it generates ‘almost’ what i was expecting for e.g. (excuse the formatting issue)
I got the resources, actions attribute while I was expecting to have them anonymous
version : ... baseUri : ... resources : /somePath actions : get :
While i was rather expecting more like
version : .. baseUri : ... /somePath: get :
I know that I can deal low level with putting into model plain Maps (with String as the Key), Lists - but isn’t there more object oriented solution.