-
Notifications
You must be signed in to change notification settings - Fork 10.3k
An invalid reference is generated for a object that contains two properties of type List<List<string>> (both of the same type). #60381
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
Comments
+1 also hitting this issue with multiple models where the type is a class rather than a string. It would be nice if the reference (#/components/schemas/#/properties/delete/items) was the same as the first reference (string). |
emergency fixing it for the time being:
|
I am also experiencing this error. At least it generates the same wrong stuff in the openapi.json |
This is the same issue of #60012. |
Hey all! Thanks for reporting this issue. The root cause here (as with many of the other schema related issues) is that the schema generated by STJ's For these scenarios, we need to explode out relative references before passing them into the This will be resolved for 9.0.x via #60410. For .NET 10 and beyond, we'll be relying on a change in the underlying Microsoft.OpenApi library. |
The bug fix for this has been merged into the servicing branch and will be included in 9.0.4. |
@captainsafia is there a prerelease I can use? Were not in production yet, so that would be fine. Or can I use a .net 10 prerelease in the meantime? |
Is there an existing issue for this?
Describe the bug
Describe the bug
For the following Type:
a wrong (at least neither swagger ui nor scalar can handle it) reference is created for the second occurance of List<List>
OpenApi File To Reproduce
Expected Behavior
Expected behavior
The reference seems invalid.
At least neither scalar nor swagger-ui can handle it.
swagger ui reports a invalid reference.
if i change the second # to the actual Name it works:

Steps To Reproduce
Using a class with List<> seems to result in this wrong reference:
Exceptions (if any)
No response
.NET Version
9.0.200
Anything else?
9.0.2 of the nuget package
The text was updated successfully, but these errors were encountered: