blob: ebe761dc96f640d537590f281f14a33953ee0b9e [file] [log] [blame]
package {{apiPackage}};
import java.util.List;
{{#imports}}import {{import}};
{{/imports}}
import org.apache.servicecomb.provider.pojo.RpcReference;
import org.springframework.stereotype.Component;
{{#operations}}
@Component
public class {{classname}}Consumer{
@RpcReference(microserviceName = "{{microserviceName}}", schemaId = "{{#camelcase}}{{classname}}{{/camelcase}}")
private {{classname}} api;
{{#operation}}
public {{>returnTypes}} {{operationId}}({{#allParams}}{{>consumer/queryParamsConsumer}}{{>consumer/pathParamsConsumer}}{{>consumer/headerParamsConsumer}}{{>consumer/bodyParamsConsumer}}{{>consumer/formParamsConsumer}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) {
return api.{{operationId}}({{#allParams}}{{#isQueryParam}}{{paramName}}{{/isQueryParam}}{{#isPathParam}}{{paramName}}{{/isPathParam}}{{#isHeaderParam}}{{paramName}}{{/isHeaderParam}}{{#isBodyParam}}{{paramName}}{{/isBodyParam}}{{#isFormParam}}{{paramName}}{{/isFormParam}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
}
{{/operation}}
}
{{/operations}}