Details
-
Bug
-
Status: Open
-
Medium
-
Resolution: Unresolved
-
11.0.2
-
None
-
None
Description
Currently, it is possible to create a list/leaf-list with min-elements and max-element violations if those elements are wrapped with a container in the payload.
For example in this model:
module test-container-childs {
namespace "http://example.com/test/container/child";
prefix "tcc";
revision 2023-09-28;
container root-container {
container nested-container {
list mandatory-list {
min-elements 1;
max-elements 3;
key id;
leaf id {
type uint32;
}
}
}
}
}
It is allowed to create 0 list resources or more than 3, if the list `mandatory-list` is wrapped with "nested-container" in the payload:
{
"nested-container": {
"mandatory-list": []
}
}
The same issue is present for the leaf-list element.
This issue was already reported before, and resolved:
https://jira.opendaylight.org/browse/YANGTOOLS-776