Redocly / Redocly/redoc

deeply nested objects display

Open
#2,263 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 really like the Redoc documentation format. The data structures in my OpenAPI files tend to be nested many layers deep and have longer field names.

In the below example, if you expand up to level10, I see the following in Firefox:

  • the white box overlaps with the Request samples section
  • the enums in long_long_long_long_long_field_name are hard to read because their column is very narrow

Is it possible to adjust the display to handle these cases in some form?

Thanks for your help.

info:
  title: Test
  version: "1.0"
paths:
  /function_name:
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                level1:
                  type: object
                  properties:
                    level2:
                      type: object
                      properties:
                        level3:
                          type: object
                          properties:
                            level4:
                              type: object
                              properties:
                                level5:
                                  type: object
                                  properties:
                                    level6:
                                      type: object
                                      properties:
                                        level7:
                                          type: object
                                          properties:
                                            level8:
                                              type: object
                                              properties:
                                                level9:
                                                  type: object
                                                  properties:
                                                    level10:
                                                      type: object
                                                      properties:
                                                        long_long_long_long_long_field_name:
                                                          type: string
                                                          enum:
                                                          - Example Value 1
                                                          - Example Value 2
                                                          - Example Value 3
                                                          - Example Value 4
                                                          - Example Value 5
                                                          - Example Value 6

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

Use the deeply nested OpenAPI example in the issue to reproduce the layout in Firefox, expanding through level 10 and inspecting the long enum field. Verify the overlap with Request samples and the narrow enum column; the issue names no file or test, so locate the relevant documentation-rendering component and its existing display tests before defining the completed layout.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
documentation, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.