Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/src/json_schema/utils/type_validators.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class TypeValidators {

static List uniqueList(String key, dynamic value) {
int i = 0;
final List enumValues = TypeValidators.nonEmptyList(key, value);
final List enumValues = TypeValidators.list(key, value);
for (final _ in enumValues) {
for (int j = i + 1; j < enumValues.length; j++) {
if (DeepCollectionEquality().equals(enumValues[i], enumValues[j])) {
Expand Down
4 changes: 0 additions & 4 deletions test/custom/invalid_schemas/draft4/enum.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
"description" : "enum: must be an array - not object",
"schema" : { "enum" : {} }
},
{
"description" : "enum: must be a non-empty array",
"schema" : { "enum" : [] }
},
{
"description" : "enum: elements must be unique",
"schema" : { "enum" : [3,4,3] }
Expand Down