Is there any method to do dynamic parameters in reitit? e.g. to have the :body vary depending on whether you're admin or user?
how do you decide whether the user is an admin or general user?
It's stored in my database.
Reitit is based on compiling the routes & parameter descriptions once, and then serving those. Thus it's hard to make reitit features dynamically depend on the requests. However, in a case like yours, i'd use something like [:or UserRequest AdminRequest] as the schema, and then do a final validation in the handler. Another option of course would be to have separate /foo and /admin/foo endpoints.