diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index 5f3bf91683b..1bc8933e624 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -311,7 +311,7 @@ void ApplyTypeStrOverride(UniValue& schema, const RPCArg& arg) }; if (number_or_string.contains(type_label)) { UniValue one_of{UniValue::VARR}; - one_of.push_back(MakeObject({{"type", "number"}})); + one_of.push_back(MakeObject({{"type", "integer"}})); one_of.push_back(MakeObject({{"type", "string"}})); schema = UniValue{UniValue::VOBJ}; schema.pushKV("oneOf", std::move(one_of)); diff --git a/test/functional/rpc_openrpc.py b/test/functional/rpc_openrpc.py index 5a57e6251ad..32be191f58f 100755 --- a/test/functional/rpc_openrpc.py +++ b/test/functional/rpc_openrpc.py @@ -52,7 +52,7 @@ class OpenRPCDocTest(BitcoinTestFramework): self.log.info("Checking type_str override schemas") getblockstats = find_method(openrpc, "getblockstats") hash_or_height = find_param(getblockstats, "hash_or_height") - assert_equal(hash_or_height["schema"], {"oneOf": [{"type": "number"}, {"type": "string"}]}) + assert_equal(hash_or_height["schema"], {"oneOf": [{"type": "integer"}, {"type": "string"}]}) self.log.info("Checking fixed-length array schemas") deriveaddresses = find_method(openrpc, "deriveaddresses")