From 399f2c1e51f8cc20358dddf0c7ac289307a16a56 Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Tue, 27 Sep 2022 16:19:22 +0200 Subject: [PATCH 01/10] lib_openapi: allow to provide title and description in convert --- src/lib_openapi/convert.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib_openapi/convert.ml b/src/lib_openapi/convert.ml index 0bd24de58f43..ac7c8e071801 100644 --- a/src/lib_openapi/convert.ml +++ b/src/lib_openapi/convert.ml @@ -359,12 +359,12 @@ let convert_endpoint (endpoint : Api.service Api.endpoint) : let env = merge_env_list [env_1; env_2; env_3; env_4; env_5] in (env, endpoint) -let convert_api version (endpoints : Api.service Api.endpoint list) : Openapi.t - = +let convert_api ?(title = "Tezos RPC") ?(description = "Tezos client RPC API.") + version (endpoints : Api.service Api.endpoint list) : Openapi.t = let envs, endpoints = List.map convert_endpoint endpoints |> List.split in Openapi.make - ~title:"Tezos RPC" - ~description:"Tezos client RPC API." + ~title + ~description ~version ~definitions:(String_map.bindings (merge_env_list envs)) endpoints -- GitLab From 0914212d6978dede5540b5b50060f8701bea7c0e Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Tue, 27 Sep 2022 16:21:27 +0200 Subject: [PATCH 02/10] Manifest: sc rollup node uses lib_openapi --- manifest/main.ml | 1 + opam/octez-sc-rollup-node-alpha.opam | 1 + src/proto_alpha/bin_sc_rollup_node/dune | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/manifest/main.ml b/manifest/main.ml index 66fe6814cfdf..74c4724e3333 100644 --- a/manifest/main.ml +++ b/manifest/main.ml @@ -4664,6 +4664,7 @@ module Protocol = Protocol ringo_lwt; injector |> if_some |> open_; octez_scoru_wasm; + octez_openapi; ] in let tx_rollup = diff --git a/opam/octez-sc-rollup-node-alpha.opam b/opam/octez-sc-rollup-node-alpha.opam index fc64c63c42b1..f11b550eaf91 100644 --- a/opam/octez-sc-rollup-node-alpha.opam +++ b/opam/octez-sc-rollup-node-alpha.opam @@ -34,6 +34,7 @@ depends: [ "ringo-lwt" { >= "0.9" } "tezos-injector-alpha" "tezos-scoru-wasm" + "tezos-openapi" ] build: [ ["rm" "-r" "vendors"] diff --git a/src/proto_alpha/bin_sc_rollup_node/dune b/src/proto_alpha/bin_sc_rollup_node/dune index cc313ba82cd2..773071744e34 100644 --- a/src/proto_alpha/bin_sc_rollup_node/dune +++ b/src/proto_alpha/bin_sc_rollup_node/dune @@ -34,7 +34,8 @@ ringo ringo-lwt tezos-injector-alpha - tezos-scoru-wasm) + tezos-scoru-wasm + tezos-openapi) (link_flags (:standard) (:include %{workspace_root}/static-link-flags.sexp)) -- GitLab From fbe472a48ed32a8277f5d182baee84df6268c0f8 Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Tue, 27 Sep 2022 11:13:46 +0200 Subject: [PATCH 03/10] SCORU/Node: add /describe RPC for schema --- .../bin_sc_rollup_node/RPC_server.ml | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml b/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml index 0236d696526f..ef66fdf40080 100644 --- a/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml +++ b/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml @@ -333,14 +333,19 @@ module Make (PVM : Pvm.S) = struct @@ fun node_ctxt output () -> Outbox.proof_of_output node_ctxt output let register node_ctxt = - List.fold_left - (fun dir f -> RPC_directory.merge dir (f node_ctxt)) - RPC_directory.empty - [ - Global_directory.build_directory; - Local_directory.build_directory; - Block_directory.build_directory; - ] + let dir = + List.fold_left + (fun dir f -> RPC_directory.merge dir (f node_ctxt)) + RPC_directory.empty + [ + Global_directory.build_directory; + Local_directory.build_directory; + Block_directory.build_directory; + ] + in + RPC_directory.register_describe_directory_service + dir + RPC_service.description_service let start node_ctxt configuration = let open Lwt_result_syntax in -- GitLab From 775452f73e0a75598e138b825f21bdf913127d94 Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Tue, 27 Sep 2022 17:37:41 +0200 Subject: [PATCH 04/10] SCORU/Node: RPC /openapi to retrieve OpenAPI spec for node --- .../bin_sc_rollup_node/RPC_server.ml | 37 +++++++++++++++++++ .../lib_sc_rollup/sc_rollup_services.ml | 7 ++++ 2 files changed, 44 insertions(+) diff --git a/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml b/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml index ef66fdf40080..00071689fe4e 100644 --- a/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml +++ b/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml @@ -139,6 +139,16 @@ module Make_directory (S : PARAM) = struct |> RPC_directory.prefix prefix end +module Root_directory = Make_directory (struct + type prefix = unit + + let prefix = RPC_path.root + + type context = Node_context.t + + let context_of_prefix node_ctxt () = return node_ctxt +end) + module Global_directory = Make_directory (struct include Sc_rollup_services.Global @@ -338,6 +348,7 @@ module Make (PVM : Pvm.S) = struct (fun dir f -> RPC_directory.merge dir (f node_ctxt)) RPC_directory.empty [ + Root_directory.build_directory; Global_directory.build_directory; Local_directory.build_directory; Block_directory.build_directory; @@ -347,6 +358,32 @@ module Make (PVM : Pvm.S) = struct dir RPC_service.description_service + let generate_openapi node_ctxt = + let open Lwt_syntax in + let dir = register node_ctxt in + let+ descr = RPC_directory.describe_directory ~recurse:true ~arg:() dir in + let json_api = + Data_encoding.Json.construct + RPC_encoding.description_answer_encoding + descr + in + let open Tezos_openapi in + json_api + |> Json.annotate ~origin:"description" + |> Api.parse_tree |> Api.parse_services |> Api.flatten + |> Convert.convert_api + ~title:"SC rollup node RPC" + ~description:"Smart contracts rollup node RPC API" + Tezos_version.Bin_version.version_string + |> Openapi.to_json + + let () = + Root_directory.register0 Sc_rollup_services.openapi + @@ fun node_ctxt () () -> + let open Lwt_result_syntax in + let*! json_openapi = generate_openapi node_ctxt in + return json_openapi + let start node_ctxt configuration = let open Lwt_result_syntax in let Configuration.{rpc_addr; rpc_port; _} = configuration in diff --git a/src/proto_alpha/lib_sc_rollup/sc_rollup_services.ml b/src/proto_alpha/lib_sc_rollup/sc_rollup_services.ml index a006a9d9661b..a266a2812a13 100644 --- a/src/proto_alpha/lib_sc_rollup/sc_rollup_services.ml +++ b/src/proto_alpha/lib_sc_rollup/sc_rollup_services.ml @@ -383,3 +383,10 @@ module Local = struct ~output:(Data_encoding.option Encodings.commitment_with_hash_and_level) (path / "last_published_commitment") end + +let openapi = + RPC_service.get_service + ~description:"OpenAPI specification of RPCs for rollup node" + ~query:RPC_query.empty + ~output:Data_encoding.json + RPC_path.(root / "openapi") -- GitLab From 8bdff0f9c3a03d1c278ce109669b726b5e91d071 Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Tue, 27 Sep 2022 11:14:19 +0200 Subject: [PATCH 05/10] SCORU/doc: script to generate openapi specs for node RPC API --- .../bin_sc_rollup_node/openapi/generate.sh | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100755 src/proto_alpha/bin_sc_rollup_node/openapi/generate.sh diff --git a/src/proto_alpha/bin_sc_rollup_node/openapi/generate.sh b/src/proto_alpha/bin_sc_rollup_node/openapi/generate.sh new file mode 100755 index 000000000000..012b4b00da25 --- /dev/null +++ b/src/proto_alpha/bin_sc_rollup_node/openapi/generate.sh @@ -0,0 +1,89 @@ +#!/bin/sh + +set -x + +# This script launches a sandbox node, activates Protocol, starts rollup node +# and gets the RPC descriptions as JSON, and converts this JSON into an OpenAPI +# specification. + +# Ensure we are running from the root directory of the Tezos repository. +cd "$(dirname "$0")"/../../../.. || exit + +# Tezos binaries. +tezos_node=./tezos-node +tezos_client=./tezos-client +tezos_scoru_node=./tezos-sc-rollup-node-alpha + +# Protocol configuration. +protocol_hash=ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK +protocol_parameters=src/proto_alpha/parameters/sandbox-parameters.json + +# Secret key to activate the protocol. +activator_secret_key="unencrypted:edsk31vznjHSSpGExDMHYASz45VZqXN4DPxvsa4hAyY8dHM28cZzp6" +bootstrap1_secret_key="unencrypted:edsk3gUfUPyBSfrS9CCgmCiQsTCHGkviBDusMxDJstFtojtc1zcpsh" + +# RPC port of rollup node. +sc_rpc_port=9999 + +# Temporary files. +tmp=openapi-tmp +data_dir=$tmp/tezos-sandbox +client_dir=$tmp/tezos-client +sc_data_dir=$tmp/tezos-client +params=$tmp/params.json + +# Generated files. +sc_openapi_json=docs/api/sc-rollup-node-rpc-openapi.json + +# Get version = git revision. +version=$(git show -s --pretty=format:%H | head -c 8) + +# Start a sandbox node. +$tezos_node config init --data-dir $data_dir \ + --network sandbox \ + --expected-pow 0 \ + --rpc-addr localhost:8732 \ + --no-bootstrap-peer \ + --synchronisation-threshold 0 +$tezos_node identity generate --data-dir $data_dir +$tezos_node run --data-dir $data_dir & +node_pid="$!" + +# Wait for the node to be ready. +sleep 1 + +# Activate the protocol. +mkdir $client_dir +$tezos_client --base-dir $client_dir import secret key activator $activator_secret_key +$tezos_client --base-dir $client_dir import secret key bootstrap1 $bootstrap1_secret_key +cat $protocol_parameters | jq '.sc_rollup_enable = true' > $params +$tezos_client --base-dir $client_dir activate protocol $protocol_hash \ + with fitness 1 \ + and key activator \ + and parameters $params \ + --timestamp "$(TZ='AAA+1' date +%FT%TZ)" + +# Wait a bit again... +sleep 1 + +# Originate a sc rollup. +sc_addr=$($tezos_client -w none --base-dir $client_dir originate sc rollup from bootstrap1 of kind arith of type unit booting with '""' --burn-cap 10 | awk '/Address: / {print $NF}') +$tezos_client -w none --base-dir $client_dir bake for bootstrap1 --minimal-timestamp + +# Start the sc rollup node. +$tezos_scoru_node --base-dir $client_dir init observer config for $sc_addr with operators bootstrap1 --data-dir $sc_data_dir --rpc-port $sc_rpc_port +$tezos_scoru_node --base-dir $client_dir run --data-dir $sc_data_dir & +sc_node_pid="$!" + +# Wait for the sc rollup node to be ready. +sleep 1 + +# Get the RPC openapi. +curl -v "http://localhost:$sc_rpc_port/openapi" > $sc_openapi_json + +# Kill the nodes. +kill -9 "$node_pid" +kill -9 "$sc_node_pid" + +echo "Generated OpenAPI specification: $sc_openapi_json" +echo "You can now clean up with: rm -rf $tmp" -- GitLab From e6696670d74d165a80efae8c6cb1be0625e84739 Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Tue, 27 Sep 2022 16:15:49 +0200 Subject: [PATCH 06/10] SCORU/Node: "generate openapi" CLI command --- .../bin_sc_rollup_node/RPC_server.ml | 13 ++++++++++-- .../bin_sc_rollup_node/RPC_server.mli | 3 +++ .../main_sc_rollup_node_alpha.ml | 21 ++++++++++++++++++- 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml b/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml index 00071689fe4e..27b1fe4bbb8d 100644 --- a/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml +++ b/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml @@ -377,13 +377,22 @@ module Make (PVM : Pvm.S) = struct Tezos_version.Bin_version.version_string |> Openapi.to_json + let openapi, openapi_wakeup = Lwt.task () + let () = Root_directory.register0 Sc_rollup_services.openapi - @@ fun node_ctxt () () -> + @@ fun _node_ctxt () () -> let open Lwt_result_syntax in - let*! json_openapi = generate_openapi node_ctxt in + let*! json_openapi = openapi in return json_openapi + let (_ : unit Lwt.t) = + let open Lwt_syntax in + (* WARNING: node_ctxt is unused during the registration process so we can + replace it by a dummy value. *) + let+ open_api = generate_openapi (Obj.magic () : Node_context.t) in + Lwt.wakeup openapi_wakeup open_api + let start node_ctxt configuration = let open Lwt_result_syntax in let Configuration.{rpc_addr; rpc_port; _} = configuration in diff --git a/src/proto_alpha/bin_sc_rollup_node/RPC_server.mli b/src/proto_alpha/bin_sc_rollup_node/RPC_server.mli index e836b81e1813..726dbe1c37d1 100644 --- a/src/proto_alpha/bin_sc_rollup_node/RPC_server.mli +++ b/src/proto_alpha/bin_sc_rollup_node/RPC_server.mli @@ -36,4 +36,7 @@ module Make (PVM : Pvm.S) : sig (** Shutdown a running RPC server. When this function is called, the rollup node will stop listening to incoming requests. *) val shutdown : RPC_server.server -> unit Lwt.t + + (** Promise containing the OpenAPI JSON specification for the RPC server. *) + val openapi : Ezjsonm.value Lwt.t end diff --git a/src/proto_alpha/bin_sc_rollup_node/main_sc_rollup_node_alpha.ml b/src/proto_alpha/bin_sc_rollup_node/main_sc_rollup_node_alpha.ml index acd01d233166..5913d400d73b 100644 --- a/src/proto_alpha/bin_sc_rollup_node/main_sc_rollup_node_alpha.ml +++ b/src/proto_alpha/bin_sc_rollup_node/main_sc_rollup_node_alpha.ml @@ -308,10 +308,29 @@ let import_command = cctxt#message "%a" Protocol.Alpha_context.Sc_rollup.Input_hash.pp hash >>= return) +let openapi_command = + let open Clic in + command + ~group + ~desc:"Generate OpenAPI specification." + (args1 pvm_name_arg) + (prefixes ["generate"; "openapi"] @@ stop) + (fun pvm_name cctxt -> + let open Lwt_result_syntax in + let*? pvm = + match Protocol.Alpha_context.Sc_rollup.Kind.of_name pvm_name with + | Some k -> Ok (Components.pvm_of_kind k) + | None -> error_with "Invalid pvm name: %S" pvm_name + in + let module RPC = RPC_server.Make ((val pvm)) in + let*! openapi_json = RPC.openapi in + let*! () = cctxt#message "%a" Data_encoding.Json.pp openapi_json in + return_unit) + let sc_rollup_commands () = List.map (Clic.map_command (new Protocol_client_context.wrap_full)) - [config_init_command; run_command; import_command] + [config_init_command; run_command; import_command; openapi_command] let select_commands _ _ = return (sc_rollup_commands () @ Client_helpers_commands.commands ()) -- GitLab From 325c83f4f8dd2956db266b068a73d0b7bdca9682 Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Wed, 12 Oct 2022 21:54:31 +0200 Subject: [PATCH 07/10] SCORU/Node: remove Obj.magic in open api generation --- .../bin_sc_rollup_node/RPC_server.ml | 13 +--- .../bin_sc_rollup_node/RPC_server.mli | 4 +- src/proto_alpha/bin_sc_rollup_node/layer1.ml | 15 +++++ src/proto_alpha/bin_sc_rollup_node/layer1.mli | 4 ++ .../main_sc_rollup_node_alpha.ml | 3 +- .../bin_sc_rollup_node/node_context.ml | 67 +++++++++++++++++++ .../bin_sc_rollup_node/node_context.mli | 4 ++ 7 files changed, 96 insertions(+), 14 deletions(-) diff --git a/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml b/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml index 27b1fe4bbb8d..00071689fe4e 100644 --- a/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml +++ b/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml @@ -377,22 +377,13 @@ module Make (PVM : Pvm.S) = struct Tezos_version.Bin_version.version_string |> Openapi.to_json - let openapi, openapi_wakeup = Lwt.task () - let () = Root_directory.register0 Sc_rollup_services.openapi - @@ fun _node_ctxt () () -> + @@ fun node_ctxt () () -> let open Lwt_result_syntax in - let*! json_openapi = openapi in + let*! json_openapi = generate_openapi node_ctxt in return json_openapi - let (_ : unit Lwt.t) = - let open Lwt_syntax in - (* WARNING: node_ctxt is unused during the registration process so we can - replace it by a dummy value. *) - let+ open_api = generate_openapi (Obj.magic () : Node_context.t) in - Lwt.wakeup openapi_wakeup open_api - let start node_ctxt configuration = let open Lwt_result_syntax in let Configuration.{rpc_addr; rpc_port; _} = configuration in diff --git a/src/proto_alpha/bin_sc_rollup_node/RPC_server.mli b/src/proto_alpha/bin_sc_rollup_node/RPC_server.mli index 726dbe1c37d1..1412935024f6 100644 --- a/src/proto_alpha/bin_sc_rollup_node/RPC_server.mli +++ b/src/proto_alpha/bin_sc_rollup_node/RPC_server.mli @@ -37,6 +37,6 @@ module Make (PVM : Pvm.S) : sig node will stop listening to incoming requests. *) val shutdown : RPC_server.server -> unit Lwt.t - (** Promise containing the OpenAPI JSON specification for the RPC server. *) - val openapi : Ezjsonm.value Lwt.t + (** Generate the OpenAPI JSON specification for the RPC server. *) + val generate_openapi : Node_context.t -> Ezjsonm.value Lwt.t end diff --git a/src/proto_alpha/bin_sc_rollup_node/layer1.ml b/src/proto_alpha/bin_sc_rollup_node/layer1.ml index 12edc4c987c8..c806da7e9a2e 100644 --- a/src/proto_alpha/bin_sc_rollup_node/layer1.ml +++ b/src/proto_alpha/bin_sc_rollup_node/layer1.ml @@ -309,3 +309,18 @@ let get_tezos_reorg_for_new_head l1_state old_head new_head = in return {old_chain = []; new_chain} | `Head old_head -> get_tezos_reorg_for_new_head l1_state old_head new_head + +(* This dummy value is only needed to generate the Open API specification + without starting the node. *) +let dummy (cctxt : Protocol_client_context.full) = + let heads, _ = Lwt_stream.create () in + let genesis_info = + Sc_rollup.Commitment.{level = Raw_level.root; commitment_hash = Hash.zero} + in + { + blocks_cache = Blocks_cache.create 1; + heads; + cctxt; + stopper = (fun () -> ()); + genesis_info; + } diff --git a/src/proto_alpha/bin_sc_rollup_node/layer1.mli b/src/proto_alpha/bin_sc_rollup_node/layer1.mli index 778c74c51c5e..986659833555 100644 --- a/src/proto_alpha/bin_sc_rollup_node/layer1.mli +++ b/src/proto_alpha/bin_sc_rollup_node/layer1.mli @@ -94,3 +94,7 @@ val get_tezos_reorg_for_new_head : [`Head of head | `Level of int32] -> head -> head Injector_common.reorg tzresult Lwt.t + +(**/*) + +val dummy : Protocol_client_context.full -> t diff --git a/src/proto_alpha/bin_sc_rollup_node/main_sc_rollup_node_alpha.ml b/src/proto_alpha/bin_sc_rollup_node/main_sc_rollup_node_alpha.ml index 5913d400d73b..a67ccc5d0fbf 100644 --- a/src/proto_alpha/bin_sc_rollup_node/main_sc_rollup_node_alpha.ml +++ b/src/proto_alpha/bin_sc_rollup_node/main_sc_rollup_node_alpha.ml @@ -323,7 +323,8 @@ let openapi_command = | None -> error_with "Invalid pvm name: %S" pvm_name in let module RPC = RPC_server.Make ((val pvm)) in - let*! openapi_json = RPC.openapi in + let*! node_ctxt = Node_context.dummy cctxt in + let*! openapi_json = RPC.generate_openapi node_ctxt in let*! () = cctxt#message "%a" Data_encoding.Json.pp openapi_json in return_unit) diff --git a/src/proto_alpha/bin_sc_rollup_node/node_context.ml b/src/proto_alpha/bin_sc_rollup_node/node_context.ml index 18c6b8cadf48..5f4adc508a2c 100644 --- a/src/proto_alpha/bin_sc_rollup_node/node_context.ml +++ b/src/proto_alpha/bin_sc_rollup_node/node_context.ml @@ -85,6 +85,73 @@ let init (cctxt : Protocol_client_context.full) dal_cctxt ~data_dir l1_ctxt context; } +(* This dummy node context is only needed to generate the Open API specification + without starting the node. *) +let dummy (cctxt : Protocol_client_context.full) = + let open Lwt_syntax in + let data_dir = + Filename.(concat (get_temp_dir_name ()) "openapi_scoru_node_dummy_data") + in + let* () = Lwt_utils_unix.create_dir data_dir in + let protocol_constants = + Data_encoding.Binary.of_bytes_exn Constants.encoding + @@ Data_encoding.Binary.to_bytes_exn Constants_repr.encoding + @@ Constants_repr.all_of_parametric + @@ Data_encoding.Binary.of_bytes_exn Constants_parametric_repr.encoding + @@ Data_encoding.Binary.to_bytes_exn + Constants.Parametric.encoding + Default_parameters.constants_mainnet + in + let rollup_address = Sc_rollup.Address.zero in + let operators = Configuration.Operator_purpose_map.empty in + let genesis_info = + Sc_rollup.Commitment.{level = Raw_level.root; commitment_hash = Hash.zero} + in + let kind = Sc_rollup.Kind.Wasm_2_0_0 in + let block_finality_time = 0 in + let fee_parameters = Configuration.Operator_purpose_map.empty in + let loser_mode = Loser_mode.no_failures in + let dummy_conf = + Configuration. + { + data_dir; + sc_rollup_address = rollup_address; + sc_rollup_node_operators = operators; + rpc_addr = ""; + rpc_port = -1; + reconnection_delay = -1.; + fee_parameters; + mode = Custom; + loser_mode; + dal_node_addr = ""; + dal_node_port = -1; + } + in + let* store = + Store_utils.load + Filename.(concat (get_temp_dir_name ()) "openapi_scoru_node_dummy_store") + in + let* context = Context.load dummy_conf in + let dal_cctxt = Dal_node_client.make_unix_cctxt dummy_conf in + let l1_ctxt = Layer1.dummy cctxt in + return + { + cctxt; + dal_cctxt; + data_dir; + l1_ctxt; + rollup_address; + operators; + genesis_info; + kind; + block_finality_time; + fee_parameters; + protocol_constants; + loser_mode; + store; + context; + } + let checkout_context node_ctxt block_hash = let open Lwt_result_syntax in let*! context_hash = Store.Contexts.find node_ctxt.store block_hash in diff --git a/src/proto_alpha/bin_sc_rollup_node/node_context.mli b/src/proto_alpha/bin_sc_rollup_node/node_context.mli index 1402747429c5..50be4fdc98fc 100644 --- a/src/proto_alpha/bin_sc_rollup_node/node_context.mli +++ b/src/proto_alpha/bin_sc_rollup_node/node_context.mli @@ -95,3 +95,7 @@ val init : (** [checkout_context node_ctxt block_hash] returns the context at block [block_hash]. *) val checkout_context : t -> Block_hash.t -> Context.t tzresult Lwt.t + +(**/**) + +val dummy : Protocol_client_context.full -> t Lwt.t -- GitLab From 280e4ee0b14bbaa9164a1352603d0d0dd1bd30c7 Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Mon, 17 Oct 2022 10:11:47 +0200 Subject: [PATCH 08/10] Revert "SCORU/Node: remove Obj.magic in open api generation" This reverts commit 325c83f4f8dd2956db266b068a73d0b7bdca9682. --- .../bin_sc_rollup_node/RPC_server.ml | 13 +++- .../bin_sc_rollup_node/RPC_server.mli | 4 +- src/proto_alpha/bin_sc_rollup_node/layer1.ml | 15 ----- src/proto_alpha/bin_sc_rollup_node/layer1.mli | 4 -- .../main_sc_rollup_node_alpha.ml | 3 +- .../bin_sc_rollup_node/node_context.ml | 67 ------------------- .../bin_sc_rollup_node/node_context.mli | 4 -- 7 files changed, 14 insertions(+), 96 deletions(-) diff --git a/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml b/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml index 00071689fe4e..27b1fe4bbb8d 100644 --- a/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml +++ b/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml @@ -377,13 +377,22 @@ module Make (PVM : Pvm.S) = struct Tezos_version.Bin_version.version_string |> Openapi.to_json + let openapi, openapi_wakeup = Lwt.task () + let () = Root_directory.register0 Sc_rollup_services.openapi - @@ fun node_ctxt () () -> + @@ fun _node_ctxt () () -> let open Lwt_result_syntax in - let*! json_openapi = generate_openapi node_ctxt in + let*! json_openapi = openapi in return json_openapi + let (_ : unit Lwt.t) = + let open Lwt_syntax in + (* WARNING: node_ctxt is unused during the registration process so we can + replace it by a dummy value. *) + let+ open_api = generate_openapi (Obj.magic () : Node_context.t) in + Lwt.wakeup openapi_wakeup open_api + let start node_ctxt configuration = let open Lwt_result_syntax in let Configuration.{rpc_addr; rpc_port; _} = configuration in diff --git a/src/proto_alpha/bin_sc_rollup_node/RPC_server.mli b/src/proto_alpha/bin_sc_rollup_node/RPC_server.mli index 1412935024f6..726dbe1c37d1 100644 --- a/src/proto_alpha/bin_sc_rollup_node/RPC_server.mli +++ b/src/proto_alpha/bin_sc_rollup_node/RPC_server.mli @@ -37,6 +37,6 @@ module Make (PVM : Pvm.S) : sig node will stop listening to incoming requests. *) val shutdown : RPC_server.server -> unit Lwt.t - (** Generate the OpenAPI JSON specification for the RPC server. *) - val generate_openapi : Node_context.t -> Ezjsonm.value Lwt.t + (** Promise containing the OpenAPI JSON specification for the RPC server. *) + val openapi : Ezjsonm.value Lwt.t end diff --git a/src/proto_alpha/bin_sc_rollup_node/layer1.ml b/src/proto_alpha/bin_sc_rollup_node/layer1.ml index c806da7e9a2e..12edc4c987c8 100644 --- a/src/proto_alpha/bin_sc_rollup_node/layer1.ml +++ b/src/proto_alpha/bin_sc_rollup_node/layer1.ml @@ -309,18 +309,3 @@ let get_tezos_reorg_for_new_head l1_state old_head new_head = in return {old_chain = []; new_chain} | `Head old_head -> get_tezos_reorg_for_new_head l1_state old_head new_head - -(* This dummy value is only needed to generate the Open API specification - without starting the node. *) -let dummy (cctxt : Protocol_client_context.full) = - let heads, _ = Lwt_stream.create () in - let genesis_info = - Sc_rollup.Commitment.{level = Raw_level.root; commitment_hash = Hash.zero} - in - { - blocks_cache = Blocks_cache.create 1; - heads; - cctxt; - stopper = (fun () -> ()); - genesis_info; - } diff --git a/src/proto_alpha/bin_sc_rollup_node/layer1.mli b/src/proto_alpha/bin_sc_rollup_node/layer1.mli index 986659833555..778c74c51c5e 100644 --- a/src/proto_alpha/bin_sc_rollup_node/layer1.mli +++ b/src/proto_alpha/bin_sc_rollup_node/layer1.mli @@ -94,7 +94,3 @@ val get_tezos_reorg_for_new_head : [`Head of head | `Level of int32] -> head -> head Injector_common.reorg tzresult Lwt.t - -(**/*) - -val dummy : Protocol_client_context.full -> t diff --git a/src/proto_alpha/bin_sc_rollup_node/main_sc_rollup_node_alpha.ml b/src/proto_alpha/bin_sc_rollup_node/main_sc_rollup_node_alpha.ml index a67ccc5d0fbf..5913d400d73b 100644 --- a/src/proto_alpha/bin_sc_rollup_node/main_sc_rollup_node_alpha.ml +++ b/src/proto_alpha/bin_sc_rollup_node/main_sc_rollup_node_alpha.ml @@ -323,8 +323,7 @@ let openapi_command = | None -> error_with "Invalid pvm name: %S" pvm_name in let module RPC = RPC_server.Make ((val pvm)) in - let*! node_ctxt = Node_context.dummy cctxt in - let*! openapi_json = RPC.generate_openapi node_ctxt in + let*! openapi_json = RPC.openapi in let*! () = cctxt#message "%a" Data_encoding.Json.pp openapi_json in return_unit) diff --git a/src/proto_alpha/bin_sc_rollup_node/node_context.ml b/src/proto_alpha/bin_sc_rollup_node/node_context.ml index 5f4adc508a2c..18c6b8cadf48 100644 --- a/src/proto_alpha/bin_sc_rollup_node/node_context.ml +++ b/src/proto_alpha/bin_sc_rollup_node/node_context.ml @@ -85,73 +85,6 @@ let init (cctxt : Protocol_client_context.full) dal_cctxt ~data_dir l1_ctxt context; } -(* This dummy node context is only needed to generate the Open API specification - without starting the node. *) -let dummy (cctxt : Protocol_client_context.full) = - let open Lwt_syntax in - let data_dir = - Filename.(concat (get_temp_dir_name ()) "openapi_scoru_node_dummy_data") - in - let* () = Lwt_utils_unix.create_dir data_dir in - let protocol_constants = - Data_encoding.Binary.of_bytes_exn Constants.encoding - @@ Data_encoding.Binary.to_bytes_exn Constants_repr.encoding - @@ Constants_repr.all_of_parametric - @@ Data_encoding.Binary.of_bytes_exn Constants_parametric_repr.encoding - @@ Data_encoding.Binary.to_bytes_exn - Constants.Parametric.encoding - Default_parameters.constants_mainnet - in - let rollup_address = Sc_rollup.Address.zero in - let operators = Configuration.Operator_purpose_map.empty in - let genesis_info = - Sc_rollup.Commitment.{level = Raw_level.root; commitment_hash = Hash.zero} - in - let kind = Sc_rollup.Kind.Wasm_2_0_0 in - let block_finality_time = 0 in - let fee_parameters = Configuration.Operator_purpose_map.empty in - let loser_mode = Loser_mode.no_failures in - let dummy_conf = - Configuration. - { - data_dir; - sc_rollup_address = rollup_address; - sc_rollup_node_operators = operators; - rpc_addr = ""; - rpc_port = -1; - reconnection_delay = -1.; - fee_parameters; - mode = Custom; - loser_mode; - dal_node_addr = ""; - dal_node_port = -1; - } - in - let* store = - Store_utils.load - Filename.(concat (get_temp_dir_name ()) "openapi_scoru_node_dummy_store") - in - let* context = Context.load dummy_conf in - let dal_cctxt = Dal_node_client.make_unix_cctxt dummy_conf in - let l1_ctxt = Layer1.dummy cctxt in - return - { - cctxt; - dal_cctxt; - data_dir; - l1_ctxt; - rollup_address; - operators; - genesis_info; - kind; - block_finality_time; - fee_parameters; - protocol_constants; - loser_mode; - store; - context; - } - let checkout_context node_ctxt block_hash = let open Lwt_result_syntax in let*! context_hash = Store.Contexts.find node_ctxt.store block_hash in diff --git a/src/proto_alpha/bin_sc_rollup_node/node_context.mli b/src/proto_alpha/bin_sc_rollup_node/node_context.mli index 50be4fdc98fc..1402747429c5 100644 --- a/src/proto_alpha/bin_sc_rollup_node/node_context.mli +++ b/src/proto_alpha/bin_sc_rollup_node/node_context.mli @@ -95,7 +95,3 @@ val init : (** [checkout_context node_ctxt block_hash] returns the context at block [block_hash]. *) val checkout_context : t -> Block_hash.t -> Context.t tzresult Lwt.t - -(**/**) - -val dummy : Protocol_client_context.full -> t Lwt.t -- GitLab From 8e24ac56bb3ed92bc0426ad44b17582ff0d5929c Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Mon, 17 Oct 2022 10:36:51 +0200 Subject: [PATCH 09/10] SCORU/Node: register dummy services without handlers for OpenAPI --- .../bin_sc_rollup_node/RPC_server.ml | 61 +++++++++++++------ .../bin_sc_rollup_node/RPC_server.mli | 4 +- .../main_sc_rollup_node_alpha.ml | 2 +- 3 files changed, 45 insertions(+), 22 deletions(-) diff --git a/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml b/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml index 27b1fe4bbb8d..4fec9c537c50 100644 --- a/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml +++ b/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml @@ -119,16 +119,30 @@ module type PARAM = sig val context_of_prefix : Node_context.t -> prefix -> context tzresult Lwt.t end +module type DIRECTORY = sig + val build_directory : Node_context.t -> unit RPC_directory.t + + val build_dummy_directory : unit -> unit RPC_directory.t +end + module Make_directory (S : PARAM) = struct open S let directory : context tzresult RPC_directory.t ref = ref RPC_directory.empty + (** This directory is used to generate the API description without handlers. *) + let dummy_directory : prefix RPC_directory.t ref = ref RPC_directory.empty + let register service f = directory := RPC_directory.register !directory service f + let register_dummy service = + dummy_directory := + RPC_directory.register !dummy_directory service (fun _ -> assert false) + let register0 service f = let open Lwt_result_syntax in + register_dummy (RPC_service.subst0 service) ; register (RPC_service.subst0 service) @@ fun ctxt query input -> let*? ctxt = ctxt in f ctxt query input @@ -137,6 +151,8 @@ module Make_directory (S : PARAM) = struct !directory |> RPC_directory.map (fun prefix -> context_of_prefix node_ctxt prefix) |> RPC_directory.prefix prefix + + let build_dummy_directory () = !dummy_directory |> RPC_directory.prefix prefix end module Root_directory = Make_directory (struct @@ -183,6 +199,14 @@ module Block_directory = Make_directory (struct (node_ctxt, block) end) +let directory_modules = + [ + (module Root_directory : DIRECTORY); + (module Global_directory : DIRECTORY); + (module Local_directory : DIRECTORY); + (module Block_directory : DIRECTORY); + ] + module Common = struct let () = Block_directory.register0 Sc_rollup_services.Global.Block.num_messages @@ -345,22 +369,30 @@ module Make (PVM : Pvm.S) = struct let register node_ctxt = let dir = List.fold_left - (fun dir f -> RPC_directory.merge dir (f node_ctxt)) + (fun dir (module D : DIRECTORY) -> + RPC_directory.merge dir (D.build_directory node_ctxt)) RPC_directory.empty - [ - Root_directory.build_directory; - Global_directory.build_directory; - Local_directory.build_directory; - Block_directory.build_directory; - ] + directory_modules in RPC_directory.register_describe_directory_service dir RPC_service.description_service - let generate_openapi node_ctxt = + let description_directory () = + let dir = + List.fold_left + (fun dir (module D : DIRECTORY) -> + RPC_directory.merge dir (D.build_dummy_directory ())) + RPC_directory.empty + directory_modules + in + RPC_directory.register_describe_directory_service + dir + RPC_service.description_service + + let generate_openapi () = let open Lwt_syntax in - let dir = register node_ctxt in + let dir = description_directory () in let+ descr = RPC_directory.describe_directory ~recurse:true ~arg:() dir in let json_api = Data_encoding.Json.construct @@ -377,22 +409,13 @@ module Make (PVM : Pvm.S) = struct Tezos_version.Bin_version.version_string |> Openapi.to_json - let openapi, openapi_wakeup = Lwt.task () - let () = Root_directory.register0 Sc_rollup_services.openapi @@ fun _node_ctxt () () -> let open Lwt_result_syntax in - let*! json_openapi = openapi in + let*! json_openapi = generate_openapi () in return json_openapi - let (_ : unit Lwt.t) = - let open Lwt_syntax in - (* WARNING: node_ctxt is unused during the registration process so we can - replace it by a dummy value. *) - let+ open_api = generate_openapi (Obj.magic () : Node_context.t) in - Lwt.wakeup openapi_wakeup open_api - let start node_ctxt configuration = let open Lwt_result_syntax in let Configuration.{rpc_addr; rpc_port; _} = configuration in diff --git a/src/proto_alpha/bin_sc_rollup_node/RPC_server.mli b/src/proto_alpha/bin_sc_rollup_node/RPC_server.mli index 726dbe1c37d1..a70e4f5a2752 100644 --- a/src/proto_alpha/bin_sc_rollup_node/RPC_server.mli +++ b/src/proto_alpha/bin_sc_rollup_node/RPC_server.mli @@ -37,6 +37,6 @@ module Make (PVM : Pvm.S) : sig node will stop listening to incoming requests. *) val shutdown : RPC_server.server -> unit Lwt.t - (** Promise containing the OpenAPI JSON specification for the RPC server. *) - val openapi : Ezjsonm.value Lwt.t + (** Generate the OpenAPI JSON specification for the RPC server. *) + val generate_openapi : unit -> Ezjsonm.value Lwt.t end diff --git a/src/proto_alpha/bin_sc_rollup_node/main_sc_rollup_node_alpha.ml b/src/proto_alpha/bin_sc_rollup_node/main_sc_rollup_node_alpha.ml index 5913d400d73b..ffba1c244cde 100644 --- a/src/proto_alpha/bin_sc_rollup_node/main_sc_rollup_node_alpha.ml +++ b/src/proto_alpha/bin_sc_rollup_node/main_sc_rollup_node_alpha.ml @@ -323,7 +323,7 @@ let openapi_command = | None -> error_with "Invalid pvm name: %S" pvm_name in let module RPC = RPC_server.Make ((val pvm)) in - let*! openapi_json = RPC.openapi in + let*! openapi_json = RPC.generate_openapi () in let*! () = cctxt#message "%a" Data_encoding.Json.pp openapi_json in return_unit) -- GitLab From 0aa1a41efa8a22efe3a96355698d9be89fb04330 Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Mon, 17 Oct 2022 11:13:07 +0200 Subject: [PATCH 10/10] SCORU/Node: generated openapi spec --- docs/api/sc-rollup-node-rpc-openapi.json | 4475 ++++++++++++++++++++++ 1 file changed, 4475 insertions(+) create mode 100644 docs/api/sc-rollup-node-rpc-openapi.json diff --git a/docs/api/sc-rollup-node-rpc-openapi.json b/docs/api/sc-rollup-node-rpc-openapi.json new file mode 100644 index 000000000000..039e9df8e57b --- /dev/null +++ b/docs/api/sc-rollup-node-rpc-openapi.json @@ -0,0 +1,4475 @@ +{ "openapi": "3.0.0", + "info": + { "title": "SC rollup node RPC", + "description": "Smart contracts rollup node RPC API", + "version": "060fc372 (2022-10-17 11:11:04 +0200) (15.0~rc1+dev)" }, + "paths": + { "/describe": + { "get": + { "description": "RPCs documentation and input/output schema", + "parameters": + [ { "name": "recurse", "in": "query", "required": true, + "schema": { "type": "string" } } ], + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "$ref": "#/components/schemas/service_tree" } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/block/{block_id}/dal/slot_headers": + { "get": + { "description": "Availability slots for a given block", + "parameters": + [ { "name": "block_id", "in": "path", + "description": "An L1 block identifier.", + "required": true, "schema": { "type": "string" } } ], + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "type": "array", + "items": + { "type": "object", + "properties": + { "level": + { "type": "integer", + "minimum": -2147483648, + "maximum": 2147483647 }, + "index": + { "type": "integer", + "minimum": 0, "maximum": 255 }, + "commitment": + { "$ref": + "#/components/schemas/DAL_commitment" } }, + "required": + [ "level", "index", "commitment" ] } } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/block/{block_id}/dal/slot_page": + { "get": + { "description": + "Data availability downloaded slot pages for a given block hash", + "parameters": + [ { "name": "block_id", "in": "path", + "description": "An L1 block identifier.", + "required": true, "schema": { "type": "string" } }, + { "name": "index", "in": "query", "required": false, + "schema": { "type": "string" } }, + { "name": "slot_page", "in": "query", "required": false, + "schema": { "type": "string" } } ], + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "type": "object", + "properties": + { "result": + { "$ref": + "#/components/schemas/unistring" }, + "contents": + { "type": "string", + "pattern": + "^([a-zA-Z0-9][a-zA-Z0-9])*$" } }, + "required": [ "result" ] } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/block/{block_id}/dal/slot_pages": + { "get": + { "description": + "Data availability downloaded slot pages for a given block hash", + "parameters": + [ { "name": "block_id", "in": "path", + "description": "An L1 block identifier.", + "required": true, "schema": { "type": "string" } } ], + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "type": "array", + "items": + { "type": "object", + "properties": + { "index": + { "type": "integer", + "minimum": 0, "maximum": 255 }, + "contents": + { "type": "array", + "items": + { "nullable": true, + "oneOf": + [ { "title": "Some", + "type": "string", + "pattern": + "^([a-zA-Z0-9][a-zA-Z0-9])*$" } ] } } }, + "required": [ "index", "contents" ] } } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/block/{block_id}/dal/slot_subscriptions": + { "get": + { "description": + "Data availability layer slot subscriptions at block", + "parameters": + [ { "name": "block_id", "in": "path", + "description": "An L1 block identifier.", + "required": true, "schema": { "type": "string" } } ], + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "nullable": true, + "oneOf": + [ { "title": "Some", "type": "array", + "items": + { "type": "integer", "minimum": 0, + "maximum": 255 } } ] } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/block/{block_id}/hash": + { "get": + { "description": + "Tezos block hash of block known to the smart-contract rollup node", + "parameters": + [ { "name": "block_id", "in": "path", + "description": "An L1 block identifier.", + "required": true, "schema": { "type": "string" } } ], + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "title": + "A block identifier (Base58Check-encoded)", + "oneOf": + [ { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/block/{block_id}/inbox": + { "get": + { "description": "Rollup inbox for block", + "parameters": + [ { "name": "block_id", "in": "path", + "description": "An L1 block identifier.", + "required": true, "schema": { "type": "string" } } ], + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "type": "object", + "properties": + { "rollup": + { "$ref": + "#/components/schemas/alpha.rollup_address" }, + "message_counter": + { "$ref": + "#/components/schemas/positive_bignum" }, + "nb_messages_in_commitment_period": + { "$ref": + "#/components/schemas/int64" }, + "starting_level_of_current_commitment_period": + { "type": "integer", + "minimum": -2147483648, + "maximum": 2147483647 }, + "level": + { "type": "integer", + "minimum": -2147483648, + "maximum": 2147483647 }, + "current_level_hash": + { "$ref": + "#/components/schemas/inbox_hash" }, + "old_levels_messages": + { "type": "object", + "properties": + { "index": + { "type": "integer", + "minimum": -1073741824, + "maximum": 1073741823 }, + "content": + { "$ref": + "#/components/schemas/inbox_hash" }, + "back_pointers": + { "type": "array", + "items": + { "$ref": + "#/components/schemas/inbox_hash" } } }, + "required": + [ "index", "content", + "back_pointers" ] } }, + "required": + [ "rollup", "message_counter", + "nb_messages_in_commitment_period", + "starting_level_of_current_commitment_period", + "level", "current_level_hash", + "old_levels_messages" ] } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/block/{block_id}/level": + { "get": + { "description": + "Level of Tezos block known to the smart-contract rollup node", + "parameters": + [ { "name": "block_id", "in": "path", + "description": "An L1 block identifier.", + "required": true, "schema": { "type": "string" } } ], + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "type": "integer", "minimum": -2147483648, + "maximum": 2147483647 } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/block/{block_id}/num_messages": + { "get": + { "description": "Number of messages for specified block", + "parameters": + [ { "name": "block_id", "in": "path", + "description": "An L1 block identifier.", + "required": true, "schema": { "type": "string" } } ], + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "title": "Big number", + "description": + "Decimal representation of a big number", + "type": "string" } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/block/{block_id}/outbox": + { "get": + { "description": "Outbox at block", + "parameters": + [ { "name": "block_id", "in": "path", + "description": "An L1 block identifier.", + "required": true, "schema": { "type": "string" } } ], + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "type": "array", + "items": + { "type": "object", + "properties": + { "outbox_level": + { "type": "integer", + "minimum": -2147483648, + "maximum": 2147483647 }, + "message_index": + { "$ref": + "#/components/schemas/positive_bignum" }, + "message": + { "type": "object", + "properties": + { "transactions": + { "type": "array", + "items": + { "type": "object", + "properties": + { "parameters": + { "$ref": + "#/components/schemas/micheline.alpha.michelson_v1.expression" }, + "destination": + { "$ref": + "#/components/schemas/alpha.contract_id.originated" }, + "entrypoint": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "parameters", + "destination" ] } } }, + "required": [ "transactions" ] } }, + "required": + [ "outbox_level", "message_index", + "message" ] } } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/block/{block_id}/state": + { "get": + { "description": + "Retrieve value from key is PVM state of specified block", + "parameters": + [ { "name": "block_id", "in": "path", + "description": "An L1 block identifier.", + "required": true, "schema": { "type": "string" } }, + { "name": "key", "in": "query", "required": true, + "schema": { "type": "string" } } ], + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/block/{block_id}/state_hash": + { "get": + { "description": "State hash for this block", + "parameters": + [ { "name": "block_id", "in": "path", + "description": "An L1 block identifier.", + "required": true, "schema": { "type": "string" } } ], + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "title": + "The hash of the VM state of a smart contract rollup (Base58Check-encoded)", + "oneOf": + [ { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/block/{block_id}/status": + { "get": + { "description": "PVM status at block", + "parameters": + [ { "name": "block_id", "in": "path", + "description": "An L1 block identifier.", + "required": true, "schema": { "type": "string" } } ], + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "title": "Universal string representation", + "description": + "Either a plain UTF8 string, or a sequence of bytes for strings that contain invalid byte sequences.", + "oneOf": + [ { "type": "string" }, + { "type": "object", + "properties": + { "invalid_utf8_string": + { "type": "array", + "items": + { "type": "integer", + "minimum": 0, + "maximum": 255 } } }, + "required": [ "invalid_utf8_string" ] } ] } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/block/{block_id}/ticks": + { "get": + { "description": "Number of ticks for specified level", + "parameters": + [ { "name": "block_id", "in": "path", + "description": "An L1 block identifier.", + "required": true, "schema": { "type": "string" } } ], + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "title": "Big number", + "description": + "Decimal representation of a big number", + "type": "string" } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/block/{block_id}/total_ticks": + { "get": + { "description": "Total number of ticks at specified block", + "parameters": + [ { "name": "block_id", "in": "path", + "description": "An L1 block identifier.", + "required": true, "schema": { "type": "string" } } ], + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "title": "Positive big number", + "description": + "Decimal representation of a positive big number", + "type": "string" } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/last_stored_commitment": + { "get": + { "description": "Last commitment computed by the node", + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "nullable": true, + "oneOf": + [ { "title": "Some", "type": "object", + "properties": + { "commitment": + { "type": "object", + "properties": + { "compressed_state": + { "$ref": + "#/components/schemas/state_hash" }, + "inbox_level": + { "type": "integer", + "minimum": + -2147483648, + "maximum": 2147483647 }, + "predecessor": + { "$ref": + "#/components/schemas/commitment_hash" }, + "number_of_ticks": + { "$ref": + "#/components/schemas/int64" } }, + "required": + [ "compressed_state", + "inbox_level", + "predecessor", + "number_of_ticks" ] }, + "hash": + { "$ref": + "#/components/schemas/commitment_hash" }, + "published_at_level": + { "type": "integer", + "minimum": -2147483648, + "maximum": 2147483647 } }, + "required": [ "commitment", "hash" ] } ] } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/proofs/outbox": + { "get": + { "description": + "Generate serialized output proof for some outbox message", + "parameters": + [ { "name": "outbox_level", "in": "query", "required": false, + "schema": { "type": "string" } }, + { "name": "message_index", "in": "query", + "required": false, "schema": { "type": "string" } }, + { "name": "serialized_outbox_message", "in": "query", + "required": false, "schema": { "type": "string" } } ], + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "type": "object", + "properties": + { "commitment": + { "$ref": + "#/components/schemas/commitment_hash" }, + "proof": + { "type": "string", + "pattern": + "^([a-zA-Z0-9][a-zA-Z0-9])*$" } }, + "required": [ "commitment", "proof" ] } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/sc_rollup_address": + { "get": + { "description": "Smart-contract rollup address", + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "title": + "A smart contract rollup address (Base58Check-encoded)", + "oneOf": + [ { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/tezos_head": + { "get": + { "description": + "Tezos head known to the smart-contract rollup node", + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "nullable": true, + "oneOf": + [ { "title": "Some", + "oneOf": + [ { "$ref": + "#/components/schemas/block_hash" } ] } ] } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/global/tezos_level": + { "get": + { "description": + "Tezos level known to the smart-contract rollup node", + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "nullable": true, + "oneOf": + [ { "title": "Some", "type": "integer", + "minimum": -2147483648, + "maximum": 2147483647 } ] } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/local/last_published_commitment": + { "get": + { "description": "Last commitment published by the node", + "responses": + { "200": + { "description": "", + "content": + { "application/json": + { "schema": + { "nullable": true, + "oneOf": + [ { "title": "Some", "type": "object", + "properties": + { "commitment": + { "type": "object", + "properties": + { "compressed_state": + { "$ref": + "#/components/schemas/state_hash" }, + "inbox_level": + { "type": "integer", + "minimum": + -2147483648, + "maximum": 2147483647 }, + "predecessor": + { "$ref": + "#/components/schemas/commitment_hash" }, + "number_of_ticks": + { "$ref": + "#/components/schemas/int64" } }, + "required": + [ "compressed_state", + "inbox_level", + "predecessor", + "number_of_ticks" ] }, + "hash": + { "$ref": + "#/components/schemas/commitment_hash" }, + "published_at_level": + { "type": "integer", + "minimum": -2147483648, + "maximum": 2147483647 } }, + "required": [ "commitment", "hash" ] } ] } } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } }, + "/openapi": + { "get": + { "description": "OpenAPI specification of RPCs for rollup node", + "responses": + { "200": + { "description": "", + "content": { "application/json": { "schema": {} } } }, + "default": + { "description": "", + "content": + { "application/json": + { "schema": + { "description": + "The full list of errors is available with the global RPC `GET errors`" } } } } } } } }, + "components": + { "schemas": + { "DAL_commitment": + { "title": + "Commitment representation for the DAL (Base58Check-encoded)", + "oneOf": [ { "$ref": "#/components/schemas/unistring" } ] }, + "alpha.contract_id.originated": + { "title": "A contract handle -- originated account", + "description": + "A contract notation as given to an RPC or inside scripts. Can be a base58 originated contract hash.", + "oneOf": [ { "$ref": "#/components/schemas/unistring" } ] }, + "alpha.michelson.v1.primitives": + { "type": "string", + "enum": + [ "SHA512", "HASH_KEY", "SIZE", "SAPLING_VERIFY_UPDATE", + "False", "SAPLING_EMPTY_STATE", "RENAME", "sapling_state", + "UNPACK", "contract", "address", "chest_key", "Pair", + "IF_NONE", "key_hash", "operation", "storage", "UNPAIR", + "view", "BLAKE2B", "AMOUNT", "DUP", "or", "NEG", "int", + "SELF_ADDRESS", "ISNAT", "DIG", "CHAIN_ID", "string", + "LSR", "lambda", "sapling_transaction", "ABS", + "CREATE_CONTRACT", "SHA256", "JOIN_TICKETS", "LEVEL", + "bls12_381_fr", "sapling_transaction_deprecated", + "tx_rollup_l2_address", "mutez", "CHECK_SIGNATURE", + "STEPS_TO_QUOTA", "SELF", "DIP", "map", "AND", "COMPARE", + "bls12_381_g1", "MAP", "APPLY", "Elt", "bool", "NOT", + "IMPLICIT_ACCOUNT", "LT", "UNIT", "EMIT", "SET_DELEGATE", + "Some", "parameter", "bytes", "chest", "EMPTY_BIG_MAP", + "None", "SUB", "list", "ADD", "nat", "VOTING_POWER", + "option", "CDR", "GT", "IF_CONS", "CONS", "LSL", "DUG", + "PACK", "SHA3", "SOURCE", "set", "SUB_MUTEZ", "LAMBDA", + "RIGHT", "CREATE_ACCOUNT", "Unit", "CAST", "NEQ", "ITER", + "FAILWITH", "PUSH", "OPEN_CHEST", "SOME", "big_map", + "BALANCE", "NIL", "signature", "CAR", "UPDATE", + "TOTAL_VOTING_POWER", "PAIR", "LAMBDA_REC", "ADDRESS", + "True", "Right", "Lambda_rec", "IF", "NEVER", "chain_id", + "SWAP", "EMPTY_MAP", "MUL", "INT", "pair", "KECCAK", + "LEFT", "Left", "SPLIT_TICKET", "constant", "ticket", + "EDIV", "LOOP", "timestamp", "TICKET", "LE", + "PAIRING_CHECK", "MIN_BLOCK_TIME", "OR", "key", + "GET_AND_UPDATE", "unit", "never", "NONE", "IF_LEFT", + "GET", "NOW", "TRANSFER_TOKENS", "LOOP_LEFT", "CONTRACT", + "TICKET_DEPRECATED", "VIEW", "EMPTY_SET", "XOR", + "bls12_381_g2", "READ_TICKET", "EQ", "GE", "MEM", "SENDER", + "DROP", "CONCAT", "EXEC", "SLICE", "code" ] }, + "alpha.rollup_address": + { "title": "A smart contract rollup address", + "description": + "A smart contract rollup is identified by a base58 address starting with scr1", + "oneOf": [ { "$ref": "#/components/schemas/unistring" } ] }, + "bignum": + { "title": "Big number", + "description": "Decimal representation of a big number", + "type": "string" }, + "block_hash": + { "title": "A block identifier (Base58Check-encoded)", + "oneOf": [ { "$ref": "#/components/schemas/unistring" } ] }, + "commitment_hash": + { "title": + "The hash of a commitment of a smart contract rollup (Base58Check-encoded)", + "oneOf": [ { "$ref": "#/components/schemas/unistring" } ] }, + "inbox_hash": + { "title": + "The hash of an inbox of a smart contract rollup (Base58Check-encoded)", + "oneOf": [ { "$ref": "#/components/schemas/unistring" } ] }, + "int64": + { "title": "64 bit integers", + "description": "Decimal representation of 64 bit integers", + "type": "string" }, + "layout": + { "oneOf": + [ { "title": "Zero_width", "type": "object", + "properties": + { "kind": + { "type": "string", "enum": [ "Zero_width" ] } }, + "required": [ "kind" ] }, + { "title": "Int", "type": "object", + "properties": + { "size": + { "type": "string", + "enum": + [ "Int32", "Int16", "Uint16", "Int64", "Int8", + "Uint8" ] }, + "kind": { "type": "string", "enum": [ "Int" ] } }, + "required": [ "size", "kind" ] }, + { "title": "Bool", "type": "object", + "properties": + { "kind": { "type": "string", "enum": [ "Bool" ] } }, + "required": [ "kind" ] }, + { "title": "RangedInt", "type": "object", + "properties": + { "min": + { "type": "integer", "minimum": -1073741824, + "maximum": 1073741823 }, + "max": + { "type": "integer", "minimum": -1073741824, + "maximum": 1073741823 }, + "kind": { "type": "string", "enum": [ "RangedInt" ] } }, + "required": [ "min", "max", "kind" ] }, + { "title": "RangedFloat", "type": "object", + "properties": + { "min": { "type": "number" }, + "max": { "type": "number" }, + "kind": + { "type": "string", "enum": [ "RangedFloat" ] } }, + "required": [ "min", "max", "kind" ] }, + { "title": "Float", "type": "object", + "properties": + { "kind": { "type": "string", "enum": [ "Float" ] } }, + "required": [ "kind" ] }, + { "title": "Bytes", "type": "object", + "properties": + { "kind": { "type": "string", "enum": [ "Bytes" ] } }, + "required": [ "kind" ] }, + { "title": "String", "type": "object", + "properties": + { "kind": { "type": "string", "enum": [ "String" ] } }, + "required": [ "kind" ] }, + { "title": "Enum", "type": "object", + "properties": + { "size": + { "type": "string", + "enum": [ "Int16", "Uint16", "Int8", "Uint8" ] }, + "reference": + { "$ref": "#/components/schemas/unistring" }, + "kind": { "type": "string", "enum": [ "Enum" ] } }, + "required": [ "size", "reference", "kind" ] }, + { "title": "Seq", "type": "object", + "properties": + { "layout": { "$ref": "#/components/schemas/layout" }, + "kind": { "type": "string", "enum": [ "Seq" ] }, + "length_limit": + { "oneOf": + [ { "title": "No_limit", "type": "object", + "properties": + { "kind": + { "type": "string", + "enum": [ "no-limit" ] } }, + "required": [ "kind" ] }, + { "title": "At_most", "type": "object", + "properties": + { "kind": + { "type": "string", + "enum": [ "at-most" ] }, + "at_most": + { "type": "integer", + "minimum": -1073741824, + "maximum": 1073741823 } }, + "required": [ "kind", "at_most" ] }, + { "title": "Exactly", "type": "object", + "properties": + { "kind": + { "type": "string", + "enum": [ "exactly" ] }, + "exactly": + { "type": "integer", + "minimum": -1073741824, + "maximum": 1073741823 } }, + "required": [ "kind", "exactly" ] } ] } }, + "required": [ "layout", "kind" ] }, + { "title": "Ref", "type": "object", + "properties": + { "name": { "$ref": "#/components/schemas/unistring" }, + "kind": { "type": "string", "enum": [ "Ref" ] } }, + "required": [ "name", "kind" ] }, + { "title": "Padding", "type": "object", + "properties": + { "kind": { "type": "string", "enum": [ "Padding" ] } }, + "required": [ "kind" ] } ] }, + "micheline.alpha.michelson_v1.expression": + { "oneOf": + [ { "title": "Int", "type": "object", + "properties": + { "int": { "$ref": "#/components/schemas/bignum" } }, + "required": [ "int" ] }, + { "title": "String", "type": "object", + "properties": + { "string": + { "$ref": "#/components/schemas/unistring" } }, + "required": [ "string" ] }, + { "title": "Bytes", "type": "object", + "properties": + { "bytes": + { "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" } }, + "required": [ "bytes" ] }, + { "title": "Sequence", "type": "array", + "items": + { "$ref": + "#/components/schemas/micheline.alpha.michelson_v1.expression" } }, + { "title": "Prim__generic", + "description": + "Generic primitive (any number of args with or without annotations)", + "type": "object", + "properties": + { "prim": + { "$ref": + "#/components/schemas/alpha.michelson.v1.primitives" }, + "args": + { "type": "array", + "items": + { "$ref": + "#/components/schemas/micheline.alpha.michelson_v1.expression" } }, + "annots": + { "type": "array", "items": { "type": "string" } } }, + "required": [ "prim" ] } ] }, + "positive_bignum": + { "title": "Positive big number", + "description": + "Decimal representation of a positive big number", + "type": "string" }, + "schema.field": + { "oneOf": + [ { "title": "Named_field", "type": "object", + "properties": + { "name": { "$ref": "#/components/schemas/unistring" }, + "layout": { "$ref": "#/components/schemas/layout" }, + "data_kind": + { "$ref": "#/components/schemas/schema.kind" }, + "kind": { "type": "string", "enum": [ "named" ] } }, + "required": [ "name", "layout", "data_kind", "kind" ] }, + { "title": "Anonymous_field", "type": "object", + "properties": + { "layout": { "$ref": "#/components/schemas/layout" }, + "kind": { "type": "string", "enum": [ "anon" ] }, + "data_kind": + { "$ref": "#/components/schemas/schema.kind" } }, + "required": [ "layout", "kind", "data_kind" ] }, + { "title": "Dynamic_field", "type": "object", + "properties": + { "kind": { "type": "string", "enum": [ "dyn" ] }, + "name": { "$ref": "#/components/schemas/unistring" }, + "num_fields": + { "type": "integer", "minimum": -1073741824, + "maximum": 1073741823 }, + "size": + { "type": "string", + "enum": [ "Uint30", "Uint16", "Uint8" ] } }, + "required": [ "kind", "num_fields", "size" ] }, + { "title": "Optional_field", "type": "object", + "properties": + { "kind": + { "type": "string", + "enum": [ "option_indicator" ] }, + "name": { "$ref": "#/components/schemas/unistring" } }, + "required": [ "kind", "name" ] } ] }, + "schema.kind": + { "oneOf": + [ { "title": "Fixed", "type": "object", + "properties": + { "size": + { "type": "integer", "minimum": -1073741824, + "maximum": 1073741823 }, + "kind": { "type": "string", "enum": [ "Float" ] } }, + "required": [ "size", "kind" ] }, + { "title": "Dynamic", "type": "object", + "properties": + { "kind": { "type": "string", "enum": [ "Dynamic" ] } }, + "required": [ "kind" ] }, + { "title": "Variable", "type": "object", + "properties": + { "kind": { "type": "string", "enum": [ "Variable" ] } }, + "required": [ "kind" ] } ] }, + "service_tree": + { "oneOf": + [ { "title": "Static", "type": "object", + "properties": + { "static": + { "type": "object", + "properties": + { "get_service": + { "type": "object", + "properties": + { "meth": + { "type": "string", + "enum": + [ "PATCH", "GET", "POST", + "PUT", "DELETE" ] }, + "path": + { "type": "array", + "items": + { "oneOf": + [ { "title": "PStatic", + "oneOf": + [ { "$ref": + "#/components/schemas/unistring" } ] }, + { "title": "PDynamic", + "type": "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", "name" ] }, + { "title": "PDynamicTail", + "type": "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "multiple" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", "name" ] } ] } }, + "description": + { "$ref": + "#/components/schemas/unistring" }, + "query": + { "type": "array", + "items": + { "type": "object", + "properties": + { "name": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" }, + "kind": + { "oneOf": + [ { "title": + "Single", + "type": + "object", + "properties": + { "single": + { "type": + "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", + "name" ] } }, + "required": + [ "single" ] }, + { "title": + "Optional", + "type": + "object", + "properties": + { "optional": + { "type": + "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", + "name" ] } }, + "required": + [ "optional" ] }, + { "title": "Flag", + "type": + "object", + "properties": + { "flag": + { "type": + "object", + "properties": + {} } }, + "required": + [ "flag" ] }, + { "title": + "Multi", + "type": + "object", + "properties": + { "multi": + { "type": + "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", + "name" ] } }, + "required": + [ "multi" ] } ] } }, + "required": + [ "name", "kind" ] } }, + "input": + { "type": "object", + "properties": + { "json_schema": {}, + "binary_schema": + { "type": "object", + "properties": + { "toplevel": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] }, + "fields": + { "type": "array", + "items": + { "type": + "object", + "properties": + { "description": + { "type": + "object", + "properties": + { "title": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "title" ] }, + "encoding": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] } }, + "required": + [ "description", + "encoding" ] } } }, + "required": + [ "toplevel", + "fields" ] } }, + "required": + [ "json_schema", + "binary_schema" ] }, + "output": + { "type": "object", + "properties": + { "json_schema": {}, + "binary_schema": + { "type": "object", + "properties": + { "toplevel": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] }, + "fields": + { "type": "array", + "items": + { "type": + "object", + "properties": + { "description": + { "type": + "object", + "properties": + { "title": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "title" ] }, + "encoding": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] } }, + "required": + [ "description", + "encoding" ] } } }, + "required": + [ "toplevel", + "fields" ] } }, + "required": + [ "json_schema", + "binary_schema" ] }, + "error": + { "type": "object", + "properties": + { "json_schema": {}, + "binary_schema": + { "type": "object", + "properties": + { "toplevel": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] }, + "fields": + { "type": "array", + "items": + { "type": + "object", + "properties": + { "description": + { "type": + "object", + "properties": + { "title": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "title" ] }, + "encoding": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] } }, + "required": + [ "description", + "encoding" ] } } }, + "required": + [ "toplevel", + "fields" ] } }, + "required": + [ "json_schema", + "binary_schema" ] } }, + "required": + [ "meth", "path", "query", "output", + "error" ] }, + "post_service": + { "type": "object", + "properties": + { "meth": + { "type": "string", + "enum": + [ "PATCH", "GET", "POST", + "PUT", "DELETE" ] }, + "path": + { "type": "array", + "items": + { "oneOf": + [ { "title": "PStatic", + "oneOf": + [ { "$ref": + "#/components/schemas/unistring" } ] }, + { "title": "PDynamic", + "type": "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", "name" ] }, + { "title": "PDynamicTail", + "type": "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "multiple" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", "name" ] } ] } }, + "description": + { "$ref": + "#/components/schemas/unistring" }, + "query": + { "type": "array", + "items": + { "type": "object", + "properties": + { "name": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" }, + "kind": + { "oneOf": + [ { "title": + "Single", + "type": + "object", + "properties": + { "single": + { "type": + "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", + "name" ] } }, + "required": + [ "single" ] }, + { "title": + "Optional", + "type": + "object", + "properties": + { "optional": + { "type": + "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", + "name" ] } }, + "required": + [ "optional" ] }, + { "title": "Flag", + "type": + "object", + "properties": + { "flag": + { "type": + "object", + "properties": + {} } }, + "required": + [ "flag" ] }, + { "title": + "Multi", + "type": + "object", + "properties": + { "multi": + { "type": + "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", + "name" ] } }, + "required": + [ "multi" ] } ] } }, + "required": + [ "name", "kind" ] } }, + "input": + { "type": "object", + "properties": + { "json_schema": {}, + "binary_schema": + { "type": "object", + "properties": + { "toplevel": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] }, + "fields": + { "type": "array", + "items": + { "type": + "object", + "properties": + { "description": + { "type": + "object", + "properties": + { "title": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "title" ] }, + "encoding": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] } }, + "required": + [ "description", + "encoding" ] } } }, + "required": + [ "toplevel", + "fields" ] } }, + "required": + [ "json_schema", + "binary_schema" ] }, + "output": + { "type": "object", + "properties": + { "json_schema": {}, + "binary_schema": + { "type": "object", + "properties": + { "toplevel": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] }, + "fields": + { "type": "array", + "items": + { "type": + "object", + "properties": + { "description": + { "type": + "object", + "properties": + { "title": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "title" ] }, + "encoding": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] } }, + "required": + [ "description", + "encoding" ] } } }, + "required": + [ "toplevel", + "fields" ] } }, + "required": + [ "json_schema", + "binary_schema" ] }, + "error": + { "type": "object", + "properties": + { "json_schema": {}, + "binary_schema": + { "type": "object", + "properties": + { "toplevel": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] }, + "fields": + { "type": "array", + "items": + { "type": + "object", + "properties": + { "description": + { "type": + "object", + "properties": + { "title": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "title" ] }, + "encoding": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] } }, + "required": + [ "description", + "encoding" ] } } }, + "required": + [ "toplevel", + "fields" ] } }, + "required": + [ "json_schema", + "binary_schema" ] } }, + "required": + [ "meth", "path", "query", "output", + "error" ] }, + "delete_service": + { "type": "object", + "properties": + { "meth": + { "type": "string", + "enum": + [ "PATCH", "GET", "POST", + "PUT", "DELETE" ] }, + "path": + { "type": "array", + "items": + { "oneOf": + [ { "title": "PStatic", + "oneOf": + [ { "$ref": + "#/components/schemas/unistring" } ] }, + { "title": "PDynamic", + "type": "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", "name" ] }, + { "title": "PDynamicTail", + "type": "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "multiple" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", "name" ] } ] } }, + "description": + { "$ref": + "#/components/schemas/unistring" }, + "query": + { "type": "array", + "items": + { "type": "object", + "properties": + { "name": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" }, + "kind": + { "oneOf": + [ { "title": + "Single", + "type": + "object", + "properties": + { "single": + { "type": + "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", + "name" ] } }, + "required": + [ "single" ] }, + { "title": + "Optional", + "type": + "object", + "properties": + { "optional": + { "type": + "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", + "name" ] } }, + "required": + [ "optional" ] }, + { "title": "Flag", + "type": + "object", + "properties": + { "flag": + { "type": + "object", + "properties": + {} } }, + "required": + [ "flag" ] }, + { "title": + "Multi", + "type": + "object", + "properties": + { "multi": + { "type": + "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", + "name" ] } }, + "required": + [ "multi" ] } ] } }, + "required": + [ "name", "kind" ] } }, + "input": + { "type": "object", + "properties": + { "json_schema": {}, + "binary_schema": + { "type": "object", + "properties": + { "toplevel": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] }, + "fields": + { "type": "array", + "items": + { "type": + "object", + "properties": + { "description": + { "type": + "object", + "properties": + { "title": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "title" ] }, + "encoding": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] } }, + "required": + [ "description", + "encoding" ] } } }, + "required": + [ "toplevel", + "fields" ] } }, + "required": + [ "json_schema", + "binary_schema" ] }, + "output": + { "type": "object", + "properties": + { "json_schema": {}, + "binary_schema": + { "type": "object", + "properties": + { "toplevel": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] }, + "fields": + { "type": "array", + "items": + { "type": + "object", + "properties": + { "description": + { "type": + "object", + "properties": + { "title": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "title" ] }, + "encoding": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] } }, + "required": + [ "description", + "encoding" ] } } }, + "required": + [ "toplevel", + "fields" ] } }, + "required": + [ "json_schema", + "binary_schema" ] }, + "error": + { "type": "object", + "properties": + { "json_schema": {}, + "binary_schema": + { "type": "object", + "properties": + { "toplevel": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] }, + "fields": + { "type": "array", + "items": + { "type": + "object", + "properties": + { "description": + { "type": + "object", + "properties": + { "title": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "title" ] }, + "encoding": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] } }, + "required": + [ "description", + "encoding" ] } } }, + "required": + [ "toplevel", + "fields" ] } }, + "required": + [ "json_schema", + "binary_schema" ] } }, + "required": + [ "meth", "path", "query", "output", + "error" ] }, + "put_service": + { "type": "object", + "properties": + { "meth": + { "type": "string", + "enum": + [ "PATCH", "GET", "POST", + "PUT", "DELETE" ] }, + "path": + { "type": "array", + "items": + { "oneOf": + [ { "title": "PStatic", + "oneOf": + [ { "$ref": + "#/components/schemas/unistring" } ] }, + { "title": "PDynamic", + "type": "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", "name" ] }, + { "title": "PDynamicTail", + "type": "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "multiple" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", "name" ] } ] } }, + "description": + { "$ref": + "#/components/schemas/unistring" }, + "query": + { "type": "array", + "items": + { "type": "object", + "properties": + { "name": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" }, + "kind": + { "oneOf": + [ { "title": + "Single", + "type": + "object", + "properties": + { "single": + { "type": + "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", + "name" ] } }, + "required": + [ "single" ] }, + { "title": + "Optional", + "type": + "object", + "properties": + { "optional": + { "type": + "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", + "name" ] } }, + "required": + [ "optional" ] }, + { "title": "Flag", + "type": + "object", + "properties": + { "flag": + { "type": + "object", + "properties": + {} } }, + "required": + [ "flag" ] }, + { "title": + "Multi", + "type": + "object", + "properties": + { "multi": + { "type": + "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", + "name" ] } }, + "required": + [ "multi" ] } ] } }, + "required": + [ "name", "kind" ] } }, + "input": + { "type": "object", + "properties": + { "json_schema": {}, + "binary_schema": + { "type": "object", + "properties": + { "toplevel": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] }, + "fields": + { "type": "array", + "items": + { "type": + "object", + "properties": + { "description": + { "type": + "object", + "properties": + { "title": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "title" ] }, + "encoding": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] } }, + "required": + [ "description", + "encoding" ] } } }, + "required": + [ "toplevel", + "fields" ] } }, + "required": + [ "json_schema", + "binary_schema" ] }, + "output": + { "type": "object", + "properties": + { "json_schema": {}, + "binary_schema": + { "type": "object", + "properties": + { "toplevel": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] }, + "fields": + { "type": "array", + "items": + { "type": + "object", + "properties": + { "description": + { "type": + "object", + "properties": + { "title": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "title" ] }, + "encoding": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] } }, + "required": + [ "description", + "encoding" ] } } }, + "required": + [ "toplevel", + "fields" ] } }, + "required": + [ "json_schema", + "binary_schema" ] }, + "error": + { "type": "object", + "properties": + { "json_schema": {}, + "binary_schema": + { "type": "object", + "properties": + { "toplevel": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] }, + "fields": + { "type": "array", + "items": + { "type": + "object", + "properties": + { "description": + { "type": + "object", + "properties": + { "title": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "title" ] }, + "encoding": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] } }, + "required": + [ "description", + "encoding" ] } } }, + "required": + [ "toplevel", + "fields" ] } }, + "required": + [ "json_schema", + "binary_schema" ] } }, + "required": + [ "meth", "path", "query", "output", + "error" ] }, + "patch_service": + { "type": "object", + "properties": + { "meth": + { "type": "string", + "enum": + [ "PATCH", "GET", "POST", + "PUT", "DELETE" ] }, + "path": + { "type": "array", + "items": + { "oneOf": + [ { "title": "PStatic", + "oneOf": + [ { "$ref": + "#/components/schemas/unistring" } ] }, + { "title": "PDynamic", + "type": "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", "name" ] }, + { "title": "PDynamicTail", + "type": "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "multiple" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", "name" ] } ] } }, + "description": + { "$ref": + "#/components/schemas/unistring" }, + "query": + { "type": "array", + "items": + { "type": "object", + "properties": + { "name": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" }, + "kind": + { "oneOf": + [ { "title": + "Single", + "type": + "object", + "properties": + { "single": + { "type": + "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", + "name" ] } }, + "required": + [ "single" ] }, + { "title": + "Optional", + "type": + "object", + "properties": + { "optional": + { "type": + "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", + "name" ] } }, + "required": + [ "optional" ] }, + { "title": "Flag", + "type": + "object", + "properties": + { "flag": + { "type": + "object", + "properties": + {} } }, + "required": + [ "flag" ] }, + { "title": + "Multi", + "type": + "object", + "properties": + { "multi": + { "type": + "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", + "name" ] } }, + "required": + [ "multi" ] } ] } }, + "required": + [ "name", "kind" ] } }, + "input": + { "type": "object", + "properties": + { "json_schema": {}, + "binary_schema": + { "type": "object", + "properties": + { "toplevel": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] }, + "fields": + { "type": "array", + "items": + { "type": + "object", + "properties": + { "description": + { "type": + "object", + "properties": + { "title": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "title" ] }, + "encoding": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] } }, + "required": + [ "description", + "encoding" ] } } }, + "required": + [ "toplevel", + "fields" ] } }, + "required": + [ "json_schema", + "binary_schema" ] }, + "output": + { "type": "object", + "properties": + { "json_schema": {}, + "binary_schema": + { "type": "object", + "properties": + { "toplevel": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] }, + "fields": + { "type": "array", + "items": + { "type": + "object", + "properties": + { "description": + { "type": + "object", + "properties": + { "title": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "title" ] }, + "encoding": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] } }, + "required": + [ "description", + "encoding" ] } } }, + "required": + [ "toplevel", + "fields" ] } }, + "required": + [ "json_schema", + "binary_schema" ] }, + "error": + { "type": "object", + "properties": + { "json_schema": {}, + "binary_schema": + { "type": "object", + "properties": + { "toplevel": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] }, + "fields": + { "type": "array", + "items": + { "type": + "object", + "properties": + { "description": + { "type": + "object", + "properties": + { "title": + { "$ref": + "#/components/schemas/unistring" }, + "description": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "title" ] }, + "encoding": + { "oneOf": + [ { "title": + "Obj", + "type": + "object", + "properties": + { "fields": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/schema.field" } } }, + "required": + [ "fields" ] }, + { "title": + "Cases", + "type": + "object", + "properties": + { "tag_size": + { "type": + "string", + "enum": + [ "Uint16", + "Uint8" ] }, + "kind": + { "$ref": + "#/components/schemas/schema.kind" }, + "cases": + { "type": + "array", + "items": + { "$ref": + "#/components/schemas/union case" } } }, + "required": + [ "tag_size", + "kind", + "cases" ] }, + { "title": + "Int_enum", + "type": + "object", + "properties": + { "size": + { "type": + "string", + "enum": + [ "Int16", + "Uint16", + "Int8", + "Uint8" ] }, + "cases": + { "type": + "array", + "items": + { "type": + "array", + "items": + { "oneOf": + [ { "type": + "integer", + "minimum": + -1073741824, + "maximum": + 1073741823 }, + { "$ref": + "#/components/schemas/unistring" } ] } } } }, + "required": + [ "size", + "cases" ] } ] } }, + "required": + [ "description", + "encoding" ] } } }, + "required": + [ "toplevel", + "fields" ] } }, + "required": + [ "json_schema", + "binary_schema" ] } }, + "required": + [ "meth", "path", "query", "output", + "error" ] }, + "subdirs": + { "oneOf": + [ { "title": "Suffixes", + "type": "object", + "properties": + { "suffixes": + { "type": "array", + "items": + { "type": "object", + "properties": + { "name": + { "$ref": + "#/components/schemas/unistring" }, + "tree": + { "$ref": + "#/components/schemas/service_tree" } }, + "required": + [ "name", "tree" ] } } }, + "required": [ "suffixes" ] }, + { "title": "Arg", "type": "object", + "properties": + { "dynamic_dispatch": + { "type": "object", + "properties": + { "arg": + { "type": "object", + "properties": + { "id": + { "type": + "string", + "enum": + [ "single" ] }, + "name": + { "$ref": + "#/components/schemas/unistring" }, + "descr": + { "$ref": + "#/components/schemas/unistring" } }, + "required": + [ "id", "name" ] }, + "tree": + { "$ref": + "#/components/schemas/service_tree" } }, + "required": + [ "arg", "tree" ] } }, + "required": [ "dynamic_dispatch" ] } ] } } } }, + "required": [ "static" ] }, + { "title": "Dynamic", "type": "object", + "properties": + { "dynamic": + { "nullable": true, + "oneOf": + [ { "title": "Some", + "oneOf": + [ { "$ref": + "#/components/schemas/unistring" } ] } ] } }, + "required": [ "dynamic" ] }, + { "title": "Empty", "type": "string", "enum": [ "empty" ] } ] }, + "state_hash": + { "title": + "The hash of the VM state of a smart contract rollup (Base58Check-encoded)", + "oneOf": [ { "$ref": "#/components/schemas/unistring" } ] }, + "union case": + { "type": "object", + "properties": + { "tag": + { "type": "integer", "minimum": -1073741824, + "maximum": 1073741823 }, + "fields": + { "type": "array", + "items": + { "$ref": "#/components/schemas/schema.field" } }, + "name": { "$ref": "#/components/schemas/unistring" } }, + "required": [ "tag", "fields" ] }, + "unistring": + { "title": "Universal string representation", + "description": + "Either a plain UTF8 string, or a sequence of bytes for strings that contain invalid byte sequences.", + "oneOf": + [ { "type": "string" }, + { "type": "object", + "properties": + { "invalid_utf8_string": + { "type": "array", + "items": + { "type": "integer", "minimum": 0, + "maximum": 255 } } }, + "required": [ "invalid_utf8_string" ] } ] } } } } -- GitLab