You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/draft2019-09/optional/format/duration.json
+46Lines changed: 46 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
[
2
2
{
3
3
"description": "validation of duration strings",
4
+
"comment": "RFC 3339 Appendix A defines the ABNF grammar for ISO-8601 durations used by JSON Schema format 'duration'. These tests enforce only the syntax defined by that grammar.",
Copy file name to clipboardExpand all lines: tests/draft2020-12/optional/format/duration.json
+46Lines changed: 46 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
[
2
2
{
3
3
"description": "validation of duration strings",
4
+
"comment": "RFC 3339 Appendix A defines the ABNF grammar for ISO-8601 durations used by JSON Schema format 'duration'. These tests enforce only the syntax defined by that grammar.",
Copy file name to clipboardExpand all lines: tests/v1/format/duration.json
+46Lines changed: 46 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
[
2
2
{
3
3
"description": "validation of duration strings",
4
+
"comment": "RFC 3339 Appendix A defines the ABNF grammar for ISO-8601 durations used by JSON Schema format 'duration'. These tests enforce only the syntax defined by that grammar.",
4
5
"schema": {
5
6
"$schema": "https://json-schema.org/v1",
6
7
"format": "duration"
@@ -135,6 +136,51 @@
135
136
"description": "element without unit",
136
137
"data": "P1",
137
138
"valid": false
139
+
},
140
+
{
141
+
"description": "all date and time components",
142
+
"data": "P1Y2M3DT4H5M6S",
143
+
"valid": true
144
+
},
145
+
{
146
+
"description": "date components only",
147
+
"data": "P1Y2M3D",
148
+
"valid": true
149
+
},
150
+
{
151
+
"description": "time components only",
152
+
"data": "PT1H2M3S",
153
+
"valid": true
154
+
},
155
+
{
156
+
"description": "month and day",
157
+
"data": "P1M2D",
158
+
"valid": true
159
+
},
160
+
{
161
+
"description": "hour and minute",
162
+
"data": "PT1H30M",
163
+
"valid": true
164
+
},
165
+
{
166
+
"description": "multi-digit values in all components",
0 commit comments