-
Notifications
You must be signed in to change notification settings - Fork 376
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
Code generation for array of objects is wrong #532
Comments
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have 2 json schema.
Elephant declare array of dogs and I am expecting the generated code to reflect that.
However I don't get array of dogs in the generated TS code.
How can I get array of
Dog
in the generated code?types.json
elephant.json
generated code (elephant.d.ts)
generated code (types)
cli
json2ts --unreachableDefinitions -i schema/ -o types/
Update
After changing the CLI to
json2ts -i schema/ -o types/ --unreachableDefinitions
.The types (Dog,Cat) are generated (see below) but the dogs array is not using the Dog definition as I am expecting.
I am expecting that the generated
Elephant
willimport
theDog
and use it in the array declaration.types.d.ts (after adding the unreachableDefinitions cli flag)
The below code is my expected output
How can I get there ?
The text was updated successfully, but these errors were encountered: