-
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
False positive recursion #1154
Comments
It is a bug. I will investigate it when I have time |
I had the same problem with a string property. It seems to appear with the use of allOf and basic types (integer, string, ...) simultaneously. |
Immediately exit from allOf's children, but use separate refCounter to do not enter into same scheme recursively Also add pseudo-recursive example
I have the same issue and can provide another reproduction example, if required. |
Immediately exit from allOf's children, but use separate refCounter to do not enter into same scheme recursively Also add pseudo-recursive example
Any news on how this issue is progressing? I could also provide additional examples if needed. @jlaw90 looks like you may have a solution to the problem in jlaw90@5f23b7a, is this something you're planning to make a PR proposal for anytime soon? Would be greatly appreciated 🎉 |
@remnestal I just rebased the commit from #1186 to see if it fixed the problem for us but it didn't - I haven't had time to investigate further unfortunately |
I have the same problem, I created the issue #1439. |
Looks like this might not be a problem anymore with the latest version of |
I tried it whith the latest version 0.10.1 and there is still the problem |
Also encountering this issue. |
Same here. Problem still exists |
Have a similar issue with a schema that has
When the second schema |
@RomanHotsiy have you had any time to look into this issue (I saw your comment from earlier)? Or maybe someone else has? |
Is this affecting current version? are there any old version I can use that doesnt have this issue? this is breaking changes for me |
It seems it is at least somehow fixed in the current version. I don't see the recursions anymore. |
I'm running into this issue as well using a schema with the below structure. ReDoc will correctly display the BaseSchema:
type: object
properties:
id:
type: String
TopLevelSchema:
allOf:
- $ref: '#/BaseSchema'
- type: object
properties:
subobjects:
type: array
items:
$ref: "#/BaseSchema" My dependencies are currently using the following versions: "dependencies": {
"@redocly/openapi-cli": "v1.0.0-beta.54",
"redoc": "2.0.0-rc.55",
"redoc-cli": "~0.12.2"
} The issue is present when the docs are presented using both openapi: 3.0.3
info:
title: Recursion False Positive
version: '3.0'
paths:
/path:
get:
summary: Demonstrates a false positive recursion identification
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/TopLevelSchema'
components:
schemas:
BaseSchema:
type: object
properties:
id:
type: String
TopLevelSchema:
allOf:
- $ref: '#/components/schemas/BaseSchema'
- type: object
properties:
subobjects:
type: array
items:
$ref: '#/components/schemas/BaseSchema' |
For me issue still persists with the latest version |
Short update on this ages-old issue 🙈. I found some time to work on this and looks like I have a solution. I need some time to clean it up and add tests. |
Any updates on this issue? I'm also still struggling with this |
Unfortunately, it is still happening in our live docs. I'll try to further reproduce. It helped on the 3rd level of nesting, but on the 4th level it still doesn't work. |
OK, I don't understand, but it seems all right now. Maybe some cache. Sorry… Thanks for the fix! |
Hello there, wrestling following issue.
Imagine I want to reuse some schema, let's say ID – I have following in
./helpers/id.yaml
:And here is a simple OpenAPI, which should result in a simple structure of three nested objects, which all wants to reference the
id
helper.Whereas the first and second object are correctly rendered with required
id
attribute, the third object is flagged as recursive:Any idea? Is it a bug or am I missing something?
The text was updated successfully, but these errors were encountered: