OpenApi: Add missing required elements to JSON
This commit adds missing mandatory nodes to the required
field of the JSON OpenApi data. According to RFC-7950, a node
is mandatory if it is:
A leaf, choice, anydata, or anyxml node with a "mandatory"
statement with the value "true".
See:
https://www.rfc-editor.org/rfc/rfc7950#page-14
The only exception for this patch is the 'choice' node.
If the 'choice' node is mandatory, we cannot require the
'choice' or 'case' name in the body.
Additionally, nodes inside the 'case' should only be required
if they are mandatory.
JIRA: NETCONF-976
Change-Id: I3d1220737a582b27163a9ff8f33ceee1edb94c87
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>