Hi, again. when writing the meta of OpenApi json g...
# http4k
r
Hi, again. when writing the meta of OpenApi json generation, Is there a way to add description and/or example for the
headers
or
queries
? Your examples only cover body and Path but couldn't from that figure it out for queries.
d
Copy code
headers += Header.required("name", "description")
r
Thanks missed that description parameter in the lens
d
if you think that something should be there, it probably is so it's always worth clicking through and checking the source 🙂
r
Sometime IntelliJ doesn't want me to go there. Ex. Query.optional() can't click on optional, and I already seen that some other places.
d
hmm - make sure you're downloading sources and that your idea and kotlin plugin are up to date
r
All is up to date, gradle is set to
all
I can go to other sources. i think there are some extensions that are difficult to find. happens to Querry.`optional`() (Querry works), also on
bindContract
or
defaulted
in (
<http://EnvironmentKey.int|EnvironmentKey.int>().defaulted()
) clicking on it, I get a short message "Cannot find declaration to go to".
d
If you invalidate caches and restart? Or try another new project ? Or wipe out the grtafle cache? I did have a problem with one project after I upgraded http4k with having multiple versions of the jar in the external.libs. If nothing else then maybe idea bug?
r
Just to let you know, neither help invalidating cache, new helloworld project still have the problem with these specific functions. It happens both on Linux and macOS, and both IntelliJ Ultimate or Community. Looks like a bug because if I look intro the Query.optional(), optional is just a function of BiDiLensSpec of which Query inherits. So it shouldn't be that difficult to figure out... 🤔 No big deal, I can navigate to source code even if it's indirectly so no excuse 😁
d
Yep - I can recreate it here as well. But it doesn't happen with similar object relationships so am not sure what's going on in Idea.