Redocly / Redocly/redoc

Description of array items is not appeared on response.

Open
#1,179 3 comments 13 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I found that UI would not show the description of items with the referenced schema.

I think this had mentioned In #538, but not fixed?

What swagger-UI showed:
截圖 2020-02-19 下午4 27 20

What redoc showed, which lack of description "bar schema description.":
截圖 2020-02-19 下午4 27 30

I test it with redoc-cli version 0.9.4, and the example YAML:

openapi: "3.0.0"
info:
  title: test
  version: "0.0.0"
paths:
  /foo:
    get:
      summary: foo
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                description: array of bars
                type: array
                items:
                  $ref: "#/components/schemas/bar"
components:
  schemas:
    bar:
      description: bar schema description.
      type: object
      properties:
        name:
          type: string

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

Reproduce the response rendering with redoc-cli 0.9.4 using the OpenAPI YAML in the issue, then compare it with the shown Swagger UI result. The work is done when the referenced array item's schema description, “bar schema description.”, appears in the rendered response.

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.