   create_directory: (mappings, constructors) ->
     for name, mapping of mappings
       do (name, mapping) =>
-        {url, path, template} = mapping
-        # TODO: use a JSON schema for this sort of thing
-        if !(url || path || template)
+        {url, query} = mapping
+        if !(url || query)
           throw new Error "Mapping lacks a url, path, or template field"
-        if constructor = constructors[mapping.resource]
-          if mapping.url && !mapping.query
-            # The API has provided a URL for this resource, so we do not have to
-            # generate it.  This is the expected case for directories coming
-            # from a Patchboard Server.
-            url = mapping.url
-            @resources[name] = new constructor(null, url: url)
-
-          else if mapping.path && !mapping.query
-            url = @generate_url(mapping)
-            @resources[name] = new constructor(null, url: url)
-          else
-            @resources[name] = (params={}) ->
-              new constructor(params)
+        if constructor = constructors[name]
+          if mapping.url
+            if mapping.query
+              @resources[name] = (params={}) ->
+                new constructor(params)
+            else
+              @resources[name] = new constructor(null, url: mapping.url)
         else
           throw new Error "No constructor for '#{name}'"
 

  generate_url: (mapping, params) ->
    url = @api.service_url
    if template = mapping.template
      parts = template.split("/")
      out = []
      for part in parts

          out.push(part)
      path = out.join("/")
    else if mapping.path
      # Ditto above comment.
      path = mapping.path
    else if mapping.url
      url = mapping.url
