Skip to content

Commit

Permalink
Merge branch 'bug/shibui-2147' into feature/shibui-2126
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Smith committed Oct 7, 2021
2 parents 62fa09a + dc31ada commit 17d9663
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@ class JsonSchemaBuilderService {
def definition = [title : it['displayName'],
description: it['helpText'],
type : 'array']
if (it['displayType'] == 'set' || it['displayType'] == 'selection_list') {
definition['uniqueItems'] = true
} else if (it['displayType'] == 'list') {
definition['uniqueItems'] = false
}
def items = [type : 'string',
minLength: 1, // TODO: should this be configurable?
maxLength: 255] //TODO: or this?
items.examples = it['examples']
if (it['displayType'] == 'set' || it['displayType'] == 'list') {
definition['uniqueItems'] = true
items.examples = it['examples']
} else if (it['displayType'] == 'selection_list') {
definition['uniqueItems'] = false
items.enum = it['examples']
}
items['default'] = it['defaultValue']


definition['items'] = items
json[(String) it['name']] = definition
Expand Down

0 comments on commit 17d9663

Please sign in to comment.