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

dave

01/20/2020, 6:51 AM
@Razi Kheir AFK, but at first glance it looks like you're not using the API quite correctly. Is there a reason you're not specifying the composite EnvironmentKey like the one in this test? https://github.com/http4k/http4k/blob/master/http4k-cloudnative/src/test/kotlin/org/http4k/cloudnative/env/EnvironmentKeyTest.kt
r

Razi Kheir

01/20/2020, 6:51 AM
Let me check 🙂
d

dave

01/20/2020, 6:54 AM
Also - are you trying to load properties from a Yaml file?
r

Razi Kheir

01/20/2020, 6:55 AM
Yup
d

dave

01/20/2020, 6:55 AM
Yeah - that's not going to work. 🙃
r

Razi Kheir

01/20/2020, 6:55 AM
Directly from a YAML file into a composite class, before I loadded them one by one but then I started loading them all together in this composite way. I remember seeing it somewhere in http4k.
It’s working for all required paramters. But once I specify an optional that is missing in YAML it throws an exception.
d

dave

01/20/2020, 7:09 AM
We don't support yaml at all. 🙃
So I'm not sure how it's working. Possibly the format is matching somehow...
3 Views