dolanor / rip

REST in peace
BSD 3-Clause "New" or "Revised" License
68 stars 0 forks source link

Allow for non generic type codec #13

Open dolanor opened 7 months ago

dolanor commented 7 months ago

Right now, codecs work for generic encoding (eg. application/json, text/xml, …)

But in a business app, our types could have their own mime type (eg. application/vnd.mycompany.customers.v1+json). This would kind mix encoding (json) and structural validation (does customer have the right field in the correct business format?). Some kind of marshal and validate mixup.

I need to think about a way, to mix them without coupling them. I guess the right interface could make wonders.

ref: