Skip to content

Commit

Permalink
SHIBUI-1788
Browse files Browse the repository at this point in the history
corrected stripping whitespace from ref names
  • Loading branch information
chasegawa committed Jun 28, 2021
1 parent 3eb8549 commit 5db234d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ class JsonSchemaBuilderService {
void addRelyingPartyOverridesToJson(Object json) {
def properties = [:]
customPropertiesConfiguration.getOverrides().each {
def propertyName = ((String) it['name']).replaceAll("\\s","")
def property
if (it['displayType'] == 'list' || it['displayType'] == 'set' || it['displayType'] == 'selection_list') {
property = [$ref: '#/definitions/' + StringUtils.strip(it['name'])]
property = [$ref: '#/definitions/' + propertyName]
} else {
property =
[title : it['displayName'],
Expand All @@ -41,7 +42,7 @@ class JsonSchemaBuilderService {
default : it['displayType'] == 'boolean' ? Boolean.getBoolean(it['defaultValue']) : it['defaultValue'],
examples : it['examples']]
}
properties[(String) it['name']] = property
properties[propertyName] = property
}
json['properties'] = properties
}
Expand All @@ -66,7 +67,7 @@ class JsonSchemaBuilderService {


definition['items'] = items
json[StringUtils.strip((String) it['name'])] = definition
json[((String) it['name']).replaceAll("\\s","")] = definition
}
}

Expand Down

0 comments on commit 5db234d

Please sign in to comment.