     ;; Missing this stuff?  Make it anonymous.
     (or (nil? schema-name) (nil? schema-ns))
     ;; The challenge here is nested schemas that may have names. Currently that will blow up.
-    [swagger-object {:schema (map->swagger-schema swagger-options schema)}]
-
+    (let [[so' new-schema] (map->swagger-schema swagger-options swagger-object schema)]
+      [so' {:schema new-schema}])
 
     ;; Avoid forward slash in the swagger name, as that's problematic.
     [swagger-name (str schema-ns \: schema-name)

    (some? swagger-schema)
    [swagger-object swagger-reference]

    [new-schema (map->swagger-schema swagger-options schema)
     swagger-object' (assoc-in swagger-object [:definitions swagger-name] new-schema)]

    :else
    [swagger-object' swagger-reference]))

(defn default-body-params-injector
  "Uses the :body-schema metadata to identify the body params."

                      :else
                      (t/track
                        #(format "Describing query parameter `%s'." (name k))
                        (let [[swagger-object' schema-description] (simple->swagger-schema swagger-options so key-schema)
                              full-description (assoc schema-description
                                                 :name k
                                                 :in :query
                                                 :required required)]
                          (update-in swagger-object' params-key
                                     conj full-description)))))]
      (reduce reducer swagger-object schema))
    ; no :query-schema
    swagger-object))

(defn map->swagger-schema
  [swagger-options swagger-object schema]
  (let [reducer (fn [[swagger-object' o :as acc] [schema-key schema-value]]
                  (if (= s/Any schema-value)
                    acc
                    (let [[k required?] (reduce-schema-key schema-key)]
                      (t/track
                        #(format "Describing key `%s'." (name k))
                        (let [[swagger-object'2 swagger-schema] (simple->swagger-schema swagger-options swagger-object' schema-value)]
                          [swagger-object'2 (cond-> (assoc-in o [:properties k] swagger-schema)
                                                    required? (update-in [:required] conj k))])))))
        base (remove-nil-vals {:description (-> (or (-> schema meta :description)
                                                    (-> schema meta :doc)))})]
    (reduce reducer [swagger-object base] schema)))

(defn ->swagger-schema
  "Converts a Prismatic schema to a Swagger schema (or possibly, a \"$ref\" map pointing to a schema). A $ref
