Skip to content

Change the tab label of anyOf/oneOf #1167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dsuket
Copy link
Contributor

@dsuket dsuket commented Jun 13, 2025

Description

Changed the labels of the anyOf and oneOf tabs.
Modified them to display the type name instead of "MOD{number}".

Motivation and Context

Related: #1152

As I mentioned in the related issue, the default tab labels being MOD{number} are hard to understand.
How about using the type name instead?

How Has This Been Tested?

  • Pass npm run build
  • Pass npm run test
  • I went through the demo API and tests and confirmed that the examples are being displayed properly.

Screenshots (if appropriate)

anyOf with primitives

スクリーンショット 2025-06-13 10 41 40

anyOf with oneOf

スクリーンショット 2025-06-13 10 41 52

anyOf with Properties in Array Item

スクリーンショット 2025-06-13 10 42 14

oneOf with Complex Types

スクリーンショット 2025-06-13 10 43 48

oneOf with Nested oneOf

スクリーンショット 2025-06-13 10 44 18

oneOf with Shared Properties

スクリーンショット 2025-06-13 10 45 12

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
    • It's a minor change, but the default tab labels for oneOf/anyOf will be updated.

Checklist

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

@dsuket dsuket marked this pull request as ready for review June 13, 2025 01:45
@dsuket dsuket force-pushed the change-anyOf-oneOf-tab-label branch from 8be84a9 to fa0c6ff Compare June 13, 2025 05:15
@dsuket dsuket force-pushed the change-anyOf-oneOf-tab-label branch from 970d27c to 149dfec Compare June 13, 2025 05:24
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