summaryrefslogtreecommitdiffstats
path: root/cba/resource-resolution/Templates
diff options
context:
space:
mode:
Diffstat (limited to 'cba/resource-resolution/Templates')
-rw-r--r--cba/resource-resolution/Templates/hello-world-jinja-mapping.json127
-rw-r--r--cba/resource-resolution/Templates/hello-world-template.jinja20
-rw-r--r--cba/resource-resolution/Templates/hello-world-template.vtl16
-rw-r--r--cba/resource-resolution/Templates/hello-world-velocity-mapping.json105
4 files changed, 268 insertions, 0 deletions
diff --git a/cba/resource-resolution/Templates/hello-world-jinja-mapping.json b/cba/resource-resolution/Templates/hello-world-jinja-mapping.json
new file mode 100644
index 0000000..8b3e4d0
--- /dev/null
+++ b/cba/resource-resolution/Templates/hello-world-jinja-mapping.json
@@ -0,0 +1,127 @@
+[
+ {
+ "name": "j_default",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "default": "ok"
+ },
+ "dictionary-name": "input-source",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "j_input",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "input-source",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "j_python",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "properties-capability-source",
+ "dictionary-source": "capability",
+ "dependencies": []
+ },
+ {
+ "name": "j_kotlin",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "kotlin-script",
+ "dictionary-source": "capability",
+ "dependencies": []
+ },
+ {
+ "name": "from_suspend_function",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "kotlin-script",
+ "dictionary-source": "capability",
+ "dependencies": []
+ },
+ {
+ "name": "j_db",
+ "input-param": true,
+ "property": {
+ "type": "list",
+ "entry_schema": {
+ "type": "string"
+ }
+ },
+ "dictionary-name": "RT-db",
+ "dictionary-source": "processor-db"
+ },
+ {
+ "name": "j_get",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "RT-rest-get",
+ "dictionary-source": "sdnc",
+ "dependencies": []
+ },
+ {
+ "name": "j_get_id",
+ "input-param": false,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "RT-rest-get-id",
+ "dictionary-source": "sdnc",
+ "dependencies": [
+ "j_get"
+ ]
+ },
+ {
+ "name": "j_post",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "RT-rest-post",
+ "dictionary-source": "sdnc",
+ "dependencies": []
+ },
+ {
+ "name": "j_put",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "RT-rest-put",
+ "dictionary-source": "sdnc",
+ "dependencies": []
+ },
+ {
+ "name": "j_patch",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "RT-rest-patch",
+ "dictionary-source": "sdnc",
+ "dependencies": []
+ },
+ {
+ "name": "j_del",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "RT-rest-delete",
+ "dictionary-source": "sdnc",
+ "dependencies": []
+ }
+]
diff --git a/cba/resource-resolution/Templates/hello-world-template.jinja b/cba/resource-resolution/Templates/hello-world-template.jinja
new file mode 100644
index 0000000..27c614e
--- /dev/null
+++ b/cba/resource-resolution/Templates/hello-world-template.jinja
@@ -0,0 +1,20 @@
+{
+ "default": "{{ j_default }}",
+ "input": "{{ j_input }}",
+ "script": {
+ "python": "{{ j_python }}",
+ "kotlin": {
+ "base": "{{ j_kotlin }}"
+ "from suspend function": "{{ from_suspend_function }}"
+ }
+ },
+ "db": "{{ j_db[0].value }}",
+ "rest": {
+ "GET": "{{j_get}}",
+ "GET_ID": "{{j_get_id}}",
+ "POST": "{{j_post}}",
+ "PUT": "{{j_put}}",
+ "PATCH": "{{j_patch}}",
+ "DELETE": "{{j_del}}"
+ }
+}
diff --git a/cba/resource-resolution/Templates/hello-world-template.vtl b/cba/resource-resolution/Templates/hello-world-template.vtl
new file mode 100644
index 0000000..f821770
--- /dev/null
+++ b/cba/resource-resolution/Templates/hello-world-template.vtl
@@ -0,0 +1,16 @@
+{
+ "default": "${v_default}",
+ "input": "${v_input}",
+ "script": {
+ "python": "${v_python}",
+ "kotlin": "${v_kotlin}"
+ },
+ "db": "${v_db.get(0).value}",
+ "rest": {
+ "GET": "${v_get}",
+ "POST": "${v_post}",
+ "PUT": "${v_put}",
+ "PATCH": "${v_patch}",
+ "DELETE": "${v_del}"
+ }
+}
diff --git a/cba/resource-resolution/Templates/hello-world-velocity-mapping.json b/cba/resource-resolution/Templates/hello-world-velocity-mapping.json
new file mode 100644
index 0000000..4314908
--- /dev/null
+++ b/cba/resource-resolution/Templates/hello-world-velocity-mapping.json
@@ -0,0 +1,105 @@
+[
+ {
+ "name": "v_default",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "default": "ok"
+ },
+ "dictionary-name": "input-source",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "v_input",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "input-source",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "v_python",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "properties-capability-source",
+ "dictionary-source": "capability",
+ "dependencies": []
+ },
+ {
+ "name": "v_kotlin",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "kotlin-script",
+ "dictionary-source": "capability",
+ "dependencies": []
+ },
+ {
+ "name": "v_db",
+ "input-param": true,
+ "property": {
+ "type": "list",
+ "entry_schema": {
+ "type": "string"
+ }
+ },
+ "dictionary-name": "RT-db",
+ "dictionary-source": "processor-db"
+ },
+ {
+ "name": "v_get",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "RT-rest-get",
+ "dictionary-source": "sdnc",
+ "dependencies": []
+ },
+ {
+ "name": "v_post",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "RT-rest-post",
+ "dictionary-source": "sdnc",
+ "dependencies": []
+ },
+ {
+ "name": "v_put",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "RT-rest-put",
+ "dictionary-source": "sdnc",
+ "dependencies": []
+ },
+ {
+ "name": "v_patch",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "RT-rest-patch",
+ "dictionary-source": "sdnc",
+ "dependencies": []
+ },
+ {
+ "name": "v_del",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "RT-rest-delete",
+ "dictionary-source": "sdnc",
+ "dependencies": []
+ }
+]