Skip to content

Conversation

jwulf
Copy link

@jwulf jwulf commented Sep 23, 2025

Description

This PR adds display of the format for oneOf schemas with a primitive arm, in line with the display for the field when it is a direct property.

Motivation and Context

oneOf schemas with a primitive arm do not display the format, but display the primitive type only. This impacts enums and specific format strings like date-time. See this issue for more context and examples.

How Has This Been Tested?

This change has been tested by manually verifying the change in output display.

Screenshots (if appropriate)

Example of the output without this patch:

Screenshot 2025-09-24 at 10 49 22 AM

This PR correctly displays the format.

Example of the output when this patch is applied:

Screenshot 2025-09-24 at 10 50 04 AM

Types of changes

  • New feature (non-breaking change which adds functionality)

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.

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