ethereum / ethereum/execution-apis

Inline subschemas are not allowed

Open
#522 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Io
Stars
1.1k
Forks
530
Avg merge
5d 8h
Merged PRs (30d)
9

Description

```
❯ 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 ()
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 ()
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)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.