Deep-merge schema properties in OpenAPISchema#4124
Conversation
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this comment.
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
OpenAPISchemaPropertyEntryschemas when merging properties fromallOf. - Add a recursive
deepMergeSchemashelper to merge nestedpropertiesand arrayitems. - 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.
Before:
After: