A little question about lenses, Result4k & ope...
# http4k
r
A little question about lenses, Result4k & openapi, Is there a way to use the asResult() lens directly in the meta block or should I keep a lens variable I can use in meta and another that's the Result ? I've done this so far:
Copy code
val requestBodyLens = Body.auto<MyRequest>().toLens()
val requestBodyResult = requestBodyLens.asResult()
val handler: HttpHandler = { request: Request ->
            requestBodyResult(request)
            ...
}
return "hello" meta {
            summary = "Hello worls"
            receiving(requestBodyLens to MyRequest())
} bindContract POST to handler
but if I could get ride of
requestBodyLens
would be nicer