Skip to content

Commit cf0ec72

Browse files
committed
Validatoin: Reduce some requirement levels where not strictly necessary
1 parent e0a9182 commit cf0ec72

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

jsonschema-core.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@
291291
</t>
292292
<t>
293293
The URI is not a network locator, only an identifier. A schema need not be downloadable from the address
294-
if it is a network-addressible URL, and implementations MUST NOT assume they should perform a network
294+
if it is a network-addressible URL, and implementations SHOULD NOT assume they should perform a network
295295
operation when they encounter a network-addressible URI.
296296
</t>
297297
<t>
@@ -463,10 +463,12 @@ Link: <http://example.com/my-hyper-schema#>; rel="describedby"
463463
<section title='Describing a profile of JSON'>
464464
<t>
465465
Instances MAY specify a "profile" as described in <xref target="RFC6906">The 'profile' Link Relation</xref>.
466-
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).
466+
When used as a media-type parameter, HTTP servers gain the ability to perform Content-Type Negotiation based on profile.
467+
The media-type parameter MUST be a whitespace-separated list of URIs (i.e. relative references are invalid).
467468
</t>
468469
<t>
469-
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.
470+
The profile URI is opaque and SHOULD NOT automatically be dereferenced.
471+
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.
470472
Since "profile" doesn't necessarily point to a network location, the "describedby" relation is used for linking to a downloadable schema.
471473
However, for simplicity, schema authors should make these URIs point to the same resource when possible.
472474
</t>

jsonschema-validation.xml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
An undefined value is the same as false.
208208
</t>
209209
<t>
210-
If "exclusiveMaximum" is true, then a numeric instance MUST NOT be equal to the value specified in "maximum".
210+
If "exclusiveMaximum" is true, then a numeric instance SHOULD NOT be equal to the value specified in "maximum".
211211
If "exclusiveMaximum" is false (or not specified), then a numeric instance MAY be equal to the value of "maximum".
212212
</t>
213213
</section>
@@ -228,7 +228,7 @@
228228
An undefined value is the same as false.
229229
</t>
230230
<t>
231-
If "exclusiveMinimum" is true, then a numeric instance MUST NOT be equal to the value specified in "minimum".
231+
If "exclusiveMinimum" is true, then a numeric instance SHOULD NOT be equal to the value specified in "minimum".
232232
If "exclusiveMinimum" is false (or not specified), then a numeric instance MAY be equal to the value of "minimum".
233233
</t>
234234
</section>
@@ -288,10 +288,7 @@
288288
it is an object, this object MUST be a valid JSON Schema.
289289
</t>
290290
<t>
291-
The value of "items" MUST be either an object or an array. If it is an
292-
object, this object MUST be a valid JSON Schema. If it is an array,
293-
items of this array MUST be objects, and each of these objects MUST be a
294-
valid JSON Schema.
291+
The value of "items" MUST be either a schema or array of schemas.
295292
</t>
296293
<t>
297294
Successful validation of an array instance with regards to these two
@@ -419,8 +416,7 @@
419416

420417
<section title="additionalProperties">
421418
<t>
422-
The value of "additionalProperties" MUST be a boolean or an object. If
423-
it is an object, it MUST also be a valid JSON Schema.
419+
The value of "additionalProperties" MUST be a boolean or a schema.
424420
</t>
425421
<t>
426422
If "additionalProperties" is absent, it may be considered present with
@@ -464,8 +460,8 @@
464460

465461
<section title="enum">
466462
<t>
467-
The value of this keyword MUST be an array. This array MUST have at
468-
least one element. Elements in the array MUST be unique.
463+
The value of this keyword MUST be an array. This array SHOULD have at
464+
least one element. Elements in the array SHOULD be unique.
469465
</t>
470466

471467
<t>

0 commit comments

Comments
 (0)