{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "OpenRpcSchema", "description": "The main schema for the casper node's RPC server, compliant with [the OpenRPC Specification](https://spec.open-rpc.org).", "type": "object", "required": [ "components", "info", "methods", "openrpc", "servers" ], "properties": { "openrpc": { "type": "string" }, "info": { "$ref": "#/definitions/OpenRpcInfoField" }, "servers": { "type": "array", "items": { "$ref": "#/definitions/OpenRpcServerEntry" } }, "methods": { "type": "array", "items": { "$ref": "#/definitions/Method" } }, "components": { "$ref": "#/definitions/Components" } }, "definitions": { "OpenRpcInfoField": { "type": "object", "required": [ "contact", "description", "license", "title", "version" ], "properties": { "version": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "contact": { "$ref": "#/definitions/OpenRpcContactField" }, "license": { "$ref": "#/definitions/OpenRpcLicenseField" } } }, "OpenRpcContactField": { "type": "object", "required": [ "name", "url" ], "properties": { "name": { "type": "string" }, "url": { "type": "string" } } }, "OpenRpcLicenseField": { "type": "object", "required": [ "name", "url" ], "properties": { "name": { "type": "string" }, "url": { "type": "string" } } }, "OpenRpcServerEntry": { "type": "object", "required": [ "name", "url" ], "properties": { "name": { "type": "string" }, "url": { "type": "string" } } }, "Method": { "description": "The struct containing the documentation for the RPCs.", "type": "object", "required": [ "examples", "name", "params", "result", "summary" ], "properties": { "name": { "type": "string" }, "summary": { "type": "string" }, "params": { "type": "array", "items": { "$ref": "#/definitions/SchemaParam" } }, "result": { "$ref": "#/definitions/ResponseResult" }, "examples": { "type": "array", "items": { "$ref": "#/definitions/Example" } } } }, "SchemaParam": { "type": "object", "required": [ "name", "required", "schema" ], "properties": { "name": { "type": "string" }, "schema": { "$ref": "#/definitions/Schema" }, "required": { "type": "boolean" } } }, "Schema": { "description": "A JSON Schema.", "anyOf": [ { "description": "A trivial boolean JSON Schema.\n\nThe schema `true` matches everything (always passes validation), whereas the schema `false` matches nothing (always fails validation).", "type": "boolean" }, { "description": "A JSON Schema object.", "allOf": [ { "$ref": "#/definitions/SchemaObject" } ] } ] }, "SchemaObject": { "description": "A JSON Schema object.", "type": "object", "properties": { "type": { "description": "The `type` keyword.\n\nSee [JSON Schema Validation 6.1.1. \"type\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.1) and [JSON Schema 4.2.1. Instance Data Model](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-4.2.1).", "anyOf": [ { "$ref": "#/definitions/SingleOrVec_for_InstanceType" }, { "type": "null" } ] }, "format": { "description": "The `format` keyword.\n\nSee [JSON Schema Validation 7. A Vocabulary for Semantic Content With \"format\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-7).", "type": [ "string", "null" ] }, "enum": { "description": "The `enum` keyword.\n\nSee [JSON Schema Validation 6.1.2. \"enum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.2)", "type": [ "array", "null" ], "items": true }, "const": { "description": "The `const` keyword.\n\nSee [JSON Schema Validation 6.1.3. \"const\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.3)" }, "$ref": { "description": "The `$ref` keyword.\n\nSee [JSON Schema 8.2.4.1. Direct References with \"$ref\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.4.1).", "type": [ "string", "null" ] }, "$id": { "description": "The `$id` keyword.\n\nSee [JSON Schema 8.2.2. The \"$id\" Keyword](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.2).", "type": [ "string", "null" ] }, "title": { "description": "The `title` keyword.\n\nSee [JSON Schema Validation 9.1. \"title\" and \"description\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.1).", "type": [ "string", "null" ] }, "description": { "description": "The `description` keyword.\n\nSee [JSON Schema Validation 9.1. \"title\" and \"description\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.1).", "type": [ "string", "null" ] }, "default": { "description": "The `default` keyword.\n\nSee [JSON Schema Validation 9.2. \"default\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.2)." }, "deprecated": { "description": "The `deprecated` keyword.\n\nSee [JSON Schema Validation 9.3. \"deprecated\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.3).", "type": "boolean" }, "readOnly": { "description": "The `readOnly` keyword.\n\nSee [JSON Schema Validation 9.4. \"readOnly\" and \"writeOnly\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.4).", "type": "boolean" }, "writeOnly": { "description": "The `writeOnly` keyword.\n\nSee [JSON Schema Validation 9.4. \"readOnly\" and \"writeOnly\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.4).", "type": "boolean" }, "examples": { "description": "The `examples` keyword.\n\nSee [JSON Schema Validation 9.5. \"examples\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.5).", "type": "array", "items": true }, "allOf": { "description": "The `allOf` keyword.\n\nSee [JSON Schema 9.2.1.1. \"allOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.1).", "type": [ "array", "null" ], "items": { "$ref": "#/definitions/Schema" } }, "anyOf": { "description": "The `anyOf` keyword.\n\nSee [JSON Schema 9.2.1.2. \"anyOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.2).", "type": [ "array", "null" ], "items": { "$ref": "#/definitions/Schema" } }, "oneOf": { "description": "The `oneOf` keyword.\n\nSee [JSON Schema 9.2.1.3. \"oneOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.3).", "type": [ "array", "null" ], "items": { "$ref": "#/definitions/Schema" } }, "not": { "description": "The `not` keyword.\n\nSee [JSON Schema 9.2.1.4. \"not\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.4).", "anyOf": [ { "$ref": "#/definitions/Schema" }, { "type": "null" } ] }, "if": { "description": "The `if` keyword.\n\nSee [JSON Schema 9.2.2.1. \"if\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.1).", "anyOf": [ { "$ref": "#/definitions/Schema" }, { "type": "null" } ] }, "then": { "description": "The `then` keyword.\n\nSee [JSON Schema 9.2.2.2. \"then\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.2).", "anyOf": [ { "$ref": "#/definitions/Schema" }, { "type": "null" } ] }, "else": { "description": "The `else` keyword.\n\nSee [JSON Schema 9.2.2.3. \"else\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.3).", "anyOf": [ { "$ref": "#/definitions/Schema" }, { "type": "null" } ] }, "multipleOf": { "description": "The `multipleOf` keyword.\n\nSee [JSON Schema Validation 6.2.1. \"multipleOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.1).", "type": [ "number", "null" ], "format": "double" }, "maximum": { "description": "The `maximum` keyword.\n\nSee [JSON Schema Validation 6.2.2. \"maximum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.2).", "type": [ "number", "null" ], "format": "double" }, "exclusiveMaximum": { "description": "The `exclusiveMaximum` keyword.\n\nSee [JSON Schema Validation 6.2.3. \"exclusiveMaximum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.3).", "type": [ "number", "null" ], "format": "double" }, "minimum": { "description": "The `minimum` keyword.\n\nSee [JSON Schema Validation 6.2.4. \"minimum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.4).", "type": [ "number", "null" ], "format": "double" }, "exclusiveMinimum": { "description": "The `exclusiveMinimum` keyword.\n\nSee [JSON Schema Validation 6.2.5. \"exclusiveMinimum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.5).", "type": [ "number", "null" ], "format": "double" }, "maxLength": { "description": "The `maxLength` keyword.\n\nSee [JSON Schema Validation 6.3.1. \"maxLength\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.1).", "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "minLength": { "description": "The `minLength` keyword.\n\nSee [JSON Schema Validation 6.3.2. \"minLength\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.2).", "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "pattern": { "description": "The `pattern` keyword.\n\nSee [JSON Schema Validation 6.3.3. \"pattern\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.3).", "type": [ "string", "null" ] }, "items": { "description": "The `items` keyword.\n\nSee [JSON Schema 9.3.1.1. \"items\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.1).", "anyOf": [ { "$ref": "#/definitions/SingleOrVec_for_Schema" }, { "type": "null" } ] }, "additionalItems": { "description": "The `additionalItems` keyword.\n\nSee [JSON Schema 9.3.1.2. \"additionalItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.2).", "anyOf": [ { "$ref": "#/definitions/Schema" }, { "type": "null" } ] }, "maxItems": { "description": "The `maxItems` keyword.\n\nSee [JSON Schema Validation 6.4.1. \"maxItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.1).", "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "minItems": { "description": "The `minItems` keyword.\n\nSee [JSON Schema Validation 6.4.2. \"minItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.2).", "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "uniqueItems": { "description": "The `uniqueItems` keyword.\n\nSee [JSON Schema Validation 6.4.3. \"uniqueItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.3).", "type": [ "boolean", "null" ] }, "contains": { "description": "The `contains` keyword.\n\nSee [JSON Schema 9.3.1.4. \"contains\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.4).", "anyOf": [ { "$ref": "#/definitions/Schema" }, { "type": "null" } ] }, "maxProperties": { "description": "The `maxProperties` keyword.\n\nSee [JSON Schema Validation 6.5.1. \"maxProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.1).", "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "minProperties": { "description": "The `minProperties` keyword.\n\nSee [JSON Schema Validation 6.5.2. \"minProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.2).", "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "required": { "description": "The `required` keyword.\n\nSee [JSON Schema Validation 6.5.3. \"required\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.3).", "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "properties": { "description": "The `properties` keyword.\n\nSee [JSON Schema 9.3.2.1. \"properties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.1).", "type": "object", "additionalProperties": { "$ref": "#/definitions/Schema" } }, "patternProperties": { "description": "The `patternProperties` keyword.\n\nSee [JSON Schema 9.3.2.2. \"patternProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.2).", "type": "object", "additionalProperties": { "$ref": "#/definitions/Schema" } }, "additionalProperties": { "description": "The `additionalProperties` keyword.\n\nSee [JSON Schema 9.3.2.3. \"additionalProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.3).", "anyOf": [ { "$ref": "#/definitions/Schema" }, { "type": "null" } ] }, "propertyNames": { "description": "The `propertyNames` keyword.\n\nSee [JSON Schema 9.3.2.5. \"propertyNames\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.5).", "anyOf": [ { "$ref": "#/definitions/Schema" }, { "type": "null" } ] } }, "additionalProperties": true }, "SingleOrVec_for_InstanceType": { "description": "A type which can be serialized as a single item, or multiple items.\n\nIn some contexts, a `Single` may be semantically distinct from a `Vec` containing only item.", "anyOf": [ { "$ref": "#/definitions/InstanceType" }, { "type": "array", "items": { "$ref": "#/definitions/InstanceType" } } ] }, "InstanceType": { "description": "The possible types of values in JSON Schema documents.\n\nSee [JSON Schema 4.2.1. Instance Data Model](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-4.2.1).", "type": "string", "enum": [ "null", "boolean", "object", "array", "number", "string", "integer" ] }, "SingleOrVec_for_Schema": { "description": "A type which can be serialized as a single item, or multiple items.\n\nIn some contexts, a `Single` may be semantically distinct from a `Vec` containing only item.", "anyOf": [ { "$ref": "#/definitions/Schema" }, { "type": "array", "items": { "$ref": "#/definitions/Schema" } } ] }, "ResponseResult": { "type": "object", "required": [ "name", "schema" ], "properties": { "name": { "type": "string" }, "schema": { "$ref": "#/definitions/Schema" } } }, "Example": { "description": "An example pair of request params and response result.", "type": "object", "required": [ "name", "params", "result" ], "properties": { "name": { "type": "string" }, "params": { "type": "array", "items": { "$ref": "#/definitions/ExampleParam" } }, "result": { "$ref": "#/definitions/ExampleResult" } } }, "ExampleParam": { "type": "object", "required": [ "name", "value" ], "properties": { "name": { "type": "string" }, "value": true } }, "ExampleResult": { "type": "object", "required": [ "name", "value" ], "properties": { "name": { "type": "string" }, "value": true } }, "Components": { "type": "object", "required": [ "schemas" ], "properties": { "schemas": { "type": "object", "additionalProperties": { "$ref": "#/definitions/Schema" } } } } } }