Skip to content

Commit

Permalink
Change dimension field reponse serilization from static to dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
garyluoex committed Jan 14, 2017
1 parent 5308c3c commit 36e92c0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public static Map<String, Object> getDimensionFullView(
resultRow.put("name", dimension.getApiName());
resultRow.put("longName", dimension.getLongName());
resultRow.put("description", dimension.getDescription());
resultRow.put("fields", getDimensionFieldListSummaryView(dimension.getDimensionFields()));
resultRow.put("fields", dimension.getDimensionFields());
resultRow.put("values", getDimensionValuesUrl(dimension, uriInfo));
resultRow.put("cardinality", dimension.getCardinality());
resultRow.put(
Expand All @@ -404,7 +404,10 @@ public static Map<String, Object> getDimensionFullView(
* @param dimensionFields Collection of dimension fields to get the summary view for
*
* @return Summary list view of the dimension fields
*
* @deprecated should be private, now the internal usage need is gone, will deprecate in case someone is using it
*/
@Deprecated
public static Set<Map<String, String>> getDimensionFieldListSummaryView(
Collection<DimensionField> dimensionFields
) {
Expand All @@ -419,7 +422,10 @@ public static Set<Map<String, String>> getDimensionFieldListSummaryView(
* @param dimensionField Dimension Field to get the view of
*
* @return Summary view of the dimension field
*
* @deprecated should be private, now the internal usage need is gone, will deprecate in case someone is using it
*/
@Deprecated
public static Map<String, String> getDimensionFieldSummaryView(DimensionField dimensionField) {
Map<String, String> resultRow = new LinkedHashMap<>();
resultRow.put("name", dimensionField.getName());
Expand Down
2 changes: 1 addition & 1 deletion fili-navi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
<type>test-jar</type>
</dependency>
</dependencies>
</project>
</project>
2 changes: 1 addition & 1 deletion fili-navi/src/main/resources/moduleConfig.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016 Yahoo Inc.
# Copyright 2017 Yahoo Inc.
# Licensed under the terms of the Apache license. Please see LICENSE.md file distributed with this work for terms.

#The name of this module (required)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class TaggedDimensionFieldSpec extends Specification {
dimensionField1.getDescription() == "testPrimaryKey description"
dimensionField1.getTags() == [PRIMARY_KEY]
dimensionField2.getTags() == []

}

def "Tagged dimension fields serialize as expected"() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016 Yahoo Inc.
# Copyright 2017 Yahoo Inc.
# Licensed under the terms of the Apache license. Please see LICENSE.md file distributed with this work for terms.

#The name of this module (required)
Expand Down

0 comments on commit 36e92c0

Please sign in to comment.