diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:44:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:44:51 +0000 |
commit | a1ec78bf0dc93d0e05e5f066f1949dc3baecea06 (patch) | |
tree | ee596ce1bc9840661386f96f9b8d1f919a106317 /vendor/gipfl/openrpc/src/OpenRpcDocument.php | |
parent | Initial commit. (diff) | |
download | icingaweb2-module-incubator-a1ec78bf0dc93d0e05e5f066f1949dc3baecea06.tar.xz icingaweb2-module-incubator-a1ec78bf0dc93d0e05e5f066f1949dc3baecea06.zip |
Adding upstream version 0.20.0.upstream/0.20.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gipfl/openrpc/src/OpenRpcDocument.php')
-rw-r--r-- | vendor/gipfl/openrpc/src/OpenRpcDocument.php | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/vendor/gipfl/openrpc/src/OpenRpcDocument.php b/vendor/gipfl/openrpc/src/OpenRpcDocument.php new file mode 100644 index 0000000..62be245 --- /dev/null +++ b/vendor/gipfl/openrpc/src/OpenRpcDocument.php @@ -0,0 +1,75 @@ +<?php + +namespace gipfl\OpenRpc; + +use JsonSerializable; + +/** + * This is the root object of the OpenRPC document. The contents of this object + * represent a whole OpenRPC document. How this object is constructed or stored + * is outside the scope of the OpenRPC Specification. + */ +class OpenRpcDocument implements JsonSerializable +{ + use SimpleJsonSerializer; + + /** + * REQUIRED. This string MUST be the semantic version number of the OpenRPC + * Specification version that the OpenRPC document uses. The openrpc field + * SHOULD be used by tooling specifications and clients to interpret the + * OpenRPC document. This is not related to the API info.version string. + * + * @var string + */ + public $openrpc; + + /** + * REQUIRED. Provides metadata about the API. The metadata MAY be used by + * tooling as required. + * + * @var Info + */ + public $info; + + /** + * An array of Server Objects, which provide connectivity information to a + * target server. If the servers property is not provided, or is an empty + * array, the default value would be a Server Object with a url value of + * localhost. + * + * @var Server[]|null + */ + public $servers; + + /** + * REQUIRED. The available methods for the API. While it is required, the + * array may be empty (to handle security filtering, for example). + * + * @var Method[]|Reference[] + */ + public $methods = []; + + /** + * An element to hold various schemas for the specification + * + * @var Components|null + */ + public $components; + + /** + * Additional external documentation + * + * @var ExternalDocumentation|null + */ + public $externalDocs; + + /** + * @param string $openRpcVersion + * @param Info $info + */ + public function __construct($openRpcVersion, Info $info) + { + $this->openrpc = $openRpcVersion; + $this->info = $info; + } +} |