raml-org / raml-js-parser-2

(deprecated)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inheritance not working

gc1508 opened this issue · comments

Hi there.

Have three types:
Action inherits from Link
Link inherits from Text
Text inherits from object

Text defines the base properties (text fields).
Link extends Text by adding two additional properties, uri and target.
Action extends Link by adding one additonal property, reference.

While debugging:

Text.properties exists and it's correctly defined;
Text.rawType.properties exists and it's correctly defined;
Link.properties shows just the Text properties.
Link.rawType exists but Link.rawType.properties doesnt
Action.properties shows just the Text properties;
Action.rawType exists but Action.rawType.properties doesnt.
So, basically, inheritance is not build up and types dont get properly extended.

Cheers,
G.

Hey, has anyone else experiencing issues on inheritance chaining?
Thanks,
Cheers,
G.

Hi @gc1508 !

It's not quite obvious, what is your way of extracting properties. Could you, please, post a reproduction snippet.

Regards, Konstantin

Closing for now as no answers. Feel free to provide more information and re-open if this is still relevant.

Also note that raml-js-parser-2 has been deprecated, the new official parser is webapi-parser. Feel free to attempt to reproduce this issue with webapi-parser and report any issue you may have on that repository.