Search in sources :

Example 1 with ConsumerResponseMapper

use of io.servicecomb.swagger.invocation.response.consumer.ConsumerResponseMapper in project java-chassis by ServiceComb.

the class ConsumerSchemaFactory method createOperation.

protected void createOperation(ConsumerSchemaContext context, OperationMeta operationMeta, ConsumerArgumentsMapper argsMapper) {
    if (context.getConsumerOperationMap() == null) {
        return;
    }
    Method method = ReflectUtils.findMethod(context.getProviderClass(), operationMeta.getMethod().getName());
    ConsumerResponseMapper responseMapper = responseMapperFactory.createResponseMapper(method.getReturnType());
    ConsumerOperationMeta consumerOperationMeta = new ConsumerOperationMeta(operationMeta, argsMapper, responseMapper);
    context.getConsumerOperationMap().put(operationMeta.getMethod().getName(), consumerOperationMeta);
}
Also used : ConsumerResponseMapper(io.servicecomb.swagger.invocation.response.consumer.ConsumerResponseMapper) ConsumerOperationMeta(io.servicecomb.core.provider.consumer.ConsumerOperationMeta) Method(java.lang.reflect.Method)

Aggregations

ConsumerOperationMeta (io.servicecomb.core.provider.consumer.ConsumerOperationMeta)1 ConsumerResponseMapper (io.servicecomb.swagger.invocation.response.consumer.ConsumerResponseMapper)1 Method (java.lang.reflect.Method)1