swagger-ui icon indicating copy to clipboard operation
swagger-ui copied to clipboard

Create a new option for urls.primaryName

Open glowcloud opened this issue 1 year ago • 1 comments

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.

glowcloud avatar Apr 15 '24 14:04 glowcloud

This needs to be addressed in next major release when we can do breaking changes.

char0n avatar Apr 18 '24 08:04 char0n