aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Forsyth <jf2512@att.com>2019-04-10 17:15:37 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-10 17:15:37 +0000
commit83a0651672b102db6bc18373445a8187d95a17ac (patch)
tree659aa53523696411cda6be354137899057d960af
parent05f3be19c2ec4357f005bdfc4e3ee19196190b1c (diff)
parent01058c2d8d4916e39f2388016e473f93b0a40566 (diff)
Merge "Include all nodes API in swagger"
-rw-r--r--aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/NodeGetOperation.java13
-rw-r--r--aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/NodesYAMLfromOXMTest.java23
2 files changed, 23 insertions, 13 deletions
diff --git a/aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/NodeGetOperation.java b/aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/NodeGetOperation.java
index b0961c3..8c8f844 100644
--- a/aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/NodeGetOperation.java
+++ b/aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/NodeGetOperation.java
@@ -111,19 +111,6 @@ public class NodeGetOperation {
return "";
}
StringBuffer pathSb = new StringBuffer();
- //Drop out the operations with multiple path parameters
- if(CRUDpath.lastIndexOf('{') > CRUDpath.indexOf('{') && StringUtils.isNotEmpty(pathParams)) {
- return "";
- }
- if(path.lastIndexOf('{') > path.indexOf('{') ) {
- return "";
- }
- //trim leading path elements before the current node type
-// int loc = path.indexOf(xmlRootElementName);
-// if(loc > 0) {
-// path = "/nodes/"+path.substring(loc);
-// }
- //append generic parameter syntax to all plural queries
if(path.indexOf('{') == -1) {
path += "?parameter=value[&parameter2=value2]";
}
diff --git a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/NodesYAMLfromOXMTest.java b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/NodesYAMLfromOXMTest.java
index e352b08..f926b40 100644
--- a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/NodesYAMLfromOXMTest.java
+++ b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/NodesYAMLfromOXMTest.java
@@ -341,6 +341,29 @@ public class NodesYAMLfromOXMTest {
sb.append(" description:\n");
sb.append(" required: false\n");
sb.append(" type: string\n");
+ sb.append(" /nodes/service-subscriptions/service-subscription/{service-type}:\n");
+ sb.append(" get:\n");
+ sb.append(" tags:\n");
+ sb.append(" - Operations\n");
+ sb.append(" summary: returns service-subscription\n");
+ sb.append(" description: returns service-subscription\n");
+ sb.append(" operationId: getBusinessCustomersCustomerServiceSubscriptionsServiceSubscription\n");
+ sb.append(" produces:\n");
+ sb.append(" - application/json\n");
+ sb.append(" - application/xml\n");
+ sb.append(" responses:\n");
+ sb.append(" \"200\":\n");
+ sb.append(" description: successful operation\n");
+ sb.append(" schema:\n");
+ sb.append(" $ref: \"#/definitions/service-subscription\"\n");
+ sb.append(" \"default\":\n");
+ sb.append(" null\n parameters:\n");
+ sb.append(" - name: service-type\n");
+ sb.append(" in: path\n");
+ sb.append(" description: Value defined by orchestration to identify this service.\n");
+ sb.append(" required: true\n");
+ sb.append(" type: string\n");
+ sb.append(" example: __SERVICE-TYPE__\n");
sb.append(" /nodes/service-subscriptions?parameter=value[&parameter2=value2]:\n");
sb.append(" get:\n");
sb.append(" tags:\n");