diff options
author | jhh <jorge.hernandez-herrero@att.com> | 2020-11-18 16:40:39 -0600 |
---|---|---|
committer | jhh <jorge.hernandez-herrero@att.com> | 2020-11-18 17:08:33 -0600 |
commit | f01256145bd9abb97cb9fba3019dcaccaeeca509 (patch) | |
tree | 47315582744c0b028320f6e3bde87c4cc439f49c /feature-lifecycle/src/test/resources/schemas | |
parent | 6a429b8504cdd38cadb3ce9bb532d08cc5115da9 (diff) |
verify schema validation for any policy type
Issue-ID: POLICY-2880
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I0cc6e8967d42d347415857dc77976f2b8ab86516
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'feature-lifecycle/src/test/resources/schemas')
-rw-r--r-- | feature-lifecycle/src/test/resources/schemas/onap.policies.typeA-1.0.0.schema.json | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/feature-lifecycle/src/test/resources/schemas/onap.policies.typeA-1.0.0.schema.json b/feature-lifecycle/src/test/resources/schemas/onap.policies.typeA-1.0.0.schema.json new file mode 100644 index 00000000..91712460 --- /dev/null +++ b/feature-lifecycle/src/test/resources/schemas/onap.policies.typeA-1.0.0.schema.json @@ -0,0 +1,106 @@ +{ + "definitions": {}, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://www.onap.org/policy/models/schemas/onap.policies.typeA.schema.json", + "type": "object", + "title": "The Root Schema", + "required": [ + "type", + "type_version", + "version", + "metadata", + "properties" + ], + "properties": { + "type": { + "$id": "#/properties/type", + "type": "string", + "title": "Policy Type", + "default": "onap.policies.typeA", + "examples": [ + "onap.policies.typeA" + ], + "pattern": "^(.+)$" + }, + "type_version": { + "$id": "#/properties/type_version", + "type": "string", + "title": "Policy Type Version", + "default": "1.0.0", + "examples": [ + "1.0.0" + ], + "pattern": "^(.+)$" + }, + "name": { + "$id": "#/properties/name", + "type": "string", + "title": "Policy Name", + "default": "", + "examples": [ + "example" + ], + "pattern": "^(.*)$" + }, + "version": { + "$id": "#/properties/version", + "type": "string", + "title": "Policy Version", + "default": "1.0.0", + "examples": [ + "1.0.0" + ], + "pattern": "^(.+)$" + }, + "metadata": { + "$id": "#/properties/metadata", + "type": "object", + "title": "Metadata", + "required": [ + "policy-id" + ], + "properties": { + "policy-id": { + "$id": "#/properties/metadata/properties/policy-id", + "type": "string", + "title": "Policy ID", + "examples": [ + "operational.restart" + ], + "pattern": "^(.+)$" + } + } + }, + "properties": { + "$id": "#/properties/properties", + "type": "object", + "title": "Properties", + "required": [ + "fieldA", + "fieldB" + ], + "properties": { + "fieldA": { + "$id": "#/properties/properties/properties/fieldA", + "type": "string", + "title": "Field A", + "examples": [ + "FieldA" + ], + "pattern": "^(.+)$" + }, + "fieldB": { + "$id": "#/properties/properties/properties/fieldB", + "type": "integer", + "title": "Timeout in seconds", + "minimum": 1, + "maximum": 5, + "default": 1, + "examples": [ + 3 + ] + } + } + } + } +}
\ No newline at end of file |