Skip to content

Commit

Permalink
Fixed json-schema builder
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Jun 18, 2021
1 parent 12c04f0 commit f11db6a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ class JsonSchemaBuilderService {
}.each {
def definition = [title : it['displayName'],
description: it['helpText'],
type : 'array',
default : it['defaultValue']]
type : 'array']
if (it['displayType'] == 'set' || it['displayType'] == 'selection_list') {
definition['uniqueItems'] = true
} else if (it['displayType'] == 'list') {
Expand All @@ -61,10 +60,10 @@ class JsonSchemaBuilderService {
minLength: 1, // TODO: should this be configurable?
maxLength: 255] //TODO: or this?
items.examples = it['examples']
items['default'] = it['defaultValue']


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

0 comments on commit f11db6a

Please sign in to comment.