aboutsummaryrefslogtreecommitdiffstats
path: root/aai-schema-gen/src/main
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-10-25 14:56:26 +0200
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-10-25 15:41:20 +0200
commit616e19c4fe775efd611500c23856af69287c0a15 (patch)
tree0ad8753e8e4983ae91d0b4220b3b5f8f8107a326 /aai-schema-gen/src/main
parente4b2c4461a1289e4be7bd533b983d658cb01a376 (diff)
Openapi file is incorrect for array fields
Issue-ID: AAI-4038 Change-Id: Ib429c413452be401b9a9bb27c62ef8a2ae51bccc Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'aai-schema-gen/src/main')
-rw-r--r--aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/YAMLfromOXM.java13
1 files changed, 11 insertions, 2 deletions
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 55767c3..577846c 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
@@ -451,8 +451,17 @@ public class YAMLfromOXM extends OxmFileProcessor {
System.out.println(
v + "-relationship added as array for getItemName null");
}
- sbProperties.append(" type: array\n items:\n");
- sbProperties.append(" $ref: \"#/definitions/")
+ // https://gitlab.devops.telekom.de/tnap/development/tesla-team/portal-tnap/portal-bff/-/merge_requests/542/diffs#c00bf90500eca6b5dfcf2b014e51dace6aafeeba
+ // type: object
+ // properties:
+ // itemName:
+ // type: array
+ // items:
+ // $ref: "#/definitions/itemName"
+ sbProperties.append(" type: object\n properties:\n");
+ sbProperties.append(" " + itemName + ":\n");
+ sbProperties.append(" type: array\n items:\n");
+ sbProperties.append(" $ref: \"#/definitions/")
.append("".equals(itemName) ? "inventory-item-data" : itemName)
.append("\"\n");
}