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
5.9.1 crashes the page #9337
Comments
I have a smaller sample that leads to the same situation. Sharing it here, if that helps. There is one endpoint The swagger UI loads but when I expand the This works on version 5.9.0, but doesn't work on the latest version 5.9.1. {
"openapi": "3.1.0",
"info": {
"title": "FastAPI",
"version": "0.1.0"
},
"paths": {
"/hello": {
"get": {
"summary": "Hello",
"operationId": "hello_hello_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Message"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Message": {
"properties": {
"message": {
"type": "string",
"title": "Message"
},
"details": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/Message"
},
"type": "array"
}
],
"title": "Details"
}
},
"type": "object",
"required": [
"message"
],
"title": "Message"
}
}
}
} |
version 5.9.1 released on 25/10/2023 has a bug related to recursive schema definitions Issue reported at: swagger-api/swagger-ui#9337
A monkey patch approach as a temporary workaround: |
I can also confirm that downgrading from 5.9.1 to 5.9.0 works with the monkey patch. 5.9.1 freezes the UI. |
Hi everybody, I can confirm. Here is the list of changes between 5.9.0 and 5.9.1: v5.9.0...v5.9.1 Which limits the regression either to c7d6214 or some of the dependabot updates. Assigned high priority to this issue. |
The cause of the issue is e2c2269 - updating swagger-client to |
Related to swagger-api/swagger-js#3173 and how swagger-client handles the cycles. NOTE: The problem is OpenAPI 3.1.0 specific |
Working on the fix in swagger-client/ApiDOM... |
Underlying issues has been now addressed in ApiDOM: swagger-api/apidom#3361 Next steps: the above ApiDOM PR will be released and integrated to swagger-client during tommorow. |
ApiDOM@0.83.0 with fixes has just been released. Working on integrating this release into swagger-client. |
Here is a PR integrating ApiDOM@0.83.0 with swagger-client and solving proper cycle detection: swagger-api/swagger-js#3226 |
Fixed for swagger-client released as https://github.com/swagger-api/swagger-js/releases/tag/v3.24.5 I'll be releasing new version of SwaggerUI to make the fix explicit by new patch release, but meanwhile you can remedy your installation by doing: $ npm uninstall swagger-ui
$ npm install swagger-ui This will make sure that latest swagger-client is installing along with swagger-ui. |
swagger-client@3.24.5 has been integrated in swagger-ui in #9364. |
5.9.1 Crashes the page when expanding methods with large schemas.
Reverting to 5.9.0 fixes the issue.
I can provide the openapi.json, but don't want to submit it here on a public forum.
The text was updated successfully, but these errors were encountered: