swagger-api / swagger-api/swagger-ui

docExpansion add one more option

Open
#5,442 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cat: configuration cat: customization cat: rendering Stale type: enhancement
Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Would you consider adding one more option for the docExpansion

Currently there are these settings:

None
List
Full

I wish there was also 'First'

'First', would just open the first tag in the list. With some of our API's getting larger, I like the ability to have it collapsed, but it's nice to be able to see the first tag section open on load. In our case it is our Authentication Section which is first and works well to be first.

?

Thanks!

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 locating the docExpansion entry point and the existing handling for None, List, and Full, then inspect nearby tests if available. Implement the requested First behavior so the first tag section is open on load while the other modes remain unchanged, and verify the behavior in the existing Swagger UI test or browser workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.