These patches do a few things:

  * simplify how root entities are declared, and remove all the boilerplate
    *Collection classes
  * fix the names of some of the collections as they appear in the CEP to
    be in conformance with CIMI 1.0
  * use OrderedHash to make sure we send XML elements back in the right
    order

The last patch isn't entirely ready for prime time (well, it uncovers a
problem that existed before, but wasn't visible), as the server now
includes this in the CEP:

  <resourceMetadata href="http://localhost:3001/cimi/resource_metadata/:id"; />

IOW, the URL is for the 'show' operation, not for the 'index'
operation. The problem is that singular and plural of resource_metadata is
resource_metadata, which causes generate_url_helper_for in rabbit_helper to
define resource_metadata_url using the show operation, with no helper for
the index operation. That needs to be changed so that the helper generates
the index or show route depending on whether an argument is passed to the
helper or not, i.e., so that calling resource_metadata_url generates
/cimi/resource_metadata and calling resource_metadata_url(42) generates
/cimi/resource_metadata/42

David

Reply via email to