Refactored YANG min/max validation code, created new clixon_validate_minmax.[ch]

Added new recursive minmax check for non-presence containers
This makes validation checks stricter, including check of incoming RPCs
Renamed xml_yang_check_list_unique_minmax() to xml_yang_minmax_recurse()
Fixed again: [YANG min-elements within non-presence container does not work](https://github.com/clicon/clixon/issues/355)
This commit is contained in:
Olof hagsand 2022-09-01 10:51:06 +02:00
parent c8bf718db8
commit 2eb9c6cda1
17 changed files with 867 additions and 614 deletions

View file

@ -881,6 +881,8 @@ xml_child_order(cxobj *xp,
* @param[in] xparent xml tree node whose children should be iterated
* @param[in] xprev previous child, or NULL on init
* @param[in] type matching type or -1 for any
* @retval xn Next XML node
* @retval NULL End of list
* @code
* cxobj *x = NULL;
* while ((x = xml_child_each(x_top, x, -1)) != NULL) {
@ -905,9 +907,7 @@ xml_child_order(cxobj *xp,
* xprev = x;
* }
* @endcode
#ifdef XML_EXPLICIT_INDEX
* @see xml_child_index_each
#endif XML_EXPLICIT_INDEX
*/
cxobj *
xml_child_each(cxobj *xparent,