diff --git a/lib/src/core/definitions/data_schema.dart b/lib/src/core/definitions/data_schema.dart index 9ed6f4bc..ca9cc0b7 100644 --- a/lib/src/core/definitions/data_schema.dart +++ b/lib/src/core/definitions/data_schema.dart @@ -92,7 +92,8 @@ class DataSchema implements Serializable { json.parseDataSchemaArrayField("items", prefixMapping, parsedFields); final minItems = json.parseField("minItems", parsedFields); final maxItems = json.parseField("maxItems", parsedFields); - final required = json.parseField>("required", parsedFields); + final required = + json.parseArrayField("required", parsedFields: parsedFields); final minLength = json.parseField("minLength", parsedFields); final maxLength = json.parseField("maxLength", parsedFields); final pattern = json.parseField("pattern", parsedFields); diff --git a/lib/src/core/definitions/extensions/json_parser.dart b/lib/src/core/definitions/extensions/json_parser.dart index 1adb3f61..94b338c7 100644 --- a/lib/src/core/definitions/extensions/json_parser.dart +++ b/lib/src/core/definitions/extensions/json_parser.dart @@ -296,7 +296,7 @@ extension ParseField on Map { Set? parsedFields, ) { final fieldValue = - parseField>>(name, parsedFields); + parseArrayField>(name, parsedFields: parsedFields); return fieldValue ?.map((e) => DataSchema.fromJson(e, prefixMapping))