Redocly / Redocly/redoc

Feature Request: Option to expand only request parameters by default

Open
#2,287 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I would like to propose a new feature for the ReDoc documentation generator. Currently, there is an option to expand all objects in the documentation by default using the expandResponses and requiredPropsFirst settings. However, I think it would be beneficial to have an option to expand only request parameters by default, without expanding other objects.

Use case:
As a user, when I'm browsing API documentation, I often find it most helpful to see the request parameters first, as they provide the essential information for making API calls. Expanding only request parameters would make it easier for users to quickly understand and utilize the API.

Proposed solution:
Introduce a new option or setting (e.g., expandRequestParameters) that, when enabled, would expand all request parameters by default while leaving other objects collapsed. This option could be set in the ReDoc configuration, like this:

html
<redoc spec-url='path/to/your/spec.yml' expand-request-parameters></redoc>
Thank you for considering this feature request. I believe it would be a valuable addition to the ReDoc project and improve the overall user experience.

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 existing expandResponses and requiredPropsFirst configuration paths in ReDoc. Confirm the new setting expands request parameters while leaving other objects collapsed, and add coverage for the HTML attribute and configuration behavior described in the issue.

Written by the indexing model from the issue text.

Assessment

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