Skip to content

Commit

Permalink
Validatoin: Reduce some requirement levels where not strictly necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
awwright committed Oct 12, 2016
1 parent e0a9182 commit cf0ec72
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
8 changes: 5 additions & 3 deletions jsonschema-core.xml
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
</t>
<t>
The URI is not a network locator, only an identifier. A schema need not be downloadable from the address
if it is a network-addressible URL, and implementations MUST NOT assume they should perform a network
if it is a network-addressible URL, and implementations SHOULD NOT assume they should perform a network
operation when they encounter a network-addressible URI.
</t>
<t>
Expand Down Expand Up @@ -463,10 +463,12 @@ Link: <http://example.com/my-hyper-schema#>; rel="describedby"
<section title='Describing a profile of JSON'>
<t>
Instances MAY specify a "profile" as described in <xref target="RFC6906">The 'profile' Link Relation</xref>.
When used as a media-type parameter, HTTP servers gain the ability to perform Content-Type Negotiation based on profile. The media-type parameter MUST be a whitespace-separated list of URIs (i.e. relative references are invalid).
When used as a media-type parameter, HTTP servers gain the ability to perform Content-Type Negotiation based on profile.
The media-type parameter MUST be a whitespace-separated list of URIs (i.e. relative references are invalid).
</t>
<t>
The profile URI is opaque and SHOULD NOT automatically be dereferenced. If the implementation does not understand the semantics of the provided profile, the implementation can instead follow the "describedby" links, if any, which may provide information on how to handle the profile.
The profile URI is opaque and SHOULD NOT automatically be dereferenced.
If the implementation does not understand the semantics of the provided profile, the implementation can instead follow the "describedby" links, if any, which may provide information on how to handle the profile.
Since "profile" doesn't necessarily point to a network location, the "describedby" relation is used for linking to a downloadable schema.
However, for simplicity, schema authors should make these URIs point to the same resource when possible.
</t>
Expand Down
16 changes: 6 additions & 10 deletions jsonschema-validation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
An undefined value is the same as false.
</t>
<t>
If "exclusiveMaximum" is true, then a numeric instance MUST NOT be equal to the value specified in "maximum".
If "exclusiveMaximum" is true, then a numeric instance SHOULD NOT be equal to the value specified in "maximum".
If "exclusiveMaximum" is false (or not specified), then a numeric instance MAY be equal to the value of "maximum".
</t>
</section>
Expand All @@ -228,7 +228,7 @@
An undefined value is the same as false.
</t>
<t>
If "exclusiveMinimum" is true, then a numeric instance MUST NOT be equal to the value specified in "minimum".
If "exclusiveMinimum" is true, then a numeric instance SHOULD NOT be equal to the value specified in "minimum".
If "exclusiveMinimum" is false (or not specified), then a numeric instance MAY be equal to the value of "minimum".
</t>
</section>
Expand Down Expand Up @@ -288,10 +288,7 @@
it is an object, this object MUST be a valid JSON Schema.
</t>
<t>
The value of "items" MUST be either an object or an array. If it is an
object, this object MUST be a valid JSON Schema. If it is an array,
items of this array MUST be objects, and each of these objects MUST be a
valid JSON Schema.
The value of "items" MUST be either a schema or array of schemas.
</t>
<t>
Successful validation of an array instance with regards to these two
Expand Down Expand Up @@ -419,8 +416,7 @@

<section title="additionalProperties">
<t>
The value of "additionalProperties" MUST be a boolean or an object. If
it is an object, it MUST also be a valid JSON Schema.
The value of "additionalProperties" MUST be a boolean or a schema.
</t>
<t>
If "additionalProperties" is absent, it may be considered present with
Expand Down Expand Up @@ -464,8 +460,8 @@

<section title="enum">
<t>
The value of this keyword MUST be an array. This array MUST have at
least one element. Elements in the array MUST be unique.
The value of this keyword MUST be an array. This array SHOULD have at
least one element. Elements in the array SHOULD be unique.
</t>

<t>
Expand Down

0 comments on commit cf0ec72

Please sign in to comment.