'no' behaviour in yang


I have seen a strange behavior of ‘no’

when i use : sw0(config-isns-vrf-forwarding-1)# no discovery-domain and press without entering any list values of discovery domain type, a random value of discover domain type will get deleted.

however after pressing after sw0(config-isns-vrf-forwarding-1)# no discovery-domain it asks for a discovery domain type value to be entered.

How to make it possible for ‘no’ to behave like latter even when we press instead of ???

By default, when you use the “no” command to delete a list without specifying the keys of the list, the entire list will be deleted. I am not sure what do you mean by random value is being deleted. It would help if you can provide your YANG model.