Sitelet https://github.com/ring-clojure/ring/issues/362
Skip to content

[bug] wrap-nested-params remove namespaces in keywords #362

Description

@kwladyka
(def app-stateless
  (-> handler
      (wrap-keyword-params {:parse-namespaces? true})
      ;(wrap-nested-params)
      (wrap-params)
      (add-headers)
      (wrap-restful-format)))
(-> (peridot/session core/app-stateless)
    (peridot/content-type "application/edn")
    (peridot/request "/authentication" :request-method :post
                     :body (pr-str {:action "sign-up"
                                    :user/email "foo@example.com"
                                    :user/password "qwaszx"
                                    :foo {:bar/baz "mee"}})))

params value

What is wrong:

When wrap-nested-params is uncomment it removes all namespaces in 1-deep, but no deeper.
{:action "sign-up", :email "foo@example.com", :password "qwaszx", :foo #:bar{:baz "mee"}}
^ removed :user/, but not :bar/.

When it is commented I get values as I expected:
{:action "sign-up", :user/email "foo@example.com", :user/password "qwaszx", :foo #:bar{:baz "mee"}}

How it should be
It shouldn't remove namespaces.
{:action "sign-up", :user/email "foo@example.com", :user/password "qwaszx", :foo #:bar{:baz "mee"}}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions