Nathan originally brought this up in #87 . In a lot of the service methods, we are expecting all entities to be an iterator, and using entity_count to see if something is a single entity or a collection. However, this doesn't account for instances where, for instance, you request a collection but it only has a single entity. We make it an iterator as we should, but the caller thinks it's an entity, so it chokes.
Here, we set iterators in the parsers themselves, such that callers only need check if something is an iterator. We can then check that in the service methods to determine how to parse the object.
@FodT @Cawb07 this is a fairly comprehensive change, so I could use a couple of CRs to make sure I haven't overlooked anything. It passes unit tests and acceptance tests, but could use some real-world and edge-case testing.
Nathan originally brought this up in #87 . In a lot of the service methods, we are expecting all entities to be an iterator, and using entity_count to see if something is a single entity or a collection. However, this doesn't account for instances where, for instance, you request a collection but it only has a single entity. We make it an iterator as we should, but the caller thinks it's an entity, so it chokes.
Here, we set iterators in the parsers themselves, such that callers only need check if something is an iterator. We can then check that in the service methods to determine how to parse the object.
@FodT @Cawb07 this is a fairly comprehensive change, so I could use a couple of CRs to make sure I haven't overlooked anything. It passes unit tests and acceptance tests, but could use some real-world and edge-case testing.