You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(defm (martian/bootstrap"http://example.com"
[{:query-schema {:version (st/defaults/Int70)},
:path-schema {:id s/Str}
:route-name:test/route:method:get,
:path-parts ["/part/":id]}]
{:use-defaults?true}))
(martian/request-for m :test/route {:id"honestly-i-am-a-string"})
;; Value cannot be coerced to match schema: {:id disallowed-key}
(martian/request-for m :test/route {})
;; Could not coerce value to schema: {:id missing-required-key}
I tried working from the readme test example, and figured out that adding a :query-schema map breaks it:
(let [m (martian/bootstrap"https://api.org"
[{:route-name:load-pet:path-parts ["/pets/":id]
:query-schema {:version (st/defaults/Int70)}
:method:get:path-schema {:id s/Str}}]
{:use-defaults?true})]
(martian/request-for m :load-pet {:id"1"}))
;; Value cannot be coerced to match schema: {:id disallowed-key}
The text was updated successfully, but these errors were encountered:
licht1stein
changed the title
Missing-key / disallowed key on path-params when setting query params
Missing-key / disallowed key on path-params when setting defaults in query-schema
Jan 5, 2025
Here's my example:
I tried working from the readme test example, and figured out that adding a
:query-schema
map breaks it:The text was updated successfully, but these errors were encountered: