Always use application/problem+json with ProblemDetail
See gh-gh-29588
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -403,7 +403,13 @@ public class RequestResponseBodyMethodProcessorTests {
|
||||
@Test
|
||||
void problemDetailWhenJsonRequested() throws Exception {
|
||||
this.servletRequest.addHeader("Accept", MediaType.APPLICATION_JSON_VALUE);
|
||||
testProblemDetailMediaType(MediaType.APPLICATION_JSON_VALUE);
|
||||
testProblemDetailMediaType(MediaType.APPLICATION_PROBLEM_JSON_VALUE);
|
||||
}
|
||||
|
||||
@Test // gh-29588
|
||||
void problemDetailWhenJsonAndProblemJsonRequested() throws Exception {
|
||||
this.servletRequest.addHeader("Accept", MediaType.APPLICATION_JSON_VALUE + "," + MediaType.APPLICATION_PROBLEM_JSON_VALUE);
|
||||
testProblemDetailMediaType(MediaType.APPLICATION_PROBLEM_JSON_VALUE);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user