schema-service processing for v19
[aai/schema-service.git] / aai-schema-gen / src / main / java / org / onap / aai / schemagen / genxsd / NodesYAMLfromOXM.java
index 9ff0fa3..e75be8f 100644 (file)
@@ -87,8 +87,12 @@ public class NodesYAMLfromOXM extends OxmFileProcessor {
                 + "apidocs/aai_swagger_" + v.toString() + ".diff)");
         }
         sb.append(
-            DOUBLE_LINE_SEPARATOR + "    Copyright © 2017-18 AT&T Intellectual Property. All rights reserved.\n\n    Licensed under the Creative Commons License, Attribution 4.0 Intl. (the "License"); you may not use this documentation except in compliance with the License." + DOUBLE_LINE_SEPARATOR + "    You may obtain a copy of the License at\n\n    (https://creativecommons.org/licenses/by/4.0/)" + DOUBLE_LINE_SEPARATOR + "    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.\n\n    This document is best viewed with Firefox or Chrome. Nodes can be found by appending /#/definitions/node-type-to-find to the path to this document. Edge definitions can be found with the node definitions." + LINE_SEPARATOR + "  version: \""
-                + v.toString() + "\"" + LINE_SEPARATOR );
+            DOUBLE_LINE_SEPARATOR + "    Copyright © 2017-18 AT&T Intellectual Property. All rights reserved." + OxmFileProcessor.DOUBLE_LINE_SEPARATOR + "    Licensed under the Creative Commons License, Attribution 4.0 Intl. (the "License"); you may not use this documentation except in compliance with the License." + DOUBLE_LINE_SEPARATOR + "    You may obtain a copy of the License at\n\n    (https://creativecommons.org/licenses/by/4.0/)" + DOUBLE_LINE_SEPARATOR + "    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." + OxmFileProcessor.DOUBLE_LINE_SEPARATOR + "    This document is best viewed with Firefox or Chrome. ");
+        sb.append(
+                       "Nodes can be found by opening the models link below and finding the node-type. ");
+        sb.append(
+                "Edge definitions can be found with the node definitions." + LINE_SEPARATOR + "  version: \""
+                    + v.toString() + "\"" + LINE_SEPARATOR );
         sb.append("  title: Active and Available Inventory REST API" + LINE_SEPARATOR);
         sb.append(
             "  license:" + LINE_SEPARATOR + "    name: Apache 2.0" + LINE_SEPARATOR + "    url: http://www.apache.org/licenses/LICENSE-2.0.html" + LINE_SEPARATOR);
@@ -257,6 +261,7 @@ public class NodesYAMLfromOXM extends OxmFileProcessor {
         String pathDescriptionProperty = javaType.getPathDescriptionProperty();
         String container = javaType.getContainerProperty();
         Vector<String> indexedProps = javaType.getIndexedProps();
+        Vector<String> dslStartNodeProps = javaType.getDslStartNodeProps();
         Vector<String> containerProps = new Vector<String>();
         if (container != null) {
             logger.debug("javaTypeName " + javaTypeName + " container:" + container
@@ -324,7 +329,8 @@ public class NodesYAMLfromOXM extends OxmFileProcessor {
                 NodeGetOperation.addContainerProps(container, containerProps);
             }
             if (xmlElementElement.isStandardType()) {
-                sbProperties.append(xmlElementElement.getTypePropertyYAML());
+               boolean isDslStartNode = dslStartNodeProps.contains(xmlElementElement.getAttribute("name"));
+                sbProperties.append(xmlElementElement.getTypePropertyYAML(isDslStartNode));
                 ++propertyCnt;
             }