We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I mark a rest controller class as hidden (with @hidden annotation) to skip it while reading, but this have no affect.
This behavior is due to original class name wrapped into proxy by Spring boot default proxying mechanism CGLIB, so class name followed by "$$SpringCGLIB$$0" suffix. See code: https://github.com/springdoc/springdoc-openapi/blob/71a0684dc0eea2504f570aad90f5069319dfa061/springdoc-openapi-starter-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java#L303
public static boolean isHiddenRestControllers(Class<?> rawClass) { return HIDDEN_REST_CONTROLLERS.stream().anyMatch(clazz -> clazz.isAssignableFrom(rawClass)); }
The Solution is to get real class name, for example: org.springframework.util.ClassUtils.getUserClass(clazz).isAssignableFrom(rawClass)
org.springframework.util.ClassUtils.getUserClass(clazz).isAssignableFrom(rawClass)
The text was updated successfully, but these errors were encountered:
Annotation @hidden on rest controller class level doesn't work due to…
7a4d09e
… spring default proxying mechanism CGLIB. Fxies #2709
@alla-gofman,
Added the fix you are requesting. Can you validate it, at your end ?
Sorry, something went wrong.
No branches or pull requests
I mark a rest controller class as hidden (with @hidden annotation) to skip it while reading, but this have no affect.
This behavior is due to original class name wrapped into proxy by Spring boot default proxying mechanism CGLIB, so class name followed by "$$SpringCGLIB$$0" suffix.
See code:
https://github.com/springdoc/springdoc-openapi/blob/71a0684dc0eea2504f570aad90f5069319dfa061/springdoc-openapi-starter-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java#L303
public static boolean isHiddenRestControllers(Class<?> rawClass) { return HIDDEN_REST_CONTROLLERS.stream().anyMatch(clazz -> clazz.isAssignableFrom(rawClass)); }
The Solution is to get real class name, for example:
org.springframework.util.ClassUtils.getUserClass(clazz).isAssignableFrom(rawClass)
The text was updated successfully, but these errors were encountered: