Skip to content

Deep-merge schema properties in OpenAPISchema#4124

Merged
nolannbiron merged 2 commits intomainfrom
nolann/rnd-10064-missing-nested-child-properties
Mar 18, 2026
Merged

Deep-merge schema properties in OpenAPISchema#4124
nolannbiron merged 2 commits intomainfrom
nolann/rnd-10064-missing-nested-child-properties

Conversation

@nolannbiron
Copy link
Member

Before:

CleanShot 2026-03-18 at 00 11 29@2x

After:

CleanShot 2026-03-18 at 00 10 34@2x

@linear
Copy link

linear bot commented Mar 17, 2026

@changeset-bot
Copy link

changeset-bot bot commented Mar 17, 2026

⚠️ No Changeset found

Latest commit: e4a04dd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@argos-ci
Copy link

argos-ci bot commented Mar 17, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v2-cloudflare (Inspect) 👍 Changes approved 7 changed Mar 18, 2026, 12:06 PM
customers-v2-vercel (Inspect) 👍 Changes approved 6 changed Mar 18, 2026, 12:01 PM
v2-cloudflare (Inspect) ✅ No changes detected - Mar 18, 2026, 12:08 PM
v2-vercel (Inspect) 👍 Changes approved 1 changed Mar 18, 2026, 12:07 PM

@nolannbiron nolannbiron requested review from Copilot and gregberge and removed request for Copilot March 18, 2026 08:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves how allOf schema properties are combined in packages/react-openapi by deep-merging overlapping property schemas (instead of overriding), so nested object/array structures are preserved when displaying schemas.

Changes:

  • Deep-merge overlapping OpenAPISchemaPropertyEntry schemas when merging properties from allOf.
  • Add a recursive deepMergeSchemas helper to merge nested properties and array items.
  • Add unit tests covering required-field merging and nested deep-merge behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/react-openapi/src/OpenAPISchema.tsx Deep-merges overlapping schemas while collecting properties from allOf.
packages/react-openapi/src/OpenAPISchema.test.ts Adds tests validating required handling and deep-merge behavior for nested schemas.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@nolannbiron nolannbiron merged commit aff6285 into main Mar 18, 2026
17 checks passed
@nolannbiron nolannbiron deleted the nolann/rnd-10064-missing-nested-child-properties branch March 18, 2026 12:09
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.

3 participants