Github user aledsage commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/810#discussion_r140309889
--- Diff:
rest/rest-api/src/main/java/org/apache/brooklyn/rest/domain/TypeDetail.java ---
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.brooklyn.rest.domain;
+
+import org.apache.brooklyn.api.typereg.RegisteredType;
+import
org.apache.brooklyn.api.typereg.RegisteredType.TypeImplementationPlan;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+public class TypeDetail extends TypeSummary {
+
+ public static class TypeImplementationPlanSummary {
+ @JsonInclude(value=Include.NON_EMPTY)
+ private String format;
+ private Object data;
+ private TypeImplementationPlanSummary() {}
+ private TypeImplementationPlanSummary(TypeImplementationPlan p) {
+ format = p.getPlanFormat();
+ data = p.getPlanData();
+ }
+ public String getFormat() {
+ return format;
+ }
+ public Object getData() {
+ return data;
+ }
+ }
+ private final TypeImplementationPlanSummary plan;
--- End diff --
I'd make this non-final, so that json-deserialization doesn't have to do
nasty stuff.
---