1

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.

Michael Hatch
  • 45
  • 1
  • 7

1 Answers1

0

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)

Fabio Maffioletti
  • 820
  • 1
  • 8
  • 17
  • Fabio, that is because I posted the wrong part of the code, I am not seeing. I am not seeing any of the Flows even for CREATE_RFI with its annotation and I do have another method with SESSION_CREATE. Sorry for the confusion. – Michael Hatch Oct 02 '15 at 11:27
  • Ok. I really think it's a configuration problem, so let's try this way: could you write here the package of your `APIFlowConstants` class and the packages of the class containing method `rfiCreateFlow`. And also the JSONDoc packages property you used to configure JSONDoc. – Fabio Maffioletti Oct 05 '15 at 09:34
  • Fabio, Here is the package for the APIFlowConstants Class: `package com.bvti.arc.API.flow;` Here is the packages config: `jsondoc.packages[0]=com.bvti.arc.API jsondoc.packages[1]=com.bvti.arc.API.controller jsondoc.packages[2]=com.bvti.arc.API.model jsondoc.packages[3]=com.bvti.arc.API.flow` – Michael Hatch Oct 06 '15 at 14:24