{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/openrpc-json/latest.json",
  "title": "openrpcDocument",
  "x-lintel": {
    "source": "https://meta.open-rpc.org/",
    "sourceSha256": "6b62c3ca1c8230c79058a4ff25e6bd9abbad0a43bd86b52853af2b551fbeeea8",
    "fileMatch": [
      "openrpc.json",
      "openrpc.yml",
      "openrpc.yaml",
      "open-rpc.json",
      "open-rpc.yml",
      "open-rpc.yaml"
    ],
    "parsers": [
      "json",
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "openrpc": {
      "title": "openrpc",
      "type": "string",
      "enum": [
        "1.3.2",
        "1.3.1",
        "1.3.0",
        "1.2.6",
        "1.2.5",
        "1.2.4",
        "1.2.3",
        "1.2.2",
        "1.2.1",
        "1.2.0",
        "1.1.12",
        "1.1.11",
        "1.1.10",
        "1.1.9",
        "1.1.8",
        "1.1.7",
        "1.1.6",
        "1.1.5",
        "1.1.4",
        "1.1.3",
        "1.1.2",
        "1.1.1",
        "1.1.0",
        "1.0.0",
        "1.0.0-rc1",
        "1.0.0-rc0"
      ]
    },
    "info": {
      "$ref": "#/$defs/infoObject"
    },
    "externalDocs": {
      "$ref": "#/$defs/externalDocumentationObject"
    },
    "servers": {
      "title": "servers",
      "type": "array",
      "additionalItems": false,
      "items": {
        "$ref": "#/$defs/serverObject"
      }
    },
    "methods": {
      "title": "methods",
      "type": "array",
      "additionalItems": false,
      "items": {
        "title": "methodOrReference",
        "oneOf": [
          {
            "$ref": "#/$defs/methodObject"
          },
          {
            "$ref": "#/$defs/referenceObject"
          }
        ]
      }
    },
    "components": {
      "title": "components",
      "type": "object",
      "properties": {
        "schemas": {
          "title": "schemaComponents",
          "type": "object",
          "patternProperties": {
            "[0-z]+": {
              "$ref": "#/$defs/JSONSchema"
            }
          }
        },
        "links": {
          "title": "linkComponents",
          "type": "object",
          "patternProperties": {
            "[0-z]+": {
              "$ref": "#/$defs/linkObject"
            }
          }
        },
        "errors": {
          "title": "errorComponents",
          "type": "object",
          "patternProperties": {
            "[0-z]+": {
              "$ref": "#/$defs/errorObject"
            }
          }
        },
        "examples": {
          "title": "exampleComponents",
          "type": "object",
          "patternProperties": {
            "[0-z]+": {
              "$ref": "#/$defs/exampleObject"
            }
          }
        },
        "examplePairings": {
          "title": "examplePairingComponents",
          "type": "object",
          "patternProperties": {
            "[0-z]+": {
              "$ref": "#/$defs/examplePairingObject"
            }
          }
        },
        "contentDescriptors": {
          "title": "contentDescriptorComponents",
          "type": "object",
          "patternProperties": {
            "[0-z]+": {
              "$ref": "#/$defs/contentDescriptorObject"
            }
          }
        },
        "tags": {
          "title": "tagComponents",
          "type": "object",
          "patternProperties": {
            "[0-z]+": {
              "$ref": "#/$defs/tagObject"
            }
          }
        }
      }
    },
    "$schema": {
      "title": "metaSchema",
      "description": "JSON Schema URI (used by some editors)",
      "type": "string",
      "default": "https://meta.open-rpc.org/"
    }
  },
  "additionalProperties": false,
  "patternProperties": {
    "^x-": {
      "$ref": "#/$defs/specificationExtension"
    }
  },
  "required": [
    "info",
    "methods",
    "openrpc"
  ],
  "$defs": {
    "specificationExtension": {
      "title": "specificationExtension"
    },
    "JSONSchema": {
      "$ref": "https://catalog.lintel.tools/schemas/schemastore/openrpc-json/_shared/latest--meta.json-schema.tools.json"
    },
    "referenceObject": {
      "title": "referenceObject",
      "type": "object",
      "properties": {
        "$ref": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/openrpc-json/_shared/latest--meta.json-schema.tools.json#/$defs/JSONSchemaObject/properties/$ref"
        }
      },
      "required": [
        "$ref"
      ],
      "additionalProperties": false
    },
    "errorObject": {
      "title": "errorObject",
      "type": "object",
      "description": "Defines an application level error.",
      "properties": {
        "code": {
          "title": "errorObjectCode",
          "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.",
          "type": "integer"
        },
        "message": {
          "title": "errorObjectMessage",
          "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.",
          "type": "string"
        },
        "data": {
          "title": "errorObjectData",
          "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)."
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": false
    },
    "licenseObject": {
      "title": "licenseObject",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "title": "licenseObjectName",
          "type": "string"
        },
        "url": {
          "title": "licenseObjectUrl",
          "type": "string"
        }
      },
      "patternProperties": {
        "^x-": {
          "$ref": "#/$defs/specificationExtension"
        }
      }
    },
    "contactObject": {
      "title": "contactObject",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "title": "contactObjectName",
          "type": "string"
        },
        "email": {
          "title": "contactObjectEmail",
          "type": "string"
        },
        "url": {
          "title": "contactObjectUrl",
          "type": "string"
        }
      },
      "patternProperties": {
        "^x-": {
          "$ref": "#/$defs/specificationExtension"
        }
      }
    },
    "infoObject": {
      "title": "infoObject",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "title",
        "version"
      ],
      "properties": {
        "title": {
          "title": "infoObjectProperties",
          "type": "string"
        },
        "description": {
          "title": "infoObjectDescription",
          "type": "string"
        },
        "termsOfService": {
          "title": "infoObjectTermsOfService",
          "type": "string",
          "format": "uri"
        },
        "version": {
          "title": "infoObjectVersion",
          "type": "string"
        },
        "contact": {
          "$ref": "#/$defs/contactObject"
        },
        "license": {
          "$ref": "#/$defs/licenseObject"
        }
      },
      "patternProperties": {
        "^x-": {
          "$ref": "#/$defs/specificationExtension"
        }
      }
    },
    "serverObject": {
      "title": "serverObject",
      "type": "object",
      "required": [
        "url"
      ],
      "additionalProperties": false,
      "properties": {
        "url": {
          "title": "serverObjectUrl",
          "type": "string",
          "format": "uri"
        },
        "name": {
          "title": "serverObjectName",
          "type": "string"
        },
        "description": {
          "title": "serverObjectDescription",
          "type": "string"
        },
        "summary": {
          "title": "serverObjectSummary",
          "type": "string"
        },
        "variables": {
          "title": "serverObjectVariables",
          "type": "object",
          "patternProperties": {
            "[0-z]+": {
              "title": "serverObjectVariable",
              "type": "object",
              "required": [
                "default"
              ],
              "properties": {
                "default": {
                  "title": "serverObjectVariableDefault",
                  "type": "string"
                },
                "description": {
                  "title": "serverObjectVariableDescription",
                  "type": "string"
                },
                "enum": {
                  "title": "serverObjectVariableEnum",
                  "type": "array",
                  "items": {
                    "title": "serverObjectVariableEnumItem",
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "patternProperties": {
        "^x-": {
          "$ref": "#/$defs/specificationExtension"
        }
      }
    },
    "linkObject": {
      "title": "linkObject",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "title": "linkObjectName",
          "type": "string",
          "minLength": 1
        },
        "summary": {
          "title": "linkObjectSummary",
          "type": "string"
        },
        "method": {
          "title": "linkObjectMethod",
          "type": "string"
        },
        "description": {
          "title": "linkObjectDescription",
          "type": "string"
        },
        "params": {
          "title": "linkObjectParams"
        },
        "server": {
          "title": "linkObjectServer",
          "$ref": "#/$defs/serverObject"
        }
      },
      "patternProperties": {
        "^x-": {
          "$ref": "#/$defs/specificationExtension"
        }
      }
    },
    "externalDocumentationObject": {
      "title": "externalDocumentationObject",
      "type": "object",
      "additionalProperties": false,
      "description": "information about external documentation",
      "required": [
        "url"
      ],
      "properties": {
        "description": {
          "title": "externalDocumentationObjectDescription",
          "type": "string"
        },
        "url": {
          "title": "externalDocumentationObjectUrl",
          "type": "string",
          "format": "uri"
        }
      },
      "patternProperties": {
        "^x-": {
          "$ref": "#/$defs/specificationExtension"
        }
      }
    },
    "methodObject": {
      "title": "methodObject",
      "type": "object",
      "required": [
        "name",
        "params"
      ],
      "additionalProperties": false,
      "properties": {
        "name": {
          "title": "methodObjectName",
          "description": "The cannonical name for the method. The name MUST be unique within the methods array.",
          "type": "string",
          "minLength": 1
        },
        "description": {
          "title": "methodObjectDescription",
          "description": "A verbose explanation of the method behavior. GitHub Flavored Markdown syntax MAY be used for rich text representation.",
          "type": "string"
        },
        "summary": {
          "title": "methodObjectSummary",
          "description": "A short summary of what the method does.",
          "type": "string"
        },
        "servers": {
          "title": "servers",
          "type": "array",
          "additionalItems": false,
          "items": {
            "$ref": "#/$defs/serverObject"
          }
        },
        "tags": {
          "title": "methodObjectTags",
          "type": "array",
          "items": {
            "title": "tagOrReference",
            "oneOf": [
              {
                "$ref": "#/$defs/tagObject"
              },
              {
                "$ref": "#/$defs/referenceObject"
              }
            ]
          }
        },
        "paramStructure": {
          "title": "methodObjectParamStructure",
          "type": "string",
          "description": "Format the server expects the params. Defaults to 'either'.",
          "enum": [
            "by-position",
            "by-name",
            "either"
          ],
          "default": "either"
        },
        "params": {
          "title": "methodObjectParams",
          "type": "array",
          "items": {
            "title": "contentDescriptorOrReference",
            "oneOf": [
              {
                "$ref": "#/$defs/contentDescriptorObject"
              },
              {
                "$ref": "#/$defs/referenceObject"
              }
            ]
          }
        },
        "result": {
          "title": "methodObjectResult",
          "oneOf": [
            {
              "$ref": "#/$defs/contentDescriptorObject"
            },
            {
              "$ref": "#/$defs/referenceObject"
            }
          ]
        },
        "errors": {
          "title": "methodObjectErrors",
          "description": "Defines an application level error.",
          "type": "array",
          "items": {
            "title": "errorOrReference",
            "oneOf": [
              {
                "$ref": "#/$defs/errorObject"
              },
              {
                "$ref": "#/$defs/referenceObject"
              }
            ]
          }
        },
        "links": {
          "title": "methodObjectLinks",
          "type": "array",
          "items": {
            "title": "linkOrReference",
            "oneOf": [
              {
                "$ref": "#/$defs/linkObject"
              },
              {
                "$ref": "#/$defs/referenceObject"
              }
            ]
          }
        },
        "examples": {
          "title": "methodObjectExamples",
          "type": "array",
          "items": {
            "title": "examplePairingOrReference",
            "oneOf": [
              {
                "$ref": "#/$defs/examplePairingObject"
              },
              {
                "$ref": "#/$defs/referenceObject"
              }
            ]
          }
        },
        "deprecated": {
          "title": "methodObjectDeprecated",
          "type": "boolean",
          "default": false
        },
        "externalDocs": {
          "$ref": "#/$defs/externalDocumentationObject"
        }
      },
      "patternProperties": {
        "^x-": {
          "$ref": "#/$defs/specificationExtension"
        }
      }
    },
    "tagObject": {
      "title": "tagObject",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "title": "tagObjectName",
          "type": "string",
          "minLength": 1
        },
        "description": {
          "title": "tagObjectDescription",
          "type": "string"
        },
        "externalDocs": {
          "$ref": "#/$defs/externalDocumentationObject"
        }
      },
      "patternProperties": {
        "^x-": {
          "$ref": "#/$defs/specificationExtension"
        }
      }
    },
    "exampleObject": {
      "title": "exampleObject",
      "type": "object",
      "required": [
        "name",
        "value"
      ],
      "properties": {
        "summary": {
          "title": "exampleObjectSummary",
          "type": "string"
        },
        "value": {
          "title": "exampleObjectValue"
        },
        "description": {
          "title": "exampleObjectDescription",
          "type": "string"
        },
        "name": {
          "title": "exampleObjectName",
          "type": "string",
          "minLength": 1
        }
      },
      "patternProperties": {
        "^x-": {
          "$ref": "#/$defs/specificationExtension"
        }
      }
    },
    "examplePairingObject": {
      "title": "examplePairingObject",
      "type": "object",
      "required": [
        "name",
        "params"
      ],
      "properties": {
        "name": {
          "title": "examplePairingObjectName",
          "type": "string",
          "minLength": 1
        },
        "description": {
          "title": "examplePairingObjectDescription",
          "type": "string"
        },
        "params": {
          "title": "examplePairingObjectParams",
          "type": "array",
          "items": {
            "title": "exampleOrReference",
            "oneOf": [
              {
                "$ref": "#/$defs/exampleObject"
              },
              {
                "$ref": "#/$defs/referenceObject"
              }
            ]
          }
        },
        "result": {
          "title": "examplePairingObjectResult",
          "oneOf": [
            {
              "$ref": "#/$defs/exampleObject"
            },
            {
              "$ref": "#/$defs/referenceObject"
            }
          ]
        }
      }
    },
    "contentDescriptorObject": {
      "title": "contentDescriptorObject",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "schema"
      ],
      "properties": {
        "name": {
          "title": "contentDescriptorObjectName",
          "type": "string",
          "minLength": 1
        },
        "description": {
          "title": "contentDescriptorObjectDescription",
          "type": "string"
        },
        "summary": {
          "title": "contentDescriptorObjectSummary",
          "type": "string"
        },
        "schema": {
          "$ref": "#/$defs/JSONSchema"
        },
        "required": {
          "title": "contentDescriptorObjectRequired",
          "type": "boolean",
          "default": false
        },
        "deprecated": {
          "title": "contentDescriptorObjectDeprecated",
          "type": "boolean",
          "default": false
        }
      },
      "patternProperties": {
        "^x-": {
          "$ref": "#/$defs/specificationExtension"
        }
      }
    }
  }
}
