jdiegodcp / ramlfications

Python parser for RAML
https://ramlfications.readthedocs.org
Apache License 2.0
234 stars 50 forks source link

raml: preserve tree structure in parsed nodes #99

Closed buhman closed 1 year ago

buhman commented 8 years ago

The idea is to be able to traverse nodes in the same tree structure as the source raml, in addition to the flat resources list. A new children attribute is added to RootNode and ResourceNode to accomplish this, and populated during create_resources.

This also changes the parent node of first-level resources from None to the root node--this is so that child/parent traversing can start from the root node, instead of some arbitrary resource.