@Override public Void visit(ApiDoc api) { for (ApiMethodDoc methodDoc : api.getMethods()) { methodDoc.accept(this); } return null; }
@Override public Void visit(ApiMethodDoc method) { List<String> pathVariables = extractPathVariables(method.getPath()); for (String pathVariable : pathVariables) { ApiParamDoc pathParameter = method.getPathparameter(pathVariable); if (pathParameter == null) { pathParameter = new ApiParamDoc(); pathParameter.setName(pathVariable); pathParameter.setType("string"); pathParameter.setRequired(String.valueOf(true)); pathParameter.setParamType(PATH); method.getPathparameters().add(pathParameter); } } return null; }