Skip to content

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

Closed
@alexmtch

Description

@alexmtch

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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions