File tree 1 file changed +50
-0
lines changed
tests/draft2019-09/optional 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 73
73
"valid" : true
74
74
}
75
75
]
76
+ },
77
+ {
78
+ "description" : " validation of binary-encoded media type documents with schema" ,
79
+ "schema" : {
80
+ "contentMediaType" : " application/json" ,
81
+ "contentEncoding" : " base64" ,
82
+ "contentSchema" : { "required" : [" foo" ], "properties" : { "foo" : { "type" : " string" } } }
83
+ },
84
+ "tests" : [
85
+ {
86
+ "description" : " a valid base64-encoded JSON document" ,
87
+ "data" : " eyJmb28iOiAiYmFyIn0K" ,
88
+ "valid" : true
89
+ },
90
+ {
91
+ "description" : " another valid base64-encoded JSON document" ,
92
+ "data" : " eyJib28iOiAyMCwgImZvbyI6ICJiYXoifQ==" ,
93
+ "valid" : true
94
+ },
95
+ {
96
+ "description" : " an invalid base64-encoded JSON document" ,
97
+ "data" : " eyJib28iOiAyMH0=" ,
98
+ "valid" : false
99
+ },
100
+ {
101
+ "description" : " an empty object as a base64-encoded JSON document" ,
102
+ "data" : " e30=" ,
103
+ "valid" : false
104
+ },
105
+ {
106
+ "description" : " an empty array as a base64-encoded JSON document" ,
107
+ "data" : " W10=" ,
108
+ "valid" : true
109
+ },
110
+ {
111
+ "description" : " a validly-encoded invalid JSON document" ,
112
+ "data" : " ezp9Cg==" ,
113
+ "valid" : false
114
+ },
115
+ {
116
+ "description" : " an invalid base64 string that is valid JSON" ,
117
+ "data" : " {}" ,
118
+ "valid" : false
119
+ },
120
+ {
121
+ "description" : " ignores non-strings" ,
122
+ "data" : 100 ,
123
+ "valid" : true
124
+ }
125
+ ]
76
126
}
77
127
]
You can’t perform that action at this time.
0 commit comments