-
Notifications
You must be signed in to change notification settings - Fork 38
Description
Describe the bug
When trying to build a client for the spec, we get a compilation error. The doc build succeeds though.
To Reproduce
Steps to reproduce the behavior:
- Download https://github.com/quantumcoinproject/api-doc/releases/download/v0.0.2/openrpc.json
- Download https://github.com/quantumcoinproject/api-doc/releases/download/v0.0.2/open-rpc-generator-config-client.json
- Install latest version of openrpc-generator: npm i @open-rpc/generator
- Run: open-rpc-generator generate -c open-rpc-generator-config-client.json
- See error
Error: the Subschemas of the schema must use $ref. Inline subschemas are not allowed.
The spec should have compiled successfully. The specific part of the spec where this occurs is:
"name": "Transaction information". The properties blockHash, blockNumber in this part of the spec is causing the issue.
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
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Windows 11
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
There are other similar issues in openapi generator (different from openrpc generator) but with same error:
OpenAPITools/openapi-generator#7262