bump OpenRPC schema to 1.3#809
Conversation
|
Went with 1.3.2 over 1.4.x because the docusaurus toolchain's JS validator |
|
@bomanaps we don't use meta-schema for validation in typescript, we use https://github.com/open-rpc/schema-utils-js , if there's a stale dep we'll definitely update it, but the meta-schema is actually deprecated. Schema-utils doesn't use meta-schema under the hood, it uses https://github.com/open-rpc/spec-types. I advise that you use 1.4.x , just because that chain is the latest head, and if there are patches that we need to do you won't pick those up on 1.3.x . Also it should be fully supported by all the tools, if you encountered thing that isn't, we'll patch it. |
If you can do the bump that will be great |
| @@ -1,5 +1,5 @@ | |||
| { | |||
| "openrpc": "1.2.4", | |||
| "openrpc": "1.3.2", | |||
There was a problem hiding this comment.
| "openrpc": "1.3.2", | |
| "openrpc": "1.4.1", |
| "strings" | ||
|
|
||
| openrpc "github.com/open-rpc/meta-schema" | ||
| openrpc "github.com/open-rpc/spec-types/generated/packages/go/v1_3" |
There was a problem hiding this comment.
| openrpc "github.com/open-rpc/spec-types/generated/packages/go/v1_3" | |
| openrpc "github.com/open-rpc/spec-types/generated/packages/go/v1_4" |
| "os" | ||
|
|
||
| openrpc "github.com/open-rpc/meta-schema" | ||
| openrpc "github.com/open-rpc/spec-types/generated/packages/go/v1_3" |
There was a problem hiding this comment.
| openrpc "github.com/open-rpc/spec-types/generated/packages/go/v1_3" | |
| openrpc "github.com/open-rpc/spec-types/generated/packages/go/v1_4" |
| "strings" | ||
|
|
||
| openrpc "github.com/open-rpc/meta-schema" | ||
| openrpc "github.com/open-rpc/spec-types/generated/packages/go/v1_3" |
There was a problem hiding this comment.
| openrpc "github.com/open-rpc/spec-types/generated/packages/go/v1_3" | |
| openrpc "github.com/open-rpc/spec-types/generated/packages/go/v1_4" |
|
I think you're most of the way there here, just change the v1_3 to v1_4 . That's the only difference, just means that all the tooling around the spec will properly track changes. |
de84fc1 to
ef82cc7
Compare
| func Validate(schema map[string]any) error { | ||
| return openrpcSchema.Validate(schema) | ||
| } | ||
|
|
There was a problem hiding this comment.
here we shouldn't strip the json schema, but just point to the canonical draft07 schema. I made a PR to your fork on this branch. This will cause the json-schema tools to resolve locally without removing json schema validation.
| "typescript": "~5.6.2" | ||
| }, | ||
| "overrides": { | ||
| "webpack": "5.106.2" |
There was a problem hiding this comment.
I don't think this is necessary here, so I'd rm this
zcstarr
left a comment
There was a problem hiding this comment.
generally looks good, I'd just see the PR for the additional changes to the repo
Bumps the OpenRPC spec version from 1.2.4 to 1.4.1 and swaps the deprecated open-rpc/meta-schema Go binding for the new open-rpc/spec-types v1_4 package, so we can start specifying notification methods (needed for eth_subscribe).