Redocly / Redocly/redoc

Nullable array of nullable item is confusingly rendered

Open
#2,260 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

I have an array that may be null. The items may also be null.

type: array
nullable: true
items:
  type: number
  nullable: true

This is rendered like this:

image

The "or null or null" part is confusing. It would be clearer with parentheses: Array of (numbers or null) or null

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 rendering with the YAML example in the issue, then find the renderer or formatter responsible for nullable array descriptions. Done means the output clearly groups nullable items, such as “Array of (numbers or null) or null,” without the confusing repeated “or null” wording.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.