class SchemaPropertyDeprecatingConverter implements ModelConverter {

	/**
	 * The constant DEPRECATED_ANNOTATIONS.
	 */
	private static final List<Class<? extends Annotation>> DEPRECATED_ANNOTATIONS = Collections.synchronizedList(new ArrayList<>());

	static {
		DEPRECATED_ANNOTATIONS.add(Deprecated.class);
	}

	/**
	 * Contains deprecated annotation boolean.
	 *
	 * @param annotations the annotations
	 * @return the boolean
	 */
	public static boolean containsDeprecatedAnnotation(Annotation[] annotations) {
		return annotations != null && Stream.of(annotations).map(Annotation::annotationType).anyMatch(DEPRECATED_ANNOTATIONS::contains);
	}

	/**
	 * Add deprecated type.
	 *
	 * @param cls the cls
	 */
	public static void addDeprecatedType(Class<? extends Annotation> cls) {
		DEPRECATED_ANNOTATIONS.add(cls);
	}

	/**
	 * Is deprecated boolean.
	 *
	 * @param method the annotated element
	 * @return the boolean
	 */
	public static boolean isDeprecated(Method method) {<FILL_FUNCTION_BODY>}

	@Override
	public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator<ModelConverter> chain) {
		if (chain.hasNext()) {
			Schema<?> resolvedSchema = chain.next().resolve(type, context, chain);
			if (type.isSchemaProperty() && containsDeprecatedAnnotation(type.getCtxAnnotations()))
				resolvedSchema.setDeprecated(true);
			return resolvedSchema;
		}
		return null;
	}
}

		Class<?> declaringClass = method.getDeclaringClass();
		boolean deprecatedMethod = DEPRECATED_ANNOTATIONS.stream().anyMatch(annoClass -> AnnotatedElementUtils.findMergedAnnotation(method, annoClass) != null);
		boolean deprecatedClass = DEPRECATED_ANNOTATIONS.stream().anyMatch(annoClass -> AnnotatedElementUtils.findMergedAnnotation(declaringClass, annoClass) != null);
		return deprecatedClass || deprecatedMethod;
	
<no_super_class>