Update DCAE Committer in INFO.yaml
[dcaegen2/platform/cli.git] / component-json-schemas / data-format / dcae-cli-v1 / data-format-schema.json
1 {
2     "$schema": "http://json-schema.org/draft-04/schema#",
3     "title": "Data format specification schema Version 1.0.1",
4     "type": "object",
5     "oneOf": [{
6         "properties": {
7             "self": {
8                 "$ref": "#/definitions/self"
9             },
10             "dataformatversion": {
11                 "$ref": "#/definitions/dataformatversion"
12             },
13             "reference": {
14
15                 "type": "object",
16                 "description": "A reference to an external schema - name/version or url, if specified, is used to access the artifact",
17                 "properties": {
18                     "name": {
19                         "$ref": "#/definitions/name"
20                     },
21                     "url": {
22                         "$ref": "#/definitions/url"
23                     },
24                     "version": {
25                         "$ref": "#/definitions/version"
26                     },
27                     "format": {
28                         "$ref": "#/definitions/format"
29                     }
30                 },
31                 "required": [
32                     "name",
33                     "version",
34                     "format"
35                 ],
36                 "additionalProperties": false
37             }
38         },
39         "required": ["self", "dataformatversion", "reference"],
40         "additionalProperties": false
41     }, {
42         "properties": {
43             "self": {
44                 "$ref": "#/definitions/self"
45             },
46             "dataformatversion": {
47                 "$ref": "#/definitions/dataformatversion"
48             },
49             "jsonschema": {
50                 "$schema": "http://json-schema.org/draft-04/schema#",
51                 "description": "The actual JSON schema for this data format"
52             }
53
54         },
55         "required": ["self", "dataformatversion", "jsonschema"],
56         "additionalProperties": false
57     }, {
58         "properties": {
59             "self": {
60                 "$ref": "#/definitions/self"
61             },
62             "dataformatversion": {
63                 "$ref": "#/definitions/dataformatversion"
64             },
65             "delimitedschema": {
66                 "type": "object",
67                 "description": "A JSON schema for delimited files",
68                 "properties": {
69                     "delimiter": {
70                         "enum": [",", "|", "\t"]
71                     },
72                     "fields": {
73                         "type": "array",
74                         "description": "Array of field descriptions",
75                         "items": {
76                             "$ref": "#/definitions/field"
77                         }
78                     }
79                 },
80                 "additionalProperties": false
81             }
82         },
83         "required": ["self", "dataformatversion", "delimitedschema"],
84         "additionalProperties": false
85     }, {
86         "properties": {
87             "self": {
88                 "$ref": "#/definitions/self"
89             },
90             "dataformatversion": {
91                 "$ref": "#/definitions/dataformatversion"
92             },
93             "unstructured": {
94                 "type": "object",
95                 "description": "A JSON schema for unstructured text",
96                 "properties": {
97                     "encoding": {
98                         "type": "string",
99                         "enum": ["ASCII", "UTF-8", "UTF-16", "UTF-32"]
100                     }
101                 },
102                 "additionalProperties": false
103
104             }
105         },
106         "required": ["self", "dataformatversion", "unstructured"],
107         "additionalProperties": false
108     }],
109     "definitions": {
110          "url": {
111              "format": "uri"
112         },
113         "name": {
114             "type": "string"
115         },
116         "version": {
117             "type": "string",
118             "pattern": "^(\\d+\\.)(\\d+\\.)(\\*|\\d+)$"
119         },
120         "self": {
121             "description": "Identifying Information for the Data Format - name/version can be used to access the artifact",
122             "type": "object",
123             "properties": {
124                 "name": {
125                     "$ref": "#/definitions/name"
126                 },
127                 "version": {
128                     "$ref": "#/definitions/version"
129                 },
130                 "description": {
131                     "type": "string"
132                 }
133             },
134             "required": [
135                 "name",
136                 "version"
137             ],
138             "additionalProperties": false
139         },
140         "format": {
141             "description": "Reference schema type",
142             "type": "string",
143             "enum": [
144                 "JSON",
145                 "Delimited Format",
146                 "XML",
147                 "Protocol Buffer",
148                 "Unstructured"
149             ]
150         },
151         "field": {
152             "description": "A field definition for the delimited schema",
153             "type": "object",
154             "properties": {
155                 "name": {
156                     "type": "string"
157                 },
158                 "description": {
159                     "type": "string"
160                 },
161                 "fieldtype": {
162                     "description": "the field type - from the XML schema types",
163                     "type": "string",
164                     "enum": ["string", "boolean",
165                         "decimal", "float", "double",
166                         "duration", "dateTime", "time",
167                         "date", "gYearMonth", "gYear",
168                         "gMonthDay", "gDay", "gMonth",
169                         "hexBinary", "base64Binary",
170                         "anyURI", "QName", "NOTATION",
171                         "normalizedString", "token",
172                         "language", "IDREFS", "ENTITIES",
173                         "NMTOKEN", "NMTOKENS", "Name",
174                         "NCName", "ID", "IDREF", "ENTITY",
175                         "integer", "nonPositiveInteger",
176                         "negativeInteger", "long", "int",
177                         "short", "byte",
178                         "nonNegativeInteger", "unsignedLong",
179                         "unsignedInt", "unsignedShort",
180                         "unsignedByte", "positiveInteger"
181
182                     ]
183                 },
184                 "fieldPattern": {
185                     "description": "Regular expression that defines the field format",
186                     "type": "integer"
187                 },
188                 "fieldMaxLength": {
189                     "description": "The maximum length of the field",
190                     "type": "integer"
191                 },
192                 "fieldMinLength": {
193                     "description": "The minimum length of the field",
194                     "type": "integer"
195                 },
196                 "fieldMinimum": {
197                     "description": "The minimum numeric value of the field",
198                     "type": "integer"
199                 },
200                 "fieldMaximum": {
201                     "description": "The maximum numeric value of the field",
202                     "type": "integer"
203                 }
204             },
205             "additionalProperties": false
206         },
207         "dataformatversion": {
208             "type": "string",
209             "enum": ["1.0.0", "1.0.1"]
210         }
211     }
212 }