swagger-api / swagger-api/swagger-ui

Create a new option for urls.primaryName

Open
#9,825 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

As we're moving to merging options with dots in names like syntaxHighlight.theme into parent settings like syntaxHighlight, we have an issue with urls.primaryName. The urls setting is an array and we can set the primaryName property to it but the information gets lost after using deepExtend. As such, we're trying to compensate for it by making an exception while merging, in: https://github.com/swagger-api/swagger-ui/pull/9824

Instead of doing that, we could simply create a new option that we wouldn't merge into the urls array, while also supporting the previous option. For example, we could have urlsPrimaryName and if we specify urls.primaryName instead, simply set the value from it to urlsPrimaryName and delete urls.primaryName.

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 examining the deepExtend behavior described in the issue and the referenced pull request 9824. Trace how urls.primaryName is merged, then verify that a new urlsPrimaryName option preserves the old option's behavior without losing the value during merging.

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
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.