如何在 Swagger 中显示 curl 命令?

How to display curl command in Swagger?

我正在使用 Swagger UI 3.24.2,我希望 curl 语句始终显示在 UI 中。目前,它仅在我单击 'Try it out' 按钮时显示。有实现这种行为的直接方法吗?我相信在 2.0 版本中此行为是默认启用的。

谢谢!

I want the curl statement to always show up in the UI.

目前不支持。

Swagger UI 使用用户输入的特定参数值生成 cURL 命令,这就是为什么 cURL 仅在 “试用”后可用。

I believe in the 2.0 version this behavior was enabled by default.

不,此行为在 v. 2.x 和 3.x

中相同