Feature Request: Option to expand only request parameters by default
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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