From 4c132e06dbbfc8cf035b9e10e016fbbcfee36b24 Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Mon, 26 May 2025 17:00:31 +0200 Subject: [PATCH] doc --- server/lib/directory.ml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/lib/directory.ml b/server/lib/directory.ml index 69f8179..9ef4ace 100644 --- a/server/lib/directory.ml +++ b/server/lib/directory.ml @@ -96,7 +96,13 @@ module Encoding = struct @@ ranged_int53 ~minimum:0L ~maximum:(Int64.shift_left 1L 53) "mutez" let hash = - def "hash" ~title:"hash" ~description:"Hexadecimal 32 bytes hash" @@ string + def "hash" ~title:"hash" ~description:"Hexadecimal 32 bytes hash" + @@ conv + ~schema: + Json_schema.( + String { string_specs with pattern = Some "^([a-zA-Z0-9]{64})$" } + |> element |> create) + Fun.id Fun.id string let unit_success = obj1 (req "result" (constant "success")) -- GitLab