schema 2024-08-30

Hi I've error while executing the below code

Please create an issue to metosin/schema-tools, should be easy to fix over there

Sounds good

(require '[schema-tools.core :as st])
(require '[schema.coerce :as sc])

(def input-map {:a "a" :b 2})

(schema.core/defschema input-schema 
  (linked.core/map 
    :a schema.core/Str))

(st/select-schema input-map input-schema sc/json-coercion-matcher)

The error is

Execution error (ExceptionInfo) at schema-tools.coerce/coerce-or-error! (coerce.cljc:24).
Could not coerce value to schema: (not ((partial instance? LinkedMap) {:a "a"}))