ataraxy icon indicating copy to clipboard operation
ataraxy copied to clipboard

route syntax validation should s/explain when it it fails

Open bhurlow opened this issue 8 years ago • 3 comments

I've found it a bit hard to debug the routing syntax when it fails to pass the valid? pre condition: https://github.com/weavejester/ataraxy/blob/master/src/ataraxy/core.clj#L65-L68

bhurlow avatar Jun 13 '17 13:06 bhurlow

I resorted to: (s/explain :ataraxy.core/routing-table-with-meta myroutes) manually

bhurlow avatar Jun 13 '17 13:06 bhurlow

Yes, this is something I've been meaning to add, but the explain output gets a little messy around some of the rules, so I wanted to clean it up before making the validation a little better.

weavejester avatar Jun 13 '17 14:06 weavejester

somebody needs to make a pretty parser for the spec output! it's almost ironic how hard to read the explain result it

bhurlow avatar Jun 13 '17 14:06 bhurlow