Redocly / Redocly/redoc

External Documentation is not rendered if it's inside root of the schema

Open
#737 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

External Documentation is not rendered if it's inside root of the schema. However there are no problems if external docs are located inside any property of an object.

Schema minimal example:

{
  "components": {
    "schemas": {
      "AuthorizationHeaderMissingApiProblem": {
        "externalDocs": {
          "description": "RFC 7807 (Problem Details for HTTP APIs)",
          "url": "https://tools.ietf.org/html/rfc7807"
        },
        "nullable": false,
        "properties": { ... },
        "type": "object",
        "title": "AuthorizationHeaderMissingApiProblem"
      }
    }
  }
}

This schema used in responses and it's missing rendered external docs section (probably it will be missed in requests too).

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 reproducing the issue with the minimal OpenAPI schema in the report, using the schema in a response and checking the rendered output. Trace how root-level externalDocs are handled compared with externalDocs inside an object property; done means the external documentation section renders for both responses and requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.