Open developerpat opened 5 years ago
package {{fallbackPackage}};
import org.springframework.stereotype.Component;
import {{package}}.{{classname}}Client;
@Component
public abstract class ClientFallback implements {{classname}}Client{
}
{{classname}} and {{package}} are empty in a supportfile. Can anybody help with this Problem?
Description
We have the following Situation: We generate a Feign Client with the OpenAPI-Generator. This produces following Code:
In the Feign client it is possible to set a fallback class which is executed when the external System is not reachable. This would look like this:
I couldn't find any configuration to set the fallback class.
openapi-generator version
OpenAPI declaration file content or url
/
Command line used for generation
/
Steps to reproduce
/
Related issues/PRs
/
Suggest a fix/enhancement
https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/JavaSpring/libraries/spring-cloud/apiClient.mustache
Please add ",fallback = ClientFallback.class" to the FeignClient annotation and "import {{fallback.package}}.ClientFallback".