https://kotlinlang.org logo
#http4k
Title
# http4k
d

dmcg

10/25/2023, 9:17 AM
org.http4k.connect.amazon.cognito.CognitoExtensionsKt#confirmForgotPassword is generated code? Is there any way to have its
ClientMetadata
parameter default to
emptyMap()
?
a

Andrew O'Hara

10/25/2023, 2:19 PM
Yes, default parameters in the generated extension functions would be very nice. The generator seems to ignore the defaults of the request class it's based on.
d

dmcg

10/25/2023, 3:40 PM
Ah, so yes, and then no 😉
a

Andrew O'Hara

10/25/2023, 3:50 PM
I don't actually know whether the defaults can be added or not. I'll let @dave answer that.
d

dave

10/25/2023, 3:51 PM
it's tricky - you'd need to adjust the code KSP generator
I presume you might have access to the default values, but I'm not sure.
(I know that it's annoying to not have the defaults generated)
@dmcg just for you - we now generate default values when there is a default collection present. I wasn't clever enough with the KSP API to make it work for everything... https://github.com/http4k/http4k-connect/blob/master/CHANGELOG.md#changelog
🙏 2
d

dmcg

10/27/2023, 1:21 PM