Document api types wrt validation

Part 3 in a series of changes towards data validation.
as above wrt to gofmt and indentation.