-
Notifications
You must be signed in to change notification settings - Fork 470
/
class.property.schema.json
151 lines (151 loc) · 6.43 KB
/
class.property.schema.json
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "class.property.schema.json",
"title": "Class Property",
"$ref": "rootProperty.schema.json",
"description": "A single property of a metadata class.",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "The name of the property, e.g. for display purposes."
},
"description": {
"type": "string",
"minLength": 1,
"description": "The description of the property."
},
"type": {
"description": "The element type.",
"anyOf": [
{
"const": "SCALAR"
},
{
"const": "VEC2"
},
{
"const": "VEC3"
},
{
"const": "VEC4"
},
{
"const": "MAT2"
},
{
"const": "MAT3"
},
{
"const": "MAT4"
},
{
"const": "STRING"
},
{
"const": "BOOLEAN"
},
{
"const": "ENUM"
},
{
"type": "string"
}
]
},
"componentType": {
"description": "The datatype of the element's components. Only applicable to `SCALAR`, `VECN`, and `MATN` types.",
"anyOf": [
{
"const": "INT8"
},
{
"const": "UINT8"
},
{
"const": "INT16"
},
{
"const": "UINT16"
},
{
"const": "INT32"
},
{
"const": "UINT32"
},
{
"const": "INT64"
},
{
"const": "UINT64"
},
{
"const": "FLOAT32"
},
{
"const": "FLOAT64"
},
{
"type": "string"
}
]
},
"enumType": {
"type": "string",
"description": "Enum ID as declared in the `enums` dictionary. Required when `type` is `ENUM`."
},
"array": {
"type": "boolean",
"default": false,
"description": "Whether the property is an array. When `count` is defined the property is a fixed-length array. Otherwise the property is a variable-length array."
},
"count": {
"type": "integer",
"minimum": 2,
"description": "The number of array elements. May only be defined when `array` is `true`."
},
"normalized": {
"type": "boolean",
"description": "Specifies whether integer values are normalized. Only applicable to `SCALAR`, `VECN`, and `MATN` types with integer component types. For unsigned integer component types, values are normalized between `[0.0, 1.0]`. For signed integer component types, values are normalized between `[-1.0, 1.0]`. For all other component types, this property shall be false.",
"default": false
},
"offset": {
"$ref": "definitions.schema.json#/definitions/numericValue",
"description": "An offset to apply to property values. Only applicable to `SCALAR`, `VECN`, and `MATN` types when the component type is `FLOAT32` or `FLOAT64`, or when the property is `normalized`."
},
"scale": {
"$ref": "definitions.schema.json#/definitions/numericValue",
"description": "A scale to apply to property values. Only applicable to `SCALAR`, `VECN`, and `MATN` types when the component type is `FLOAT32` or `FLOAT64`, or when the property is `normalized`."
},
"max": {
"$ref": "definitions.schema.json#/definitions/numericValue",
"description": "Maximum allowed value for the property. Only applicable to `SCALAR`, `VECN`, and `MATN` types. This is the maximum of all property values, after the transforms based on the `normalized`, `offset`, and `scale` properties have been applied."
},
"min": {
"$ref": "definitions.schema.json#/definitions/numericValue",
"description": "Minimum allowed value for the property. Only applicable to `SCALAR`, `VECN`, and `MATN` types. This is the minimum of all property values, after the transforms based on the `normalized`, `offset`, and `scale` properties have been applied."
},
"required": {
"type": "boolean",
"description": "If required, the property shall be present in every entity conforming to the class. If not required, individual entities may include `noData` values, or the entire property may be omitted. As a result, `noData` has no effect on a required property. Client implementations may use required properties to make performance optimizations.",
"default": false
},
"noData": {
"$ref": "definitions.schema.json#/definitions/noDataValue",
"description": "A `noData` value represents missing data — also known as a sentinel value — wherever it appears. `BOOLEAN` properties may not specify `noData` values. This is given as the plain property value, without the transforms from the `normalized`, `offset`, and `scale` properties. Shall not be defined if `required` is true."
},
"default": {
"$ref": "definitions.schema.json#/definitions/anyValue",
"description": "A default value to use when encountering a `noData` value or an omitted property. The value is given in its final form, taking the effect of `normalized`, `offset`, and `scale` properties into account. Shall not be defined if `required` is true."
},
"semantic": {
"type": "string",
"minLength": 1,
"description": "An identifier that describes how this property should be interpreted. The semantic cannot be used by other properties in the class."
}
},
"required": [
"type"
]
}