fix(接口测试): swagger文件导入问题

--user=郭雨琦
--bug=1015323
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001015323
This commit is contained in:
guoyuqi 2022-07-25 15:58:43 +08:00 committed by xiaomeinvG
parent 0ec18cbf38
commit 75a9d76daf
1 changed files with 1 additions and 1 deletions

View File

@ -456,7 +456,7 @@ public class Swagger3Parser extends SwaggerAbstractParser {
private JsonSchemaItem parseSchema(Schema schema, Set<String> refSet) {
if (schema == null) return null;
if (StringUtils.isBlank(schema.get$ref()) && schema.getProperties() == null && refSet.isEmpty()) {
if (StringUtils.isBlank(schema.get$ref()) && schema.getProperties() == null && refSet.isEmpty() && schema.getExample() == null) {
return null;
}
JsonSchemaItem item = new JsonSchemaItem();