aboutsummaryrefslogtreecommitdiffstats
path: root/aai-schema-gen/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'aai-schema-gen/src/main')
-rw-r--r--aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/NodesYAMLfromOXM.java5
-rw-r--r--aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/YAMLfromOXM.java5
2 files changed, 6 insertions, 4 deletions
diff --git a/aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/NodesYAMLfromOXM.java b/aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/NodesYAMLfromOXM.java
index 8a06c37..4f1996d 100644
--- a/aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/NodesYAMLfromOXM.java
+++ b/aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/NodesYAMLfromOXM.java
@@ -246,9 +246,9 @@ public class NodesYAMLfromOXM extends OxmFileProcessor {
private String getDictionary(String resource) {
StringBuilder dictSb = new StringBuilder();
dictSb.append(" ").append(resource).append(":\n");
+ dictSb.append(" type: object\n");
dictSb.append(" description: |\n");
dictSb.append(" dictionary of ").append(resource).append("\n");
- dictSb.append(" type: object\n");
dictSb.append(" properties:\n");
dictSb.append(" ").append(resource).append(":\n");
dictSb.append(" type: array\n");
@@ -408,7 +408,6 @@ public class NodesYAMLfromOXM extends OxmFileProcessor {
sbProperties.append(" ").append(getXmlRootElementName(addType))
.append(":\n");
if ("RelationshipList".equals(addType)) {
- sbProperties.append(" type: object\n");
sbProperties.append(" $ref: \"#/definitions/").append(itemName)
.append("\"\n");
} else {
@@ -515,6 +514,8 @@ public class NodesYAMLfromOXM extends OxmFileProcessor {
} else if (xmlRootElementName.equals("relationship")) {
definitionsSb.append(" " + "relationship-dict" + ":\n");
definitionsLocalSb.append(" " + "relationship-dict" + ":\n");
+ definitionsSb.append(" type: object\n");
+ definitionsLocalSb.append(" type: object\n");
dict = getDictionary(xmlRootElementName);
} else {
definitionsSb.append(" ").append(xmlRootElementName).append(":\n");
diff --git a/aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/YAMLfromOXM.java b/aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/YAMLfromOXM.java
index 1b746d5..71baa9c 100644
--- a/aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/YAMLfromOXM.java
+++ b/aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/YAMLfromOXM.java
@@ -250,9 +250,9 @@ public class YAMLfromOXM extends OxmFileProcessor {
private String getDictionary(String resource) {
StringBuilder dictSb = new StringBuilder();
dictSb.append(" ").append(resource).append(":\n");
+ dictSb.append(" type: object\n");
dictSb.append(" description: |\n");
dictSb.append(" dictionary of ").append(resource).append("\n");
- dictSb.append(" type: object\n");
dictSb.append(" properties:\n");
dictSb.append(" ").append(resource).append(":\n");
dictSb.append(" type: array\n");
@@ -437,7 +437,6 @@ public class YAMLfromOXM extends OxmFileProcessor {
sbProperties.append(" ").append(getXmlRootElementName(addType))
.append(":\n");
if ("RelationshipList".equals(addType)) {
- sbProperties.append(" type: object\n");
sbProperties.append(" $ref: \"#/definitions/").append(itemName)
.append("\"\n");
sbPropertiesPatch.append(" ")
@@ -553,6 +552,8 @@ public class YAMLfromOXM extends OxmFileProcessor {
} else if (xmlRootElementName.equals("relationship")) {
definitionsSb.append(" " + "relationship-dict" + ":\n");
definitionsLocalSb.append(" " + "relationship-dict" + ":\n");
+ definitionsSb.append(" type: object\n");
+ definitionsLocalSb.append(" type: object\n");
dict = getDictionary(xmlRootElementName);
} else {
definitionsSb.append(" ").append(xmlRootElementName).append(":\n");