Skip to content

Commit 1087db4

Browse files
committed
Use "uri-reference", not "url" or "uriref"
There is no way to tell a validator that a schema is using draft-wright-json-schema-validation-00, which is the only draft with a "uriref" format. Validators either interpret schemas as the previous draft (fge-04), which does not have this concept at all, or the following draft (wright-01) which has "uri-reference". Since there are no options that will automatically work correctly, using the later form seems to be the best. Many validators allow registering extensions, and we can just document that we are using the wright-01+ syntax. You often need to register format handlers to get *any* format validation with many validators anyway, so this does not seem overly burdensome.
1 parent 49e784d commit 1087db4

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

schemas/v3.0/schema.yaml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ definitions:
3838
properties:
3939
$ref:
4040
type: string
41-
format: uriref
41+
format: uri-reference
4242
Info:
4343
type: object
4444
required:
@@ -51,7 +51,7 @@ definitions:
5151
type: string
5252
termsOfService:
5353
type: string
54-
format: uriref
54+
format: uri-reference
5555
contact:
5656
$ref: '#/definitions/Contact'
5757
license:
@@ -70,7 +70,7 @@ definitions:
7070
type: string
7171
url:
7272
type: string
73-
format: uriref
73+
format: uri-reference
7474
email:
7575
type: string
7676
format: email
@@ -87,7 +87,7 @@ definitions:
8787
type: string
8888
url:
8989
type: string
90-
format: uriref
90+
format: uri-reference
9191
patternProperties:
9292
'^x-': {}
9393
additionalProperties: false
@@ -347,7 +347,7 @@ definitions:
347347
type: string
348348
namespace:
349349
type: string
350-
format: url
350+
format: uri-reference
351351
prefix:
352352
type: string
353353
attribute:
@@ -440,7 +440,7 @@ definitions:
440440
value: {}
441441
externalValue:
442442
type: string
443-
format: uriref
443+
format: uri-reference
444444
patternProperties:
445445
'^x-': {}
446446
additionalProperties: false
@@ -707,7 +707,7 @@ definitions:
707707
type: string
708708
url:
709709
type: string
710-
format: uriref
710+
format: uri-reference
711711
patternProperties:
712712
'^x-': {}
713713
additionalProperties: false
@@ -1326,7 +1326,7 @@ definitions:
13261326
- openIdConnect
13271327
openIdConnectUrl:
13281328
type: string
1329-
format: url
1329+
format: uri-reference
13301330
description:
13311331
type: string
13321332
patternProperties:
@@ -1356,10 +1356,10 @@ definitions:
13561356
properties:
13571357
authorizationUrl:
13581358
type: string
1359-
format: uriref
1359+
format: uri-reference
13601360
refreshUrl:
13611361
type: string
1362-
format: uriref
1362+
format: uri-reference
13631363
scopes:
13641364
type: object
13651365
additionalProperties:
@@ -1375,10 +1375,10 @@ definitions:
13751375
properties:
13761376
tokenUrl:
13771377
type: string
1378-
format: uriref
1378+
format: uri-reference
13791379
refreshUrl:
13801380
type: string
1381-
format: uriref
1381+
format: uri-reference
13821382
scopes:
13831383
type: object
13841384
additionalProperties:
@@ -1394,10 +1394,10 @@ definitions:
13941394
properties:
13951395
tokenUrl:
13961396
type: string
1397-
format: uriref
1397+
format: uri-reference
13981398
refreshUrl:
13991399
type: string
1400-
format: uriref
1400+
format: uri-reference
14011401
scopes:
14021402
type: object
14031403
additionalProperties:
@@ -1414,13 +1414,13 @@ definitions:
14141414
properties:
14151415
authorizationUrl:
14161416
type: string
1417-
format: uriref
1417+
format: uri-reference
14181418
tokenUrl:
14191419
type: string
1420-
format: uriref
1420+
format: uri-reference
14211421
refreshUrl:
14221422
type: string
1423-
format: uriref
1423+
format: uri-reference
14241424
scopes:
14251425
type: object
14261426
additionalProperties:
@@ -1439,7 +1439,7 @@ definitions:
14391439
properties:
14401440
operationRef:
14411441
type: string
1442-
format: uriref
1442+
format: uri-reference
14431443
parameters:
14441444
type: object
14451445
additionalProperties: {}
@@ -1497,4 +1497,4 @@ definitions:
14971497
allowReserved:
14981498
type: boolean
14991499
default: false
1500-
additionalProperties: false
1500+
additionalProperties: false

0 commit comments

Comments
 (0)