-
-
Save seancorfield/05bcbac5f6bef82b554aa8310bca6845 to your computer and use it in GitHub Desktop.
Example of builder with map as input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns builderjava.bad | |
(:require [clojure.java.data.builder :as builder]) | |
(:import (software.amazon.awscdk.services.apigateway IntegrationOptions | |
IntegrationOptions$Builder))) | |
(defn build [] | |
(builder/to-java IntegrationOptions {:requestParamaters {"a" "b"}})) | |
(build) | |
;; => #object[software.amazon.awscdk.services.apigateway.IntegrationOptions$Jsii$Proxy 0x14b789f6 "software.amazon.awscdk.services.apigateway.IntegrationOptions$Jsii$Proxy@b43"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:deps {software.amazon.awscdk/apigateway {:mvn/version "1.30.0"} | |
org.clojure/java.data {:mvn/version "1.0.64"}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns builderjava.good | |
(:import software.amazon.awscdk.services.apigateway.IntegrationOptions)) | |
(defn build [] | |
(-> (IntegrationOptions/builder) | |
(.requestParameters {"a" "b"}) | |
(.build))) | |
(build) | |
;; => #object[software.amazon.awscdk.services.apigateway.IntegrationOptions$Jsii$Proxy 0x4ffbb14b "software.amazon.awscdk.services.apigateway.IntegrationOptions$Jsii$Proxy@b43"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment