Am trying to figure out the letk syntax for optional body params (but within sweet/resource). Stumbled accross this https://github.com/metosin/compojure-api/issues/154 and found the docs - but can't find an example of destructuring
:body-params in the resource case, anyone know if it's possible?
resource is all data, so the
fnk can only be used in destructuring, not in declaring parameters. So, you need to declare the optionality via
:parameters. Example here: https://github.com/metosin/compojure-api/blob/master/test/compojure/api/resource_test.clj#L43-L47