raml-org / raml-java-parser-2

Other
19 stars 5 forks source link

Child resources don't contain traits from parent resources #12

Open aolenev opened 8 years ago

aolenev commented 8 years ago

According to http://docs.raml.org/specs/1.0/#raml-10-spec-applying-resource-types-and-traits child resources should inherit traits (from "is" tag) from parent resources, but currently every resource contains just its own list of traits. Now users of RAML parsers should collect full list of traits manually in accordance with resources' inheritance and method Please comment whether is it bug or not, and if it's not - please write it explicitly in ReadMe.md

sichvoge commented 8 years ago

Can you point me to the section that is stating that?

aolenev commented 8 years ago

Sorry, my interpretation of provided example in this section was wrong and there is an inheritance just from resource type to resource

aolenev commented 8 years ago

And in this example "get" method should have its own 2 traits ('paged' and 'rateLimited') and 1 trait ('secured') which is common for all methods. Does it mean that if I call

method.is()

it should return all 3 traits? Now it returns just 2 traits