Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions test-circular.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### Description
This PR resolves issue #10616 where Swagger-UI becomes unresponsive when expanding certain operations that include circular model references.

### Root Cause
Circular `$ref` references in schemas cause infinite recursion in the React component tree while rendering model properties.

### Solution
Added a recursion guard in `model.jsx` that:
- Tracks visited schema references
- Prevents infinite rendering loops
- Displays a short warning for circular structures instead

### Reproduction
1. Create a simple OpenAPI file with a self-referencing schema:
```yaml
components:
schemas:
User:
type: object
properties:
manager:
$ref: '#/components/schemas/User'