如何在使用Swagger的java中使用ApiModelProperty

时间:2017-08-16 10:03:21

标签: java swagger

我只是想要授权,但我不确切地知道放在哪里:@ApiModelProperty(value = "authorization", dataType = "java.lang.String", required = true) String authorization在我的方法中:

public Response getClienteFornitore(@HeaderParam("Authorization")  String authorization, @HeaderParam("StaySignedIn")  boolean staySignedIn, @PathParam("clienteFornitoreId") int clienteFornitoreId) {

....

}

我真的很感激能帮助的人!谢谢!

1 个答案:

答案 0 :(得分:1)

您可以通过在方法签名中的相应参数中添加(u'Sorry, you are not allowed to access this document. Only users with the following access level are currently allowed to do that:\n- Administration/Settings\n\n(Document model: ir.module.module)', None) 注释来使authorization成为必需:

@ApiParam