Description
We are using version 2.0.11.
The YANG parser does not complain when you put a mandatory node in a default case in a choice (see the attached model). We saw this when we had a nested choice in a default case that was mandatory, but actually it is also the case if a default case contains directly a mandatory leaf.
According to the RFC this is not allowed. See section https://tools.ietf.org/html/rfc7950#section-7.9.3
pyang is giving an error on this:
example.yang:11: error: mandatory node in default case
example.yang:15: error: mandatory node in default case