module foo-multiple { yang-version 1; namespace "foo"; prefix foo; revision 2016-05-17 { description "test"; } container task-container { list task { key "task-id"; leaf task-id { type string; } leaf task-mandatory-leaf { type string; mandatory true; } container task-data { presence "Task data"; leaf mandatory-data { type string; mandatory true; } leaf other-data { type string; } container non-presence-container { container presence-container { presence "presence container"; leaf mandatory-leaf { mandatory true; type string; } } container non-presence-container-2 { leaf mandatory-leaf-2 { mandatory true; type string; } } container presence-container-2 { presence "presence container"; leaf mandatory-leaf-3 { mandatory true; type string; } } } } } } }