Closed fredgan closed 3 years ago
Sorry, it's outdated docs... I've modified a while back so that you can still assign arbitrary properties to a schema evaluated object. Those assigned properties won't be schema validated (since the arbitrary properties will not have a schema expression for them) but it won't prevent the assignment.
Also, I had at some point removed support for passing in a schema string as part of .extends()
. You now need to be more explicit:
schema.extends(Yang.parse('leaf b;'))
I can't recall why I removed support for directly extending schema with a string statement... let me see if I can restore that functionality.
published as 0.24.46 along with update to TUTORIAL.md
Hi Peter @sekur,
I find that schema extension does not work as described in the TUTORIAL.md. example:
the actual result:
As it showed above, the result didn't return undefined.
Besides, another example
the results throw an error.
Is it the expected behavior, or a user error?