         (throw (IllegalArgumentException. (format "Catalog is missing keys: %s" (string/join ", " (map name missing-keys)))))))
     catalog))
 
-(def validate
+(defn validate
   "Function for validating v7- of the catalogs"
-  (comp validate-edges
-        validate-resources
-        #(s/validate catalog-wireformat-schema %)))
+  [catalog]
+  (->> catalog
+       (s/validate catalog-wireformat-schema)
+       validate-resources
+       validate-edges))
 
 ;; ## High-level parsing routines
 

      (dissoc :api_version)
      wire-v6->wire-v7))

(defn wire-v4->wire-v7 [catalog recieved-time]
  (-> catalog
      (assoc :producer_timestamp recieved-time)
      wire-v5->wire-v7))

(def ^:const valid-relationships

  [catalog :- catalog-query-schema]
  (-> catalog
      (dissoc :hash)
      (update :edges edges-expanded->wire-v7)
      (update :resources resources-expanded->wire-v7)))

(defn catalogs-query->wire-v7 [catalogs]
  (map catalog-query->wire-v7 catalogs))
