Repro:
(require '[clojure.spec.alpha :as s]
(s/def :foo/user-map (s/map-of string? int?))
(s/explain-data :foo/user-map {"hi" "foo"})
;; Actual value:
;; #:cljs.spec.alpha{:problems
;; ({:path [1],
;; :pred int?,
;; :val "foo",
;; :via [:foo/user-map],
;; :in ["hi" 1]})}
;; Expected: the `:in` value to be ["hi"] ?
(s/explain-data :foo/user-map {:hi 2})
;; Actual value:
;; #:cljs.spec.alpha{:problems
;; ({:path [0],
;; :pred string?,
;; :val :hi,
;; :via [:foo/user-map],
;; :in [:hi 0]})}
;; Expected: I'm not sure, since a path can't "point to" a key
Motivation: given some top-level data (in this case, `{"hi" "foo"}`) and an `:in` path, I would like to be able to find the problematic data (in this case, `"foo"`).
In the case where the value of a map does not conform, the `:in` path is not compatible with functions like `get-in`, but it could be.
In the case where the key of a map does not conform, there is no way to "point to" a key using `get-in`, so I'm not sure what the right fix is.
I don't know that compatibility with `get-in` is a requirement: if spec provided a function that accomplished the same thing with "spec" paths (i.e. ones that could point to keys), that would be fine.