-
Notifications
You must be signed in to change notification settings - Fork 4k
Fix missing properties in allOf/oneOf #3871
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
Fix missing properties in allOf/oneOf #3871
Conversation
🦋 Changeset detectedLatest commit: 3321428 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this 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 refactors the property handling logic in OpenAPI schema processing to properly collect and merge properties from schemas using allOf. The implementation extracts common property processing logic into reusable helper functions and adds special handling for allOf schemas to collect properties from all sub-schemas and merge them correctly, including proper handling of required field annotations.
Key Changes
- Extracted property processing logic into
processSchemaPropertieshelper function - Added
mergePropertieshelper to merge properties with later definitions overriding earlier ones - Implemented allOf handling that recursively collects and merges properties from all schemas in the allOf array
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/react-openapi/src/OpenAPISchema.tsx | Refactored getSchemaProperties to add allOf support by extracting reusable helpers and implementing recursive property collection and merging logic |
| .changeset/chatty-glasses-move.md | Added changeset documenting the fix for missing properties in allOf/oneOf schemas |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.