-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Broken mutual recursion #2135
Comments
Hi @tiopid, thanks for your issue. openapi: 3.0.0
info:
title: False positive recursion
version: '3.0'
paths:
/documents:
get:
summary: Example
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/A"
components:
schemas:
A:
type: array
items:
$ref: '#/components/schemas/B'
B:
allOf:
- $ref: '#/components/schemas/C'
- $ref: '#/components/schemas/D'
C:
type: object
required:
- value
properties:
value:
$ref: '#/components/schemas/A'
D:
type: object
But on commits: Please provide more clear steps to reproduce and expected behavior. Thanks |
sorry, this is correct example
I noticed that the error occurs because both objects in allOf the properties are called A, and B items with oneOf |
Describe the bug
After this fix -
fix: rewrite recursive checks
i got the problem with mutual recursion object, because here https://github.com/Redocly/redoc/blob/master/src/services/OpenAPIParser.ts#L12
only the previous $ref is checked
The text was updated successfully, but these errors were encountered: