Fork me on GitHub
#pedestal
<
2019-01-02
>
asilverman18:01:26

good morning and happy new year clojurians, I was hoping it would be ok to ask you a question. I’m looking to implement a jasonapi complient microservice using pedestal but I’m faced with a challenge, I am not sure pedestal supports filtering and pagination in the way that the jsonapi standard defines it (i.e. filter[name]&page[3] - https://jsonapi.org/format/#fetching-pagination). Is this feature to parse multimap queryparams available in pedestal?. Thank you #pedestal

ddeaguiar19:01:24

@ariel.silverman AFAIK, those parameters will result in a params map of {:filter[name] nil :page[3] nil}.

asilverman20:01:42

Thank you, I was hoping to get some clarity about how to parse parameters of this sort, for example say for an input of filter[name]=somename&filter[id]=123 getting a nested map that looks like {:filter {:name "somename" :id 123} }

ddeaguiar20:01:55

@ariel.silverman, as of now you’d need to create an interceptor to do that transformation for you

asilverman20:01:42

Thank you, I was hoping to get some clarity about how to parse parameters of this sort, for example say for an input of filter[name]=somename&filter[id]=123 getting a nested map that looks like {:filter {:name "somename" :id 123} }