aboutsummaryrefslogtreecommitdiffstats
path: root/policy-utils/src/test/resources
diff options
context:
space:
mode:
Diffstat (limited to 'policy-utils/src/test/resources')
-rw-r--r--policy-utils/src/test/resources/coder/bad-regex.json9
-rw-r--r--policy-utils/src/test/resources/coder/missing-required.json5
-rw-r--r--policy-utils/src/test/resources/coder/test.schema.json71
-rw-r--r--policy-utils/src/test/resources/coder/valid.json11
4 files changed, 96 insertions, 0 deletions
diff --git a/policy-utils/src/test/resources/coder/bad-regex.json b/policy-utils/src/test/resources/coder/bad-regex.json
new file mode 100644
index 00000000..049de2cf
--- /dev/null
+++ b/policy-utils/src/test/resources/coder/bad-regex.json
@@ -0,0 +1,9 @@
+{
+ "aaString": "abc123",
+ "anInteger": 90,
+ "aaBoolean": true,
+ "aaCollection": [ {
+ "subItemString": "defg",
+ "subItemInteger": 1200
+ }]
+} \ No newline at end of file
diff --git a/policy-utils/src/test/resources/coder/missing-required.json b/policy-utils/src/test/resources/coder/missing-required.json
new file mode 100644
index 00000000..e19db9db
--- /dev/null
+++ b/policy-utils/src/test/resources/coder/missing-required.json
@@ -0,0 +1,5 @@
+{
+ "aaString": "abcd",
+ "anInteger": 90,
+ "aaBoolean": true
+} \ No newline at end of file
diff --git a/policy-utils/src/test/resources/coder/test.schema.json b/policy-utils/src/test/resources/coder/test.schema.json
new file mode 100644
index 00000000..60e70fb4
--- /dev/null
+++ b/policy-utils/src/test/resources/coder/test.schema.json
@@ -0,0 +1,71 @@
+{
+ "definitions": {},
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "http://onap.org/policy/common/coders/root.json",
+ "type": "object",
+ "title": "Test Schema",
+ "required": [
+ "aaString",
+ "anInteger",
+ "aaBoolean",
+ "aaCollection"
+ ],
+ "properties": {
+ "aaString": {
+ "$id": "#/properties/aaString",
+ "type": "string",
+ "title": "an alphabetical string",
+ "default": "",
+ "examples": [
+ "abcdef"
+ ],
+ "pattern": "^([a-z]*)$"
+ },
+ "anInteger": {
+ "$id": "#/properties/anInteger",
+ "type": "integer",
+ "title": "a bounded integer",
+ "default": 5,
+ "examples": [
+ 98
+ ],
+ "minimum": 10,
+ "maximum": 100
+ },
+ "aaBoolean": {
+ "$id": "#/properties/aaBoolean",
+ "type": "boolean",
+ "title": "a boolean",
+ "default": false,
+ "examples": [
+ true
+ ]
+ },
+ "aaCollection": {
+ "$id": "#/properties/aaCollection",
+ "type": "array",
+ "title": "a collection",
+ "items": {
+ "$id": "#/properties/aaCollection/items",
+ "type": "object",
+ "title": "the collection items",
+ "required": [
+ "subItemString"
+ ],
+ "properties": {
+ "subItemString": {
+ "$id": "#/properties/aaCollection/items/properties/subItemString",
+ "type": "string",
+ "title": "the subitem string",
+ "default": "blah",
+ "pattern": "^(.*)$"
+ },
+ "subItemInteger": {
+ "$id": "#/properties/aaCollection/items/properties/subItemInteger",
+ "type": "integer"
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/policy-utils/src/test/resources/coder/valid.json b/policy-utils/src/test/resources/coder/valid.json
new file mode 100644
index 00000000..a2cdb932
--- /dev/null
+++ b/policy-utils/src/test/resources/coder/valid.json
@@ -0,0 +1,11 @@
+{
+ "aaString": "abcd",
+ "anInteger": 90,
+ "aaBoolean": true,
+ "aaCollection": [
+ {
+ "subItemString": "defg",
+ "subItemInteger": 1200
+ }
+ ]
+} \ No newline at end of file