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

JSON Schema recursion on array of object generate a JSON type #4211

Closed
2 of 4 tasks
alexmtch opened this issue Jul 29, 2022 · 0 comments · Fixed by #4216
Closed
2 of 4 tasks

JSON Schema recursion on array of object generate a JSON type #4211

alexmtch opened this issue Jul 29, 2022 · 0 comments · Fixed by #4216

Comments

@alexmtch
Copy link

alexmtch commented Jul 29, 2022

Issue workflow progress

Progress of the issue based on the Contributor Workflow

  • 1. The issue provides a reproduction available on Github, Stackblitz or CodeSandbox

  • 2. A failing test has been provided

  • 3. A local solution has been provided

  • 4. A pull request is pending review


Describe the bug

When i'm using an example provided by the documentation i don't get correct result. In this case the SimilarBook types should have a similarBooks property which is an array of SimilarBook but instead i got an array of JSON.

The SimilarBook type is :

title: String
author: String
price: Float
similarBooks: [JSON]

image

To Reproduce

Reproduced here : https://stackblitz.com/edit/github-eabbxs?file=book.json
You could see that i've picked the book example of https://www.graphql-mesh.com/docs/handlers/json-schema
I've tried with "noDeduplication" as true or false.

Expected behavior

The SimilarBook type should be like :

title: String
author: String
price: Float
similarBooks: [SimilarBook]
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

Successfully merging a pull request may close this issue.

1 participant