Skip to content

Commit

Permalink
[SHIBUI-905]
Browse files Browse the repository at this point in the history
A little Groovy cleanup.
  • Loading branch information
Bill Smith committed Oct 22, 2018
1 parent fa6a127 commit 8d6a433
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,10 @@ class MetadataSourcesUiDefinitionController {
ResponseEntity<?> getUiDefinitionJsonSchema() {
try {
def parsedJson = jacksonObjectMapper.readValue(this.jsonSchemaLocation.url, Map)
def widget = parsedJson["properties"]["attributeRelease"]["widget"]
def data = []
customAttributesConfiguration.getAttributes().each {
def attribute = [:]
attribute["key"] = it["name"]
attribute["label"] = it["displayName"]
data << attribute
parsedJson['properties']['attributeRelease']['widget']['data'] =
customAttributesConfiguration.getAttributes().collect {
[key: it['name'], label: it['displayName']]
}
widget["data"] = data
return ResponseEntity.ok(parsedJson)
}
catch (Exception e) {
Expand Down

0 comments on commit 8d6a433

Please sign in to comment.