Swagger 2.0 where to declare Basic Auth Schema

前端 未结 3 2229
自闭症患者
自闭症患者 2021-02-18 16:48

How do I define basic authentication using Swagger 2.0 annotations and have it display in swagger UI.

In the resource I have:

@ApiOperation(value = \"Re         


        
3条回答
  •  孤城傲影
    2021-02-18 17:31

    You can use the @SwaggerDefinition http://swagger.io/customizing-your-auto-generated-swagger-definitions-in-1-5-x/

    or you can configure the swagger object directly, here's an example http://www.programcreek.com/java-api-examples/index.php?source_dir=rakam-master/rakam/src/main/java/org/rakam/WebServiceRecipe.java

提交回复
热议问题