From a8ce62a3bae5976982f6d1432723251a414e2878 Mon Sep 17 00:00:00 2001 From: "LaMont, William(wl2432)" Date: Fri, 12 Jun 2020 13:35:23 -0400 Subject: v20 support in schema-service without javafx Issue-ID: AAI-2930 Change-Id: I68ba45069f465988e21602521e8e665cb27318d1 Signed-off-by: LaMont, William(wl2432) --- .../org/onap/aai/schemagen/genxsd/NodesYAMLfromOXMTest.java | 2 +- .../java/org/onap/aai/schemagen/genxsd/PatchOperationTest.java | 4 ++-- .../java/org/onap/aai/schemagen/genxsd/PutOperationTest.java | 4 ++-- .../java/org/onap/aai/schemagen/genxsd/YAMLfromOXMTest.java | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'aai-schema-gen/src/test') 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 9ad16d6..2207a90 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 @@ -252,7 +252,7 @@ public class NodesYAMLfromOXMTest { sb.append("info:" + OxmFileProcessor.LINE_SEPARATOR); sb.append(" description: |\n"); sb.append("\n"); - sb.append(" [Differences versus the previous schema version](apidocs/aai_swagger_v11.diff)" + OxmFileProcessor.DOUBLE_LINE_SEPARATOR); + sb.append(" [Differences versus the previous schema version](apidocs/aai/aai_swagger_v11.diff)" + OxmFileProcessor.DOUBLE_LINE_SEPARATOR); sb.append(" Copyright © 2017-18 AT&T Intellectual Property. All rights reserved." + OxmFileProcessor.DOUBLE_LINE_SEPARATOR); sb.append(" Licensed under the Creative Commons License, Attribution 4.0 Intl. (the "License"); you may not use this documentation except in compliance with the License." + OxmFileProcessor.DOUBLE_LINE_SEPARATOR); sb.append(" You may obtain a copy of the License at\n"); diff --git a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/PatchOperationTest.java b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/PatchOperationTest.java index e36d520..4fc1c84 100644 --- a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/PatchOperationTest.java +++ b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/PatchOperationTest.java @@ -45,7 +45,7 @@ public class PatchOperationTest { @Parameters public static Collection testConditions() { String inputs [][] = { - {"NetworkGenericVnfsGenericVnf","generic-vnf","Network","/network/generic-vnfs/generic-vnf/{vnf-id}"," - name: vnf-id\n in: path\n description: Unique id of VNF. This is unique across the graph.\n required: true\n type: string\n example: __VNF-ID__"," patch:\n tags:\n - Network\n summary: update an existing generic-vnf\n description: |\n Update an existing generic-vnf\n #\n Note: Endpoints that are not devoted to object relationships support both PUT and PATCH operations.\n The PUT operation will entirely replace an existing object.\n The PATCH operation sends a \"description of changes\" for an existing object. The entire set of changes must be applied. An error result means no change occurs.\n #\n Other differences between PUT and PATCH are:\n #\n - For PATCH, you can send any of the values shown in sample REQUEST body. There are no required values.\n - For PATCH, resource-id which is a required REQUEST body element for PUT, must not be sent.\n - PATCH cannot be used to update relationship elements; there are dedicated PUT operations for this.\n operationId: UpdateNetworkGenericVnfsGenericVnf\n consumes:\n - application/json\n produces:\n - application/json\n responses:\n \"default\":\n null parameters:\n - name: vnf-id\n in: path\n description: Unique id of VNF. This is unique across the graph.\n required: true\n type: string\n example: __VNF-ID__ - name: body\n in: body\n description: generic-vnf object that needs to be updated.[See Examples](apidocs/relations/v16/NetworkGenericVnfsGenericVnf.json)\n required: true\n schema:\n $ref: \"#/definitions/generic-vnf\"\n"}, + {"NetworkGenericVnfsGenericVnf","generic-vnf","Network","/network/generic-vnfs/generic-vnf/{vnf-id}"," - name: vnf-id\n in: path\n description: Unique id of VNF. This is unique across the graph.\n required: true\n type: string\n example: __VNF-ID__"," patch:\n tags:\n - Network\n summary: update an existing generic-vnf\n description: |\n Update an existing generic-vnf\n #\n Note: Endpoints that are not devoted to object relationships support both PUT and PATCH operations.\n The PUT operation will entirely replace an existing object.\n The PATCH operation sends a \"description of changes\" for an existing object. The entire set of changes must be applied. An error result means no change occurs.\n #\n Other differences between PUT and PATCH are:\n #\n - For PATCH, you can send any of the values shown in sample REQUEST body. There are no required values.\n - For PATCH, resource-id which is a required REQUEST body element for PUT, must not be sent.\n - PATCH cannot be used to update relationship elements; there are dedicated PUT operations for this.\n operationId: UpdateNetworkGenericVnfsGenericVnf\n consumes:\n - application/json\n produces:\n - application/json\n responses:\n \"default\":\n null parameters:\n - name: vnf-id\n in: path\n description: Unique id of VNF. This is unique across the graph.\n required: true\n type: string\n example: __VNF-ID__ - name: body\n in: body\n description: generic-vnf object that needs to be updated.[See Examples](apidocs/aai/relations/v16/NetworkGenericVnfsGenericVnf.json)\n required: true\n schema:\n $ref: \"#/definitions/generic-vnf\"\n"}, // if ( StringUtils.isEmpty(tag) ) {"GenericVnf","generic-vnf","","/generic-vnf/{vnf-id}"," - name: vnf-id\n in: path\n description: Unique id of VNF. This is unique across the graph.\n required: true\n type: string\n example: __VNF-ID__",""}, // Test: if ( !path.endsWith("/relationship") && !path.endsWith("}") ) @@ -75,7 +75,7 @@ public class PatchOperationTest { @Test public void testToString() { - PatchOperation patch = new PatchOperation(useOpId, xmlRootElementName, tag, path, pathParams, v); + PatchOperation patch = new PatchOperation(useOpId, xmlRootElementName, tag, path, pathParams, v, "/aai" ); String modResult = patch.toString(); assertThat(modResult, is(this.result)); } diff --git a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/PutOperationTest.java b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/PutOperationTest.java index 1b073d9..0a60b7f 100644 --- a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/PutOperationTest.java +++ b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/PutOperationTest.java @@ -45,7 +45,7 @@ public class PutOperationTest { @Parameters public static Collection testConditions() { String inputs [][] = { - {"NetworkGenericVnfsGenericVnf","generic-vnf","Network","/network/generic-vnfs/generic-vnf/{vnf-id}"," - name: vnf-id\n in: path\n description: Unique id of VNF. This is unique across the graph.\n required: true\n type: string\n example: __VNF-ID__"," put:\n tags:\n - Network\n summary: create or update an existing generic-vnf\n description: |\n Create or update an existing generic-vnf.\n #\n Note! This PUT method has a corresponding PATCH method that can be used to update just a few of the fields of an existing object, rather than a full object replacement. An example can be found in the [PATCH section] below\n operationId: createOrUpdateNetworkGenericVnfsGenericVnf\n consumes:\n - application/json\n - application/xml\n produces:\n - application/json\n - application/xml\n responses:\n \"default\":\n null parameters:\n - name: vnf-id\n in: path\n description: Unique id of VNF. This is unique across the graph.\n required: true\n type: string\n example: __VNF-ID__ - name: body\n in: body\n description: generic-vnf object that needs to be created or updated. [Valid relationship examples shown here](apidocs/relations/"+v.toString()+"/NetworkGenericVnfsGenericVnf.json)\n required: true\n schema:\n $ref: \"#/definitions/generic-vnf\"\n"}, + {"NetworkGenericVnfsGenericVnf","generic-vnf","Network","/network/generic-vnfs/generic-vnf/{vnf-id}"," - name: vnf-id\n in: path\n description: Unique id of VNF. This is unique across the graph.\n required: true\n type: string\n example: __VNF-ID__"," put:\n tags:\n - Network\n summary: create or update an existing generic-vnf\n description: |\n Create or update an existing generic-vnf.\n #\n Note! This PUT method has a corresponding PATCH method that can be used to update just a few of the fields of an existing object, rather than a full object replacement. An example can be found in the [PATCH section] below\n operationId: createOrUpdateNetworkGenericVnfsGenericVnf\n consumes:\n - application/json\n - application/xml\n produces:\n - application/json\n - application/xml\n responses:\n \"default\":\n null parameters:\n - name: vnf-id\n in: path\n description: Unique id of VNF. This is unique across the graph.\n required: true\n type: string\n example: __VNF-ID__ - name: body\n in: body\n description: generic-vnf object that needs to be created or updated. [Valid relationship examples shown here](apidocs/aai/relations/"+v.toString()+"/NetworkGenericVnfsGenericVnf.json)\n required: true\n schema:\n $ref: \"#/definitions/generic-vnf\"\n"}, // if ( StringUtils.isEmpty(tag) ) {"GenericVnf","generic-vnf","","/generic-vnf/{vnf-id}"," - name: vnf-id\n in: path\n description: Unique id of VNF. This is unique across the graph.\n required: true\n type: string\n example: __VNF-ID__",""}, // Test: if ( !path.endsWith("/relationship") && !path.endsWith("}") ) @@ -75,7 +75,7 @@ public class PutOperationTest { @Test public void testToString() { - PutOperation put = new PutOperation(useOpId, xmlRootElementName, tag, path, pathParams, v); + PutOperation put = new PutOperation(useOpId, xmlRootElementName, tag, path, pathParams, v, "/aai"); String modResult = put.toString(); assertThat(modResult, is(this.result)); } diff --git a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/YAMLfromOXMTest.java b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/YAMLfromOXMTest.java index 2ccf051..ad4f055 100644 --- a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/YAMLfromOXMTest.java +++ b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/YAMLfromOXMTest.java @@ -313,7 +313,7 @@ public class YAMLfromOXMTest { sb.append("info:" + OxmFileProcessor.LINE_SEPARATOR); sb.append(" description: |\n"); sb.append("\n"); - sb.append(" [Differences versus the previous schema version](apidocs/aai_swagger_v11.diff)" + OxmFileProcessor.DOUBLE_LINE_SEPARATOR); + sb.append(" [Differences versus the previous schema version](apidocs/aai/aai_swagger_v11.diff)" + OxmFileProcessor.DOUBLE_LINE_SEPARATOR); sb.append(" Copyright © 2017-18 AT&T Intellectual Property. All rights reserved." + OxmFileProcessor.DOUBLE_LINE_SEPARATOR); sb.append(" Licensed under the Creative Commons License, Attribution 4.0 Intl. (the "License"); you may not use this documentation except in compliance with the License." + OxmFileProcessor.DOUBLE_LINE_SEPARATOR); sb.append(" You may obtain a copy of the License at\n"); @@ -401,7 +401,7 @@ public class YAMLfromOXMTest { sb.append(" example: __SERVICE-TYPE__\n"); sb.append(" - name: body\n"); sb.append(" in: body\n"); - sb.append(" description: service-subscription object that needs to be created or updated. [Valid relationship examples shown here](apidocs/relations/v11/BusinessCustomersCustomerServiceSubscriptionsServiceSubscription.json)\n"); + sb.append(" description: service-subscription object that needs to be created or updated. [Valid relationship examples shown here](apidocs/aai/relations/v11/BusinessCustomersCustomerServiceSubscriptionsServiceSubscription.json)\n"); sb.append(" required: true\n"); sb.append(" schema:\n"); sb.append(" $ref: \"#/definitions/service-subscription\"\n"); @@ -444,7 +444,7 @@ public class YAMLfromOXMTest { sb.append(" - name: body\n"); sb.append(" in: body\n"); sb.append(" description: service-subscription object that needs to be updated."); - sb.append("[See Examples](apidocs/relations/v11/BusinessCustomersCustomerServiceSubscriptionsServiceSubscription.json)\n"); + sb.append("[See Examples](apidocs/aai/relations/v11/BusinessCustomersCustomerServiceSubscriptionsServiceSubscription.json)\n"); sb.append(" required: true\n"); sb.append(" schema:\n"); sb.append(" $ref: \"#/definitions/zzzz-patch-service-subscription\"\n"); @@ -557,7 +557,7 @@ public class YAMLfromOXMTest { sb.append(" example: __GLOBAL-CUSTOMER-ID__\n"); sb.append(" - name: body\n"); sb.append(" in: body\n"); - sb.append(" description: customer object that needs to be created or updated. [Valid relationship examples shown here](apidocs/relations/v11/BusinessCustomersCustomer.json)\n"); + sb.append(" description: customer object that needs to be created or updated. [Valid relationship examples shown here](apidocs/aai/relations/v11/BusinessCustomersCustomer.json)\n"); sb.append(" required: true\n"); sb.append(" schema:\n"); sb.append(" $ref: \"#/definitions/customer\"\n"); @@ -594,7 +594,7 @@ public class YAMLfromOXMTest { sb.append(" - name: body\n"); sb.append(" in: body\n"); sb.append(" description: customer object that needs to be updated."); - sb.append("[See Examples](apidocs/relations/v11/BusinessCustomersCustomer.json)\n"); + sb.append("[See Examples](apidocs/aai/relations/v11/BusinessCustomersCustomer.json)\n"); sb.append(" required: true\n"); sb.append(" schema:\n"); sb.append(" $ref: \"#/definitions/zzzz-patch-customer\"\n"); -- cgit 1.2.3-korg