diff options
Diffstat (limited to 'policy-utils/src/test/resources')
4 files changed, 128 insertions, 0 deletions
diff --git a/policy-utils/src/test/resources/policy.type.external-9.9.9.schema.json b/policy-utils/src/test/resources/policy.type.external-9.9.9.schema.json new file mode 100644 index 00000000..d8651eb5 --- /dev/null +++ b/policy-utils/src/test/resources/policy.type.external-9.9.9.schema.json @@ -0,0 +1,7 @@ +{ + "definitions": {}, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://www.onap.org/policy/models/schemas/policy.type.external", + "type": "object", + "title": "Domain policy.type.external Policy root schema" +} diff --git a/policy-utils/src/test/resources/policyA-no-policy-type.json b/policy-utils/src/test/resources/policyA-no-policy-type.json new file mode 100644 index 00000000..c92b736c --- /dev/null +++ b/policy-utils/src/test/resources/policyA-no-policy-type.json @@ -0,0 +1,16 @@ +{ + "type": "policy.type.Z", + "type_version": "1.0.0", + "version": "1.0.0", + "metadata": { + "policy-id": "A" + }, + "properties": { + "nested": { + "nested1": "nested1", + "nested2": true, + "nested3": 50 + } + }, + "name": "A" +}
\ No newline at end of file diff --git a/policy-utils/src/test/resources/policyA.json b/policy-utils/src/test/resources/policyA.json new file mode 100644 index 00000000..7afa79d3 --- /dev/null +++ b/policy-utils/src/test/resources/policyA.json @@ -0,0 +1,16 @@ +{ + "type": "policy.type.A", + "type_version": "1.0.0", + "version": "1.0.0", + "metadata": { + "policy-id": "A" + }, + "properties": { + "nested": { + "nested1": "nested1", + "nested2": true, + "nested3": 50 + } + }, + "name": "A" +}
\ No newline at end of file diff --git a/policy-utils/src/test/resources/schemas/policy.type.A-1.0.0.schema.json b/policy-utils/src/test/resources/schemas/policy.type.A-1.0.0.schema.json new file mode 100644 index 00000000..089ec44f --- /dev/null +++ b/policy-utils/src/test/resources/schemas/policy.type.A-1.0.0.schema.json @@ -0,0 +1,89 @@ +{ + "definitions": {}, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://www.onap.org/policy/models/schemas/policy.type.A", + "type": "object", + "title": "Domain policy.type.A Policy root schema", + "required": [ + "type", + "type_version", + "version", + "metadata", + "properties" + ], + "properties": { + "type": { + "$id": "#/properties/type", + "type": "string", + "pattern": "^(.+)$" + }, + "type_version": { + "$id": "#/properties/type_version", + "type": "string", + "pattern": "^(.+)$" + }, + "version": { + "$id": "#/properties/version", + "type": "string", + "title": "Version", + "pattern": "^(.+)$" + }, + "name": { + "$id": "#/properties/name", + "type": "string", + "pattern": "^(.+)$" + }, + "metadata": { + "$id": "#/properties/metadata", + "type": "object", + "title": "Metadata", + "required": [ + "policy-id" + ], + "properties": { + "policy-id": { + "$id": "#/properties/metadata/properties/policy-id", + "type": "string", + "pattern": "^(.+)$" + } + } + }, + "properties": { + "$id": "#/properties/properties", + "type": "object", + "required": [ + "nested" + ], + "properties": { + "nested": { + "$id": "#/properties/properties/properties/nested", + "type": "object", + "required": [ + "nested1", + "nested2", + "nested3" + ], + "properties": { + "nested1": { + "$id": "#/properties/properties/properties/nested/properties/nested1", + "type": "string", + "pattern": "^(.+)$" + }, + "nested2": { + "$id": "#/properties/properties/properties/nested/properties/nested2", + "type": "boolean", + "default": true + }, + "nested3": { + "$id": "#/properties/properties/properties/nested/properties/nested3", + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 30 + } + } + } + } + } + } +} |