jsondoc

JSONDoc Flows Not Showing in Documentation


I am using JSONDoc for documentation on a REST API and for some reason the Flows only show the description and give an error

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

I have flow constants defined in a class as follows:

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";
}

I have a controller classes annotated like this:

@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;
    }

and flow control classes like this:

@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() {
    }

Not sure why the flows are not finding the matching ID, I am using version 1.2.5 and compiling using Java 8.


Solution

  • It seems that you do not have a method annotated with @ApiMethod(id = APIFlowConstants.SESSION_CREATE). In the code you reported you just have a method annotated with @ApiMethod(id = APIFlowConstants.CREATE_RFI)