[NETCONF-1172] OpenApi ignore min-elements conditions for list Created: 02/Oct/23 Updated: 03/Nov/23 Resolved: 03/Nov/23 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | restconf-openapi |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0 |
| Type: | Bug | Priority: | Medium |
| Reporter: | Peter Suna | Assignee: | Matej Šramčík |
| Resolution: | Done | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
OpenAPI generates an example for a list with only one element, even when the min-elements constraint is set. Generated example for this model is attached.
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 2;
max-elements 3;
key id;
leaf id {
type uint32;
}
}
}
}
}
Expected example payload:
{
"nested-container": {
"mandatory-list": [
{
"id": 0
},
{
"id": 1
}
]
}
}
|