如何删除 "Examples" 组合框或在 Swagger UI 中更改其文本?
How to remove the "Examples" combobox or change its text in Swagger UI?
我在使用 Swagger UI 时遇到问题,它显示一个空的 "Examples" 组合框(在下图中标记为黄色),看起来不太好。有没有办法删除它或将其文本更改为有用的内容?
我尝试添加 example
标签,但它不起作用。操作定义如下所示:
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
It was a bug 在 Swagger UI v. 3.23.0-3.23.1(和 Swagger Editor 3.6.31)中 在 v. 3.23.2.
我在使用 Swagger UI 时遇到问题,它显示一个空的 "Examples" 组合框(在下图中标记为黄色),看起来不太好。有没有办法删除它或将其文本更改为有用的内容?
我尝试添加 example
标签,但它不起作用。操作定义如下所示:
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
It was a bug 在 Swagger UI v. 3.23.0-3.23.1(和 Swagger Editor 3.6.31)中 在 v. 3.23.2.