[NETCONF-1171] OpenAPI Generates Incorrect 'min-elements' for XML Leaf-List Created: 02/Oct/23  Updated: 31/Oct/23  Resolved: 31/Oct/23

Status: Resolved
Project: netconf
Component/s: restconf-openapi
Affects Version/s: None
Fix Version/s: 7.0.0, 4.0.9, 6.0.5, 5.0.10

Type: Bug Priority: Medium
Reporter: Peter Suna Assignee: Ľuboš Čičut
Resolution: Done Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screenshot 2023-10-02 204104.png     PNG File Screenshot 2023-10-02 204114.png    

 Description   

OpenAPI generates the required number of elements only for JSON example requests, while the XML example contains only one element.

Generated examples for this model are attached.

module test-container-childs {
    namespace "http://example.com/test/container/child";
    prefix "tcc";
    revision 2023-09-28;
    
    container root-leaf-list-container {
        container nested-leaf-list-container {
            leaf-list leaf-list-with-min-elements {
                min-elements 2;
                max-elements 3;
                type string;
            }
        }    
    }
} 

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