Fork me on GitHub

@quimrstorres: hi. there is a way, overriding the :coercion for api, context or endpoint. Nowhere near computer, but here are some pointers:, I think there should be an easier way, or at least better examples but hope this helps. I would start with creating an string->vector schema matcher (see the plumatic schema guides), test it separately and only after then plug it into c-api.


Schema matchers don't compose easily, to get your own matcher + default matchers, you have to use something like (schema-tools.coerce/or-matcher my-string->vector-matcher ring.swagger.coerce/query-schema-coercion-matcher).


Hi @ikitommi . I’ve been through that pages but I was wondering because I also thought there might be an easier way. Thanks for the great help. If you think I could contribute with the examples or even in submitting any kind of improvement, let me know. 🙂


@quimrstorres: contributions welcome! I think a great start would be to cut&paste the coersion-part of the old README into a separate wiki page + possible more examples on real life cases (Wiki is open for all to modify).


if you think there is an easier way to customize coercion, please share :) Discussed some time ago about :matchers, but couldn't make it work on paper good enough.


I will definitely do the changes you suggested to the docs. When you refer to :matchers, you are suggesting to add an option on the api, context and route to customize the matchers used, right?


that (`:matchers`) was one idea. Not implemented and not sure how useful it would be. All ears on a good way to handle the custom coercion in an easy way.