--- /dev/null
+*.class
+*.jar
+*.war
+*.zip
+*.log
+
+target/
+log/
+
+.idea/
+.idea_modules/
+*.iml
+*.ipr
+*.iws
+
+.settings/
+bin/
+tmp/
+.metadata
+.classpath
+.project
+*.tmp
+.checkstyle
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (c) 2021 Pantheon.tech.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ 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.
+ ============LICENSE_END=========================================================
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.onap.cps</groupId>
+ <artifactId>cps-tbdmt-parent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../cps-tbdmt-parent/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>cps-tbdmt-application</artifactId>
+</project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (c) 2021 Pantheon.tech.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ 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.
+ ============LICENSE_END=========================================================
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.onap.cps</groupId>
+ <artifactId>cps-tbdmt-bom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <description>This artifact contains dependencyManagement declarations of all published CPS components.</description>
+
+ <properties>
+ <nexusproxy>https://nexus.onap.org</nexusproxy>
+ <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
+ <sonar.skip>true</sonar.skip>
+ <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
+ </properties>
+
+ <distributionManagement>
+ <repository>
+ <id>ecomp-releases</id>
+ <name>ECOMP Release Repository</name>
+ <url>${nexusproxy}${releaseNexusPath}</url>
+ </repository>
+ <snapshotRepository>
+ <id>ecomp-snapshots</id>
+ <name>ECOMP Snapshot Repository</name>
+ <url>${nexusproxy}${snapshotNexusPath}</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>cps-tbdmt-service</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>cps-tbdmt-rest</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+</project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (c) 2021 Pantheon.tech.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ 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.
+ ============LICENSE_END=========================================================
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.onap.cps</groupId>
+ <artifactId>cps-tbdmt-dependencies</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>${project.groupId}:${project.artifactId}</name>
+ <description>This artifact contains dependencyManagement declarations of upstream versions.</description>
+
+ <properties>
+ <nexusproxy>https://nexus.onap.org</nexusproxy>
+ <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
+ <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
+ <sonar.skip>true</sonar.skip>
+ </properties>
+
+ <distributionManagement>
+ <repository>
+ <id>ecomp-releases</id>
+ <name>ECOMP Release Repository</name>
+ <url>${nexusproxy}${releaseNexusPath}</url>
+ </repository>
+ <snapshotRepository>
+ <id>ecomp-snapshots</id>
+ <name>ECOMP Snapshot Repository</name>
+ <url>${nexusproxy}${snapshotNexusPath}</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+ <dependencyManagement>
+ <dependencies>
+
+ </dependencies>
+ </dependencyManagement>
+</project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.cps</groupId>
+ <artifactId>cps-parent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.onap.cps</groupId>
+ <artifactId>cps-tbdmt-parent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <properties>
+ <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.cps</groupId>
+ <artifactId>cps-tbdmt-dependencies</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.cps</groupId>
+ <artifactId>cps-tbdmt-bom</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+</project>
\ No newline at end of file
--- /dev/null
+swagger: "2.0"
+info:
+ description: ""
+ version: "1.0.0"
+ title: "Template based Data Model Transformer APIs"
+ license:
+ name: "Apache 2.0"
+ url: "http://www.apache.org/licenses/LICENSE-2.0.html"
+host: "localhost"
+basePath: "/v1"
+tags:
+- name: "templates"
+ description: "CRUD APIs for xpath templates"
+schemes:
+- "https"
+- "http"
+paths:
+ /templates:
+ post:
+ tags:
+ - "templates"
+ summary: "Add a new template"
+ description: ""
+ operationId: "addTemplate"
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ parameters:
+ - in: "body"
+ name: "body"
+ description: "Template object that needs to be added"
+ required: true
+ schema:
+ $ref: "#/definitions/Template"
+ responses:
+ "201":
+ description: "Created successfully"
+ "400":
+ description: "Invalid input"
+ "500":
+ description: "Internal server error"
+ get:
+ tags:
+ - "templates"
+ summary: "Get all templates"
+ description: ""
+ operationId: "getAllTemplates"
+ consumes:
+ - "application/json"
+ produces:
+ - "application/json"
+ responses:
+ "200":
+ description: "Templates returned successfully"
+ schema:
+ type: "array"
+ items:
+ $ref: "#/definitions/Template"
+ "404":
+ description: "No templates found"
+ "500":
+ description: "Internal server error"
+ /templates/{schemaSet}/{id}:
+ get:
+ tags:
+ - "templates"
+ summary: "Find template by ID"
+ description: "Returns a single template"
+ operationId: "getTemplateById"
+ produces:
+ - "application/json"
+ parameters:
+ - name: "id"
+ in: "path"
+ description: "ID of template to return"
+ required: true
+ type: "string"
+ - name: "schemaSet"
+ in: "path"
+ description: "schema set"
+ required: true
+ type: "string"
+ responses:
+ "200":
+ description: "Template returned successfully"
+ schema:
+ $ref: "#/definitions/Template"
+ "400":
+ description: "Invalid ID supplied"
+ "404":
+ description: "Not found"
+ delete:
+ tags:
+ - "templates"
+ summary: "Deletes a template"
+ description: ""
+ operationId: "deleteTemplate"
+ produces:
+ - "application/json"
+ parameters:
+ - name: "id"
+ in: "path"
+ required: true
+ type: "string"
+ - name: "schemaSet"
+ in: "path"
+ description: "schema set"
+ required: true
+ type: "string"
+ responses:
+ "200":
+ description: "Deleted successfully"
+ "400":
+ description: "Invalid ID supplied"
+ "404":
+ description: "Template not found"
+ /execute/{schemaSet}/{id}:
+ post:
+ tags:
+ - "template executions"
+ summary: "Execute a template"
+ description: "Returns the result of execution"
+ operationId: "executeTemplateById"
+ produces:
+ - "application/json"
+ parameters:
+ - name: "id"
+ in: "path"
+ description: "ID of template to execute"
+ required: true
+ type: "string"
+ - name: "schemaSet"
+ in: "path"
+ description: "schema set"
+ required: true
+ type: "string"
+ - in: "body"
+ name: "body"
+ description: "Template object that needs to be added"
+ required: true
+ schema:
+ $ref: "#/definitions/ApiRequest"
+ responses:
+ "200":
+ description: "Result returned successfully"
+ schema:
+ $ref: "#/definitions/ApiResponse"
+ "400":
+ description: "Invalid ID supplied"
+ "404":
+ description: "Not found"
+ "500":
+ description: "Internal server error"
+definitions:
+ Template:
+ type: "object"
+ required:
+ - "id"
+ - "schemaSet"
+ - "xpathTemplate"
+ properties:
+ id:
+ type: "string"
+ schemaSet:
+ type: "string"
+ xpathTemplate:
+ type: "string"
+ ApiRequest:
+ type: "object"
+ properties:
+ input:
+ type: "object"
+ ApiResponse:
+ type: "object"
+externalDocs:
+ description: "Find out more about APIs"
+ url: "https://wiki.onap.org/display/DW/API+Mapper+Service"
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (c) 2021 Pantheon.tech.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ 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.
+ ============LICENSE_END=========================================================
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.onap.cps</groupId>
+ <artifactId>cps-tbdmt-parent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../cps-tbdmt-parent/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>cps-tbdmt-rest</artifactId>
+</project>
\ No newline at end of file
--- /dev/null
+config.stopBubbling = true
+lombok.addLombokGeneratedAnnotation = true
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*******************************************************************************
+ * ============LICENSE_START=======================================================
+ * ONAP
+ * ================================================================================
+ * Copyright (C) 2021 Wipro Limited.
+ * Modifications Copyright (C) 2021 Pantheon.tech.
+ * ==============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ * ============LICENSE_END=========================================================
+ *
+ *******************************************************************************/
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.onap.cps</groupId>
+ <artifactId>cps-tbdmt-parent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../cps-tbdmt-parent/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>cps-tbdmt-service</artifactId>
+ <packaging>jar</packaging>
+
+</project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (c) 2021 Pantheon.tech.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ 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.
+ ============LICENSE_END=========================================================
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.oparent</groupId>
+ <artifactId>oparent</artifactId>
+ <version>3.2.0</version>
+ </parent>
+
+ <groupId>org.onap.cps</groupId>
+ <artifactId>cps-tbdmt-aggregator</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>cps-tbdmt</name>
+ <description>Template Based DataModel Transformer</description>
+
+ <organization>
+ <name>ONAP - CPS</name>
+ <url>http://www.onap.org/</url>
+ </organization>
+
+ <properties>
+ <maven.deploy.skip>true</maven.deploy.skip>
+ <maven.install.skip>true</maven.install.skip>
+ </properties>
+
+ <modules>
+ <module>cps-tbdmt-service</module>
+ <module>cps-tbdmt-rest</module>
+ <module>cps-tbdmt-dependencies</module>
+ <module>cps-tbdmt-bom</module>
+ <module>cps-tbdmt-parent</module>
+ <module>cps-tbdmt-application</module>
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>versions-maven-plugin</artifactId>
+ <configuration>
+ <processAllModules>true</processAllModules>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file