fix issue: when there are no direct properties for a class, Api fails