Redocly / Redocly/redoc

Downloaded file does not include referenced definitions

Open
#2,496 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug
In our API definitions we use shared models, example below. Downloaded file does not include referenced definitions.

Expected behavior
I would expect that in the downloaded file we have also included shared model dto or there is a zip file with all required files included.

Minimal reproducible OpenAPI snippet(if possible)
Example:

    '401':
      $ref: ./shared-dto-model.yml#/components/responses/Unauthorized
    '403':
      $ref: ./shared-dto-model.yml#/components/responses/Forbidden
    '404':
      description: Should be returned when not found entity
      content:
        application/json:
          schema:
            $ref: ./shared-dto-model.yml#/components/schemas/ErrorResponse
    '500':
      $ref: ./shared-dto-model.yml#/components/responses/InternalServerError

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.

Research direction

Start by tracing the download behavior for the OpenAPI definition shown in the issue, focusing on how the external shared-dto-model.yml references are handled. Reproduce the download with the provided references and verify that the resulting file includes the referenced definitions or provides a zip containing the required files.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.