@@ -287,12 +287,11 @@ private TsModel createJaxrsInterface(SymbolTable symbolTable, TsModel tsModel, M
287287 tsModel .getTypeAliases ().add (responseTypeAlias );
288288 // application interface
289289 final String applicationPath = jaxrsApplication .getApplicationPath ();
290- final String pathPrefix = applicationPath != null && !applicationPath .isEmpty () ? applicationPath + "/" : "" ;
291290 final List <TsMethodModel > methods = new ArrayList <>();
292291 final Map <String , Long > methodNamesCount = groupingByMethodName (jaxrsApplication .getMethods ());
293292 for (JaxrsMethodModel method : jaxrsApplication .getMethods ()) {
294293 final boolean createLongName = methodNamesCount .get (method .getName ()) > 1 ;
295- methods .add (processJaxrsMethod (symbolTable , pathPrefix , responseSymbol , method , createLongName ));
294+ methods .add (processJaxrsMethod (symbolTable , applicationPath , responseSymbol , method , createLongName ));
296295 }
297296 final String applicationName = jaxrsApplication .getApplicationName () != null ? jaxrsApplication .getApplicationName () : "RestApplication" ;
298297 final TsBeanModel interfaceModel = new TsBeanModel (null , false , symbolTable .getSyntheticSymbol (applicationName ), null , null , null , null , null , methods , null );
@@ -301,6 +300,7 @@ private TsModel createJaxrsInterface(SymbolTable symbolTable, TsModel tsModel, M
301300 }
302301
303302 private static Map <String , Long > groupingByMethodName (List <JaxrsMethodModel > methods ) {
303+ // Java 8
304304// return methods.stream().collect(Collectors.groupingBy(JaxrsMethodModel::getName, Collectors.counting()));
305305 final Map <String , Long > methodNamesCount = new LinkedHashMap <>();
306306 for (JaxrsMethodModel method : methods ) {
@@ -314,7 +314,7 @@ private static Map<String, Long> groupingByMethodName(List<JaxrsMethodModel> met
314314
315315 private TsMethodModel processJaxrsMethod (SymbolTable symbolTable , String pathPrefix , Symbol responseSymbol , JaxrsMethodModel method , boolean createLongName ) {
316316 final List <String > comments = new ArrayList <>();
317- final String path = pathPrefix + method .getPath ();
317+ final String path = Utils . joinPath ( pathPrefix , method .getPath () );
318318 comments .add ("HTTP " + method .getHttpMethod () + " /" + path );
319319 final List <TsParameterModel > parameters = new ArrayList <>();
320320 // path params
0 commit comments