X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=aai-schema-gen%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Faai%2Fschemagen%2Fgenxsd%2FYAMLfromOXMTest.java;fp=aai-schema-gen%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Faai%2Fschemagen%2Fgenxsd%2FYAMLfromOXMTest.java;h=774b760ffdc4f5d96fa5c46a7cd9494bb35ef2fa;hb=1e2d336a332c3b58d07ebc6d4e9c448178281ee3;hp=ed1398151add71907dccbab4de1d544cb40e1a8a;hpb=33db2e9d0c0e9da96a7507b1695cbfa2e5394489;p=aai%2Fschema-service.git 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 ed13981..774b760 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 @@ -311,26 +311,48 @@ public class YAMLfromOXMTest { public String YAMLheader() { StringBuilder sb = new StringBuilder(1500); + sb.append("#").append(OxmFileProcessor.LINE_SEPARATOR).append( + "# ============LICENSE_START=======================================================") + .append(OxmFileProcessor.LINE_SEPARATOR).append("# org.onap.aai") + .append(OxmFileProcessor.LINE_SEPARATOR) + .append( + "# ================================================================================") + .append(OxmFileProcessor.LINE_SEPARATOR) + .append("# Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.") + .append(OxmFileProcessor.LINE_SEPARATOR) + .append( + "# ================================================================================") + .append(OxmFileProcessor.LINE_SEPARATOR) + .append( + "# Licensed under the Creative Commons License, Attribution 4.0 Intl. (the \"License\");") + .append(OxmFileProcessor.LINE_SEPARATOR) + .append("# you may not use this file except in compliance with the License.") + .append(OxmFileProcessor.LINE_SEPARATOR) + .append("# You may obtain a copy of the License at") + .append(OxmFileProcessor.LINE_SEPARATOR).append("#

") + .append(OxmFileProcessor.LINE_SEPARATOR) + .append("# https://creativecommons.org/licenses/by/4.0/") + .append(OxmFileProcessor.LINE_SEPARATOR).append("#

") + .append(OxmFileProcessor.LINE_SEPARATOR) + .append("# Unless required by applicable law or agreed to in writing, software") + .append(OxmFileProcessor.LINE_SEPARATOR) + .append("# distributed under the License is distributed on an \"AS IS\" BASIS,") + .append(OxmFileProcessor.LINE_SEPARATOR) + .append("# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.") + .append(OxmFileProcessor.LINE_SEPARATOR) + .append("# See the License for the specific language governing permissions and") + .append(OxmFileProcessor.LINE_SEPARATOR).append("# limitations under the License.") + .append(OxmFileProcessor.LINE_SEPARATOR) + .append( + "# ============LICENSE_END=========================================================") + .append(OxmFileProcessor.LINE_SEPARATOR).append("#") + .append(OxmFileProcessor.LINE_SEPARATOR).append(OxmFileProcessor.LINE_SEPARATOR); sb.append("swagger: \"2.0\"\n"); sb.append("info:" + OxmFileProcessor.LINE_SEPARATOR); sb.append(" description: |\n"); - sb.append("\n"); 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"); - sb.append("\n"); - sb.append(" (https://creativecommons.org/licenses/by/4.0/)" - + OxmFileProcessor.DOUBLE_LINE_SEPARATOR); - sb.append( - " 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); sb.append( " This document is best viewed with Firefox or Chrome. Nodes can be found by opening the models link below and finding the node-type. Edge definitions can be found with the node definitions." + OxmFileProcessor.LINE_SEPARATOR); @@ -341,11 +363,7 @@ public class YAMLfromOXMTest { sb.append(" name: Apache 2.0\n"); sb.append(" url: http://www.apache.org/licenses/LICENSE-2.0.html" + OxmFileProcessor.LINE_SEPARATOR); - sb.append(" contact:" + OxmFileProcessor.LINE_SEPARATOR); - sb.append(" name: n/a" + OxmFileProcessor.LINE_SEPARATOR); - sb.append(" url: n/a" + OxmFileProcessor.LINE_SEPARATOR); - sb.append(" email: n/a" + OxmFileProcessor.LINE_SEPARATOR); - sb.append("host: n/a" + OxmFileProcessor.LINE_SEPARATOR); + sb.append("host: localhost" + OxmFileProcessor.LINE_SEPARATOR); sb.append("basePath: /aai/v11" + OxmFileProcessor.LINE_SEPARATOR); sb.append("schemes:" + OxmFileProcessor.LINE_SEPARATOR); sb.append(" - https\n"); @@ -380,14 +398,12 @@ public class YAMLfromOXMTest { " description: Global customer id used across to uniquely identify customer.\n"); sb.append(" required: true\n"); sb.append(" type: string\n"); - sb.append(" example: __GLOBAL-CUSTOMER-ID__\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(" put:\n"); sb.append(" tags:\n"); sb.append(" - Business\n"); @@ -414,14 +430,12 @@ public class YAMLfromOXMTest { " description: Global customer id used across to uniquely identify customer.\n"); sb.append(" required: true\n"); sb.append(" type: string\n"); - sb.append(" example: __GLOBAL-CUSTOMER-ID__\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(" - name: body\n"); sb.append(" in: body\n"); sb.append( @@ -465,14 +479,12 @@ public class YAMLfromOXMTest { " description: Global customer id used across to uniquely identify customer.\n"); sb.append(" required: true\n"); sb.append(" type: string\n"); - sb.append(" example: __GLOBAL-CUSTOMER-ID__\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(" - name: body\n"); sb.append(" in: body\n"); sb.append(" description: service-subscription object that needs to be updated."); @@ -503,14 +515,12 @@ public class YAMLfromOXMTest { " description: Global customer id used across to uniquely identify customer.\n"); sb.append(" required: true\n"); sb.append(" type: string\n"); - sb.append(" example: __GLOBAL-CUSTOMER-ID__\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(" - name: resource-version\n"); sb.append(" in: query\n"); sb.append(" description: resource-version for concurrency\n"); @@ -539,10 +549,8 @@ public class YAMLfromOXMTest { " description: Global customer id used across to uniquely identify customer.\n"); sb.append(" required: true\n"); sb.append(" type: string\n"); - sb.append(" example: __GLOBAL-CUSTOMER-ID__\n"); sb.append(" - name: service-type\n"); sb.append(" in: query\n"); - sb.append(" description: n/a\n"); sb.append(" required: false\n"); sb.append(" type: string\n"); sb.append(" /business/customers/customer/{global-customer-id}:\n"); @@ -568,7 +576,6 @@ public class YAMLfromOXMTest { " description: Global customer id used across to uniquely identify customer.\n"); sb.append(" required: true\n"); sb.append(" type: string\n"); - sb.append(" example: __GLOBAL-CUSTOMER-ID__\n"); sb.append(" put:\n"); sb.append(" tags:\n"); sb.append(" - Business\n"); @@ -594,7 +601,6 @@ public class YAMLfromOXMTest { " description: Global customer id used across to uniquely identify customer.\n"); sb.append(" required: true\n"); sb.append(" type: string\n"); - sb.append(" example: __GLOBAL-CUSTOMER-ID__\n"); sb.append(" - name: body\n"); sb.append(" in: body\n"); sb.append( @@ -637,7 +643,6 @@ public class YAMLfromOXMTest { " description: Global customer id used across to uniquely identify customer.\n"); sb.append(" required: true\n"); sb.append(" type: string\n"); - 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 updated."); @@ -666,7 +671,6 @@ public class YAMLfromOXMTest { " description: Global customer id used across to uniquely identify customer.\n"); sb.append(" required: true\n"); sb.append(" type: string\n"); - sb.append(" example: __GLOBAL-CUSTOMER-ID__\n"); sb.append(" - name: resource-version\n"); sb.append(" in: query\n"); sb.append(" description: resource-version for concurrency\n"); @@ -691,17 +695,14 @@ public class YAMLfromOXMTest { sb.append(" null parameters:\n"); sb.append(" - name: global-customer-id\n"); sb.append(" in: query\n"); - sb.append(" description: n/a\n"); sb.append(" required: false\n"); sb.append(" type: string\n"); sb.append(" - name: subscriber-name\n"); sb.append(" in: query\n"); - sb.append(" description: n/a\n"); sb.append(" required: false\n"); sb.append(" type: string\n"); sb.append(" - name: subscriber-type\n"); sb.append(" in: query\n"); - sb.append(" description: n/a\n"); sb.append(" required: false\n"); sb.append(" type: string\n"); return sb.toString();