From: Claudio D. Gasparini Date: Fri, 19 Feb 2021 11:19:58 +0000 (+0100) Subject: Create cps-tdmt module X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=3df9a3750168747014a49013199898d0a6f0335e;p=cps%2Fcps-tbdmt.git Create cps-tdmt module Issue-ID: CPS-243 Signed-off-by: Claudio D. Gasparini Change-Id: I102e1f6b4e2f9eaa88d856a94a869c0e005b700e --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..624c9b6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +*.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 diff --git a/cps-tbdmt-application/pom.xml b/cps-tbdmt-application/pom.xml new file mode 100644 index 0000000..ac57848 --- /dev/null +++ b/cps-tbdmt-application/pom.xml @@ -0,0 +1,31 @@ + + + + + org.onap.cps + cps-tbdmt-parent + 0.0.1-SNAPSHOT + ../cps-tbdmt-parent/pom.xml + + 4.0.0 + + cps-tbdmt-application + \ No newline at end of file diff --git a/cps-tbdmt-bom/pom.xml b/cps-tbdmt-bom/pom.xml new file mode 100644 index 0000000..746b5da --- /dev/null +++ b/cps-tbdmt-bom/pom.xml @@ -0,0 +1,64 @@ + + + + 4.0.0 + org.onap.cps + cps-tbdmt-bom + 0.0.1-SNAPSHOT + pom + + This artifact contains dependencyManagement declarations of all published CPS components. + + + https://nexus.onap.org + /content/repositories/releases/ + true + /content/repositories/snapshots/ + + + + + ecomp-releases + ECOMP Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + ECOMP Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + + + + + ${project.groupId} + cps-tbdmt-service + ${project.version} + + + ${project.groupId} + cps-tbdmt-rest + ${project.version} + + + + \ No newline at end of file diff --git a/cps-tbdmt-dependencies/pom.xml b/cps-tbdmt-dependencies/pom.xml new file mode 100644 index 0000000..589f9f0 --- /dev/null +++ b/cps-tbdmt-dependencies/pom.xml @@ -0,0 +1,56 @@ + + + + 4.0.0 + org.onap.cps + cps-tbdmt-dependencies + 0.0.1-SNAPSHOT + pom + + ${project.groupId}:${project.artifactId} + This artifact contains dependencyManagement declarations of upstream versions. + + + https://nexus.onap.org + /content/repositories/releases/ + /content/repositories/snapshots/ + true + + + + + ecomp-releases + ECOMP Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + ECOMP Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + + + + + + + \ No newline at end of file diff --git a/cps-tbdmt-parent/pom.xml b/cps-tbdmt-parent/pom.xml new file mode 100644 index 0000000..1322a47 --- /dev/null +++ b/cps-tbdmt-parent/pom.xml @@ -0,0 +1,40 @@ + + + 4.0.0 + + org.onap.cps + cps-parent + 0.0.1-SNAPSHOT + + + + org.onap.cps + cps-tbdmt-parent + 0.0.1-SNAPSHOT + pom + + + ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml + + + + + + org.onap.cps + cps-tbdmt-dependencies + ${project.version} + pom + import + + + org.onap.cps + cps-tbdmt-bom + ${project.version} + pom + import + + + + \ No newline at end of file diff --git a/cps-tbdmt-rest/docs/api/swagger/swagger.yaml b/cps-tbdmt-rest/docs/api/swagger/swagger.yaml new file mode 100644 index 0000000..b6fe6fb --- /dev/null +++ b/cps-tbdmt-rest/docs/api/swagger/swagger.yaml @@ -0,0 +1,178 @@ +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" diff --git a/cps-tbdmt-rest/pom.xml b/cps-tbdmt-rest/pom.xml new file mode 100644 index 0000000..048f243 --- /dev/null +++ b/cps-tbdmt-rest/pom.xml @@ -0,0 +1,31 @@ + + + + + org.onap.cps + cps-tbdmt-parent + 0.0.1-SNAPSHOT + ../cps-tbdmt-parent/pom.xml + + 4.0.0 + + cps-tbdmt-rest + \ No newline at end of file diff --git a/cps-tbdmt-service/lombok.config b/cps-tbdmt-service/lombok.config new file mode 100644 index 0000000..a23edb4 --- /dev/null +++ b/cps-tbdmt-service/lombok.config @@ -0,0 +1,2 @@ +config.stopBubbling = true +lombok.addLombokGeneratedAnnotation = true \ No newline at end of file diff --git a/cps-tbdmt-service/pom.xml b/cps-tbdmt-service/pom.xml new file mode 100644 index 0000000..4e21048 --- /dev/null +++ b/cps-tbdmt-service/pom.xml @@ -0,0 +1,39 @@ + + + + + org.onap.cps + cps-tbdmt-parent + 0.0.1-SNAPSHOT + ../cps-tbdmt-parent/pom.xml + + 4.0.0 + + cps-tbdmt-service + jar + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..c284a98 --- /dev/null +++ b/pom.xml @@ -0,0 +1,67 @@ + + + + 4.0.0 + + org.onap.oparent + oparent + 3.2.0 + + + org.onap.cps + cps-tbdmt-aggregator + 0.0.1-SNAPSHOT + pom + + cps-tbdmt + Template Based DataModel Transformer + + + ONAP - CPS + http://www.onap.org/ + + + + true + true + + + + cps-tbdmt-service + cps-tbdmt-rest + cps-tbdmt-dependencies + cps-tbdmt-bom + cps-tbdmt-parent + cps-tbdmt-application + + + + + + org.codehaus.mojo + versions-maven-plugin + + true + + + + + \ No newline at end of file