Fork me on GitHub
#biff
<
2022-08-12
>
Ash10:08:15

Minor observation about :api-routeshandling… Over my all features value, the default routesdef produces a :api-routes sub-structure like this:

(nil nil nil nil nil [["/echo" {:get #function[example.api/echo]}]])
Where /echo is my one API route and those leading nil s are because most of my featnamespaces don’t have :api-routes . But the handler doesn’t seem to like those nils - it 404s when given a /echo When I filter-out those nils, to get:
([["/echo" {:get #function[example.api/echo]}]])
…the handler works fine for the /echo route. Anyway, this posting is just in case it might help someone else who stumbles across this problem. 😃

Jacob O'Bryant16:08:02

oops 😬 I'll take a look at that and probably update the template

Ash19:08:44

…t’was just a minor thing. Your design of Biff has made it easy to slide in a router that supports Swagger annotated API routes, with param coercion etc. - It’s been a really handy foundation on which to quickly prototype my project’s small web service. Cheers. gratitude-thank-you

Jacob O'Bryant20:08:52

I just pushed a commit to fix this in the template project by the way: https://github.com/jacobobryant/biff/commit/daf5c98b6ae1e014b66624aef029e2d894d363ce. (FYI for anyone else with an existing Biff project, you'll need to apply those changes manually. I'll make a note about this in the next release)