diff --git a/crates/sui-json-rpc-types/src/sui_move.rs b/crates/sui-json-rpc-types/src/sui_move.rs index 50b91ddaa0231..9849cd7cf859d 100644 --- a/crates/sui-json-rpc-types/src/sui_move.rs +++ b/crates/sui-json-rpc-types/src/sui_move.rs @@ -77,8 +77,7 @@ pub struct SuiMoveNormalizedStruct { pub struct SuiMoveNormalizedEnum { pub abilities: SuiMoveAbilitySet, pub type_parameters: Vec, - // NB: Don't use a `BTreeMap` here as we want to keep the declaration order of the variants - pub variants: Vec<(String, Vec)>, + pub variants: BTreeMap>, } #[derive(Serialize, Deserialize, Debug, JsonSchema, Clone)] @@ -247,7 +246,7 @@ impl From for SuiMoveNormalizedEnum { .collect::>(), ) }) - .collect::)>>(), + .collect::>>(), } } } diff --git a/crates/sui-open-rpc/spec/openrpc.json b/crates/sui-open-rpc/spec/openrpc.json index 9f5d5ceb090c6..6b1eb2bddb957 100644 --- a/crates/sui-open-rpc/spec/openrpc.json +++ b/crates/sui-open-rpc/spec/openrpc.json @@ -9015,22 +9015,12 @@ } }, "variants": { - "type": "array", - "items": { + "type": "object", + "additionalProperties": { "type": "array", - "items": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/SuiMoveNormalizedField" - } - } - ], - "maxItems": 2, - "minItems": 2 + "items": { + "$ref": "#/components/schemas/SuiMoveNormalizedField" + } } } }