You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shows only endpoints that have "@RestController" or "@controller" annotation by default. If beans don´t have this annotation, spring don´t exposes it as controller, and beans that aren´t exposed as controller, dont appear in open api endpoint.
...
The text was updated successfully, but these errors were encountered:
You can reproduce issue/feature if execute com.github.ma3.controller.HelloControllerTest#givenFeignClient_whenGetAppApiDoc_thenFeignClientShouldNotAppear test method.
You can see the problem with SwaggerIU too:
NOTE: This is related with Spring actuator starter:
If you remove actuator dependency, client don´t appear and OpenApi is generated ok.
Thank you
migueltercero
changed the title
Feign clients that uses SpringMVCContract appears in OpenApi like controllers exposed
Feign clients that uses SpringMVCContract appears in OpenApi like controllers exposed if spring-boot-starter-actuator is in classpath
Aug 2, 2021
Describe the feature
If you use https://spring.io/projects/spring-cloud-openfeign and define
@FeingClients
with SpringMVCContract, SpringDoc shows this clients in OpenApi.The problem is that this clients uses same annotations that RestControllers (@RequestMapping, @GetMapping ...)
To Reproduce
Expected behavior
Solution
Posibles solutions:
annotationsToExclude
and passFeignClient.class
to excludeThe text was updated successfully, but these errors were encountered: