如何删除“示例"组合框或在Swagger UI中更改其文本? [英] How to remove the "Examples" combobox or change its text in Swagger UI?
本文介绍了如何删除“示例"组合框或在Swagger UI中更改其文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Swagger UI上遇到问题,它显示一个空白的"Examples"组合框(在下图标记为黄色),看起来不太好.有没有办法将其删除或将其文本更改为有用的内容?
I have a problem with Swagger UI where it displays an empty "Examples" combobox (marked yellow on the image below) which does not look good. Is there a way to remove it or change its text to something useful?
我尝试添加example
标记,但是它不起作用.操作定义如下:
I tried adding the example
tag, but it won't work. The operation definition looks like this:
post:
tags:
- pet
summary: Add a new pet to the store
operationId: addPet
requestBody:
description: Pet object that needs to be added to the store
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
application/xml:
schema:
$ref: '#/components/schemas/Pet'
required: true
responses:
405:
description: Invalid input
content: {}
security:
- petstore_auth:
- write:pets
- read:pets
推荐答案
它是Swagger UI 3.23.0-3.23.1版(和Swagger编辑器3.6.31版)中的错误,已在3.23.2版中进行了修复.
It was a bug in Swagger UI v. 3.23.0-3.23.1 (and Swagger Editor 3.6.31) that was fixed in v. 3.23.2.
这篇关于如何删除“示例"组合框或在Swagger UI中更改其文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文