-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Given an annotated method like
import org.springframework.web.bind.annotation.*;
public class MyClass {
@GetMapping(produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity<Map<String, Result>> myMethod() { ... }
}
the following validation fails
@Test
public void annotations() throws Exception {
AnnotationValidator.validate().exactly()
.annotation(type(GetMapping.class)
.param("produces", MediaType.APPLICATION_JSON_UTF8_VALUE))
.forMethod(MyClass.class.getDeclaredMethod("myMethod"));
}
the functional equal annotated method is validated (when adding the method param)
@RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity<Map<String, Result>> myMethod() { ... }
We are using version 1.2.
Metadata
Metadata
Assignees
Labels
No labels