From 048dc0d1c9f5803212af36ab9ef4fda665964754 Mon Sep 17 00:00:00 2001 From: openrpc-bastion Date: Tue, 7 May 2024 08:44:33 +0000 Subject: [PATCH] chore(release): 1.14.7 [skip ci] ## [1.14.7](https://github.com/open-rpc/meta-schema/compare/1.14.6...1.14.7) (2024-05-07) ### Bug Fixes * bump node and transpiler ([1899504](https://github.com/open-rpc/meta-schema/commit/18995040bb80c7b045b347af26465f827bf19ef3)) --- CHANGELOG.md | 7 +++++++ index.d.ts | 24 +++++++++++------------ index.js | 2 +- index.py | 24 +++++++++++------------ openrpc_document.go | 46 ++++++++++++++++++++++----------------------- 5 files changed, 55 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 182cb6e..2bf257a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.14.7](https://github.com/open-rpc/meta-schema/compare/1.14.6...1.14.7) (2024-05-07) + + +### Bug Fixes + +* bump node and transpiler ([1899504](https://github.com/open-rpc/meta-schema/commit/18995040bb80c7b045b347af26465f827bf19ef3)) + ## [1.14.6](https://github.com/open-rpc/meta-schema/compare/1.14.5...1.14.6) (2023-07-04) diff --git a/index.d.ts b/index.d.ts index 76d189a..7187433 100644 --- a/index.d.ts +++ b/index.d.ts @@ -125,13 +125,13 @@ export type ExclusiveMinimum = number; export type NonNegativeInteger = number; export type NonNegativeIntegerDefaultZero = number; export type Pattern = string; -export type SchemaArray = Undefined[]; +export type SchemaArray = JSONSchema[]; /** * * @default true * */ -export type Items = Undefined | SchemaArray; +export type Items = JSONSchema | SchemaArray; export type UniqueItems = boolean; export type StringDoaGddGA = string; /** @@ -158,7 +158,7 @@ export interface Properties { [key: string]: any; } * */ export interface PatternProperties { [key: string]: any; } -export type DependenciesSet = Undefined | StringArray; +export type DependenciesSet = JSONSchema | StringArray; export interface Dependencies { [key: string]: any; } export type Enum = AlwaysTrue[]; export type SimpleTypes = any; @@ -185,34 +185,34 @@ export interface JSONSchemaObject { maxLength?: NonNegativeInteger; minLength?: NonNegativeIntegerDefaultZero; pattern?: Pattern; - additionalItems?: Undefined; + additionalItems?: JSONSchema; items?: Items; maxItems?: NonNegativeInteger; minItems?: NonNegativeIntegerDefaultZero; uniqueItems?: UniqueItems; - contains?: Undefined; + contains?: JSONSchema; maxProperties?: NonNegativeInteger; minProperties?: NonNegativeIntegerDefaultZero; required?: StringArray; - additionalProperties?: Undefined; + additionalProperties?: JSONSchema; definitions?: Definitions; properties?: Properties; patternProperties?: PatternProperties; dependencies?: Dependencies; - propertyNames?: Undefined; + propertyNames?: JSONSchema; const?: AlwaysTrue; enum?: Enum; type?: Type; format?: Format; contentMediaType?: ContentMediaType; contentEncoding?: ContentEncoding; - if?: Undefined; - then?: Undefined; - else?: Undefined; + if?: JSONSchema; + then?: JSONSchema; + else?: JSONSchema; allOf?: SchemaArray; anyOf?: SchemaArray; oneOf?: SchemaArray; - not?: Undefined; + not?: JSONSchema; [k: string]: any; } /** @@ -233,7 +233,7 @@ export interface ContentDescriptorObject { name: ContentDescriptorObjectName; description?: ContentDescriptorObjectDescription; summary?: ContentDescriptorObjectSummary; - schema: Undefined; + schema: JSONSchema; required?: ContentDescriptorObjectRequired; deprecated?: ContentDescriptorObjectDeprecated; [regex: string]: SpecificationExtension | any; diff --git a/index.js b/index.js index f82d7fb..8c73188 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.openrpcDocument = void 0; -exports.openrpcDocument = { "$schema": "https://meta.json-schema.tools/", "$id": "https://meta.open-rpc.org/", "title": "openrpcDocument", "type": "object", "required": ["info", "methods", "openrpc"], "additionalProperties": false, "patternProperties": { "^x-": { "$ref": "#/definitions/specificationExtension" } }, "properties": { "openrpc": { "$ref": "#/definitions/openrpc" }, "info": { "$ref": "#/definitions/infoObject" }, "externalDocs": { "$ref": "#/definitions/externalDocumentationObject" }, "servers": { "$ref": "#/definitions/servers" }, "methods": { "$ref": "#/definitions/methods" }, "components": { "$ref": "#/definitions/components" }, "$schema": { "$ref": "#/definitions/metaSchema" } }, "definitions": { "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"] }, "infoObjectProperties": { "title": "infoObjectProperties", "type": "string" }, "infoObjectDescription": { "title": "infoObjectDescription", "type": "string" }, "infoObjectTermsOfService": { "title": "infoObjectTermsOfService", "type": "string", "format": "uri" }, "infoObjectVersion": { "title": "infoObjectVersion", "type": "string" }, "contactObjectName": { "title": "contactObjectName", "type": "string" }, "contactObjectEmail": { "title": "contactObjectEmail", "type": "string" }, "contactObjectUrl": { "title": "contactObjectUrl", "type": "string" }, "specificationExtension": { "title": "specificationExtension" }, "contactObject": { "title": "contactObject", "type": "object", "additionalProperties": false, "properties": { "name": { "$ref": "#/definitions/contactObjectName" }, "email": { "$ref": "#/definitions/contactObjectEmail" }, "url": { "$ref": "#/definitions/contactObjectUrl" } }, "patternProperties": { "^x-": { "$ref": "#/definitions/specificationExtension" } } }, "licenseObjectName": { "title": "licenseObjectName", "type": "string" }, "licenseObjectUrl": { "title": "licenseObjectUrl", "type": "string" }, "licenseObject": { "title": "licenseObject", "type": "object", "additionalProperties": false, "properties": { "name": { "$ref": "#/definitions/licenseObjectName" }, "url": { "$ref": "#/definitions/licenseObjectUrl" } }, "patternProperties": { "^x-": { "$ref": "#/definitions/specificationExtension" } } }, "infoObject": { "title": "infoObject", "type": "object", "additionalProperties": false, "required": ["title", "version"], "properties": { "title": { "$ref": "#/definitions/infoObjectProperties" }, "description": { "$ref": "#/definitions/infoObjectDescription" }, "termsOfService": { "$ref": "#/definitions/infoObjectTermsOfService" }, "version": { "$ref": "#/definitions/infoObjectVersion" }, "contact": { "$ref": "#/definitions/contactObject" }, "license": { "$ref": "#/definitions/licenseObject" } }, "patternProperties": { "^x-": { "$ref": "#/definitions/specificationExtension" } } }, "externalDocumentationObjectDescription": { "title": "externalDocumentationObjectDescription", "type": "string" }, "externalDocumentationObjectUrl": { "title": "externalDocumentationObjectUrl", "type": "string", "format": "uri" }, "externalDocumentationObject": { "title": "externalDocumentationObject", "type": "object", "additionalProperties": false, "description": "information about external documentation", "required": ["url"], "properties": { "description": { "$ref": "#/definitions/externalDocumentationObjectDescription" }, "url": { "$ref": "#/definitions/externalDocumentationObjectUrl" } }, "patternProperties": { "^x-": { "$ref": "#/definitions/specificationExtension" } } }, "serverObjectUrl": { "title": "serverObjectUrl", "type": "string", "format": "uri" }, "serverObjectName": { "title": "serverObjectName", "type": "string" }, "serverObjectDescription": { "title": "serverObjectDescription", "type": "string" }, "serverObjectSummary": { "title": "serverObjectSummary", "type": "string" }, "serverObjectVariableDefault": { "title": "serverObjectVariableDefault", "type": "string" }, "serverObjectVariableDescription": { "title": "serverObjectVariableDescription", "type": "string" }, "serverObjectVariableEnumItem": { "title": "serverObjectVariableEnumItem", "type": "string" }, "serverObjectVariableEnum": { "title": "serverObjectVariableEnum", "type": "array", "items": { "$ref": "#/definitions/serverObjectVariableEnumItem" } }, "serverObjectVariable": { "title": "serverObjectVariable", "type": "object", "required": ["default"], "properties": { "default": { "$ref": "#/definitions/serverObjectVariableDefault" }, "description": { "$ref": "#/definitions/serverObjectVariableDescription" }, "enum": { "$ref": "#/definitions/serverObjectVariableEnum" } } }, "serverObjectVariables": { "title": "serverObjectVariables", "type": "object", "patternProperties": { "[0-z]+": { "$ref": "#/definitions/serverObjectVariable" } } }, "serverObject": { "title": "serverObject", "type": "object", "required": ["url"], "additionalProperties": false, "properties": { "url": { "$ref": "#/definitions/serverObjectUrl" }, "name": { "$ref": "#/definitions/serverObjectName" }, "description": { "$ref": "#/definitions/serverObjectDescription" }, "summary": { "$ref": "#/definitions/serverObjectSummary" }, "variables": { "$ref": "#/definitions/serverObjectVariables" } }, "patternProperties": { "^x-": { "$ref": "#/definitions/specificationExtension" } } }, "AlwaysFalse": false, "servers": { "title": "servers", "type": "array", "additionalItems": false, "items": { "$ref": "#/definitions/serverObject" } }, "methodObjectName": { "title": "methodObjectName", "description": "The cannonical name for the method. The name MUST be unique within the methods array.", "type": "string", "minLength": 1 }, "methodObjectDescription": { "title": "methodObjectDescription", "description": "A verbose explanation of the method behavior. GitHub Flavored Markdown syntax MAY be used for rich text representation.", "type": "string" }, "methodObjectSummary": { "title": "methodObjectSummary", "description": "A short summary of what the method does.", "type": "string" }, "tagObjectName": { "title": "tagObjectName", "type": "string", "minLength": 1 }, "tagObjectDescription": { "title": "tagObjectDescription", "type": "string" }, "tagObject": { "title": "tagObject", "type": "object", "additionalProperties": false, "required": ["name"], "properties": { "name": { "$ref": "#/definitions/tagObjectName" }, "description": { "$ref": "#/definitions/tagObjectDescription" }, "externalDocs": { "$ref": "#/definitions/externalDocumentationObject" } }, "patternProperties": { "^x-": { "$ref": "#/definitions/specificationExtension" } } }, "$ref": { "title": "$ref", "type": "string", "format": "uri-reference" }, "referenceObject": { "title": "referenceObject", "type": "object", "additionalProperties": false, "required": ["$ref"], "properties": { "$ref": { "$ref": "#/definitions/$ref" } } }, "tagOrReference": { "title": "tagOrReference", "oneOf": [{ "$ref": "#/definitions/tagObject" }, { "$ref": "#/definitions/referenceObject" }] }, "methodObjectTags": { "title": "methodObjectTags", "type": "array", "items": { "$ref": "#/definitions/tagOrReference" } }, "methodObjectParamStructure": { "title": "methodObjectParamStructure", "type": "string", "description": "Format the server expects the params. Defaults to 'either'.", "enum": ["by-position", "by-name", "either"], "default": "either" }, "contentDescriptorObjectName": { "title": "contentDescriptorObjectName", "type": "string", "minLength": 1 }, "contentDescriptorObjectDescription": { "title": "contentDescriptorObjectDescription", "type": "string" }, "contentDescriptorObjectSummary": { "title": "contentDescriptorObjectSummary", "type": "string" }, "$id": { "title": "$id", "type": "string", "format": "uri-reference" }, "$schema": { "title": "$schema", "type": "string", "format": "uri" }, "$comment": { "title": "$comment", "type": "string" }, "title": { "title": "title", "type": "string" }, "description": { "title": "description", "type": "string" }, "AlwaysTrue": true, "readOnly": { "title": "readOnly", "type": "boolean", "default": false }, "examples": { "title": "examples", "type": "array", "items": true }, "multipleOf": { "title": "multipleOf", "type": "number", "exclusiveMinimum": 0 }, "maximum": { "title": "maximum", "type": "number" }, "exclusiveMaximum": { "title": "exclusiveMaximum", "type": "number" }, "minimum": { "title": "minimum", "type": "number" }, "exclusiveMinimum": { "title": "exclusiveMinimum", "type": "number" }, "nonNegativeInteger": { "title": "nonNegativeInteger", "type": "integer", "minimum": 0 }, "nonNegativeIntegerDefaultZero": { "title": "nonNegativeIntegerDefaultZero", "type": "integer", "minimum": 0, "default": 0 }, "pattern": { "title": "pattern", "type": "string", "format": "regex" }, "schemaArray": { "title": "schemaArray", "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/undefined" } }, "items": { "title": "items", "anyOf": [{ "$ref": "#/definitions/undefined" }, { "$ref": "#/definitions/schemaArray" }], "default": true }, "uniqueItems": { "title": "uniqueItems", "type": "boolean", "default": false }, "string_doaGddGA": { "type": "string", "title": "string_doaGddGA" }, "stringArray": { "title": "stringArray", "type": "array", "items": { "$ref": "#/definitions/string_doaGddGA" }, "uniqueItems": true, "default": [] }, "definitions": { "title": "definitions", "type": "object", "additionalProperties": { "$ref": "#/definitions/undefined" }, "default": {} }, "properties": { "title": "properties", "type": "object", "additionalProperties": { "$ref": "#/definitions/undefined" }, "default": {} }, "patternProperties": { "title": "patternProperties", "type": "object", "additionalProperties": { "$ref": "#/definitions/undefined" }, "propertyNames": { "title": "propertyNames", "format": "regex" }, "default": {} }, "dependenciesSet": { "title": "dependenciesSet", "anyOf": [{ "$ref": "#/definitions/undefined" }, { "$ref": "#/definitions/stringArray" }] }, "dependencies": { "title": "dependencies", "type": "object", "additionalProperties": { "$ref": "#/definitions/dependenciesSet" } }, "enum": { "title": "enum", "type": "array", "items": true, "minItems": 1, "uniqueItems": true }, "simpleTypes": { "title": "simpleTypes", "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] }, "arrayOfSimpleTypes": { "title": "arrayOfSimpleTypes", "type": "array", "items": { "$ref": "#/definitions/simpleTypes" }, "minItems": 1, "uniqueItems": true }, "type": { "title": "type", "anyOf": [{ "$ref": "#/definitions/simpleTypes" }, { "$ref": "#/definitions/arrayOfSimpleTypes" }] }, "format": { "title": "format", "type": "string" }, "contentMediaType": { "title": "contentMediaType", "type": "string" }, "contentEncoding": { "title": "contentEncoding", "type": "string" }, "JSONSchemaObject": { "title": "JSONSchemaObject", "type": "object", "properties": { "$id": { "$ref": "#/definitions/$id" }, "$schema": { "$ref": "#/definitions/$schema" }, "$ref": { "$ref": "#/definitions/$ref" }, "$comment": { "$ref": "#/definitions/$comment" }, "title": { "$ref": "#/definitions/title" }, "description": { "$ref": "#/definitions/description" }, "default": true, "readOnly": { "$ref": "#/definitions/readOnly" }, "examples": { "$ref": "#/definitions/examples" }, "multipleOf": { "$ref": "#/definitions/multipleOf" }, "maximum": { "$ref": "#/definitions/maximum" }, "exclusiveMaximum": { "$ref": "#/definitions/exclusiveMaximum" }, "minimum": { "$ref": "#/definitions/minimum" }, "exclusiveMinimum": { "$ref": "#/definitions/exclusiveMinimum" }, "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefaultZero" }, "pattern": { "$ref": "#/definitions/pattern" }, "additionalItems": { "$ref": "#/definitions/undefined" }, "items": { "$ref": "#/definitions/items" }, "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefaultZero" }, "uniqueItems": { "$ref": "#/definitions/uniqueItems" }, "contains": { "$ref": "#/definitions/undefined" }, "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefaultZero" }, "required": { "$ref": "#/definitions/stringArray" }, "additionalProperties": { "$ref": "#/definitions/undefined" }, "definitions": { "$ref": "#/definitions/definitions" }, "properties": { "$ref": "#/definitions/properties" }, "patternProperties": { "$ref": "#/definitions/patternProperties" }, "dependencies": { "$ref": "#/definitions/dependencies" }, "propertyNames": { "$ref": "#/definitions/undefined" }, "const": true, "enum": { "$ref": "#/definitions/enum" }, "type": { "$ref": "#/definitions/type" }, "format": { "$ref": "#/definitions/format" }, "contentMediaType": { "$ref": "#/definitions/contentMediaType" }, "contentEncoding": { "$ref": "#/definitions/contentEncoding" }, "if": { "$ref": "#/definitions/undefined" }, "then": { "$ref": "#/definitions/undefined" }, "else": { "$ref": "#/definitions/undefined" }, "allOf": { "$ref": "#/definitions/schemaArray" }, "anyOf": { "$ref": "#/definitions/schemaArray" }, "oneOf": { "$ref": "#/definitions/schemaArray" }, "not": { "$ref": "#/definitions/undefined" } } }, "JSONSchemaBoolean": { "title": "JSONSchemaBoolean", "description": "Always valid if true. Never valid if false. Is constant.", "type": "boolean" }, "JSONSchema": { "$schema": "https://meta.json-schema.tools/", "$id": "https://meta.json-schema.tools/", "title": "JSONSchema", "default": {}, "oneOf": [{ "$ref": "#/definitions/JSONSchemaObject" }, { "$ref": "#/definitions/JSONSchemaBoolean" }], "definitions": { "JSONSchemaBoolean": { "$ref": "#/definitions/JSONSchemaBoolean" }, "JSONSchemaObject": { "$ref": "#/definitions/JSONSchemaObject" }, "schemaArray": { "$ref": "#/definitions/schemaArray" }, "nonNegativeInteger": { "$ref": "#/definitions/nonNegativeInteger" }, "nonNegativeIntegerDefault0": { "$ref": "#/definitions/nonNegativeIntegerDefaultZero" }, "simpleTypes": { "$ref": "#/definitions/simpleTypes" }, "stringArray": { "$ref": "#/definitions/stringArray" } }, "isCycle": true }, "contentDescriptorObjectRequired": { "title": "contentDescriptorObjectRequired", "type": "boolean", "default": false }, "contentDescriptorObjectDeprecated": { "title": "contentDescriptorObjectDeprecated", "type": "boolean", "default": false }, "contentDescriptorObject": { "title": "contentDescriptorObject", "type": "object", "additionalProperties": false, "required": ["name", "schema"], "properties": { "name": { "$ref": "#/definitions/contentDescriptorObjectName" }, "description": { "$ref": "#/definitions/contentDescriptorObjectDescription" }, "summary": { "$ref": "#/definitions/contentDescriptorObjectSummary" }, "schema": { "$ref": "#/definitions/undefined" }, "required": { "$ref": "#/definitions/contentDescriptorObjectRequired" }, "deprecated": { "$ref": "#/definitions/contentDescriptorObjectDeprecated" } }, "patternProperties": { "^x-": { "$ref": "#/definitions/specificationExtension" } } }, "contentDescriptorOrReference": { "title": "contentDescriptorOrReference", "oneOf": [{ "$ref": "#/definitions/contentDescriptorObject" }, { "$ref": "#/definitions/referenceObject" }] }, "methodObjectParams": { "title": "methodObjectParams", "type": "array", "items": { "$ref": "#/definitions/contentDescriptorOrReference" } }, "methodObjectResult": { "title": "methodObjectResult", "oneOf": [{ "$ref": "#/definitions/contentDescriptorObject" }, { "$ref": "#/definitions/referenceObject" }] }, "errorObjectCode": { "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" }, "errorObjectMessage": { "title": "errorObjectMessage", "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", "type": "string" }, "errorObjectData": { "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.)." }, "errorObject": { "title": "errorObject", "type": "object", "description": "Defines an application level error.", "additionalProperties": false, "required": ["code", "message"], "properties": { "code": { "$ref": "#/definitions/errorObjectCode" }, "message": { "$ref": "#/definitions/errorObjectMessage" }, "data": { "$ref": "#/definitions/errorObjectData" } } }, "errorOrReference": { "title": "errorOrReference", "oneOf": [{ "$ref": "#/definitions/errorObject" }, { "$ref": "#/definitions/referenceObject" }] }, "methodObjectErrors": { "title": "methodObjectErrors", "description": "Defines an application level error.", "type": "array", "items": { "$ref": "#/definitions/errorOrReference" } }, "linkObjectName": { "title": "linkObjectName", "type": "string", "minLength": 1 }, "linkObjectSummary": { "title": "linkObjectSummary", "type": "string" }, "linkObjectMethod": { "title": "linkObjectMethod", "type": "string" }, "linkObjectDescription": { "title": "linkObjectDescription", "type": "string" }, "linkObjectParams": { "title": "linkObjectParams" }, "linkObjectServer": { "title": "linkObjectServer", "type": "object", "required": ["url"], "additionalProperties": false, "properties": { "url": { "$ref": "#/definitions/serverObjectUrl" }, "name": { "$ref": "#/definitions/serverObjectName" }, "description": { "$ref": "#/definitions/serverObjectDescription" }, "summary": { "$ref": "#/definitions/serverObjectSummary" }, "variables": { "$ref": "#/definitions/serverObjectVariables" } }, "patternProperties": { "^x-": { "$ref": "#/definitions/specificationExtension" } } }, "linkObject": { "title": "linkObject", "type": "object", "additionalProperties": false, "properties": { "name": { "$ref": "#/definitions/linkObjectName" }, "summary": { "$ref": "#/definitions/linkObjectSummary" }, "method": { "$ref": "#/definitions/linkObjectMethod" }, "description": { "$ref": "#/definitions/linkObjectDescription" }, "params": { "$ref": "#/definitions/linkObjectParams" }, "server": { "$ref": "#/definitions/linkObjectServer" } }, "patternProperties": { "^x-": { "$ref": "#/definitions/specificationExtension" } } }, "linkOrReference": { "title": "linkOrReference", "oneOf": [{ "$ref": "#/definitions/linkObject" }, { "$ref": "#/definitions/referenceObject" }] }, "methodObjectLinks": { "title": "methodObjectLinks", "type": "array", "items": { "$ref": "#/definitions/linkOrReference" } }, "examplePairingObjectName": { "title": "examplePairingObjectName", "type": "string", "minLength": 1 }, "examplePairingObjectDescription": { "title": "examplePairingObjectDescription", "type": "string" }, "exampleObjectSummary": { "title": "exampleObjectSummary", "type": "string" }, "exampleObjectValue": { "title": "exampleObjectValue" }, "exampleObjectDescription": { "title": "exampleObjectDescription", "type": "string" }, "exampleObjectName": { "title": "exampleObjectName", "type": "string", "minLength": 1 }, "exampleObject": { "title": "exampleObject", "type": "object", "required": ["name", "value"], "properties": { "summary": { "$ref": "#/definitions/exampleObjectSummary" }, "value": { "$ref": "#/definitions/exampleObjectValue" }, "description": { "$ref": "#/definitions/exampleObjectDescription" }, "name": { "$ref": "#/definitions/exampleObjectName" } }, "patternProperties": { "^x-": { "$ref": "#/definitions/specificationExtension" } } }, "exampleOrReference": { "title": "exampleOrReference", "oneOf": [{ "$ref": "#/definitions/exampleObject" }, { "$ref": "#/definitions/referenceObject" }] }, "examplePairingObjectParams": { "title": "examplePairingObjectParams", "type": "array", "items": { "$ref": "#/definitions/exampleOrReference" } }, "examplePairingObjectResult": { "title": "examplePairingObjectResult", "oneOf": [{ "$ref": "#/definitions/exampleObject" }, { "$ref": "#/definitions/referenceObject" }] }, "examplePairingObject": { "title": "examplePairingObject", "type": "object", "required": ["name", "params"], "properties": { "name": { "$ref": "#/definitions/examplePairingObjectName" }, "description": { "$ref": "#/definitions/examplePairingObjectDescription" }, "params": { "$ref": "#/definitions/examplePairingObjectParams" }, "result": { "$ref": "#/definitions/examplePairingObjectResult" } } }, "examplePairingOrReference": { "title": "examplePairingOrReference", "oneOf": [{ "$ref": "#/definitions/examplePairingObject" }, { "$ref": "#/definitions/referenceObject" }] }, "methodObjectExamples": { "title": "methodObjectExamples", "type": "array", "items": { "$ref": "#/definitions/examplePairingOrReference" } }, "methodObjectDeprecated": { "title": "methodObjectDeprecated", "type": "boolean", "default": false }, "methodObject": { "title": "methodObject", "type": "object", "required": ["name", "params"], "additionalProperties": false, "properties": { "name": { "$ref": "#/definitions/methodObjectName" }, "description": { "$ref": "#/definitions/methodObjectDescription" }, "summary": { "$ref": "#/definitions/methodObjectSummary" }, "servers": { "$ref": "#/definitions/servers" }, "tags": { "$ref": "#/definitions/methodObjectTags" }, "paramStructure": { "$ref": "#/definitions/methodObjectParamStructure" }, "params": { "$ref": "#/definitions/methodObjectParams" }, "result": { "$ref": "#/definitions/methodObjectResult" }, "errors": { "$ref": "#/definitions/methodObjectErrors" }, "links": { "$ref": "#/definitions/methodObjectLinks" }, "examples": { "$ref": "#/definitions/methodObjectExamples" }, "deprecated": { "$ref": "#/definitions/methodObjectDeprecated" }, "externalDocs": { "$ref": "#/definitions/externalDocumentationObject" } }, "patternProperties": { "^x-": { "$ref": "#/definitions/specificationExtension" } } }, "methodOrReference": { "title": "methodOrReference", "oneOf": [{ "$ref": "#/definitions/methodObject" }, { "$ref": "#/definitions/referenceObject" }] }, "methods": { "title": "methods", "type": "array", "additionalItems": false, "items": { "$ref": "#/definitions/methodOrReference" } }, "schemaComponents": { "title": "schemaComponents", "type": "object", "patternProperties": { "[0-z]+": { "$ref": "#/definitions/undefined" } } }, "linkComponents": { "title": "linkComponents", "type": "object", "patternProperties": { "[0-z]+": { "$ref": "#/definitions/linkObject" } } }, "errorComponents": { "title": "errorComponents", "type": "object", "patternProperties": { "[0-z]+": { "$ref": "#/definitions/errorObject" } } }, "exampleComponents": { "title": "exampleComponents", "type": "object", "patternProperties": { "[0-z]+": { "$ref": "#/definitions/exampleObject" } } }, "examplePairingComponents": { "title": "examplePairingComponents", "type": "object", "patternProperties": { "[0-z]+": { "$ref": "#/definitions/examplePairingObject" } } }, "contentDescriptorComponents": { "title": "contentDescriptorComponents", "type": "object", "patternProperties": { "[0-z]+": { "$ref": "#/definitions/contentDescriptorObject" } } }, "tagComponents": { "title": "tagComponents", "type": "object", "patternProperties": { "[0-z]+": { "$ref": "#/definitions/tagObject" } } }, "components": { "title": "components", "type": "object", "properties": { "schemas": { "$ref": "#/definitions/schemaComponents" }, "links": { "$ref": "#/definitions/linkComponents" }, "errors": { "$ref": "#/definitions/errorComponents" }, "examples": { "$ref": "#/definitions/exampleComponents" }, "examplePairings": { "$ref": "#/definitions/examplePairingComponents" }, "contentDescriptors": { "$ref": "#/definitions/contentDescriptorComponents" }, "tags": { "$ref": "#/definitions/tagComponents" } } }, "metaSchema": { "title": "metaSchema", "description": "JSON Schema URI (used by some editors)", "type": "string", "default": "https://meta.open-rpc.org/" } } }; +exports.openrpcDocument = { "$schema": "https://meta.json-schema.tools/", "$id": "https://meta.open-rpc.org/", "title": "openrpcDocument", "type": "object", "required": ["info", "methods", "openrpc"], "additionalProperties": false, "patternProperties": { "^x-": { "$ref": "#/definitions/specificationExtension" } }, "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": "#/definitions/infoObject" }, "externalDocs": { "$ref": "#/definitions/externalDocumentationObject" }, "servers": { "title": "servers", "type": "array", "additionalItems": false, "items": { "$ref": "#/definitions/serverObject" } }, "methods": { "title": "methods", "type": "array", "additionalItems": false, "items": { "title": "methodOrReference", "oneOf": [{ "$ref": "#/definitions/methodObject" }, { "$ref": "#/definitions/referenceObject" }] } }, "components": { "title": "components", "type": "object", "properties": { "schemas": { "title": "schemaComponents", "type": "object", "patternProperties": { "[0-z]+": { "$ref": "#/definitions/JSONSchema" } } }, "links": { "title": "linkComponents", "type": "object", "patternProperties": { "[0-z]+": { "$ref": "#/definitions/linkObject" } } }, "errors": { "title": "errorComponents", "type": "object", "patternProperties": { "[0-z]+": { "$ref": "#/definitions/errorObject" } } }, "examples": { "title": "exampleComponents", "type": "object", "patternProperties": { "[0-z]+": { "$ref": "#/definitions/exampleObject" } } }, "examplePairings": { "title": "examplePairingComponents", "type": "object", "patternProperties": { "[0-z]+": { "$ref": "#/definitions/examplePairingObject" } } }, "contentDescriptors": { "title": "contentDescriptorComponents", "type": "object", "patternProperties": { "[0-z]+": { "$ref": "#/definitions/contentDescriptorObject" } } }, "tags": { "title": "tagComponents", "type": "object", "patternProperties": { "[0-z]+": { "$ref": "#/definitions/tagObject" } } } } }, "$schema": { "title": "metaSchema", "description": "JSON Schema URI (used by some editors)", "type": "string", "default": "https://meta.open-rpc.org/" } }, "definitions": { "specificationExtension": { "title": "specificationExtension" }, "JSONSchema": { "$ref": "https://raw.githubusercontent.com/json-schema-tools/meta-schema/1.5.9/src/schema.json" }, "referenceObject": { "title": "referenceObject", "type": "object", "additionalProperties": false, "required": ["$ref"], "properties": { "$ref": { "$ref": "https://raw.githubusercontent.com/json-schema-tools/meta-schema/1.5.9/src/schema.json#/definitions/JSONSchemaObject/properties/$ref" } } }, "errorObject": { "title": "errorObject", "type": "object", "description": "Defines an application level error.", "additionalProperties": false, "required": ["code", "message"], "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.)." } } }, "licenseObject": { "title": "licenseObject", "type": "object", "additionalProperties": false, "properties": { "name": { "title": "licenseObjectName", "type": "string" }, "url": { "title": "licenseObjectUrl", "type": "string" } }, "patternProperties": { "^x-": { "$ref": "#/definitions/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": "#/definitions/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": "#/definitions/contactObject" }, "license": { "$ref": "#/definitions/licenseObject" } }, "patternProperties": { "^x-": { "$ref": "#/definitions/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": "#/definitions/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": "#/definitions/serverObject" } }, "patternProperties": { "^x-": { "$ref": "#/definitions/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": "#/definitions/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": "#/definitions/serverObject" } }, "tags": { "title": "methodObjectTags", "type": "array", "items": { "title": "tagOrReference", "oneOf": [{ "$ref": "#/definitions/tagObject" }, { "$ref": "#/definitions/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": "#/definitions/contentDescriptorObject" }, { "$ref": "#/definitions/referenceObject" }] } }, "result": { "title": "methodObjectResult", "oneOf": [{ "$ref": "#/definitions/contentDescriptorObject" }, { "$ref": "#/definitions/referenceObject" }] }, "errors": { "title": "methodObjectErrors", "description": "Defines an application level error.", "type": "array", "items": { "title": "errorOrReference", "oneOf": [{ "$ref": "#/definitions/errorObject" }, { "$ref": "#/definitions/referenceObject" }] } }, "links": { "title": "methodObjectLinks", "type": "array", "items": { "title": "linkOrReference", "oneOf": [{ "$ref": "#/definitions/linkObject" }, { "$ref": "#/definitions/referenceObject" }] } }, "examples": { "title": "methodObjectExamples", "type": "array", "items": { "title": "examplePairingOrReference", "oneOf": [{ "$ref": "#/definitions/examplePairingObject" }, { "$ref": "#/definitions/referenceObject" }] } }, "deprecated": { "title": "methodObjectDeprecated", "type": "boolean", "default": false }, "externalDocs": { "$ref": "#/definitions/externalDocumentationObject" } }, "patternProperties": { "^x-": { "$ref": "#/definitions/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": "#/definitions/externalDocumentationObject" } }, "patternProperties": { "^x-": { "$ref": "#/definitions/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": "#/definitions/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": "#/definitions/exampleObject" }, { "$ref": "#/definitions/referenceObject" }] } }, "result": { "title": "examplePairingObjectResult", "oneOf": [{ "$ref": "#/definitions/exampleObject" }, { "$ref": "#/definitions/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": "#/definitions/JSONSchema" }, "required": { "title": "contentDescriptorObjectRequired", "type": "boolean", "default": false }, "deprecated": { "title": "contentDescriptorObjectDeprecated", "type": "boolean", "default": false } }, "patternProperties": { "^x-": { "$ref": "#/definitions/specificationExtension" } } } } }; exports.default = exports.openrpcDocument; diff --git a/index.py b/index.py index ef5a489..49fc75c 100644 --- a/index.py +++ b/index.py @@ -184,9 +184,9 @@ class MethodObjectParamStructure(Enum): Pattern = NewType("Pattern", str) -SchemaArray = NewType("SchemaArray", List[Undefined]) +SchemaArray = NewType("SchemaArray", List[JSONSchema]) -Items = NewType("Items", Union[Undefined, SchemaArray]) +Items = NewType("Items", Union[JSONSchema, SchemaArray]) UniqueItems = NewType("UniqueItems", bool) @@ -200,7 +200,7 @@ class MethodObjectParamStructure(Enum): PatternProperties = NewType("PatternProperties", Mapping[Any, Any]) -DependenciesSet = NewType("DependenciesSet", Union[Undefined, StringArray]) +DependenciesSet = NewType("DependenciesSet", Union[JSONSchema, StringArray]) Dependencies = NewType("Dependencies", Mapping[Any, Any]) @@ -236,34 +236,34 @@ class JSONSchemaObject(TypedDict): maxLength: Optional[NonNegativeInteger] minLength: Optional[NonNegativeIntegerDefaultZero] pattern: Optional[Pattern] - additionalItems: Optional[Undefined] + additionalItems: Optional[JSONSchema] items: Optional[Items] maxItems: Optional[NonNegativeInteger] minItems: Optional[NonNegativeIntegerDefaultZero] uniqueItems: Optional[UniqueItems] - contains: Optional[Undefined] + contains: Optional[JSONSchema] maxProperties: Optional[NonNegativeInteger] minProperties: Optional[NonNegativeIntegerDefaultZero] required: Optional[StringArray] - additionalProperties: Optional[Undefined] + additionalProperties: Optional[JSONSchema] definitions: Optional[Definitions] properties: Optional[Properties] patternProperties: Optional[PatternProperties] dependencies: Optional[Dependencies] - propertyNames: Optional[Undefined] + propertyNames: Optional[JSONSchema] const: Optional[AlwaysTrue] enum: Optional[Enum] type: Optional[Type] format: Optional[Format] contentMediaType: Optional[ContentMediaType] contentEncoding: Optional[ContentEncoding] - if: Optional[Undefined] - then: Optional[Undefined] - else: Optional[Undefined] + if: Optional[JSONSchema] + then: Optional[JSONSchema] + else: Optional[JSONSchema] allOf: Optional[SchemaArray] anyOf: Optional[SchemaArray] oneOf: Optional[SchemaArray] - not: Optional[Undefined] + not: Optional[JSONSchema] """Always valid if true. Never valid if false. Is constant. """ JSONSchemaBoolean = NewType("JSONSchemaBoolean", bool) @@ -278,7 +278,7 @@ class ContentDescriptorObject(TypedDict): name: Optional[ContentDescriptorObjectName] description: Optional[ContentDescriptorObjectDescription] summary: Optional[ContentDescriptorObjectSummary] - schema: Optional[Undefined] + schema: Optional[JSONSchema] required: Optional[ContentDescriptorObjectRequired] deprecated: Optional[ContentDescriptorObjectDeprecated] diff --git a/openrpc_document.go b/openrpc_document.go index 4c8f45e..1411899 100644 --- a/openrpc_document.go +++ b/openrpc_document.go @@ -167,21 +167,21 @@ type ExclusiveMinimum float64 type NonNegativeInteger int64 type NonNegativeIntegerDefaultZero int64 type Pattern string -type SchemaArray []Undefined +type SchemaArray []JSONSchema // // --- Default --- // // true type Items struct { - Undefined *Undefined + JSONSchema *JSONSchema SchemaArray *SchemaArray } func (a *Items) UnmarshalJSON(bytes []byte) error { var ok bool - var myUndefined Undefined - if err := json.Unmarshal(bytes, &myUndefined); err == nil { + var myJSONSchema JSONSchema + if err := json.Unmarshal(bytes, &myJSONSchema); err == nil { ok = true - a.Undefined = &myUndefined + a.JSONSchema = &myJSONSchema } var mySchemaArray SchemaArray if err := json.Unmarshal(bytes, &mySchemaArray); err == nil { @@ -195,8 +195,8 @@ func (a *Items) UnmarshalJSON(bytes []byte) error { } func (o Items) MarshalJSON() ([]byte, error) { out := []interface{}{} - if o.Undefined != nil { - out = append(out, o.Undefined) + if o.JSONSchema != nil { + out = append(out, o.JSONSchema) } if o.SchemaArray != nil { out = append(out, o.SchemaArray) @@ -226,15 +226,15 @@ type Properties map[string]interface{} // {} type PatternProperties map[string]interface{} type DependenciesSet struct { - Undefined *Undefined + JSONSchema *JSONSchema StringArray *StringArray } func (a *DependenciesSet) UnmarshalJSON(bytes []byte) error { var ok bool - var myUndefined Undefined - if err := json.Unmarshal(bytes, &myUndefined); err == nil { + var myJSONSchema JSONSchema + if err := json.Unmarshal(bytes, &myJSONSchema); err == nil { ok = true - a.Undefined = &myUndefined + a.JSONSchema = &myJSONSchema } var myStringArray StringArray if err := json.Unmarshal(bytes, &myStringArray); err == nil { @@ -248,8 +248,8 @@ func (a *DependenciesSet) UnmarshalJSON(bytes []byte) error { } func (o DependenciesSet) MarshalJSON() ([]byte, error) { out := []interface{}{} - if o.Undefined != nil { - out = append(out, o.Undefined) + if o.JSONSchema != nil { + out = append(out, o.JSONSchema) } if o.StringArray != nil { out = append(out, o.StringArray) @@ -312,34 +312,34 @@ type JSONSchemaObject struct { MaxLength *NonNegativeInteger `json:"maxLength,omitempty"` MinLength *NonNegativeIntegerDefaultZero `json:"minLength,omitempty"` Pattern *Pattern `json:"pattern,omitempty"` - AdditionalItems *Undefined `json:"additionalItems,omitempty"` + AdditionalItems *JSONSchema `json:"additionalItems,omitempty"` Items *Items `json:"items,omitempty"` MaxItems *NonNegativeInteger `json:"maxItems,omitempty"` MinItems *NonNegativeIntegerDefaultZero `json:"minItems,omitempty"` UniqueItems *UniqueItems `json:"uniqueItems,omitempty"` - Contains *Undefined `json:"contains,omitempty"` + Contains *JSONSchema `json:"contains,omitempty"` MaxProperties *NonNegativeInteger `json:"maxProperties,omitempty"` MinProperties *NonNegativeIntegerDefaultZero `json:"minProperties,omitempty"` Required *StringArray `json:"required,omitempty"` - AdditionalProperties *Undefined `json:"additionalProperties,omitempty"` + AdditionalProperties *JSONSchema `json:"additionalProperties,omitempty"` Definitions *Definitions `json:"definitions,omitempty"` Properties *Properties `json:"properties,omitempty"` PatternProperties *PatternProperties `json:"patternProperties,omitempty"` Dependencies *Dependencies `json:"dependencies,omitempty"` - PropertyNames *Undefined `json:"propertyNames,omitempty"` + PropertyNames *JSONSchema `json:"propertyNames,omitempty"` Const *AlwaysTrue `json:"const,omitempty"` Enum *Enum `json:"enum,omitempty"` Type *Type `json:"type,omitempty"` Format *Format `json:"format,omitempty"` ContentMediaType *ContentMediaType `json:"contentMediaType,omitempty"` ContentEncoding *ContentEncoding `json:"contentEncoding,omitempty"` - If *Undefined `json:"if,omitempty"` - Then *Undefined `json:"then,omitempty"` - Else *Undefined `json:"else,omitempty"` + If *JSONSchema `json:"if,omitempty"` + Then *JSONSchema `json:"then,omitempty"` + Else *JSONSchema `json:"else,omitempty"` AllOf *SchemaArray `json:"allOf,omitempty"` AnyOf *SchemaArray `json:"anyOf,omitempty"` OneOf *SchemaArray `json:"oneOf,omitempty"` - Not *Undefined `json:"not,omitempty"` + Not *JSONSchema `json:"not,omitempty"` } // Always valid if true. Never valid if false. Is constant. type JSONSchemaBoolean bool @@ -383,7 +383,7 @@ type ContentDescriptorObject struct { Name *ContentDescriptorObjectName `json:"name"` Description *ContentDescriptorObjectDescription `json:"description,omitempty"` Summary *ContentDescriptorObjectSummary `json:"summary,omitempty"` - Schema *Undefined `json:"schema"` + Schema *JSONSchema `json:"schema"` Required *ContentDescriptorObjectRequired `json:"required,omitempty"` Deprecated *ContentDescriptorObjectDeprecated `json:"deprecated,omitempty"` } @@ -732,4 +732,4 @@ type OpenrpcDocument struct { Schema *MetaSchema `json:"$schema,omitempty"` } -const RawOpenrpc_document = "{\"$schema\":\"https://meta.json-schema.tools/\",\"$id\":\"https://meta.open-rpc.org/\",\"title\":\"openrpcDocument\",\"type\":\"object\",\"required\":[\"info\",\"methods\",\"openrpc\"],\"additionalProperties\":false,\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/specificationExtension\"}},\"properties\":{\"openrpc\":{\"$ref\":\"#/definitions/openrpc\"},\"info\":{\"$ref\":\"#/definitions/infoObject\"},\"externalDocs\":{\"$ref\":\"#/definitions/externalDocumentationObject\"},\"servers\":{\"$ref\":\"#/definitions/servers\"},\"methods\":{\"$ref\":\"#/definitions/methods\"},\"components\":{\"$ref\":\"#/definitions/components\"},\"$schema\":{\"$ref\":\"#/definitions/metaSchema\"}},\"definitions\":{\"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\"]},\"infoObjectProperties\":{\"title\":\"infoObjectProperties\",\"type\":\"string\"},\"infoObjectDescription\":{\"title\":\"infoObjectDescription\",\"type\":\"string\"},\"infoObjectTermsOfService\":{\"title\":\"infoObjectTermsOfService\",\"type\":\"string\",\"format\":\"uri\"},\"infoObjectVersion\":{\"title\":\"infoObjectVersion\",\"type\":\"string\"},\"contactObjectName\":{\"title\":\"contactObjectName\",\"type\":\"string\"},\"contactObjectEmail\":{\"title\":\"contactObjectEmail\",\"type\":\"string\"},\"contactObjectUrl\":{\"title\":\"contactObjectUrl\",\"type\":\"string\"},\"specificationExtension\":{\"title\":\"specificationExtension\"},\"contactObject\":{\"title\":\"contactObject\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"name\":{\"$ref\":\"#/definitions/contactObjectName\"},\"email\":{\"$ref\":\"#/definitions/contactObjectEmail\"},\"url\":{\"$ref\":\"#/definitions/contactObjectUrl\"}},\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/specificationExtension\"}}},\"licenseObjectName\":{\"title\":\"licenseObjectName\",\"type\":\"string\"},\"licenseObjectUrl\":{\"title\":\"licenseObjectUrl\",\"type\":\"string\"},\"licenseObject\":{\"title\":\"licenseObject\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"name\":{\"$ref\":\"#/definitions/licenseObjectName\"},\"url\":{\"$ref\":\"#/definitions/licenseObjectUrl\"}},\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/specificationExtension\"}}},\"infoObject\":{\"title\":\"infoObject\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"title\",\"version\"],\"properties\":{\"title\":{\"$ref\":\"#/definitions/infoObjectProperties\"},\"description\":{\"$ref\":\"#/definitions/infoObjectDescription\"},\"termsOfService\":{\"$ref\":\"#/definitions/infoObjectTermsOfService\"},\"version\":{\"$ref\":\"#/definitions/infoObjectVersion\"},\"contact\":{\"$ref\":\"#/definitions/contactObject\"},\"license\":{\"$ref\":\"#/definitions/licenseObject\"}},\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/specificationExtension\"}}},\"externalDocumentationObjectDescription\":{\"title\":\"externalDocumentationObjectDescription\",\"type\":\"string\"},\"externalDocumentationObjectUrl\":{\"title\":\"externalDocumentationObjectUrl\",\"type\":\"string\",\"format\":\"uri\"},\"externalDocumentationObject\":{\"title\":\"externalDocumentationObject\",\"type\":\"object\",\"additionalProperties\":false,\"description\":\"information about external documentation\",\"required\":[\"url\"],\"properties\":{\"description\":{\"$ref\":\"#/definitions/externalDocumentationObjectDescription\"},\"url\":{\"$ref\":\"#/definitions/externalDocumentationObjectUrl\"}},\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/specificationExtension\"}}},\"serverObjectUrl\":{\"title\":\"serverObjectUrl\",\"type\":\"string\",\"format\":\"uri\"},\"serverObjectName\":{\"title\":\"serverObjectName\",\"type\":\"string\"},\"serverObjectDescription\":{\"title\":\"serverObjectDescription\",\"type\":\"string\"},\"serverObjectSummary\":{\"title\":\"serverObjectSummary\",\"type\":\"string\"},\"serverObjectVariableDefault\":{\"title\":\"serverObjectVariableDefault\",\"type\":\"string\"},\"serverObjectVariableDescription\":{\"title\":\"serverObjectVariableDescription\",\"type\":\"string\"},\"serverObjectVariableEnumItem\":{\"title\":\"serverObjectVariableEnumItem\",\"type\":\"string\"},\"serverObjectVariableEnum\":{\"title\":\"serverObjectVariableEnum\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/serverObjectVariableEnumItem\"}},\"serverObjectVariable\":{\"title\":\"serverObjectVariable\",\"type\":\"object\",\"required\":[\"default\"],\"properties\":{\"default\":{\"$ref\":\"#/definitions/serverObjectVariableDefault\"},\"description\":{\"$ref\":\"#/definitions/serverObjectVariableDescription\"},\"enum\":{\"$ref\":\"#/definitions/serverObjectVariableEnum\"}}},\"serverObjectVariables\":{\"title\":\"serverObjectVariables\",\"type\":\"object\",\"patternProperties\":{\"[0-z]+\":{\"$ref\":\"#/definitions/serverObjectVariable\"}}},\"serverObject\":{\"title\":\"serverObject\",\"type\":\"object\",\"required\":[\"url\"],\"additionalProperties\":false,\"properties\":{\"url\":{\"$ref\":\"#/definitions/serverObjectUrl\"},\"name\":{\"$ref\":\"#/definitions/serverObjectName\"},\"description\":{\"$ref\":\"#/definitions/serverObjectDescription\"},\"summary\":{\"$ref\":\"#/definitions/serverObjectSummary\"},\"variables\":{\"$ref\":\"#/definitions/serverObjectVariables\"}},\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/specificationExtension\"}}},\"AlwaysFalse\":false,\"servers\":{\"title\":\"servers\",\"type\":\"array\",\"additionalItems\":false,\"items\":{\"$ref\":\"#/definitions/serverObject\"}},\"methodObjectName\":{\"title\":\"methodObjectName\",\"description\":\"The cannonical name for the method. The name MUST be unique within the methods array.\",\"type\":\"string\",\"minLength\":1},\"methodObjectDescription\":{\"title\":\"methodObjectDescription\",\"description\":\"A verbose explanation of the method behavior. GitHub Flavored Markdown syntax MAY be used for rich text representation.\",\"type\":\"string\"},\"methodObjectSummary\":{\"title\":\"methodObjectSummary\",\"description\":\"A short summary of what the method does.\",\"type\":\"string\"},\"tagObjectName\":{\"title\":\"tagObjectName\",\"type\":\"string\",\"minLength\":1},\"tagObjectDescription\":{\"title\":\"tagObjectDescription\",\"type\":\"string\"},\"tagObject\":{\"title\":\"tagObject\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"name\"],\"properties\":{\"name\":{\"$ref\":\"#/definitions/tagObjectName\"},\"description\":{\"$ref\":\"#/definitions/tagObjectDescription\"},\"externalDocs\":{\"$ref\":\"#/definitions/externalDocumentationObject\"}},\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/specificationExtension\"}}},\"$ref\":{\"title\":\"$ref\",\"type\":\"string\",\"format\":\"uri-reference\"},\"referenceObject\":{\"title\":\"referenceObject\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"$ref\"],\"properties\":{\"$ref\":{\"$ref\":\"#/definitions/$ref\"}}},\"tagOrReference\":{\"title\":\"tagOrReference\",\"oneOf\":[{\"$ref\":\"#/definitions/tagObject\"},{\"$ref\":\"#/definitions/referenceObject\"}]},\"methodObjectTags\":{\"title\":\"methodObjectTags\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/tagOrReference\"}},\"methodObjectParamStructure\":{\"title\":\"methodObjectParamStructure\",\"type\":\"string\",\"description\":\"Format the server expects the params. Defaults to 'either'.\",\"enum\":[\"by-position\",\"by-name\",\"either\"],\"default\":\"either\"},\"contentDescriptorObjectName\":{\"title\":\"contentDescriptorObjectName\",\"type\":\"string\",\"minLength\":1},\"contentDescriptorObjectDescription\":{\"title\":\"contentDescriptorObjectDescription\",\"type\":\"string\"},\"contentDescriptorObjectSummary\":{\"title\":\"contentDescriptorObjectSummary\",\"type\":\"string\"},\"$id\":{\"title\":\"$id\",\"type\":\"string\",\"format\":\"uri-reference\"},\"$schema\":{\"title\":\"$schema\",\"type\":\"string\",\"format\":\"uri\"},\"$comment\":{\"title\":\"$comment\",\"type\":\"string\"},\"title\":{\"title\":\"title\",\"type\":\"string\"},\"description\":{\"title\":\"description\",\"type\":\"string\"},\"AlwaysTrue\":true,\"readOnly\":{\"title\":\"readOnly\",\"type\":\"boolean\",\"default\":false},\"examples\":{\"title\":\"examples\",\"type\":\"array\",\"items\":true},\"multipleOf\":{\"title\":\"multipleOf\",\"type\":\"number\",\"exclusiveMinimum\":0},\"maximum\":{\"title\":\"maximum\",\"type\":\"number\"},\"exclusiveMaximum\":{\"title\":\"exclusiveMaximum\",\"type\":\"number\"},\"minimum\":{\"title\":\"minimum\",\"type\":\"number\"},\"exclusiveMinimum\":{\"title\":\"exclusiveMinimum\",\"type\":\"number\"},\"nonNegativeInteger\":{\"title\":\"nonNegativeInteger\",\"type\":\"integer\",\"minimum\":0},\"nonNegativeIntegerDefaultZero\":{\"title\":\"nonNegativeIntegerDefaultZero\",\"type\":\"integer\",\"minimum\":0,\"default\":0},\"pattern\":{\"title\":\"pattern\",\"type\":\"string\",\"format\":\"regex\"},\"schemaArray\":{\"title\":\"schemaArray\",\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/definitions/undefined\"}},\"items\":{\"title\":\"items\",\"anyOf\":[{\"$ref\":\"#/definitions/undefined\"},{\"$ref\":\"#/definitions/schemaArray\"}],\"default\":true},\"uniqueItems\":{\"title\":\"uniqueItems\",\"type\":\"boolean\",\"default\":false},\"string_doaGddGA\":{\"type\":\"string\",\"title\":\"string_doaGddGA\"},\"stringArray\":{\"title\":\"stringArray\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/string_doaGddGA\"},\"uniqueItems\":true,\"default\":[]},\"definitions\":{\"title\":\"definitions\",\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/undefined\"},\"default\":{}},\"properties\":{\"title\":\"properties\",\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/undefined\"},\"default\":{}},\"patternProperties\":{\"title\":\"patternProperties\",\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/undefined\"},\"propertyNames\":{\"title\":\"propertyNames\",\"format\":\"regex\"},\"default\":{}},\"dependenciesSet\":{\"title\":\"dependenciesSet\",\"anyOf\":[{\"$ref\":\"#/definitions/undefined\"},{\"$ref\":\"#/definitions/stringArray\"}]},\"dependencies\":{\"title\":\"dependencies\",\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/dependenciesSet\"}},\"enum\":{\"title\":\"enum\",\"type\":\"array\",\"items\":true,\"minItems\":1,\"uniqueItems\":true},\"simpleTypes\":{\"title\":\"simpleTypes\",\"enum\":[\"array\",\"boolean\",\"integer\",\"null\",\"number\",\"object\",\"string\"]},\"arrayOfSimpleTypes\":{\"title\":\"arrayOfSimpleTypes\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/simpleTypes\"},\"minItems\":1,\"uniqueItems\":true},\"type\":{\"title\":\"type\",\"anyOf\":[{\"$ref\":\"#/definitions/simpleTypes\"},{\"$ref\":\"#/definitions/arrayOfSimpleTypes\"}]},\"format\":{\"title\":\"format\",\"type\":\"string\"},\"contentMediaType\":{\"title\":\"contentMediaType\",\"type\":\"string\"},\"contentEncoding\":{\"title\":\"contentEncoding\",\"type\":\"string\"},\"JSONSchemaObject\":{\"title\":\"JSONSchemaObject\",\"type\":\"object\",\"properties\":{\"$id\":{\"$ref\":\"#/definitions/$id\"},\"$schema\":{\"$ref\":\"#/definitions/$schema\"},\"$ref\":{\"$ref\":\"#/definitions/$ref\"},\"$comment\":{\"$ref\":\"#/definitions/$comment\"},\"title\":{\"$ref\":\"#/definitions/title\"},\"description\":{\"$ref\":\"#/definitions/description\"},\"default\":true,\"readOnly\":{\"$ref\":\"#/definitions/readOnly\"},\"examples\":{\"$ref\":\"#/definitions/examples\"},\"multipleOf\":{\"$ref\":\"#/definitions/multipleOf\"},\"maximum\":{\"$ref\":\"#/definitions/maximum\"},\"exclusiveMaximum\":{\"$ref\":\"#/definitions/exclusiveMaximum\"},\"minimum\":{\"$ref\":\"#/definitions/minimum\"},\"exclusiveMinimum\":{\"$ref\":\"#/definitions/exclusiveMinimum\"},\"maxLength\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"minLength\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefaultZero\"},\"pattern\":{\"$ref\":\"#/definitions/pattern\"},\"additionalItems\":{\"$ref\":\"#/definitions/undefined\"},\"items\":{\"$ref\":\"#/definitions/items\"},\"maxItems\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"minItems\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefaultZero\"},\"uniqueItems\":{\"$ref\":\"#/definitions/uniqueItems\"},\"contains\":{\"$ref\":\"#/definitions/undefined\"},\"maxProperties\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"minProperties\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefaultZero\"},\"required\":{\"$ref\":\"#/definitions/stringArray\"},\"additionalProperties\":{\"$ref\":\"#/definitions/undefined\"},\"definitions\":{\"$ref\":\"#/definitions/definitions\"},\"properties\":{\"$ref\":\"#/definitions/properties\"},\"patternProperties\":{\"$ref\":\"#/definitions/patternProperties\"},\"dependencies\":{\"$ref\":\"#/definitions/dependencies\"},\"propertyNames\":{\"$ref\":\"#/definitions/undefined\"},\"const\":true,\"enum\":{\"$ref\":\"#/definitions/enum\"},\"type\":{\"$ref\":\"#/definitions/type\"},\"format\":{\"$ref\":\"#/definitions/format\"},\"contentMediaType\":{\"$ref\":\"#/definitions/contentMediaType\"},\"contentEncoding\":{\"$ref\":\"#/definitions/contentEncoding\"},\"if\":{\"$ref\":\"#/definitions/undefined\"},\"then\":{\"$ref\":\"#/definitions/undefined\"},\"else\":{\"$ref\":\"#/definitions/undefined\"},\"allOf\":{\"$ref\":\"#/definitions/schemaArray\"},\"anyOf\":{\"$ref\":\"#/definitions/schemaArray\"},\"oneOf\":{\"$ref\":\"#/definitions/schemaArray\"},\"not\":{\"$ref\":\"#/definitions/undefined\"}}},\"JSONSchemaBoolean\":{\"title\":\"JSONSchemaBoolean\",\"description\":\"Always valid if true. Never valid if false. Is constant.\",\"type\":\"boolean\"},\"JSONSchema\":{\"$schema\":\"https://meta.json-schema.tools/\",\"$id\":\"https://meta.json-schema.tools/\",\"title\":\"JSONSchema\",\"default\":{},\"oneOf\":[{\"$ref\":\"#/definitions/JSONSchemaObject\"},{\"$ref\":\"#/definitions/JSONSchemaBoolean\"}],\"definitions\":{\"JSONSchemaBoolean\":{\"$ref\":\"#/definitions/JSONSchemaBoolean\"},\"JSONSchemaObject\":{\"$ref\":\"#/definitions/JSONSchemaObject\"},\"schemaArray\":{\"$ref\":\"#/definitions/schemaArray\"},\"nonNegativeInteger\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"nonNegativeIntegerDefault0\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefaultZero\"},\"simpleTypes\":{\"$ref\":\"#/definitions/simpleTypes\"},\"stringArray\":{\"$ref\":\"#/definitions/stringArray\"}},\"isCycle\":true},\"contentDescriptorObjectRequired\":{\"title\":\"contentDescriptorObjectRequired\",\"type\":\"boolean\",\"default\":false},\"contentDescriptorObjectDeprecated\":{\"title\":\"contentDescriptorObjectDeprecated\",\"type\":\"boolean\",\"default\":false},\"contentDescriptorObject\":{\"title\":\"contentDescriptorObject\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"name\",\"schema\"],\"properties\":{\"name\":{\"$ref\":\"#/definitions/contentDescriptorObjectName\"},\"description\":{\"$ref\":\"#/definitions/contentDescriptorObjectDescription\"},\"summary\":{\"$ref\":\"#/definitions/contentDescriptorObjectSummary\"},\"schema\":{\"$ref\":\"#/definitions/undefined\"},\"required\":{\"$ref\":\"#/definitions/contentDescriptorObjectRequired\"},\"deprecated\":{\"$ref\":\"#/definitions/contentDescriptorObjectDeprecated\"}},\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/specificationExtension\"}}},\"contentDescriptorOrReference\":{\"title\":\"contentDescriptorOrReference\",\"oneOf\":[{\"$ref\":\"#/definitions/contentDescriptorObject\"},{\"$ref\":\"#/definitions/referenceObject\"}]},\"methodObjectParams\":{\"title\":\"methodObjectParams\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/contentDescriptorOrReference\"}},\"methodObjectResult\":{\"title\":\"methodObjectResult\",\"oneOf\":[{\"$ref\":\"#/definitions/contentDescriptorObject\"},{\"$ref\":\"#/definitions/referenceObject\"}]},\"errorObjectCode\":{\"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\"},\"errorObjectMessage\":{\"title\":\"errorObjectMessage\",\"description\":\"A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.\",\"type\":\"string\"},\"errorObjectData\":{\"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.).\"},\"errorObject\":{\"title\":\"errorObject\",\"type\":\"object\",\"description\":\"Defines an application level error.\",\"additionalProperties\":false,\"required\":[\"code\",\"message\"],\"properties\":{\"code\":{\"$ref\":\"#/definitions/errorObjectCode\"},\"message\":{\"$ref\":\"#/definitions/errorObjectMessage\"},\"data\":{\"$ref\":\"#/definitions/errorObjectData\"}}},\"errorOrReference\":{\"title\":\"errorOrReference\",\"oneOf\":[{\"$ref\":\"#/definitions/errorObject\"},{\"$ref\":\"#/definitions/referenceObject\"}]},\"methodObjectErrors\":{\"title\":\"methodObjectErrors\",\"description\":\"Defines an application level error.\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/errorOrReference\"}},\"linkObjectName\":{\"title\":\"linkObjectName\",\"type\":\"string\",\"minLength\":1},\"linkObjectSummary\":{\"title\":\"linkObjectSummary\",\"type\":\"string\"},\"linkObjectMethod\":{\"title\":\"linkObjectMethod\",\"type\":\"string\"},\"linkObjectDescription\":{\"title\":\"linkObjectDescription\",\"type\":\"string\"},\"linkObjectParams\":{\"title\":\"linkObjectParams\"},\"linkObjectServer\":{\"title\":\"linkObjectServer\",\"type\":\"object\",\"required\":[\"url\"],\"additionalProperties\":false,\"properties\":{\"url\":{\"$ref\":\"#/definitions/serverObjectUrl\"},\"name\":{\"$ref\":\"#/definitions/serverObjectName\"},\"description\":{\"$ref\":\"#/definitions/serverObjectDescription\"},\"summary\":{\"$ref\":\"#/definitions/serverObjectSummary\"},\"variables\":{\"$ref\":\"#/definitions/serverObjectVariables\"}},\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/specificationExtension\"}}},\"linkObject\":{\"title\":\"linkObject\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"name\":{\"$ref\":\"#/definitions/linkObjectName\"},\"summary\":{\"$ref\":\"#/definitions/linkObjectSummary\"},\"method\":{\"$ref\":\"#/definitions/linkObjectMethod\"},\"description\":{\"$ref\":\"#/definitions/linkObjectDescription\"},\"params\":{\"$ref\":\"#/definitions/linkObjectParams\"},\"server\":{\"$ref\":\"#/definitions/linkObjectServer\"}},\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/specificationExtension\"}}},\"linkOrReference\":{\"title\":\"linkOrReference\",\"oneOf\":[{\"$ref\":\"#/definitions/linkObject\"},{\"$ref\":\"#/definitions/referenceObject\"}]},\"methodObjectLinks\":{\"title\":\"methodObjectLinks\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/linkOrReference\"}},\"examplePairingObjectName\":{\"title\":\"examplePairingObjectName\",\"type\":\"string\",\"minLength\":1},\"examplePairingObjectDescription\":{\"title\":\"examplePairingObjectDescription\",\"type\":\"string\"},\"exampleObjectSummary\":{\"title\":\"exampleObjectSummary\",\"type\":\"string\"},\"exampleObjectValue\":{\"title\":\"exampleObjectValue\"},\"exampleObjectDescription\":{\"title\":\"exampleObjectDescription\",\"type\":\"string\"},\"exampleObjectName\":{\"title\":\"exampleObjectName\",\"type\":\"string\",\"minLength\":1},\"exampleObject\":{\"title\":\"exampleObject\",\"type\":\"object\",\"required\":[\"name\",\"value\"],\"properties\":{\"summary\":{\"$ref\":\"#/definitions/exampleObjectSummary\"},\"value\":{\"$ref\":\"#/definitions/exampleObjectValue\"},\"description\":{\"$ref\":\"#/definitions/exampleObjectDescription\"},\"name\":{\"$ref\":\"#/definitions/exampleObjectName\"}},\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/specificationExtension\"}}},\"exampleOrReference\":{\"title\":\"exampleOrReference\",\"oneOf\":[{\"$ref\":\"#/definitions/exampleObject\"},{\"$ref\":\"#/definitions/referenceObject\"}]},\"examplePairingObjectParams\":{\"title\":\"examplePairingObjectParams\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/exampleOrReference\"}},\"examplePairingObjectResult\":{\"title\":\"examplePairingObjectResult\",\"oneOf\":[{\"$ref\":\"#/definitions/exampleObject\"},{\"$ref\":\"#/definitions/referenceObject\"}]},\"examplePairingObject\":{\"title\":\"examplePairingObject\",\"type\":\"object\",\"required\":[\"name\",\"params\"],\"properties\":{\"name\":{\"$ref\":\"#/definitions/examplePairingObjectName\"},\"description\":{\"$ref\":\"#/definitions/examplePairingObjectDescription\"},\"params\":{\"$ref\":\"#/definitions/examplePairingObjectParams\"},\"result\":{\"$ref\":\"#/definitions/examplePairingObjectResult\"}}},\"examplePairingOrReference\":{\"title\":\"examplePairingOrReference\",\"oneOf\":[{\"$ref\":\"#/definitions/examplePairingObject\"},{\"$ref\":\"#/definitions/referenceObject\"}]},\"methodObjectExamples\":{\"title\":\"methodObjectExamples\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/examplePairingOrReference\"}},\"methodObjectDeprecated\":{\"title\":\"methodObjectDeprecated\",\"type\":\"boolean\",\"default\":false},\"methodObject\":{\"title\":\"methodObject\",\"type\":\"object\",\"required\":[\"name\",\"params\"],\"additionalProperties\":false,\"properties\":{\"name\":{\"$ref\":\"#/definitions/methodObjectName\"},\"description\":{\"$ref\":\"#/definitions/methodObjectDescription\"},\"summary\":{\"$ref\":\"#/definitions/methodObjectSummary\"},\"servers\":{\"$ref\":\"#/definitions/servers\"},\"tags\":{\"$ref\":\"#/definitions/methodObjectTags\"},\"paramStructure\":{\"$ref\":\"#/definitions/methodObjectParamStructure\"},\"params\":{\"$ref\":\"#/definitions/methodObjectParams\"},\"result\":{\"$ref\":\"#/definitions/methodObjectResult\"},\"errors\":{\"$ref\":\"#/definitions/methodObjectErrors\"},\"links\":{\"$ref\":\"#/definitions/methodObjectLinks\"},\"examples\":{\"$ref\":\"#/definitions/methodObjectExamples\"},\"deprecated\":{\"$ref\":\"#/definitions/methodObjectDeprecated\"},\"externalDocs\":{\"$ref\":\"#/definitions/externalDocumentationObject\"}},\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/specificationExtension\"}}},\"methodOrReference\":{\"title\":\"methodOrReference\",\"oneOf\":[{\"$ref\":\"#/definitions/methodObject\"},{\"$ref\":\"#/definitions/referenceObject\"}]},\"methods\":{\"title\":\"methods\",\"type\":\"array\",\"additionalItems\":false,\"items\":{\"$ref\":\"#/definitions/methodOrReference\"}},\"schemaComponents\":{\"title\":\"schemaComponents\",\"type\":\"object\",\"patternProperties\":{\"[0-z]+\":{\"$ref\":\"#/definitions/undefined\"}}},\"linkComponents\":{\"title\":\"linkComponents\",\"type\":\"object\",\"patternProperties\":{\"[0-z]+\":{\"$ref\":\"#/definitions/linkObject\"}}},\"errorComponents\":{\"title\":\"errorComponents\",\"type\":\"object\",\"patternProperties\":{\"[0-z]+\":{\"$ref\":\"#/definitions/errorObject\"}}},\"exampleComponents\":{\"title\":\"exampleComponents\",\"type\":\"object\",\"patternProperties\":{\"[0-z]+\":{\"$ref\":\"#/definitions/exampleObject\"}}},\"examplePairingComponents\":{\"title\":\"examplePairingComponents\",\"type\":\"object\",\"patternProperties\":{\"[0-z]+\":{\"$ref\":\"#/definitions/examplePairingObject\"}}},\"contentDescriptorComponents\":{\"title\":\"contentDescriptorComponents\",\"type\":\"object\",\"patternProperties\":{\"[0-z]+\":{\"$ref\":\"#/definitions/contentDescriptorObject\"}}},\"tagComponents\":{\"title\":\"tagComponents\",\"type\":\"object\",\"patternProperties\":{\"[0-z]+\":{\"$ref\":\"#/definitions/tagObject\"}}},\"components\":{\"title\":\"components\",\"type\":\"object\",\"properties\":{\"schemas\":{\"$ref\":\"#/definitions/schemaComponents\"},\"links\":{\"$ref\":\"#/definitions/linkComponents\"},\"errors\":{\"$ref\":\"#/definitions/errorComponents\"},\"examples\":{\"$ref\":\"#/definitions/exampleComponents\"},\"examplePairings\":{\"$ref\":\"#/definitions/examplePairingComponents\"},\"contentDescriptors\":{\"$ref\":\"#/definitions/contentDescriptorComponents\"},\"tags\":{\"$ref\":\"#/definitions/tagComponents\"}}},\"metaSchema\":{\"title\":\"metaSchema\",\"description\":\"JSON Schema URI (used by some editors)\",\"type\":\"string\",\"default\":\"https://meta.open-rpc.org/\"}}}" \ No newline at end of file +const RawOpenrpc_document = "{\"$schema\":\"https://meta.json-schema.tools/\",\"$id\":\"https://meta.open-rpc.org/\",\"title\":\"openrpcDocument\",\"type\":\"object\",\"required\":[\"info\",\"methods\",\"openrpc\"],\"additionalProperties\":false,\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/specificationExtension\"}},\"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\":\"#/definitions/infoObject\"},\"externalDocs\":{\"$ref\":\"#/definitions/externalDocumentationObject\"},\"servers\":{\"title\":\"servers\",\"type\":\"array\",\"additionalItems\":false,\"items\":{\"$ref\":\"#/definitions/serverObject\"}},\"methods\":{\"title\":\"methods\",\"type\":\"array\",\"additionalItems\":false,\"items\":{\"title\":\"methodOrReference\",\"oneOf\":[{\"$ref\":\"#/definitions/methodObject\"},{\"$ref\":\"#/definitions/referenceObject\"}]}},\"components\":{\"title\":\"components\",\"type\":\"object\",\"properties\":{\"schemas\":{\"title\":\"schemaComponents\",\"type\":\"object\",\"patternProperties\":{\"[0-z]+\":{\"$ref\":\"#/definitions/JSONSchema\"}}},\"links\":{\"title\":\"linkComponents\",\"type\":\"object\",\"patternProperties\":{\"[0-z]+\":{\"$ref\":\"#/definitions/linkObject\"}}},\"errors\":{\"title\":\"errorComponents\",\"type\":\"object\",\"patternProperties\":{\"[0-z]+\":{\"$ref\":\"#/definitions/errorObject\"}}},\"examples\":{\"title\":\"exampleComponents\",\"type\":\"object\",\"patternProperties\":{\"[0-z]+\":{\"$ref\":\"#/definitions/exampleObject\"}}},\"examplePairings\":{\"title\":\"examplePairingComponents\",\"type\":\"object\",\"patternProperties\":{\"[0-z]+\":{\"$ref\":\"#/definitions/examplePairingObject\"}}},\"contentDescriptors\":{\"title\":\"contentDescriptorComponents\",\"type\":\"object\",\"patternProperties\":{\"[0-z]+\":{\"$ref\":\"#/definitions/contentDescriptorObject\"}}},\"tags\":{\"title\":\"tagComponents\",\"type\":\"object\",\"patternProperties\":{\"[0-z]+\":{\"$ref\":\"#/definitions/tagObject\"}}}}},\"$schema\":{\"title\":\"metaSchema\",\"description\":\"JSON Schema URI (used by some editors)\",\"type\":\"string\",\"default\":\"https://meta.open-rpc.org/\"}},\"definitions\":{\"specificationExtension\":{\"title\":\"specificationExtension\"},\"JSONSchema\":{\"$ref\":\"https://raw.githubusercontent.com/json-schema-tools/meta-schema/1.5.9/src/schema.json\"},\"referenceObject\":{\"title\":\"referenceObject\",\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"$ref\"],\"properties\":{\"$ref\":{\"$ref\":\"https://raw.githubusercontent.com/json-schema-tools/meta-schema/1.5.9/src/schema.json#/definitions/JSONSchemaObject/properties/$ref\"}}},\"errorObject\":{\"title\":\"errorObject\",\"type\":\"object\",\"description\":\"Defines an application level error.\",\"additionalProperties\":false,\"required\":[\"code\",\"message\"],\"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.).\"}}},\"licenseObject\":{\"title\":\"licenseObject\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"name\":{\"title\":\"licenseObjectName\",\"type\":\"string\"},\"url\":{\"title\":\"licenseObjectUrl\",\"type\":\"string\"}},\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/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\":\"#/definitions/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\":\"#/definitions/contactObject\"},\"license\":{\"$ref\":\"#/definitions/licenseObject\"}},\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/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\":\"#/definitions/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\":\"#/definitions/serverObject\"}},\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/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\":\"#/definitions/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\":\"#/definitions/serverObject\"}},\"tags\":{\"title\":\"methodObjectTags\",\"type\":\"array\",\"items\":{\"title\":\"tagOrReference\",\"oneOf\":[{\"$ref\":\"#/definitions/tagObject\"},{\"$ref\":\"#/definitions/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\":\"#/definitions/contentDescriptorObject\"},{\"$ref\":\"#/definitions/referenceObject\"}]}},\"result\":{\"title\":\"methodObjectResult\",\"oneOf\":[{\"$ref\":\"#/definitions/contentDescriptorObject\"},{\"$ref\":\"#/definitions/referenceObject\"}]},\"errors\":{\"title\":\"methodObjectErrors\",\"description\":\"Defines an application level error.\",\"type\":\"array\",\"items\":{\"title\":\"errorOrReference\",\"oneOf\":[{\"$ref\":\"#/definitions/errorObject\"},{\"$ref\":\"#/definitions/referenceObject\"}]}},\"links\":{\"title\":\"methodObjectLinks\",\"type\":\"array\",\"items\":{\"title\":\"linkOrReference\",\"oneOf\":[{\"$ref\":\"#/definitions/linkObject\"},{\"$ref\":\"#/definitions/referenceObject\"}]}},\"examples\":{\"title\":\"methodObjectExamples\",\"type\":\"array\",\"items\":{\"title\":\"examplePairingOrReference\",\"oneOf\":[{\"$ref\":\"#/definitions/examplePairingObject\"},{\"$ref\":\"#/definitions/referenceObject\"}]}},\"deprecated\":{\"title\":\"methodObjectDeprecated\",\"type\":\"boolean\",\"default\":false},\"externalDocs\":{\"$ref\":\"#/definitions/externalDocumentationObject\"}},\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/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\":\"#/definitions/externalDocumentationObject\"}},\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/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\":\"#/definitions/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\":\"#/definitions/exampleObject\"},{\"$ref\":\"#/definitions/referenceObject\"}]}},\"result\":{\"title\":\"examplePairingObjectResult\",\"oneOf\":[{\"$ref\":\"#/definitions/exampleObject\"},{\"$ref\":\"#/definitions/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\":\"#/definitions/JSONSchema\"},\"required\":{\"title\":\"contentDescriptorObjectRequired\",\"type\":\"boolean\",\"default\":false},\"deprecated\":{\"title\":\"contentDescriptorObjectDeprecated\",\"type\":\"boolean\",\"default\":false}},\"patternProperties\":{\"^x-\":{\"$ref\":\"#/definitions/specificationExtension\"}}}}}" \ No newline at end of file