The OpenRPC Method which encloses the content descriptor
The OpenRPC Content Descriptor that is a param in the method
an ID for the param/method combo.
It follows the format {method.name}/{indexWithinParams}|{contentDescriptor.name}
where:
Create a unique identifier for a result within a given method. This is typically used to create hashmap keys for method to result mappings.
The OpenRPC Method which encloses the content descriptor
The OpenRPC Content Descriptor (either a method param or the result).
an ID for the result/method combo.
It follows the format {method.name}/result
.
Removes false and null values from array
replaces $ref's within a document and its schemas. The replaced value will be a javascript object reference to the real schema / open-rpc component
The same OpenRPC Document that was passed in, but with all $ref's dereferenced.
finds an array elements which matches the predicate
|| {undefined}
finds array index of array object which matches predicate
|| {undefined}
compares OpenrpcDocuments
Returns any JSON Schema validation errors that are found with the OpenRPC document passed in.
OpenRPC Document to validate.
Either true if everything checks out, or a well formatted error.
Create a unique identifier for a parameter within a given method. This is typically used to create hashmap keys for method to parameter mappings.
ContentDescriptorNotFoundInMethodError
const { generateMethodParamId } const methodObject = { name: "foo", params: [{ name: "fooParam", schema: { type: "integer" } }], result: {} }; const paramId = generateMethodParamId(methodObject, methodObject.params[0]); console.log(paramId); // outputs: // "foo/0/fooParam"