Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline subschemas are not allowed #522

Open
jfkfrb opened this issue Feb 5, 2024 · 0 comments
Open

Inline subschemas are not allowed #522

jfkfrb opened this issue Feb 5, 2024 · 0 comments

Comments

@jfkfrb
Copy link

jfkfrb commented Feb 5, 2024

❯ open-rpc-generator generate -t server  -l typescript -n eth-node -d execution-apis/openrpc.json -o ./generated-server         14:56:31
(node:17436) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[
  'One of the provided schemas is using an array for the field type. This is not',
  'advisable, as oneOf is the equivalent. In (far) future releases, type as an array',
  'support will be deprecated.'
]
[
  'One of the provided schemas is using an array for the field type. This is not',
  'advisable, as oneOf is the equivalent. In (far) future releases, type as an array',
  'support will be deprecated.'
]
There was error at generator runtime:
Error: the Subschemas of the schema must use $ref. Inline subschemas are not allowed.
the schema in question: 
{"title":"block hash","type":"string","pattern":"^0x[0-9a-f]{64}$"}
    at CodeGen.refToTitle (/Users/l1jxk15/.config/yarn/global/node_modules/@json-schema-tools/transpiler/build/codegens/codegen.js:91:19)
    at /Users/l1jxk15/.config/yarn/global/node_modules/@json-schema-tools/transpiler/build/codegens/typescript.js:122:50
    at Array.reduce (<anonymous>)
    at Typescript.handleObject (/Users/l1jxk15/.config/yarn/global/node_modules/@json-schema-tools/transpiler/build/codegens/typescript.js:116:51)
    at CodeGen.toIR (/Users/l1jxk15/.config/yarn/global/node_modules/@json-schema-tools/transpiler/build/codegens/codegen.js:140:29)
    at /Users/l1jxk15/.config/yarn/global/node_modules/@json-schema-tools/transpiler/build/codegens/codegen.js:53:32
    at Array.forEach (<anonymous>)
    at CodeGen.transpile (/Users/l1jxk15/.config/yarn/global/node_modules/@json-schema-tools/transpiler/build/codegens/codegen.js:51:18)
    at Transpiler.transpile (/Users/l1jxk15/.config/yarn/global/node_modules/@json-schema-tools/transpiler/build/index.js:140:28)
    at Transpiler.toTypescript (/Users/l1jxk15/.config/yarn/global/node_modules/@json-schema-tools/transpiler/build/index.js:49:21)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant