smithy4s icon indicating copy to clipboard operation
smithy4s copied to clipboard

Document the name mapping mechanism for `UrlForm`

Open BalmungSan opened this issue 2 years ago • 4 comments

It would be great if the UrlFormDecoder and UrlFormEncoder could be configured to apply name mapping to fields, similar to the @jsonName annotation.

I may contribute this if you think it would be accepted and if you could guide me about the best way to do it :)


Related to #1254

BalmungSan avatar Oct 09 '23 15:10 BalmungSan

I agree. Are there any traits we currently support in these codecs?

kubukoz avatar Oct 09 '23 15:10 kubukoz

It's undocumented, but in theory using this trait should work : https://github.com/disneystreaming/alloy/#alloyurlformname

Baccata avatar Oct 10 '23 10:10 Baccata

@Baccata oh that is great to know! thanks. Does that mean I should close the issue? Or is there something I am missing?

BalmungSan avatar Oct 10 '23 16:10 BalmungSan

I suppose we could rephrase this issue as a documentation one.

This could be resolved by adding a new page next to https://disneystreaming.github.io/smithy4s/docs/protocols/simple-rest-json/overview, perhaps

kubukoz avatar Oct 10 '23 18:10 kubukoz