Redocly / Redocly/redoc

Error: "Self-referencing circular pointer"

Open
#1,649 9 comments 2 reactions 1 assignee View on GitHub

@AlexVarchuk is already working on this.

Since Jul 11, 2023.

investigation
Dominant language
TypeScript
Stars
25.9k
Forks
2.4k
Avg merge
13h 10m
Merged PRs (30d)
4

Description

I get this error when i run:

$ redoc-cli bundle -o dist/docs/index.html docs/openapi.yml
Prerendering docs
Error: Self-referencing circular pointer
    at /usr/lib/node_modules/redoc-cli/node_modules/@redocly/openapi-core/lib/resolve.js:242:31
    at Generator.next (<anonymous>)
    at /usr/lib/node_modules/redoc-cli/node_modules/@redocly/openapi-core/lib/resolve.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/usr/lib/node_modules/redoc-cli/node_modules/@redocly/openapi-core/lib/resolve.js:4:12)
    at followRef (/usr/lib/node_modules/redoc-cli/node_modules/@redocly/openapi-core/lib/resolve.js:240:24)
    at /usr/lib/node_modules/redoc-cli/node_modules/@redocly/openapi-core/lib/resolve.js:300:45
    at Generator.next (<anonymous>)
    at /usr/lib/node_modules/redoc-cli/node_modules/@redocly/openapi-core/lib/resolve.js:8:71
    at new Promise (<anonymous>)

Here is my file structure:

tree .   
.
└── docs
    ├── iap
    │   ├── paths
    │   │   ├── products.yml
    │   │   ├── product.yml
    │   │   ├── subscriptions.yml
    │   │   └── subscription.yml
    │   └── schemas
    │       ├── filter_product_type.yml
    │       ├── period_type.yml
    │       ├── period.yml
    │       ├── product_currency.yml
    │       ├── product_filters.yml
    │       ├── product_list.yml
    │       ├── product_type.yml
    │       ├── product.yml
    │       ├── subscription_params.yml
    │       ├── subscription_status.yml
    │       └── subscription.yml
    ├── openapi.yml
    └── _schemas.yml // imports all schemas from service schema folder

I checked it many times, there are no circular referencing. And other tools like OpenAPI VSCode Extension by 42Crunch seems to work fine with previews.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.