I am using the contract method and it does generate the swagger.json that isn't a problem. My issue was if I try to use something like
petstore.swagger.io to look at it I can see the API but none of the try me's work. This is because I utilize an API key that goes in the header. When the header changes the browser sends an OPTIONS request to the http4k server which returns a 404. My Cors Policy is as follows:
filter = ServerFilters.Cors(CorsPolicy(listOf("*"), listOf("content-type", "jwt", "*" ), listOf(GET, PUT, POST, DELETE, OPTIONS, TRACE, PATCH, PURGE, HEAD))).then(filter)