Closed bisgardo closed 2 years ago
Make fields of generated struct use the correct types.
Picked changes to generated Allow type from version generated by a more recent version of the rosetta spec.
Allow
It seems like there's some bug in the generator that makes it generate fields of type plain serde_json::Value instead of the proper types in the Allow struct. Picking the changes to Allow's model from commit https://github.com/coinbase/rosetta-specifications/commit/ce6898659de0f79c350034db6ac938e12805302f#diff-80521b2ac2125e10a84393ae746d6f0d993979c8a974dc320b913f8bb2fd32b5 makes it generate it correctly. Before the model change, all non-builtin types were used as a parameter to Vec, so that could be what's triggering the bug.
serde_json::Value
Vec
This also means that this change won't be reverted by a future upgrade of the Rosetta spec.
Purpose
Make fields of generated struct use the correct types.
Changes
Picked changes to generated
Allow
type from version generated by a more recent version of the rosetta spec.It seems like there's some bug in the generator that makes it generate fields of type plain
serde_json::Value
instead of the proper types in theAllow
struct. Picking the changes toAllow
's model from commit https://github.com/coinbase/rosetta-specifications/commit/ce6898659de0f79c350034db6ac938e12805302f#diff-80521b2ac2125e10a84393ae746d6f0d993979c8a974dc320b913f8bb2fd32b5 makes it generate it correctly. Before the model change, all non-builtin types were used as a parameter toVec
, so that could be what's triggering the bug.This also means that this change won't be reverted by a future upgrade of the Rosetta spec.