    :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]]

    (-> data
        (transform-schema-map (:schemas components-spec) "#/components/schemas")
        (transform-responses-map (:responses components-spec) "#/components/responses")
        (transform-parameter-objects components-spec "#/components/parameters")

        )))


        (update-in [:swagger-object key] assoc :type :OpenAPI-Operation)
        (update-in [:swagger-object key] assoc :parent parent-key)
        (update-in [:swagger-object key] assoc :description (common/render-resource-strings "templates/operation-object.tpl" operation-object-spec [:tags :operationId]))
        (transform-parameter-objects (:parameters operation-object-spec) key :OpenAPI-Parameter))))


(defn transform-operation-objects [data path-spec parent-key]
