Fork me on GitHub

Am trying to figure out the letk syntax for optional body params (but within sweet/resource). Stumbled accross this and found the docs - but can't find an example of destructuring :body-params in the resource case, anyone know if it's possible?


@mgrbyte 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:


Thanks @U055NJ5CC - i had seen this, but looks like it's for schema not spec (can't find an/figure out the equivalent spec example)