Skip to content

Commit

Permalink
Merged in bug/shibui-2147 (pull request #536)
Browse files Browse the repository at this point in the history
Bug/shibui 2147

Approved-by: Bill Smith
Approved-by: Jonathan Johnson
  • Loading branch information
chasegawa authored and Jonathan Johnson committed Oct 12, 2021
2 parents 2f2b621 + ee364a2 commit cd5f011
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 cd5f011

Please sign in to comment.