public interface ArgumentsMapper
| Modifier and Type | Method and Description |
|---|---|
default Map<String,Object> |
invocationArgumentToSwaggerArguments(SwaggerInvocation swaggerInvocation,
Map<String,Object> invocationArguments)
for scenes that consumer arguments not same to contract arguments, eg:
1.consumer: int add(QueryWrapper query)
class QueryWrapper {
public int x;
public int y;
}
contract: int add(int x, int y)
2.consumer: int add(InvocationContext context, int x, int y);
contract: int add(int x, int y)
3.consumer: int add(int x, int y)
contract: int add(BodyRequest body)
class BodyRequest {
public int x;
public int y;
}
notice:
no convert logic when map arguments
map arguments by name, DO NOT use duplicated contract argument names
|
default Map<String,Object> |
swaggerArgumentToInvocationArguments(SwaggerInvocation invocation,
Map<String,Object> swaggerArguments) |
default Map<String,Object> swaggerArgumentToInvocationArguments(SwaggerInvocation invocation, Map<String,Object> swaggerArguments)
default Map<String,Object> invocationArgumentToSwaggerArguments(SwaggerInvocation swaggerInvocation, Map<String,Object> invocationArguments)
for scenes that consumer arguments not same to contract arguments, eg:
1.consumer: int add(QueryWrapper query)
class QueryWrapper {
public int x;
public int y;
}
contract: int add(int x, int y)
2.consumer: int add(InvocationContext context, int x, int y);
contract: int add(int x, int y)
3.consumer: int add(int x, int y)
contract: int add(BodyRequest body)
class BodyRequest {
public int x;
public int y;
}
notice:
no convert logic when map arguments
map arguments by name, DO NOT use duplicated contract argument names
Copyright © 2017–2020 The Apache Software Foundation. All rights reserved.