public static String [ ] removePathTemplate ( List < MappedEndpoint > mappedEndpoints ) { return mappedEndpoints . stream ( ) . filter ( me -> ! me . type . equals ( MappedEndpoint . Type . STATIC ) ) . map ( me -> { int idx = me . url . indexOf ( "/{" ) ; return idx >= 0 ? me . url . substring ( 0 , idx ) : me . url ; } ) . distinct ( ) . toArray ( String [ ] :: new ) ; }
best effort to resolve url that may be unique