| Interface | Description |
|---|---|
| ResponseMapperFactory<MAPPER> | |
| ResponseMetaMapper |
| Class | Description |
|---|---|
| Headers | |
| ResponseMapperFactorys<MAPPER> | |
| ResponsesMeta |
two Scenes:
1.consumer interface + swagger
interface declare success response type
and can declare exceptions response type by annotations
consumer interface meta never changed and has high priority
so, merge them to be one ResponsesMeta
2.restTemplate + swagger
can only declare success response type
and not stable
so, will wrap swagger meta
note:
old version support: List<User> users = restTemplate.postForObject(...., List.class)
in fact, in this time, type is determined by swagger meta
new version:
1) if request response type is List/Set/Map, and there is element type defined, then use swagger type,
2) other times use request response type
3) compare to old version, add support of ParameterizedTypeReference
|
Copyright © 2017–2020 The Apache Software Foundation. All rights reserved.