well that's very strange. I've upgraded pedestal to 0.8-beta1 and this check is now garbage (spec/valid? :io.pedestal.http.route.specs/verb :alksdjflsdkajf) => true even though the spec appears to be correctly defined as (s/def ::verb #{:any :get :put :post :delete :path :options :head}) in the correct namespace and I don't see anywhere in the code base that alters that definition. I looked at my deps tree and I also don't see anything suspicious. Is anyone else seeing this?
and just to make sure I haven't messed up something with spec
(spec/def ::bb #{:any}) => :some.ns/bb
(spec/valid? ::bb :blha) => false
The verb handling is all over the place because for some routing specifications you can provide your own list of allowed verbs and rely on verb smuggling to make it all work. Thus:
(s/def ::table-route
(s/cat
:path ::path
:verb keyword? ;; This should be constrained based on options
:handler ::table-handler
:clauses (s/keys* :opt-un [::route-name ::constraints])))@simon.wasle I'd like to merge https://github.com/pedestal/pedestal/pull/933 but I can't responsibly do so until the CLA is signed. Can you give it another try?
Just signed, sorry for the delay, it worked without issues. Seems the PR is still blocked because the commit is not signed, will look into it tomorrow, here it's past midnight already. 😄
It's fine to merge, but if you could work on signed commits for future PRs that would be great!