有什么方法可以隐藏“尝试一下”。在Spring Boot中使用OpenAPI 3的特定API选项?

发布于 2025-02-06 03:18:06 字数 574 浏览 2 评论 0原文

',“ try>” 选项选项。

我们可以通过添加springdoc.swagger.swagger-ui.supportedsubmitmethods = array = array = [“ get”,get',get'',get',' 将“,“ post”,“ patch”] 在application.properties文件中。

并通过添加springdoc.swagger-ui.tryitoutenabled = true

来将其隐藏为所有API。

  1. 有什么方法可以通过在Spring Boot中使用OpenAPI 3隐藏它?
  2. 如果API中没有参数,可以隐藏整个参数零件吗?

We can hide "Try it out" option for Methods like GET,PATCH,POST, etc... by adding

springdoc.swagger-ui.supportedSubmitMethods = Array=["get", "put", "post","patch"]
in Application.properties file.

and hide it for all Api by adding springdoc.swagger-ui.tryItOutEnabled = true

We want to hide it for a specific API.

  1. Is there any way to hide this by using OpenApi 3 in Spring Boot?
  2. Can hide the whole Parameter part if there is no parameter defined in API?

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文