summaryrefslogtreecommitdiffstats
path: root/feature-lifecycle/src/test/resources/schemas/onap.policies.typeA-1.0.0.schema.json
blob: 9171246079615cb35ae2a93b5930e7288c913441 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
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
                    ]
                }
            }
        }
    }
}