如何记录每个云端点 API?例如我有以下代码。我可以使用 @Api
注释为 FooApi
编写概述。但是我想在这里为 getSomething
方法写一个文档。有注释吗?
@Api(name = "foo", version = "v1", description = "this api...")
public class FooApi {
// I want to write a description for this specific method
@ApiMethod(httpMethod = "get")
public Bar getSomething() {
}
}
最佳答案
根据Javadoc for @ApiMethod
annotations和 Endpoints Annotations文章中,还没有为 @ApiMethod
实现属性来显示为 description
,就像 @Api
注释的那样。作为引用,支持的 @Api
注释属性也可以在相同的 Endpoints Annotations 中找到。文章和@Api
annotation Javadoc .
关于java - 为通过 Google Cloud Endpoints 公开的 API 方法提供文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34964950/