You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a 1.3.12 application undergoing an exploratory migration to 2.0.0-rc3. A few working tests are now failing under 2.0.0-rc3. The tests POST an entity with unknown properties: 1.3.12 returns 400, 2.0.0 returns 204. If I explicitly configure the objectmapper with objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true); then the tests work as they did in 1.3.12.
Explicit configuration seems like "the right thing", but regressions make everyone sad.
// Create an AUTH aware web container with the event resource endpoints available.
@ClassRule
public static final ResourceTestRule eventResource = ResourceTestRule.builder()
.setTestContainerFactory(new GrizzlyWebTestContainerFactory())
.addProvider(new AuthDynamicFeature(
new OAuthCredentialAuthFilter.Builder<>()
.setAuthenticator(new WebTokenAuthenticator())
.setAuthorizer(new WebTokenAuthorizer())
.setPrefix("Bearer")
.buildAuthFilter()
)
)
.addProvider(RolesAllowedDynamicFeature.class)
.addProvider(new AuthValueFactoryProvider.Binder<>(MyUser.class))
.addResource(new EventResource(eventStoreFactory))
.build();
@Before
public void setUp() {
// this fixes the problem in 2.0.0-rc3
eventResource.getObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true);
}
The text was updated successfully, but these errors were encountered:
I have a 1.3.12 application undergoing an exploratory migration to 2.0.0-rc3. A few working tests are now failing under 2.0.0-rc3. The tests POST an entity with unknown properties: 1.3.12 returns 400, 2.0.0 returns 204. If I explicitly configure the objectmapper with objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true); then the tests work as they did in 1.3.12.
Explicit configuration seems like "the right thing", but regressions make everyone sad.
The text was updated successfully, but these errors were encountered: