From a1ec78bf0dc93d0e05e5f066f1949dc3baecea06 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:44:51 +0200 Subject: Adding upstream version 0.20.0. Signed-off-by: Daniel Baumann --- vendor/gipfl/openrpc/src/Method.php | 133 ++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 vendor/gipfl/openrpc/src/Method.php (limited to 'vendor/gipfl/openrpc/src/Method.php') diff --git a/vendor/gipfl/openrpc/src/Method.php b/vendor/gipfl/openrpc/src/Method.php new file mode 100644 index 0000000..54226e3 --- /dev/null +++ b/vendor/gipfl/openrpc/src/Method.php @@ -0,0 +1,133 @@ +[] + */ + public $params; + + /** + * REQUIRED. The description of the result returned by the method. It MUST + * be a Content Descriptor. + * + * @var ContentDescriptor|Reference + */ + public $result; + + /** + * Declares this method to be deprecated. Consumers SHOULD refrain from + * usage of the declared method. Default value is false. + * + * @var boolean + */ + public $deprecated; + + /** + * An alternative servers array to service this method. If an alternative + * servers array is specified at the Root level, it will be overridden by + * this value. + * + * @var Server[] + */ + public $servers; + + /** + * A list of custom application defined errors that MAY be returned. The + * Errors MUST have unique error codes. + * + * @var [] + */ + public $errors; + + /** + * A list of possible links from this method call + * + * @var [] + */ + public $links; + + /** + * The expected format of the parameters. As per the JSON-RPC 2.0 specification, + * the params of a JSON-RPC request object may be an array, object, or either + * (represented as by-position, by-name, and either respectively). When a method + * has a paramStructure value of by-name, callers of the method MUST send a + * JSON-RPC request object whose params field is an object. Further, the key + * names of the params object MUST be the same as the contentDescriptor.names + * for the given method. Defaults to "either". + * + * @var string "by-name" | "by-position" | "either" + */ + public $paramStructure; + + /** + * Array of Example Pairing Object where each example includes a valid + * params-to-result Content Descriptor pairing. + * + * @var ExamplePairing [] + */ + public $examples; + + /** + * @param $name + */ + public function __construct($name) + { + $this->name = $name; + } +} -- cgit v1.2.3