fix(接口测试): 修复由于修改接口导入对example处理问题而产生的问题
--bug=1021408--user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001021408
This commit is contained in:
parent
474ea08815
commit
b15910316e
|
@ -330,7 +330,7 @@ public class Swagger3Parser extends SwaggerAbstractParser {
|
||||||
Set<String> refSet = new HashSet<>();
|
Set<String> refSet = new HashSet<>();
|
||||||
Map<String, Schema> infoMap = new HashMap();
|
Map<String, Schema> infoMap = new HashMap();
|
||||||
Schema schema = getSchema(mediaType.getSchema());
|
Schema schema = getSchema(mediaType.getSchema());
|
||||||
if (content.get(contentType).getExample() != null && schema.getExample() == null) {
|
if (content.get(contentType) != null && content.get(contentType).getExample() != null && schema.getExample() == null) {
|
||||||
schema.setExample(content.get(contentType).getExample());
|
schema.setExample(content.get(contentType).getExample());
|
||||||
}
|
}
|
||||||
Object bodyData = null;
|
Object bodyData = null;
|
||||||
|
|
Loading…
Reference in New Issue