Skip to content

Commit 4c796fe

Browse files
author
Bnonni
committed
rename epxiry to expiration; update type number to object
1 parent 6c7ef1e commit 4c796fe

File tree

1 file changed

+48
-18
lines changed

1 file changed

+48
-18
lines changed

json-schemas/interface-methods/protocol-rule-set.json

Lines changed: 48 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@
112112
"minProperties": 1,
113113
"properties": {
114114
"$requiredTags": {
115-
"type": "array",
116-
"items": {
117-
"type": "string"
118-
}
115+
"type": "array",
116+
"items": {
117+
"type": "string"
118+
}
119119
},
120120
"$allowUndefinedTags": {
121-
"type": "boolean"
121+
"type": "boolean"
122122
}
123123
},
124124
"patternProperties": {
@@ -127,13 +127,23 @@
127127
"additionalProperties": false,
128128
"properties": {
129129
"type": {
130-
"enum": ["string", "number", "integer", "boolean", "array"]
130+
"enum": [
131+
"string",
132+
"number",
133+
"integer",
134+
"boolean",
135+
"array"
136+
]
131137
},
132138
"items": {
133139
"type": "object",
134140
"properties": {
135141
"type": {
136-
"enum": ["string", "number", "integer"]
142+
"enum": [
143+
"string",
144+
"number",
145+
"integer"
146+
]
137147
}
138148
},
139149
"patternProperties": {
@@ -144,7 +154,11 @@
144154
"type": "object",
145155
"properties": {
146156
"type": {
147-
"enum": ["string", "number", "integer"]
157+
"enum": [
158+
"string",
159+
"number",
160+
"integer"
161+
]
148162
}
149163
},
150164
"patternProperties": {
@@ -153,16 +167,32 @@
153167
}
154168
},
155169
"patternProperties": {
156-
"^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength|minItems|maxItems|uniqueItems|minContains|maxContains)$": {
170+
"^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength|minItems|maxItems|uniqueItems|minContains|maxContains)$": {}
171+
},
172+
"$expiration": {
173+
"type": "object",
174+
"additionalProperties": false,
175+
"properties": {
176+
"duration": {
177+
"type": "number",
178+
"minimum": 1,
179+
"$comment": "Amount of milliseconds to add to dateCreated to determine expiration date"
180+
},
181+
"timespan": {
182+
"type": "string",
183+
"minimum": "1s",
184+
"$comment": "Time span to add to dateCreated to determine expiration date (e.g. 30s, 45m, 10h, 2D, 3W, 6M, 2Y)"
185+
},
186+
"datetime": {
187+
"type": "string",
188+
"$comment": "Datetime string in ISO8601 format (YYYY-MM-DDThh:mm:ssZ) after which a record expires"
189+
}
157190
}
158191
}
192+
},
193+
"patternProperties": {
194+
"^[^$].*$": {
195+
"$ref": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json"
196+
}
159197
}
160-
}
161-
}
162-
},
163-
"patternProperties": {
164-
"^[^$].*$": {
165-
"$ref": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json"
166-
}
167-
}
168-
}
198+
}

0 commit comments

Comments
 (0)