@ -361,6 +361,12 @@ public class JAXRSContractTest {
@@ -361,6 +361,12 @@ public class JAXRSContractTest {
. hasUrl ( "/base/specific" ) ;
}
@Test
public void methodPathWithoutLeadingSlashParsesCorrectly ( ) throws Exception {
assertThat ( parseAndValidateMetadata ( MethodWithFirstPathThenGetWithoutLeadingSlash . class , "get" ) . template ( ) )
. hasUrl ( "/base/specific" ) ;
}
interface Methods {
@POST
@ -568,6 +574,13 @@ public class JAXRSContractTest {
@@ -568,6 +574,13 @@ public class JAXRSContractTest {
Response get ( ) ;
}
@Path ( "/base/" )
interface MethodWithFirstPathThenGetWithoutLeadingSlash {
@Path ( "specific" )
@GET
Response get ( ) ;
}
private MethodMetadata parseAndValidateMetadata ( Class < ? > targetType , String method ,
Class < ? > . . . parameterTypes )
throws NoSuchMethodException {