You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When trying to use the result of parseOpenRPCDocument, its leaving remnants of the dereffer left over. specifically in this case .items is left with .components still there.
this leads to circular references and lots of pain for the developer.
heres a minimum doc that does it for me:
{
openrpc: "1.2.4",
info: {
title: "Test ref",
version: "1.0.0",
},
methods: [
{
name: "wallet_createSession",
paramStructure: "by-name",
params: [
],
result: {
name: "wallet_createSessionResult",
schema: {
type: "object",
properties: {
sessionScopes: {
$ref: "#/components/schemas/SessionScopes",
},
},
},
},
examples: [
],
errors: []
},
],
components: {
schemas: {
SessionScopes: {
type: "object",
patternProperties: {
"[-a-z0-9]{3,8}(:[-_a-zA-Z0-9]{1,32})?": {
$ref: "#/components/schemas/Scope",
},
},
},
ScopeString: {
type: "string",
pattern: "[-a-z0-9]{3,8}(:[-_a-zA-Z0-9]{1,32})?",
},
Scope: {
type: "object",
title: "Scope",
description: "Scope for a multi-chain connection",
additionalProperties: true,
required: ["notifications", "methods"],
properties: {
scopes: {
type: "array",
items: {
$ref: "#/components/schemas/ScopeString",
},
},
methods: {
description:
"Methods that the wallet must support in order to be used with this provider.",
type: "array",
items: {
type: "string",
},
},
notifications: {
description:
"Notifications that the wallet must support in order to be used with this provider.",
type: "array",
items: {
type: "string",
},
},
rpcEndpoints: {
description: "JSON-RPC endpoints for this namespace.",
type: "array",
items: {
type: "string",
format: "uri",
},
},
rpcDocuments: {
type: "array",
description:
"OpenRPC documents that define RPC methods in which to anchor the methods authorized in a CAIP-25 interaction.",
items: {
type: "string",
format: "uri",
},
},
},
},
},
},
}
```
and heres a branch with a failing test: https://github.com/open-rpc/schema-utils-js/pull/935
The text was updated successfully, but these errors were encountered:
Describe the bug
When trying to use the result of
parseOpenRPCDocument
, its leaving remnants of the dereffer left over. specifically in this case.items
is left with.components
still there.this leads to circular references and lots of pain for the developer.
heres a minimum doc that does it for me:
The text was updated successfully, but these errors were encountered: