|
12 | 12 | import io.swagger.v3.core.util.AnnotationsUtils;
|
13 | 13 | import io.swagger.v3.core.util.Json;
|
14 | 14 | import io.swagger.v3.core.util.Json31;
|
| 15 | +import io.swagger.v3.core.util.KotlinDetector; |
15 | 16 | import io.swagger.v3.core.util.ParameterProcessor;
|
16 | 17 | import io.swagger.v3.core.util.PathUtils;
|
17 | 18 | import io.swagger.v3.core.util.ReflectionUtils;
|
@@ -305,7 +306,8 @@ public OpenAPI read(Class<?> cls,
|
305 | 306 | javax.ws.rs.Consumes classConsumes = ReflectionUtils.getAnnotation(cls, javax.ws.rs.Consumes.class);
|
306 | 307 | javax.ws.rs.Produces classProduces = ReflectionUtils.getAnnotation(cls, javax.ws.rs.Produces.class);
|
307 | 308 |
|
308 |
| - boolean classDeprecated = ReflectionUtils.getAnnotation(cls, Deprecated.class) != null; |
| 309 | + boolean classDeprecated = ReflectionUtils.getAnnotation(cls, Deprecated.class) != null |
| 310 | + || (KotlinDetector.isKotlinPresent() && ReflectionUtils.getAnnotation(cls, KotlinDetector.getKotlinDeprecated()) != null); |
309 | 311 |
|
310 | 312 | // OpenApiDefinition
|
311 | 313 | OpenAPIDefinition openAPIDefinition = ReflectionUtils.getAnnotation(cls, OpenAPIDefinition.class);
|
@@ -434,7 +436,8 @@ public OpenAPI read(Class<?> cls,
|
434 | 436 | continue;
|
435 | 437 | }
|
436 | 438 |
|
437 |
| - boolean methodDeprecated = ReflectionUtils.getAnnotation(method, Deprecated.class) != null; |
| 439 | + boolean methodDeprecated = ReflectionUtils.getAnnotation(method, Deprecated.class) != null |
| 440 | + || (KotlinDetector.isKotlinPresent() && ReflectionUtils.getAnnotation(method, KotlinDetector.getKotlinDeprecated()) != null); |
438 | 441 |
|
439 | 442 | javax.ws.rs.Path methodPath = ReflectionUtils.getAnnotation(method, javax.ws.rs.Path.class);
|
440 | 443 |
|
|
0 commit comments