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
Is your feature request related to a problem? Please describe.
I'm using the spring generator with the library option set to spring-cloud to generate Feign clients. While the generated clients support specifying a configuration class, they do not currently support setting fallback or fallbackFactory.
This limitation makes it difficult to apply fallback logic, which is essential for resilience in production environments. Although many customizations can be handled via configuration classes or application.properties, fallback behavior seems to be an exception.
Describe the solution you'd like
It would be helpful if the generator could support specifying fallback and/or fallbackFactory for Feign clients in the generated code. Ideally, this could be handled via generator options or annotations, allowing users to plug in their custom fallback implementations easily.
Describe alternatives you've considered
Currently, I need to manually modify the generated code to set the fallback or fallbackFactory, which undermines the purpose of code generation. Other workarounds, such as programmatically wrapping the client, are more complex and not ideal.
Additional context
Feign provides a very convenient client abstraction, and when using OpenAPI + Java + Spring, it is a strong candidate for client generation. However, the lack of fallback support in the generated code is a blocker for production usage in many cases where resilience is critical.
There was also a similar request made in the past here: #1396
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I'm using the
spring
generator with thelibrary
option set tospring-cloud
to generate Feign clients. While the generated clients support specifying a configuration class, they do not currently support settingfallback
orfallbackFactory
.This limitation makes it difficult to apply fallback logic, which is essential for resilience in production environments. Although many customizations can be handled via configuration classes or
application.properties
, fallback behavior seems to be an exception.Describe the solution you'd like
It would be helpful if the generator could support specifying
fallback
and/orfallbackFactory
for Feign clients in the generated code. Ideally, this could be handled via generator options or annotations, allowing users to plug in their custom fallback implementations easily.Describe alternatives you've considered
Currently, I need to manually modify the generated code to set the fallback or fallbackFactory, which undermines the purpose of code generation. Other workarounds, such as programmatically wrapping the client, are more complex and not ideal.
Additional context
Feign provides a very convenient client abstraction, and when using OpenAPI + Java + Spring, it is a strong candidate for client generation. However, the lack of fallback support in the generated code is a blocker for production usage in many cases where resilience is critical.
There was also a similar request made in the past here: #1396
The text was updated successfully, but these errors were encountered: