Skip to content

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
@sserrata sserrata self-assigned this Jun 25, 2025
@sserrata sserrata added the enhancement New feature or request label Jun 25, 2025
Copy link

Visit the preview URL for this PR (updated for commit 149dfec):

https://docusaurus-openapi-36b86--pr1167-jc8ctmgi.web.app

(expires Fri, 25 Jul 2025 21:59:30 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: bf293780ee827f578864d92193b8c2866acd459f

@sserrata
Copy link
Member

Hi @dsuket, thanks for the contribution. I think it's a solid change/idea.

@sserrata sserrata merged commit cc80e62 into PaloAltoNetworks:main Jun 26, 2025
9 checks passed
@dsuket dsuket deleted the change-anyOf-oneOf-tab-label branch October 11, 2025 08:44
dsuket added a commit to dsuket/docusaurus-openapi-docs that referenced this pull request Oct 13, 2025
fix: change label

change tab label name of anyOf/oneOf

build

feat: refactor request and response example

fix: primitive

add build

fix: Added handling for when there is no schema.

feat: Add new endpoints for allOf with nested array items and properties in OpenAPI schema

[Enhancement] Add vendor extension support for positioning sidebar items (PaloAltoNetworks#1160)

* Add support for x-position vendor extension and sorting logic

* Add position and x-position types

chore: restrict workflows to main repo (PaloAltoNetworks#1169)

docs: fix typos and tables (PaloAltoNetworks#1170)

Change the tab label of anyOf/oneOf (PaloAltoNetworks#1167)

* feat: support null type

* fix: fix tab label

refactor: refactor request and response example (PaloAltoNetworks#1161)

* feat: refactor request and response example

* fix: primitive

refactor: change ResponseSamples to CodeSamples (PaloAltoNetworks#1162)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants