use of io.servicecomb.swagger.invocation.arguments.ArgumentMapper in project java-chassis by ServiceComb.
the class ConsumerSchemaFactory method mapSameIntfParameters.
protected void mapSameIntfParameters(ConsumerSchemaContext context) {
for (OperationMeta operationMeta : context.getSchemaMeta().getOperations()) {
List<ArgumentMapper> consumerArgMapperList = new ArrayList<>();
int swaggerParameterCount = operationMeta.getSwaggerOperation().getParameters().size();
for (int idx = 0; idx < swaggerParameterCount; idx++) {
ConsumerArgumentSame argMapper = new ConsumerArgumentSame(idx, idx);
consumerArgMapperList.add(argMapper);
}
ConsumerArgumentsMapper argsMapper = new ConsumerArgumentsMapper(consumerArgMapperList, swaggerParameterCount);
createOperation(context, operationMeta, argsMapper);
}
}
use of io.servicecomb.swagger.invocation.arguments.ArgumentMapper in project java-chassis by ServiceComb.
the class ConsumerArgumentsMapper method toInvocation.
public void toInvocation(Object[] consumerArguments, SwaggerInvocation invocation) {
Object[] swaggerArguments = new Object[swaggerParameterCount];
invocation.setSwaggerArguments(swaggerArguments);
for (ArgumentMapper argMapper : consumerArgMapperList) {
argMapper.mapArgument(invocation, consumerArguments);
}
}
Aggregations