I have three path variables for an API. I want to mask one input on Swagger UI with *****.
How can I do this when using Springdoc OpenAPI?
I have three path variables for an API. I want to mask one input on Swagger UI with *****.
How can I do this when using Springdoc OpenAPI?
You just use the swagger annotations:
@Parameter(schema = @Schema(type = "string", format = "password"))
As already shown by jenkinsme in their answer, set the format to password. Also, the type field is not needed as it defaults to string (hopefully all passwords are strings).
@Parameter(schema = @Schema(format = "password"))
The above will show up as shown in the below image
Refer the OpenAPI specification page on Data Types for all the supported types