Skip to content

Invalid reference token: $defs #2777

@SteffTek

Description

@SteffTek

Describe the bug
Im using Zod to generate my JSON Schema from my Typescript Types. I have some cycling dependencies (User has Groups, Group has Users, etc). For these Zod uses OpenAPI definitions.

Zod can use different targets for JSON Schemas, im currently using the default. https://zod.dev/json-schema?id=target - Targeting openapi-3.0 does not resolve this either, then we have a different issue.

Expected behavior
Redocly can use my spec.json.

Minimal reproducible OpenAPI snippet(if possible)

spec.json

Screenshots

Image

Additional context
I solved this until recently with dedicated Components and Manual Refs in the API Spec, but our new documentation engine cannot handle manual types currently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions