Context
Our canonical schemas (spec/1.3/schema.json, spec/1.4/schema.json) still declare:
"$schema": "https://meta.json-schema.tools/"
and reference it internally:
"JSONSchema": { "$ref": "https://meta.json-schema.tools" }
That domain serves a copy of the draft-07 meta-schema with title annotations added (for prettier generated typing names — see open-rpc/meta-schema#323 and open-rpc/meta-schema#324 for the history). It works, but it is an external dependency baked into the spec itself: separate org, separate infra, and we have already been bitten:
@open-rpc/playground had to vendor the JSONSchema definition locally as a stopgap because of CORS issues with https://meta.json-schema.tools (see the open-rpc/tools changelog for @open-rpc/playground@1.1.2)
openrpc-linter rewrites $schema to http://json-schema.org/draft-07/schema# when it encounters it
execution-apis tooling strips the embedded identifiers so the definition behaves like a local subschema
Proposal
Long term, the spec should not depend on a third-party domain for its own dialect identifier. Options:
Tasks
Related: #422 (versioned meta-schemas on meta.open-rpc.org).
Context
Our canonical schemas (
spec/1.3/schema.json,spec/1.4/schema.json) still declare:and reference it internally:
That domain serves a copy of the draft-07 meta-schema with
titleannotations added (for prettier generated typing names — see open-rpc/meta-schema#323 and open-rpc/meta-schema#324 for the history). It works, but it is an external dependency baked into the spec itself: separate org, separate infra, and we have already been bitten:@open-rpc/playgroundhad to vendor the JSONSchema definition locally as a stopgap because of CORS issues withhttps://meta.json-schema.tools(see the open-rpc/tools changelog for@open-rpc/playground@1.1.2)openrpc-linterrewrites$schematohttp://json-schema.org/draft-07/schema#when it encounters itexecution-apistooling strips the embedded identifiers so the definition behaves like a local subschemaProposal
Long term, the spec should not depend on a third-party domain for its own dialect identifier. Options:
http://json-schema.org/draft-07/schema#) instead — simplest, but loses thetitleannotations that give us nice generated type names$schema/$reftargets are infrastructure we controlJSONSchemadefinition into our schemas so there is no remote$refat allTasks
spec/1.3/schema.jsonandspec/1.4/schema.json($schema+JSONSchema$ref)schema-utils-js(registers it in AJV under that key), playground (local vendoring workaround),openrpc-linter(rewrites it),execution-apis(strips the identifiers)@open-rpc/specand@open-rpc/spec-typesmeta-schema#476Related: #422 (versioned meta-schemas on meta.open-rpc.org).