-
Notifications
You must be signed in to change notification settings - Fork 222
Inspectable interceptors #1160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Inspectable interceptors #1160
Conversation
:output output | ||
:transformer transformer}) | ||
output)))] | ||
(cond-> (m/map->Interceptor interceptor) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting: Interceptor is private, but map->Interceptor is not
(-transform-map-keys keyword-keys -string->keyword)))})) | ||
(cond-> json-vectors (assoc :vector -sequential->vector))) | ||
:encoders (-json-encoders)}))) | ||
(let [!this (atom nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this hack?
(assoc :map-of {:compile (fn [schema _] | ||
(let [key-schema (some-> schema (m/children) (first))] | ||
(or (some-> key-schema (m/type) map-of-key-decoders | ||
(-interceptor schema @!this :json nil) (m/-intercepting) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some sort of recursion trick?
discussed this with Tommi: needs docs & tests |
test how to inspect interceptor chain:
run an interceptor chain:
... and see steps tapped: