correct schema creation for nested objects