-
Notifications
You must be signed in to change notification settings - Fork 183
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
Swagger APIView fails with stack overflow on circular reference #4693
Comments
@ruowan could you please take a look? |
Sure. I will take a look. |
We already have circular reference handle but not support cross file reference. I did circular reference support for cross file reference. I have already created a PR to fix it. Here is example I test it with new version of swagger apiParser. https://apiviewstaging.azurewebsites.net/Assemblies/Review/eb2bc3f8c130420da2c89046b499f7e5. Looks good. |
Close this issues. Fixed. |
The API view tool stack overflows when presented with a circular reference in a swagger file. In our case, the CloudErrorBody in the spec referenced below contains an array of CloudErrorBody objects within its details property. To our knowledge, this is allowed and is a standard way to return CloudErrors. The APIView tool should not crash on this.
Example spec that causes the issue:
https://github.com/Azure/azure-rest-api-specs/blob/f4d938bc278b402ac81bc9bc941642d8ed3c51c0/specification/devcenter/data-plane/Microsoft.DevCenter/preview/2022-11-11-preview/devcenter.json
Example check run:
https://github.com/Azure/azure-rest-api-specs/pull/21454/checks?check_run_id=9419920269
The text was updated successfully, but these errors were encountered: