title: Endpoint API method with List or Array Parameter
body: <p>I want to send array of object or list to app engine using endpoint API</p>
  
  <pre><code>@ApiMethod(name = "insertGroupMembers")
  public List&lt;GroupMembers&gt; insertGroupMembers(Collection&lt;GroupMembers&gt; members) {
      EntityManager mgr = getEntityManager();
      List&lt;GroupMembers&gt; listMembers = new ArrayList&lt;&gt;(); 
      try {
          for (GroupMembers groupMember : members) {
              mgr.persist(groupMember);
              listMembers.add(groupMember);
          }
  
      } finally {
          mgr.close();
  
      return listMembers;
  
  }
  </code></pre>
  
  <p>But it shows the error at the time generating api library as follows :-</p>
  
  <p>Description Resource    Path    Location    Type
  There was a problem generating the API metadata for your Cloud Endpoints classes: com.google.api.server.spi.config.validation.CollectionResourceException: groupmembersendpoint.com.appbell.tagalone.GroupMembersEndpoint.insertGroupMembers parameter (type java.util.Collection): Illegal parameter type ('class com.appbell.tagalone.GroupMembers' in collection type 'java.util.Collection').  Arrays or collections of entity types are not allowed. TagAlone-AppEngine      Unknown Google App Engine Cloud Endpoints Problem Marker</p>