raml-java-parser-2 icon indicating copy to clipboard operation
raml-java-parser-2 copied to clipboard

Child resources don't contain traits from parent resources

Open aolenev opened this issue 10 years ago • 3 comments

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

aolenev avatar Dec 17 '15 13:12 aolenev

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

sichvoge avatar Dec 17 '15 15:12 sichvoge

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

aolenev avatar Dec 18 '15 09:12 aolenev

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

aolenev avatar Dec 18 '15 09:12 aolenev