【发布时间】:2016-02-21 09:10:23
【问题描述】:
我在使用 Restlet 制作 Swagger 显示 API 文档时遇到了一些麻烦。 Swagger 展示的只是这些东西:
检查 api-docs 它只显示:
我想知道我的代码有什么问题:
public class MyApplication extends SwaggerApplication {
private static final String ROOT_URI = "/";
public Restlet createInboundRoot() {
Router router = new Router(getContext());
router.attach(ROOT_URI, RootServerResource.class);
router.attach(ROOT_URI + "ping", PingServerResource.class);
router.attach(ROOT_URI + "ping/", PingServerResource.class);
// Some code omitted for simplicity
return router;
}
}
【问题讨论】: