Remove warning when type importer manually (#7264)

This commit is contained in:
Oleh Kurpiak 2020-08-24 15:20:51 +03:00 committed by GitHub
parent 8bd2dd4c9d
commit 1dc65f0033
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2076,7 +2076,9 @@ public class DefaultCodegen implements CodegenConfig {
} else if (isAnyTypeSchema(schema)) { } else if (isAnyTypeSchema(schema)) {
return "AnyType"; return "AnyType";
} else if (StringUtils.isNotEmpty(schema.getType())) { } else if (StringUtils.isNotEmpty(schema.getType())) {
LOGGER.warn("Unknown type found in the schema: " + schema.getType()); if (!importMapping.containsKey(schema.getType())) {
LOGGER.warn("Unknown type found in the schema: " + schema.getType());
}
return schema.getType(); return schema.getType();
} }
// The 'type' attribute has not been set in the OAS schema, which means the value // The 'type' attribute has not been set in the OAS schema, which means the value