Search in sources :

Example 1 with ConsumerArgumentSame

use of io.servicecomb.swagger.invocation.arguments.consumer.ConsumerArgumentSame 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);
    }
}
Also used : ConsumerArgumentsMapper(io.servicecomb.swagger.invocation.arguments.consumer.ConsumerArgumentsMapper) ArrayList(java.util.ArrayList) ConsumerArgumentSame(io.servicecomb.swagger.invocation.arguments.consumer.ConsumerArgumentSame) ConsumerOperationMeta(io.servicecomb.core.provider.consumer.ConsumerOperationMeta) OperationMeta(io.servicecomb.core.definition.OperationMeta) ArgumentMapper(io.servicecomb.swagger.invocation.arguments.ArgumentMapper)

Aggregations

OperationMeta (io.servicecomb.core.definition.OperationMeta)1 ConsumerOperationMeta (io.servicecomb.core.provider.consumer.ConsumerOperationMeta)1 ArgumentMapper (io.servicecomb.swagger.invocation.arguments.ArgumentMapper)1 ConsumerArgumentSame (io.servicecomb.swagger.invocation.arguments.consumer.ConsumerArgumentSame)1 ConsumerArgumentsMapper (io.servicecomb.swagger.invocation.arguments.consumer.ConsumerArgumentsMapper)1 ArrayList (java.util.ArrayList)1