Skip to content

Commit 00bda4a

Browse files
committed
Default "submissionSchema" to true
Now that we have "targetHints" which, among other things, can provide information about which HTTP methods are supported, there is no longer a clear need to prevent submission by default. It is more in line with the rest of JSON Schema's philosophy to allow unconstrained input by default. Note that "hrefSchema" remains false by default due to its interaction with resolving URI Templates from instance data.
1 parent cff5540 commit 00bda4a

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

jsonschema-hyperschema.xml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -907,20 +907,7 @@
907907
representation.
908908
</t>
909909
<t>
910-
Omitting "submissionSchema" or setting the entire schema to "false"
911-
prevents any user agent data from being accepted.
912-
<cref>
913-
Is this correct? In draft-06 this was the only way to signal
914-
support for data submission, but now we have "targetHints" for
915-
that. It may make more sense for this to default to behaving
916-
as if the schema is set to true. The original idea was that
917-
both this keyword and "hrefSchema" indicated the presence
918-
of optional functionality. This makes sense for "hrefSchema",
919-
as it is used with "href" which is owned by the hyper-schema.
920-
However, "submissionSchema" describes a message that is
921-
supposedly accepted by the target resource. In general, we
922-
choose defaults that avoid constraining target behavior.
923-
</cref>
910+
Omitting "submissionSchema" has the same behavior as a value of "true".
924911
</t>
925912
</section>
926913
</section>

0 commit comments

Comments
 (0)