|
1 | 1 | package org.springdoc.core; |
2 | 2 |
|
3 | 3 | import com.fasterxml.jackson.annotation.JsonView; |
4 | | -import io.swagger.v3.core.util.ReflectionUtils; |
5 | 4 | import org.apache.commons.lang3.ArrayUtils; |
| 5 | +import org.springframework.core.annotation.AnnotatedElementUtils; |
6 | 6 | import org.springframework.http.MediaType; |
7 | 7 | import org.springframework.web.bind.annotation.*; |
8 | 8 |
|
@@ -52,27 +52,27 @@ public String[] getMethodConsumes() { |
52 | 52 |
|
53 | 53 |
|
54 | 54 | public void calculateConsumesProduces(Method method) { |
55 | | - PostMapping reqPostMappringMethod = ReflectionUtils.getAnnotation(method, PostMapping.class); |
| 55 | + PostMapping reqPostMappringMethod = AnnotatedElementUtils.findMergedAnnotation(method, PostMapping.class); |
56 | 56 | if (reqPostMappringMethod != null) { |
57 | 57 | fillMethods(reqPostMappringMethod.produces(), reqPostMappringMethod.consumes()); |
58 | 58 | return; |
59 | 59 | } |
60 | | - GetMapping reqGetMappringMethod = ReflectionUtils.getAnnotation(method, GetMapping.class); |
| 60 | + GetMapping reqGetMappringMethod = AnnotatedElementUtils.findMergedAnnotation(method, GetMapping.class); |
61 | 61 | if (reqGetMappringMethod != null) { |
62 | 62 | fillMethods(reqGetMappringMethod.produces(), reqGetMappringMethod.consumes()); |
63 | 63 | return; |
64 | 64 | } |
65 | | - DeleteMapping reqDeleteMappringMethod = ReflectionUtils.getAnnotation(method, DeleteMapping.class); |
| 65 | + DeleteMapping reqDeleteMappringMethod = AnnotatedElementUtils.findMergedAnnotation(method, DeleteMapping.class); |
66 | 66 | if (reqDeleteMappringMethod != null) { |
67 | 67 | fillMethods(reqDeleteMappringMethod.produces(), reqDeleteMappringMethod.consumes()); |
68 | 68 | return; |
69 | 69 | } |
70 | | - PutMapping reqPutMappringMethod = ReflectionUtils.getAnnotation(method, PutMapping.class); |
| 70 | + PutMapping reqPutMappringMethod = AnnotatedElementUtils.findMergedAnnotation(method, PutMapping.class); |
71 | 71 | if (reqPutMappringMethod != null) { |
72 | 72 | fillMethods(reqPutMappringMethod.produces(), reqPutMappringMethod.consumes()); |
73 | 73 | return; |
74 | 74 | } |
75 | | - RequestMapping reqMappringMethod = ReflectionUtils.getAnnotation(method, RequestMapping.class); |
| 75 | + RequestMapping reqMappringMethod = AnnotatedElementUtils.findMergedAnnotation(method, RequestMapping.class); |
76 | 76 | if (reqMappringMethod != null) { |
77 | 77 | fillMethods(reqMappringMethod.produces(), reqMappringMethod.consumes()); |
78 | 78 | } |
|
0 commit comments