Current documentation doesn't clearly specify that a leaf of type union can have one of several types. Currently, the types are listed, but are not clearly indicated as a union. Furthermore, some types are not documented correctly (e.g. identities). Here's an example:

http://ydk.cisco.com/0.6.2/py/docs/gen_doc_7759527929f92eef2f6b4cdf8c9fee355e0d28bf.html#ydk.models.openconfig.openconfig_routing_policy.RoutingPolicy.DefinedSets.BgpDefinedSets.CommunitySets.CommunitySet.Config
Note that in this particular case, the leaf is not only a union, but one of the member of the union is a union itself. So the documentation should be able to either flatten the type options or clearly indicate the hierarchy of types possible.
Current documentation doesn't clearly specify that a leaf of type union can have one of several types. Currently, the types are listed, but are not clearly indicated as a union. Furthermore, some types are not documented correctly (e.g. identities). Here's an example:
http://ydk.cisco.com/0.6.2/py/docs/gen_doc_7759527929f92eef2f6b4cdf8c9fee355e0d28bf.html#ydk.models.openconfig.openconfig_routing_policy.RoutingPolicy.DefinedSets.BgpDefinedSets.CommunitySets.CommunitySet.Config
Note that in this particular case, the leaf is not only a union, but one of the member of the union is a union itself. So the documentation should be able to either flatten the type options or clearly indicate the hierarchy of types possible.