UNPKG

@open-rpc/extensions

Version:

@OpenRPC - extensions repository

15 lines (14 loc) 1.35 kB
const e = "0.0.0-development", r = "x-error-group", o = "0.0.1", t = "Enables grouping and organization of JSON-RPC errors in OpenRPC methods. Unlike the standard Errors array, this extension allows defining reusable error collections that can be referenced across methods. Error groups can be combined through references, creating a union of all individual errors in the referenced arrays. This promotes better error organization, reusability, and consistency across API documentation.", s = "Group, organize, and reuse JSON-RPC error definitions across OpenRPC methods via references", n = { description: "github", url: "https://github.com/open-rpc/tools/tree/main/packages/extensions/src/x-error-groups" }, i = ["methodObject"], a = { type: "array", items: { oneOf: [{ type: "array", items: { type: "object", properties: { code: { type: "integer", description: "The code of the error." }, message: { type: "string", description: "The message of the error." }, data: { description: "The data of the error." } }, required: ["code", "message"] } }, { type: "object", properties: { $ref: { type: "string" } }, required: ["$ref"] }] } }, c = { openrpcExtension: e, name: r, version: o, description: t, summary: s, externalDocumentation: n, restricted: i, schema: a }; export { c as XErrorGroupsJSON }; //# sourceMappingURL=index.es.js.map