diff --git a/crates/jstz_crypto/src/hash.rs b/crates/jstz_crypto/src/hash.rs index 92e8fa707..5c48952ba 100644 --- a/crates/jstz_crypto/src/hash.rs +++ b/crates/jstz_crypto/src/hash.rs @@ -7,6 +7,7 @@ use boa_gc::{empty_trace, Finalize, Trace}; use derive_more::{Display, Error}; use hex::FromHexError; use serde::{Deserialize, Serialize}; +use utoipa::ToSchema; #[derive( Debug, @@ -20,6 +21,7 @@ use serde::{Deserialize, Serialize}; Deserialize, Default, Finalize, + ToSchema, )] pub struct Blake2b([u8; 32]); diff --git a/crates/jstz_node/openapi.json b/crates/jstz_node/openapi.json index e53c917f8..7a9b367fa 100644 --- a/crates/jstz_node/openapi.json +++ b/crates/jstz_node/openapi.json @@ -419,6 +419,14 @@ }, "components": { "schemas": { + "Blake2b": { + "type": "array", + "items": { + "type": "integer", + "format": "int32", + "minimum": 0 + } + }, "Content": { "oneOf": [ { @@ -666,7 +674,7 @@ ], "properties": { "hash": { - "type": "string" + "$ref": "#/components/schemas/Blake2b" }, "inner": { "$ref": "#/components/schemas/ReceiptResult" diff --git a/crates/jstz_proto/src/receipt.rs b/crates/jstz_proto/src/receipt.rs index dbc459388..202da939f 100644 --- a/crates/jstz_proto/src/receipt.rs +++ b/crates/jstz_proto/src/receipt.rs @@ -28,7 +28,6 @@ impl From> for ReceiptResult { #[derive(Debug, Clone, Serialize, Deserialize, ToSchema)] pub struct Receipt { - #[schema(value_type = String)] hash: OperationHash, pub inner: ReceiptResult, }