Skip to content

Commit

Permalink
Use "uri-reference", not "url" or "uriref"
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
handrews committed Nov 8, 2018
1 parent 49e784d commit 1087db4
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions schemas/v3.0/schema.yaml
Expand Up @@ -38,7 +38,7 @@ definitions:
properties:
$ref:
type: string
format: uriref
format: uri-reference
Info:
type: object
required:
Expand All @@ -51,7 +51,7 @@ definitions:
type: string
termsOfService:
type: string
format: uriref
format: uri-reference
contact:
$ref: '#/definitions/Contact'
license:
Expand All @@ -70,7 +70,7 @@ definitions:
type: string
url:
type: string
format: uriref
format: uri-reference
email:
type: string
format: email
Expand All @@ -87,7 +87,7 @@ definitions:
type: string
url:
type: string
format: uriref
format: uri-reference
patternProperties:
'^x-': {}
additionalProperties: false
Expand Down Expand Up @@ -347,7 +347,7 @@ definitions:
type: string
namespace:
type: string
format: url
format: uri-reference
prefix:
type: string
attribute:
Expand Down Expand Up @@ -440,7 +440,7 @@ definitions:
value: {}
externalValue:
type: string
format: uriref
format: uri-reference
patternProperties:
'^x-': {}
additionalProperties: false
Expand Down Expand Up @@ -707,7 +707,7 @@ definitions:
type: string
url:
type: string
format: uriref
format: uri-reference
patternProperties:
'^x-': {}
additionalProperties: false
Expand Down Expand Up @@ -1326,7 +1326,7 @@ definitions:
- openIdConnect
openIdConnectUrl:
type: string
format: url
format: uri-reference
description:
type: string
patternProperties:
Expand Down Expand Up @@ -1356,10 +1356,10 @@ definitions:
properties:
authorizationUrl:
type: string
format: uriref
format: uri-reference
refreshUrl:
type: string
format: uriref
format: uri-reference
scopes:
type: object
additionalProperties:
Expand All @@ -1375,10 +1375,10 @@ definitions:
properties:
tokenUrl:
type: string
format: uriref
format: uri-reference
refreshUrl:
type: string
format: uriref
format: uri-reference
scopes:
type: object
additionalProperties:
Expand All @@ -1394,10 +1394,10 @@ definitions:
properties:
tokenUrl:
type: string
format: uriref
format: uri-reference
refreshUrl:
type: string
format: uriref
format: uri-reference
scopes:
type: object
additionalProperties:
Expand All @@ -1414,13 +1414,13 @@ definitions:
properties:
authorizationUrl:
type: string
format: uriref
format: uri-reference
tokenUrl:
type: string
format: uriref
format: uri-reference
refreshUrl:
type: string
format: uriref
format: uri-reference
scopes:
type: object
additionalProperties:
Expand All @@ -1439,7 +1439,7 @@ definitions:
properties:
operationRef:
type: string
format: uriref
format: uri-reference
parameters:
type: object
additionalProperties: {}
Expand Down Expand Up @@ -1497,4 +1497,4 @@ definitions:
allowReserved:
type: boolean
default: false
additionalProperties: false
additionalProperties: false

0 comments on commit 1087db4

Please sign in to comment.