Actually I solved this by adding "/" as the value of the @ApplicationPath annotation, I thought it was not necessary because the API documentation says the following for @ApplicationPath value param:
Defines the base URI for all resource URIs. A trailing '/' character will be automatically appended if one is not present.
I assumed that leaving an empty String will be equivalent to use @ApplicationPath("/") but it is not.
So this is how the configuration class looks now:
@ApplicationPath("/")
public class MyRESTAPIApp extends ResourceConfig{
public MyRESTAPIApp () {
packages("com.mypackage.resource", "com.mypackage.providers");
register(org.glassfish.jersey.filter.LoggingFilter.class);
property("jersey.config.beanValidation.enableOutputValidationErrorEntity.server", "true");
}
}