在 SpringDoc OpenAPi 中未禁用 petstore URL [英] petstore URL not disabled in SpringDoc OpenAPi

查看:81
本文介绍了在 SpringDoc OpenAPi 中未禁用 petstore URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 SpringDoc 1.4.3 进行 swagger.
我添加了以下配置以禁用 application.yml

中的 petstore URL

配置

springdoc:招摇-ui:disable-swagger-default-url: true标签分类器:alpha操作分类器:alpha文档扩展:无

但是当我点击

解决方案

由于以下功能支持,已经过测试和验证:

只需使用以下属性:

springdoc.swagger-ui.disable-swagger-default-url=true

I am using SpringDoc 1.4.3 for swagger.
I have added the below configuration to disabled the petstore URLs in application.yml

Configuration

springdoc:
  swagger-ui:
    disable-swagger-default-url: true
    tags-sorter: alpha
    operations-sorter: alpha
    doc-expansion: none

but when I hit the https://petstore.swagger.io/v2/swagger.json in explore text box, it is still showing me the petsore URLs as shown in the below image.

Swagger Image

解决方案

Already tested and validated thanks to the following feature support:

Just use, the following property:

springdoc.swagger-ui.disable-swagger-default-url=true

这篇关于在 SpringDoc OpenAPi 中未禁用 petstore URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆