algonaut icon indicating copy to clipboard operation
algonaut copied to clipboard

Skip serialization of `Option::None` fields

Open manuelmauro opened this issue 5 years ago • 2 comments

Currently many structs in the client libraries (algod, kmd, indexer) serialize None fields. Add the proper macro directive from serde to such fields, checking the official Algorand documentation, adding and running tests.

#[serde(skip_serializing_if = "Option::is_none")]

manuelmauro avatar Apr 19 '21 08:04 manuelmauro

I'd like to pick this one up. Can you provide examples of how to test if serialization is happening properly?

epequeno avatar Jun 17 '21 20:06 epequeno

Hi! I thought that instead of adding tests we can use this reference implementation https://github.com/manuelmauro/algorand-oas-generated-v2-clients

manuelmauro avatar Jun 19 '21 21:06 manuelmauro