[YANGTOOLS-835] Invert statement enforcement Created: 15/Nov/17  Updated: 03/Aug/18

Status: Open
Project: yangtools
Component/s: parser
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Medium
Reporter: Robert Varga Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: backlog
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Our current validator logic relies on parent statements being aware of their possible children. This does not really work as it requires knowledge of all statements – which is not possible due to YANG being an extensible language.

Substatement validation needs to occur the other way around: children should check whether they are defined underneath correct parent. We already do this sort of check in StatementSupport.onStatementAdded() – which is completely satisfactory, except we need to make it much more friendly (for example by providing a default implementation, which checks if parent's StatementDefinition is in a set.


Generated at Wed Feb 07 20:54:26 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.