Swagger UI 中的屏蔽输入(示例 - 密码)?
问题描述:
我有一个 API 的三个路径变量.我想用 ***** 屏蔽 Swagger UI 上的一个输入.
I have three path variables for an API. I want to mask one input on Swagger UI with *****.
在使用 Springdoc OpenAPI 时如何执行此操作?
How can I do this when using Springdoc OpenAPI?
答
您只需使用 swagger 注释:
You just use the swagger annotations:
@Parameter(schema = @Schema(type = "string", format = "password"))