Skip to content

Commit 9702367

Browse files
committed
uri-reference
1 parent 2e16ebe commit 9702367

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

jsonschema/_format.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ def is_uri(instance):
211211
return True
212212
return rfc3987.parse(instance, rule="URI")
213213

214+
@_checks_drafts(name="uri-reference", raises=ValueError)
215+
def is_uri_reference(instance):
216+
if not isinstance(instance, str_types):
217+
return True
218+
return rfc3987.parse(instance, rule="URI_reference")
219+
214220

215221
try:
216222
import strict_rfc3339

0 commit comments

Comments
 (0)