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

dave

02/17/2018, 8:41 AM
one more thing. you can also add filters to an entire contract (if that's what you wanted), by doing:
Copy code
val filters = ServerFilters.InitialiseRequestContext(myContexts.contexts)
        .then(addState)

    operator fun invoke() = contract(OpenApi(ApiInfo(title, version), json), swaggerPath, NoSecurity, *routes)
        .withFilter(filters)