    :bearerFormat
    :openIdConnectUrl])
 
-(defn transform-security-scheme-object [parameter-name parent-key data security-scheme-object-spec spec-type]
+(defn transform-security-scheme-object [scheme-key parent-key data security-scheme-object-spec spec-type]
   (if-let [ref (:$ref security-scheme-object-spec)]
     (-> data
         (update-in [:references] conj {:source-path parent-key :target-path ref}))
-    (let [key (str parent-key "/" parameter-name)]
-      (-> data
-          (update-in [:swagger-object key] assoc :name parameter-name)
+    (let [key (str parent-key "/" (name scheme-key))]
+      (-> data
+          (update-in [:swagger-object key] assoc :name (name scheme-key))
           (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/security-scheme-object.tpl" security-scheme-object-spec security-scheme-fields))

        )))


(def server-variable-fields [:enum :default])

(defn transform-server-variable [var-name var-spec]

   :tokenUrl
   :refreshUrl])

(defn transform-oauth-flow-object [flow-key parent-key data oauth-flow-object-spec spec-type]
  (let [key (str parent-key "/" (name flow-key))
        scopes-spec (:scopes oauth-flow-object-spec)
        scopes-md (common/render-resource-strings "templates/oauth-scopes.tpl" scopes-spec (keys scopes-spec))
        oauth-flow-object-spec (assoc oauth-flow-object-spec :scopesMd scopes-md)]
    (-> data
        (update-in [:swagger-object key] assoc :name (name flow-key))
        (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/oauth-flow-object.tpl" oauth-flow-object-spec oauth-flow-fields)))))
