BACKGROUND: I am creating a shared Swagger documentation template to be used everywhere, and I am trying to configure an annotation like this: @DefaultDocs(value = "summary content of API", schemaClass = nameClass.class)
Here: https://github.com/bmt810818/issue/blob/main/%40AliasFor.md
I have read most articles about @AliasFor, but I haven't found a similar case. "Any answer is helpful to me. Thank you for viewing this post"
Comment From: sbrannen
Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use the issue tracker only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.
Having said that, the error message explains the issue: @Schema
is not used on as a meta-annotation on your @DefaultDocs
annotation or on any other annotations on @DefaultDocs
(recursively within the "meta-annotation hierarchy/tree").
See the Explicit alias for attribute in meta-annotation
description in the Javadoc for @AliasFor
.
See also the Spring Annotation Programming Model documentation.