-
Notifications
You must be signed in to change notification settings - Fork 4k
Improve OpenAPI circular references #3821
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
Conversation
🦋 Changeset detectedLatest commit: 9376c39 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 improves the handling and visual presentation of circular references in OpenAPI schemas. When a schema references itself, the component now displays a more complete presentation with the circular reference indicator, and ensures proper scroll-to-anchor behavior with updated styling.
- Refactored circular reference handling to render
OpenAPISchemaPresentationinstead of justOpenAPISchemaCircularRef - Moved the element ID from
OpenAPIDisclosureto its parent wrapper div to enable anchor linking - Updated circular reference UI with repositioned glyph and improved styling
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/react-openapi/src/OpenAPISchema.tsx | Refactored circular reference rendering to use OpenAPISchemaPresentation with conditional content display; moved ID attribute to wrapper div for proper anchor navigation |
| packages/gitbook/src/components/DocumentView/OpenAPI/style.css | Added scroll margin for anchor navigation, adjusted circular reference text size and glyph spacing |
| .changeset/yellow-jobs-nail.md | Added changeset documenting the improvements |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8190c4b to
9376c39
Compare
Before:

After:
