.get("/{id}/{date}").description("Find user by id and date").outType(User.class)
.security("api_key")
...
.put().description("Updates or create a user").type(User.class)
.security("petstore_auth", "write:pets,read:pets")
.get("/{id}/{date}").description("Find user by id and date").outType(User.class)
.security("api_key")
...
.put().description("Updates or create a user").type(User.class)
.security("petstore_auth", "write:pets,read:pets")
Copy to ClipboardCopied!Toggle word wrapToggle overflow
此处的 get 操作使用 Api Key 安全性,而 put 操作则使用带有允许读和写片断范围的 OAuth 安全性。