Skip to content

Commit 7afa6f0

Browse files
committed
Squashed 'json/' changes from 0b657e8..3481a79
3481a79 Merge pull request python-jsonschema#91 from gelraen/nonanchoredpattern 818553f Update pattern.json b63c96f Merge pull request python-jsonschema#92 from gelraen/escapedref 2f043b0 Update ref.json 1ebe2b4 Add valid instances for escaped ref tests b117902 Add a test that checks for implicit anchoring d319afa Merge pull request python-jsonschema#90 from bugventure/develop a2c9de2 Add jsen to the list of validators 6d4adfe Merge pull request python-jsonschema#87 from legoktm/protocol-relative 824cb99 Add test case for protocol-relative uri validation git-subtree-dir: json git-subtree-split: 3481a793ab6a1042a5973549f735b18f2355fb4e
1 parent e886fd2 commit 7afa6f0

File tree

7 files changed

+69
-6
lines changed

7 files changed

+69
-6
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ This suite is being used by:
9999
* [skeemas](https://github.com/Prestaul/skeemas)
100100
* [tv4](https://github.com/geraintluff/tv4)
101101
* [z-schema](https://github.com/zaggino/z-schema)
102+
* [jsen](https://github.com/bugventure/jsen)
102103

103104
### .NET ###
104105

tests/draft3/optional/format.json

+5
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@
7777
"data": "http://foo.bar/?baz=qux#quux",
7878
"valid": true
7979
},
80+
{
81+
"description": "a valid protocol-relative URI",
82+
"data": "//foo.bar/?baz=qux#quux",
83+
"valid": true
84+
},
8085
{
8186
"description": "an invalid URI",
8287
"data": "\\\\WINDOWS\\fileshare",

tests/draft3/pattern.json

+11
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,16 @@
1919
"valid": true
2020
}
2121
]
22+
},
23+
{
24+
"description": "pattern is not anchored",
25+
"schema": {"pattern": "a+"},
26+
"tests": [
27+
{
28+
"description": "matches a substring",
29+
"data": "xxaayy",
30+
"valid": true
31+
}
32+
]
2233
}
2334
]

tests/draft3/ref.json

+18-3
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,34 @@
8686
},
8787
"tests": [
8888
{
89-
"description": "slash",
89+
"description": "slash invalid",
9090
"data": {"slash": "aoeu"},
9191
"valid": false
9292
},
9393
{
94-
"description": "tilda",
94+
"description": "tilda invalid",
9595
"data": {"tilda": "aoeu"},
9696
"valid": false
9797
},
9898
{
99-
"description": "percent",
99+
"description": "percent invalid",
100100
"data": {"percent": "aoeu"},
101101
"valid": false
102+
},
103+
{
104+
"description": "slash valid",
105+
"data": {"slash": 123},
106+
"valid": true
107+
},
108+
{
109+
"description": "tilda valid",
110+
"data": {"tilda": 123},
111+
"valid": true
112+
},
113+
{
114+
"description": "percent valid",
115+
"data": {"percent": 123},
116+
"valid": true
102117
}
103118
]
104119
},

tests/draft4/optional/format.json

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
"data": "http://foo.bar/?baz=qux#quux",
3030
"valid": true
3131
},
32+
{
33+
"description": "a valid protocol-relative URI",
34+
"data": "//foo.bar/?baz=qux#quux",
35+
"valid": true
36+
},
3237
{
3338
"description": "an invalid URI",
3439
"data": "\\\\WINDOWS\\fileshare",

tests/draft4/pattern.json

+11
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,16 @@
1919
"valid": true
2020
}
2121
]
22+
},
23+
{
24+
"description": "pattern is not anchored",
25+
"schema": {"pattern": "a+"},
26+
"tests": [
27+
{
28+
"description": "matches a substring",
29+
"data": "xxaayy",
30+
"valid": true
31+
}
32+
]
2233
}
2334
]

tests/draft4/ref.json

+18-3
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,34 @@
8686
},
8787
"tests": [
8888
{
89-
"description": "slash",
89+
"description": "slash invalid",
9090
"data": {"slash": "aoeu"},
9191
"valid": false
9292
},
9393
{
94-
"description": "tilda",
94+
"description": "tilda invalid",
9595
"data": {"tilda": "aoeu"},
9696
"valid": false
9797
},
9898
{
99-
"description": "percent",
99+
"description": "percent invalid",
100100
"data": {"percent": "aoeu"},
101101
"valid": false
102+
},
103+
{
104+
"description": "slash valid",
105+
"data": {"slash": 123},
106+
"valid": true
107+
},
108+
{
109+
"description": "tilda valid",
110+
"data": {"tilda": 123},
111+
"valid": true
112+
},
113+
{
114+
"description": "percent valid",
115+
"data": {"percent": 123},
116+
"valid": true
102117
}
103118
]
104119
},

0 commit comments

Comments
 (0)