文档中未显示 JSONDoc 流
JSONDoc Flows Not Showing in Documentation
我将 JSONDoc 用于 REST 文档 API,但出于某种原因,流程仅显示描述并给出错误
The following errors prevent a correct functionality of the playground
and do not provide enough documentation data for API users:
- No method found with id: SESSION_CREATE
我在 class 中定义了流量常数,如下所示:
public class APIFlowConstants {
public final static String SESSION_CREATE = "SESSION_CREATE";
public static final String CREATE_RFI = "CREATE_RFI";
public static final String GET_RFI = "GET_RFI";
public static final String LIST_RFIS = "LIST_RFIS";
public static final String UPDATE_RFI = "UPDATE_RFI";
public static final String DELETE_RFI = "DELETE_RFI";
}
我有一个控制器 classes 注释如下:
@ApiMethod(id = APIFlowConstants.CREATE_RFI)
@RequestMapping(value = "/", method = RequestMethod.GET)
public List<BAMRfi> getAllRfis(){
java.util.List<BAMRfi> rfis = bamRfiRepository.findAll();
return rfis;
}
@ApiMethod(id = APIFlowConstants.SESSION_CREATE)
@RequestMapping(value = "/", method = RequestMethod.GET)
public String getSessionToken(@PathVariable(value="seed") String seed){
String token = Token.getToken(seed);
return token;
}
和流量控制class是这样的:
@ApiFlow(name = "Create RFI Flow", description = "creates a new BAM RFI", steps = {
@ApiFlowStep(apimethodid = APIFlowConstants.SESSION_CREATE),
@ApiFlowStep(apimethodid = APIFlowConstants.CREATE_RFI) })
public void rfiCreateFlow() {
}
不确定为什么流程找不到匹配的 ID,我使用的是版本 1.2.5 并使用 Java 8.
进行编译
您似乎没有使用 @ApiMethod(id = APIFlowConstants.SESSION_CREATE)
注释的方法。在您报告的代码中,您只有一个用 @ApiMethod(id = APIFlowConstants.CREATE_RFI)
注释的方法
我将 JSONDoc 用于 REST 文档 API,但出于某种原因,流程仅显示描述并给出错误
The following errors prevent a correct functionality of the playground and do not provide enough documentation data for API users:
- No method found with id: SESSION_CREATE
我在 class 中定义了流量常数,如下所示:
public class APIFlowConstants {
public final static String SESSION_CREATE = "SESSION_CREATE";
public static final String CREATE_RFI = "CREATE_RFI";
public static final String GET_RFI = "GET_RFI";
public static final String LIST_RFIS = "LIST_RFIS";
public static final String UPDATE_RFI = "UPDATE_RFI";
public static final String DELETE_RFI = "DELETE_RFI";
}
我有一个控制器 classes 注释如下:
@ApiMethod(id = APIFlowConstants.CREATE_RFI)
@RequestMapping(value = "/", method = RequestMethod.GET)
public List<BAMRfi> getAllRfis(){
java.util.List<BAMRfi> rfis = bamRfiRepository.findAll();
return rfis;
}
@ApiMethod(id = APIFlowConstants.SESSION_CREATE)
@RequestMapping(value = "/", method = RequestMethod.GET)
public String getSessionToken(@PathVariable(value="seed") String seed){
String token = Token.getToken(seed);
return token;
}
和流量控制class是这样的:
@ApiFlow(name = "Create RFI Flow", description = "creates a new BAM RFI", steps = {
@ApiFlowStep(apimethodid = APIFlowConstants.SESSION_CREATE),
@ApiFlowStep(apimethodid = APIFlowConstants.CREATE_RFI) })
public void rfiCreateFlow() {
}
不确定为什么流程找不到匹配的 ID,我使用的是版本 1.2.5 并使用 Java 8.
进行编译您似乎没有使用 @ApiMethod(id = APIFlowConstants.SESSION_CREATE)
注释的方法。在您报告的代码中,您只有一个用 @ApiMethod(id = APIFlowConstants.CREATE_RFI)