Swagger-UI 显示不正确
Swagger-UI not appearing properly
为什么我的 Swagger UI 看起来不一样?
这是我的:
这是我想要的:
为了让 Swagger-UI 工作,我所做的就是下载项目(https://github.com/swagger-api/swagger-ui),将 dist 文件夹中的所有内容放入我的 webapp 文件夹中动态网络项目。这样做之后,我更新了 index.html 以指向我的 swagger.json。完成此操作后,我能够看到显示的第一张图片。然而,大的执行按钮并不是那么吸引人:(我如何让我的 swagger 页面看起来像第二张图片?
第一张图片是 Swagger UI 版本。 3.x 或 4.x(当前版本)。第二张图片是 Swagger UI ver. 2(旧版本,不再开发)
如果您出于某种原因想要使用版本 2,可以从 Swagger UI 存储库的 2.x
分支下载它:
这只是 Swagger-UI 版本 3 的新外观和感觉。只需查看它们的 FAQ:
Hey, what happened to the UI?! I liked it much better in Swagger-X!
We took the the best of the existing projects, freshened things up and
voila! We’re likely to make more changes in the upcoming weeks, and
definitely more when we support the next version of the spec.
But I want the old look’n’feel!
That’s the great thing about the new projects – if you want to modify
the UI to suit your needs that’s a lot easier now.
为什么我的 Swagger UI 看起来不一样?
这是我的:
这是我想要的:
为了让 Swagger-UI 工作,我所做的就是下载项目(https://github.com/swagger-api/swagger-ui),将 dist 文件夹中的所有内容放入我的 webapp 文件夹中动态网络项目。这样做之后,我更新了 index.html 以指向我的 swagger.json。完成此操作后,我能够看到显示的第一张图片。然而,大的执行按钮并不是那么吸引人:(我如何让我的 swagger 页面看起来像第二张图片?
第一张图片是 Swagger UI 版本。 3.x 或 4.x(当前版本)。第二张图片是 Swagger UI ver. 2(旧版本,不再开发)
如果您出于某种原因想要使用版本 2,可以从 Swagger UI 存储库的 2.x
分支下载它:
这只是 Swagger-UI 版本 3 的新外观和感觉。只需查看它们的 FAQ:
Hey, what happened to the UI?! I liked it much better in Swagger-X!
We took the the best of the existing projects, freshened things up and voila! We’re likely to make more changes in the upcoming weeks, and definitely more when we support the next version of the spec.
But I want the old look’n’feel!
That’s the great thing about the new projects – if you want to modify the UI to suit your needs that’s a lot easier now.