Skip to content

feat: respect titles for oneOf variants#2772

Open
susliko wants to merge 1 commit intoRedocly:mainfrom
susliko:nested-one-of
Open

feat: respect titles for oneOf variants#2772
susliko wants to merge 1 commit intoRedocly:mainfrom
susliko:nested-one-of

Conversation

@susliko
Copy link
Copy Markdown

@susliko susliko commented Feb 9, 2026

What/Why/How?

Hi 👋🏻
This fixes #2772 (comment) when buttons for oneOf cases do not pick up schema names (or titles, if provided) and just show "object" instead.

The fix is to avoid adding default: undefined property to the FieldModel as it makes further processing fall into allOf cases, which leads to further unwanted changes of structure in hoistOneOfs

Screenshots

Before:
image

After:
image

Check yourself

  • Code is linted
  • Tested
  • All new/updated code is covered with tests

@susliko susliko requested a review from a team as a code owner February 9, 2026 13:21
@susliko susliko force-pushed the nested-one-of branch 2 times, most recently from e4cfa9e to 6e856b3 Compare February 9, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant