                 :let [selected-properties (concat required-properties
                                                   (subvec optional-properties
                                                           0 num-optional-fields))
+                      ;; Check for dependencies, remove properties that lack their dependencies
+                      selected-properties (if (not (empty? dependencies))
+                                            (remove #(lacks-dependency? % dependencies selected-properties)
+                                                    selected-properties)
+                                            selected-properties)
                       ;; Create a map of property names to generators
                       selected-prop-gens (select-keys prop-gens selected-properties)]
                 ;; Generate a hash map containing the properties

        properties (if (= 0 (rand-int 2))
                     (dissoc properties :ComposedOf)
                     properties)

        ;; Create a map of property keys to generators for those properties
        prop-gens (into {} (for [[k subtype] properties]
                             [k (schema-type->generator schema nil subtype)]))

           gen/one-of)
      (object-like-schema-type->generator
       schema type-name
       (select-keys schema-type [:properties :required :additionalProperties :dependencies])))))

(defmethod schema-type->generator "oneOf"
  [schema type-name schema-type]
