    :allowReserved
    :example])
 
-(defn transform-parameter-object [parameter-name parent-key data parameter-object-spec]
+
+(defn transform-parameter-object [parameter-name parent-key data parameter-object-spec spec-type]
   (if-let [ref (:$ref parameter-object-spec)]
     (-> data
         (update-in [:references] conj {:source-path parent-key :target-path ref}))
-    (let [key (str parent-key "/" parameter-name)
-          data (-> data
-                   (update-in [:swagger-object key] assoc :name (:name parameter-object-spec))
-                   (update-in [:swagger-object key] assoc :type :OpenAPI-Parameter)
-                   (update-in [:swagger-object key] assoc :parent parent-key)
-                   (update-in [:swagger-object key] assoc :description (common/render-resource-strings "templates/parameter-object.tpl" parameter-object-spec parameter-table-fields)))]
-
-      (if-let [schema-object-spec (:schema parameter-object-spec)]
-        (transform-schema-object :schema key data (:schema parameter-object-spec))
-        data))))
-
-
-(defn transform-parameter-objects [data spec parent-key]
+    (let [key (str parent-key "/" parameter-name)]
+      (-> data
+          (update-in [:swagger-object key] assoc :name parameter-name)
+          (update-in [:swagger-object key] assoc :type spec-type)
+          (update-in [:swagger-object key] assoc :parent parent-key)
+          (update-in [:swagger-object key] assoc :description (common/render-resource-strings "templates/parameter-object.tpl" parameter-object-spec parameter-table-fields))
+          (#(if-let [schema-object-spec (:schema parameter-object-spec)]
+              (transform-schema-object :schema key % (:schema parameter-object-spec))
+              %))))))
+
+
+(defn transform-parameter-objects [data param-spec parent-key spec-type]
   (reduce
     (fn [data parameter-object-spec]
       (if (map-entry? parameter-object-spec)
-        (transform-parameter-object (key parameter-object-spec) parent-key data (val parameter-object-spec))
-        (transform-parameter-object (:name parameter-object-spec) parent-key data parameter-object-spec)))
-    data
-    (:parameters spec)))
+        (transform-parameter-object (name (key parameter-object-spec)) parent-key data (val parameter-object-spec) spec-type)
+        (transform-parameter-object (:name parameter-object-spec) parent-key data parameter-object-spec spec-type)))
+    data
+    param-spec))
 
 
 (defn transform-operation-object [parent-key data [operation-object-key operation-object-spec]]

          (update-in [:swagger-object key] assoc :parent parent-key)
          (update-in [:swagger-object key] assoc :type :OpenAPI-Response)
          (update-in [:swagger-object key] assoc :description (:description response-object-spec))
          ))))


(defn transform-responses-map [data response-specs parent-key]

                 (update-in [:swagger-object key] assoc :parent parent-key)
                 (update-in [:swagger-object key] assoc :description (common/render-resource-strings "templates/path-object.tpl" path-object-spec))
                 (transform-operation-objects path-object-spec key)
                 (transform-parameter-objects (:parameters path-object-spec) key :OpenAPI-Parameter))]
    (name path-object-key)
    (if-let [ref (:$ref path-object-spec)]
      (-> data
