fix for api note test - affects where schema does not define unique field

Change to api.php is important
The change to generic makes sense with some slight hesitation - as long as no test regression on it