CDS attributes are not shown properly in UI

Handled for legacy and operational policy

Change-Id: I504c4aa2531b19b09965ad1dbc03c9944931f77b
Issue-ID: CLAMP-809
Signed-off-by: Vidyashree-Huawei <vidyashree.rama@huawei.com>
diff --git a/src/test/resources/tosca/operational-policy-json-schema.json b/src/test/resources/tosca/operational-policy-json-schema.json
index 6ab84a8..ffa88ec 100644
--- a/src/test/resources/tosca/operational-policy-json-schema.json
+++ b/src/test/resources/tosca/operational-policy-json-schema.json
@@ -99,6 +99,7 @@
                 "anyOf": [
                   {
                     "title": "APPC",
+                    "type": "object",
                     "properties": {
                       "actor": {
                         "title": "actor",
@@ -108,7 +109,7 @@
                           "hidden": true
                         }
                       },
-                      "type": {
+                      "recipe": {
                         "title": "recipe",
                         "type": "string",
                         "default": "",
@@ -129,6 +130,7 @@
                   },
                   {
                     "title": "SO",
+                    "type": "object",
                     "properties": {
                       "actor": {
                         "title": "actor",
@@ -138,7 +140,7 @@
                           "hidden": true
                         }
                       },
-                      "type": {
+                      "recipe": {
                         "title": "recipe",
                         "type": "string",
                         "default": "",
@@ -156,6 +158,7 @@
                   },
                   {
                     "title": "SDNC",
+                    "type": "object",
                     "properties": {
                       "actor": {
                         "title": "actor",
@@ -165,7 +168,7 @@
                           "hidden": true
                         }
                       },
-                      "type": {
+                      "recipe": {
                         "title": "recipe",
                         "type": "string",
                         "default": "",
@@ -183,6 +186,7 @@
                   },
                   {
                     "title": "VFC",
+                    "type": "object",
                     "properties": {
                       "actor": {
                         "title": "actor",
@@ -192,12 +196,9 @@
                           "hidden": true
                         }
                       },
-                      "type": {
+                      "recipe": {
                         "title": "recipe",
                         "type": "string",
-                        "required": [
-                          "payload"
-                        ],
                         "default": "",
                         "enum": [
                           "ModifyConfig"
@@ -212,6 +213,7 @@
                   },
                   {
                     "title": "CDS",
+                    "type": "object",
                     "properties": {
                       "actor": {
                         "title": "actor",
@@ -221,17 +223,21 @@
                           "hidden": true
                         }
                       },
-                      "type": {
+                      "recipe": {
                         "title": "recipe",
                         "type": "object",
-                        "required": [
-                          "payload"
-                        ],
                         "anyOf": [
                           {
                             "title": "user-defined",
+                            "type": "object",
                             "properties": {
-                              "type": {
+                              "recipe": {
+                                "title": "recipe",
+                                "type": "string",
+                                "default": "user-defined",
+                                "format": "textarea"
+                              },
+                              "payload": {
                                 "title": "Payload (YAML)",
                                 "type": "string",
                                 "default": "",
@@ -241,67 +247,505 @@
                           },
                           {
                             "title": "resource-assignment",
+                            "type": "object",
                             "properties": {
-                              "type": {
-                                "title": "Payload (YAML)",
+                              "recipe": {
+                                "title": "recipe",
                                 "type": "string",
-                                "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027",
-                                "format": "textarea"
+                                "default": "resource-assignment",
+                                "options": {
+                                  "hidden": true
+                                }
+                              },
+                              "payload": {
+                                "title": "Payload (YAML)",
+                                "type": "object",
+                                "properties": {
+                                  "artifact_name": {
+                                    "title": "artifact name",
+                                    "type": "string",
+                                    "default": "baseconfiguration",
+                                    "readOnly": "True"
+                                  },
+                                  "artifact_version": {
+                                    "title": "artifact version",
+                                    "type": "string",
+                                    "default": "1.0.0",
+                                    "readOnly": "True"
+                                  },
+                                  "mode": {
+                                    "title": "mode",
+                                    "type": "string",
+                                    "default": "async",
+                                    "format": "textarea"
+                                  },
+                                  "data": {
+                                    "title": "data",
+                                    "properties": {
+                                      "resource-assignment-properties": {
+                                        "title": "resource-assignment-properties",
+                                        "type": "object",
+                                        "properties": {
+                                          "request-id": {
+                                            "title": "request-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "service-instance-id": {
+                                            "title": "service-instance-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf-id": {
+                                            "title": "vnf-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "action-name": {
+                                            "title": "action-name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "scope-type": {
+                                            "title": "scope-type",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "hostname": {
+                                            "title": "hostname",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf_name": {
+                                            "title": "vnf_name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          }
+                                        }
+                                      }
+                                    }
+                                  }
+                                }
                               }
                             }
                           },
                           {
                             "title": "activate",
+                            "type": "object",
                             "properties": {
-                              "type": {
-                                "title": "Payload (YAML)",
+                              "recipe": {
+                                "title": "recipe",
                                 "type": "string",
-                                "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027",
-                                "format": "textarea"
+                                "default": "activate",
+                                "options": {
+                                  "hidden": true
+                                }
+                              },
+                              "payload": {
+                                "title": "Payload (YAML)",
+                                "type": "object",
+                                "properties": {
+                                  "artifact_name": {
+                                    "title": "artifact name",
+                                    "type": "string",
+                                    "default": "baseconfiguration",
+                                    "readOnly": "True"
+                                  },
+                                  "artifact_version": {
+                                    "title": "artifact version",
+                                    "type": "string",
+                                    "default": "1.0.0",
+                                    "readOnly": "True"
+                                  },
+                                  "mode": {
+                                    "title": "mode",
+                                    "type": "string",
+                                    "default": "async",
+                                    "format": "textarea"
+                                  },
+                                  "data": {
+                                    "title": "data",
+                                    "properties": {
+                                      "resource-assignment-properties": {
+                                        "title": "resource-assignment-properties",
+                                        "type": "object",
+                                        "properties": {
+                                          "request-id": {
+                                            "title": "request-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "service-instance-id": {
+                                            "title": "service-instance-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf-id": {
+                                            "title": "vnf-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "action-name": {
+                                            "title": "action-name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "scope-type": {
+                                            "title": "scope-type",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "hostname": {
+                                            "title": "hostname",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf_name": {
+                                            "title": "vnf_name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          }
+                                        }
+                                      }
+                                    }
+                                  }
+                                }
                               }
                             }
                           },
                           {
                             "title": "activate-restconf",
+                            "type": "object",
                             "properties": {
-                              "type": {
-                                "title": "Payload (YAML)",
+                              "recipe": {
+                                "title": "recipe",
                                 "type": "string",
-                                "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027",
-                                "format": "textarea"
+                                "default": "activate-restconf",
+                                "options": {
+                                  "hidden": true
+                                }
+                              },
+                              "payload": {
+                                "title": "Payload (YAML)",
+                                "type": "object",
+                                "properties": {
+                                  "artifact_name": {
+                                    "title": "artifact name",
+                                    "type": "string",
+                                    "default": "baseconfiguration",
+                                    "readOnly": "True"
+                                  },
+                                  "artifact_version": {
+                                    "title": "artifact version",
+                                    "type": "string",
+                                    "default": "1.0.0",
+                                    "readOnly": "True"
+                                  },
+                                  "mode": {
+                                    "title": "mode",
+                                    "type": "string",
+                                    "default": "async",
+                                    "format": "textarea"
+                                  },
+                                  "data": {
+                                    "title": "data",
+                                    "properties": {
+                                      "resource-assignment-properties": {
+                                        "title": "resource-assignment-properties",
+                                        "type": "object",
+                                        "properties": {
+                                          "request-id": {
+                                            "title": "request-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "service-instance-id": {
+                                            "title": "service-instance-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf-id": {
+                                            "title": "vnf-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "action-name": {
+                                            "title": "action-name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "scope-type": {
+                                            "title": "scope-type",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "hostname": {
+                                            "title": "hostname",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf_name": {
+                                            "title": "vnf_name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          }
+                                        }
+                                      }
+                                    }
+                                  }
+                                }
                               }
                             }
                           },
                           {
                             "title": "activate-cli",
+                            "type": "object",
                             "properties": {
-                              "type": {
-                                "title": "Payload (YAML)",
+                              "recipe": {
+                                "title": "recipe",
                                 "type": "string",
-                                "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027",
-                                "format": "textarea"
+                                "default": "activate-cli",
+                                "options": {
+                                  "hidden": true
+                                }
+                              },
+                              "payload": {
+                                "title": "Payload (YAML)",
+                                "type": "object",
+                                "properties": {
+                                  "artifact_name": {
+                                    "title": "artifact name",
+                                    "type": "string",
+                                    "default": "baseconfiguration",
+                                    "readOnly": "True"
+                                  },
+                                  "artifact_version": {
+                                    "title": "artifact version",
+                                    "type": "string",
+                                    "default": "1.0.0",
+                                    "readOnly": "True"
+                                  },
+                                  "mode": {
+                                    "title": "mode",
+                                    "type": "string",
+                                    "default": "async",
+                                    "format": "textarea"
+                                  },
+                                  "data": {
+                                    "title": "data",
+                                    "properties": {
+                                      "resource-assignment-properties": {
+                                        "title": "resource-assignment-properties",
+                                        "type": "object",
+                                        "properties": {
+                                          "request-id": {
+                                            "title": "request-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "service-instance-id": {
+                                            "title": "service-instance-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf-id": {
+                                            "title": "vnf-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "action-name": {
+                                            "title": "action-name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "scope-type": {
+                                            "title": "scope-type",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "hostname": {
+                                            "title": "hostname",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf_name": {
+                                            "title": "vnf_name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          }
+                                        }
+                                      }
+                                    }
+                                  }
+                                }
                               }
                             }
                           },
                           {
                             "title": "assign-activate",
+                            "type": "object",
                             "properties": {
-                              "type": {
-                                "title": "Payload (YAML)",
+                              "recipe": {
+                                "title": "recipe",
                                 "type": "string",
-                                "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027",
-                                "format": "textarea"
+                                "default": "assign-activate",
+                                "options": {
+                                  "hidden": true
+                                }
+                              },
+                              "payload": {
+                                "title": "Payload (YAML)",
+                                "type": "object",
+                                "properties": {
+                                  "artifact_name": {
+                                    "title": "artifact name",
+                                    "type": "string",
+                                    "default": "baseconfiguration",
+                                    "readOnly": "True"
+                                  },
+                                  "artifact_version": {
+                                    "title": "artifact version",
+                                    "type": "string",
+                                    "default": "1.0.0",
+                                    "readOnly": "True"
+                                  },
+                                  "mode": {
+                                    "title": "mode",
+                                    "type": "string",
+                                    "default": "async",
+                                    "format": "textarea"
+                                  },
+                                  "data": {
+                                    "title": "data",
+                                    "properties": {
+                                      "resource-assignment-properties": {
+                                        "title": "resource-assignment-properties",
+                                        "type": "object",
+                                        "properties": {
+                                          "request-id": {
+                                            "title": "request-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "service-instance-id": {
+                                            "title": "service-instance-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf-id": {
+                                            "title": "vnf-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "action-name": {
+                                            "title": "action-name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "scope-type": {
+                                            "title": "scope-type",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "hostname": {
+                                            "title": "hostname",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf_name": {
+                                            "title": "vnf_name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          }
+                                        }
+                                      }
+                                    }
+                                  }
+                                }
                               }
                             }
                           },
                           {
                             "title": "imperative-test-wf",
+                            "type": "object",
                             "properties": {
-                              "type": {
-                                "title": "Payload (YAML)",
+                              "recipe": {
+                                "title": "recipe",
                                 "type": "string",
-                                "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027",
-                                "format": "textarea"
+                                "default": "imperative-test-wf",
+                                "options": {
+                                  "hidden": true
+                                }
+                              },
+                              "payload": {
+                                "title": "Payload (YAML)",
+                                "type": "object",
+                                "properties": {
+                                  "artifact_name": {
+                                    "title": "artifact name",
+                                    "type": "string",
+                                    "default": "baseconfiguration",
+                                    "readOnly": "True"
+                                  },
+                                  "artifact_version": {
+                                    "title": "artifact version",
+                                    "type": "string",
+                                    "default": "1.0.0",
+                                    "readOnly": "True"
+                                  },
+                                  "mode": {
+                                    "title": "mode",
+                                    "type": "string",
+                                    "default": "async",
+                                    "format": "textarea"
+                                  },
+                                  "data": {
+                                    "title": "data",
+                                    "properties": {
+                                      "resource-assignment-properties": {
+                                        "title": "resource-assignment-properties",
+                                        "type": "object",
+                                        "properties": {
+                                          "request-id": {
+                                            "title": "request-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "service-instance-id": {
+                                            "title": "service-instance-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf-id": {
+                                            "title": "vnf-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "action-name": {
+                                            "title": "action-name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "scope-type": {
+                                            "title": "scope-type",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "hostname": {
+                                            "title": "hostname",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf_name": {
+                                            "title": "vnf_name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          }
+                                        }
+                                      }
+                                    }
+                                  }
+                                }
                               }
                             }
                           }
@@ -731,4 +1175,4 @@
       }
     }
   }
-}
\ No newline at end of file
+}