Skip to content

fix: set up default derives#49

Open
Fenex wants to merge 1 commit into
denislituev:masterfrom
Fenex:fix/serde-derives
Open

fix: set up default derives#49
Fenex wants to merge 1 commit into
denislituev:masterfrom
Fenex:fix/serde-derives

Conversation

@Fenex

@Fenex Fenex commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

Swap default derives for requests and responses structs:

  • *Request: Serialize -> Deserialize
  • *Response: Deserialize -> Serialize

Swap default derives for requests and responses structs:
 - `*Request`: Serialize -> Deserialize
 - `*Response`: Deserialize -> Serialize
@denislituev

Copy link
Copy Markdown
Owner

Hi, instead of swapping Serialize and Deserialize, consider adding BOTH traits to support both client and server usage:

#[derive(Debug, Clone, Serialize, Deserialize)]

This would make the generated models universal without significant overhead. The current change only works for server-side use, while having both traits works for everything.

What do you think?

@Fenex

Fenex commented Mar 13, 2026

Copy link
Copy Markdown
Contributor Author

I do not use Request/Response structs at all. I just did notice this strange derive and send a PR to fix. But yeah, it is possible to just generate both serde traits for all cases.

@denislituev

Copy link
Copy Markdown
Owner

For this one If you add both of the crates - it will be cool. Let's put this aside for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants