ITADN

SwaggerUI 5.18.2 does not render openap 3.0.4

#288Closedmast93 创建于 2025-03-13
bug
M
mast93commented
### Describe the bug The SwaggerUI samples/TodoApp/wwwroot/swagger-ui/index.html is currently giving the below error: Unable to render this definition The provided definition does not specify a valid version field. Please indicate a valid Swagger or OpenAPI version field. Supported version fields are swagger: "2.0" and those that match openapi: 3.x.y (for example, openapi: 3.1.0). openapi/v1.json is returning "openapi": "3.0.4" which SwaggerUI 5.18.2 used in samples/TodoApp/wwwroot/swagger-ui/index.html does not support. Update samples/TodoApp/wwwroot/swagger-ui/index.html SwaggerUI to 5.19.0 fixes this (latest version 5.20.1). ### Steps To reproduce Run the sample and open the SwaggerUI url https://localhost:50001/swagger-ui/index.html ### Expected behaviour SwaggerUI displays content ### Actual behaviour Shows error ### Screenshots ![Image](https://github.com/user-attachments/assets/097d12bf-f9a6-4c6f-973a-abe85a1a37a6) ### System information Windows 11 .NET 9.0 Current github release
关闭于 2025-03-13 3 条评论