]> git.immae.eu Git - github/fretlink/ansible-kong-app.git/blobdiff - dhall/server/service/plugin/correlationId.dhall
dhall: BREAKING CHANGE update dhall config for 1.33+ compatibility
[github/fretlink/ansible-kong-app.git] / dhall / server / service / plugin / correlationId.dhall
index d5d592860d0db6134576c57aa2fa40a5df22c08a..41c572098cfe26805366f3cd391a781fd0174984 100644 (file)
@@ -2,22 +2,16 @@ let Plugin = ./Plugin.dhall
 
 let config = ./Config.dhall
 
-in    λ(generator : Optional Text)
-    →   { name =
-            "correlation-id"
+in  λ(generator : Optional Text) →
+        { name = "correlation-id"
         , config =
             config.CorrelationId
-            { header_name =
-                "X-correl"
-            , echo_downstream =
-                True
-            , generator =
-                Optional/fold
-                Text
-                generator
-                Text
-                (λ(t : Text) → t)
-                "uuid#counter"
-            }
+              { header_name = "X-correl"
+              , echo_downstream = True
+              , generator =
+                  merge
+                    { None = "uuid#counter", Some = λ(x : Text) → x }
+                    generator
+              }
         }
       : Plugin