Skip to content

Commit

Permalink
Add fix to properly check choices when given with certain types
Browse files Browse the repository at this point in the history
  • Loading branch information
yashpatel6 committed Sep 4, 2024
1 parent a4e99e0 commit 3454bc4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/schema/schema.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ schema {
path_types = ['Path']
custom_types = [:]

single_choice_types = [
'String',
'Path',
'Number',
'Integer'
]

/**
* Load the schema file.
Expand Down Expand Up @@ -211,6 +217,10 @@ schema {
} else if (properties.containsKey('choices')) {
schema.check_choices_singular(options, name, properties.choices)
}

if (properties.type in schema.single_choice_types && properties.containsKey('choices')) {
schema.check_choices_singular(options, name, properties.choices)
}
} else {
schema.check_default(options, name, properties)
schema.check_required(options, name, properties)
Expand Down

0 comments on commit 3454bc4

Please sign in to comment.