You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an API method which returns a tree structure. I created a definition file with describing the recursive type in JSON schema and I tried this code generator. And the generator instantly hung.
To Reproduce
Steps to reproduce the behavior:
Put the following JSON content as openrpc.json in your current directory
npm i @open-rpc/generator
npx open-rpc-generator init
The command hangs at the first question. npx open-rpc-generator generate hangs as well
Describe the bug
I have an API method which returns a tree structure. I created a definition file with describing the recursive type in JSON schema and I tried this code generator. And the generator instantly hung.
To Reproduce
Steps to reproduce the behavior:
openrpc.json
in your current directorynpm i @open-rpc/generator
npx open-rpc-generator init
npx open-rpc-generator generate
hangs as wellExpected behavior
The
npx open-rpc-generator init
creates a configuration file for the project.Screenshots
Instead of screenshot I captured terminal screen outputs:
The command hung at the first question.
Desktop (please complete the following information):
@open-rpc/generator
: v1.22.3Additional context
When I modified the
children
field as follows, this issue didn't occur.I believe the recursive type made the generator hang. I guess the generator checks
$ref
recursively without checking the reference is already visit.The text was updated successfully, but these errors were encountered: