paperclip icon indicating copy to clipboard operation
paperclip copied to clipboard

Actix plugin: Flattening and skipping fields in items

Open wafflespeanut opened this issue 4 years ago • 5 comments

As a follow-up to #70, we should support #[serde(flatten)] and #[serde(skip)] in fields.

wafflespeanut avatar Feb 25 '20 20:02 wafflespeanut

And... I don't know whether you already support any of these, I just know that I will need all this before starting to use paperclip:

  • #[serde(tag = "type")]
  • #[serde(tag = "type", content = "result")]
  • #[serde(rename = "name")]

Ploppz avatar Apr 22 '20 09:04 Ploppz

We do support #[serde(rename = "...")], but tag is something that has to do with enums right? We don't support enums with complex variants as of now, because it can't be represented in swagger (v2). It will be supported in 0.5.0, when we move to v3.

wafflespeanut avatar Apr 22 '20 10:04 wafflespeanut

Oh yeah, that's right.

Ploppz avatar Apr 23 '20 07:04 Ploppz

Is there any follow-up to this with the 0.7.0 release? :)

timonbimon avatar Apr 11 '22 13:04 timonbimon

IIRC we currently support both skip and flatten.

tiagolobocastro avatar Apr 11 '22 15:04 tiagolobocastro