Skip to content

Commit dd0b873

Browse files
committed
Move "Metadata keywords" to the end.
The format and string-encoded content keywords have validation semantics (even if only optionally), so they should go between the required validation keywords and the metadata keywords.
1 parent ce4966c commit dd0b873

File tree

1 file changed

+100
-100
lines changed

1 file changed

+100
-100
lines changed

jsonschema-validation.xml

Lines changed: 100 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -769,106 +769,6 @@
769769
</section>
770770
</section>
771771

772-
<section title="Metadata keywords">
773-
<section title="definitions">
774-
<t>
775-
This keyword's value MUST be an object.
776-
Each member value of this object MUST be a valid JSON Schema.
777-
</t>
778-
<t>
779-
This keyword plays no role in validation per se. Its role is to provide
780-
a standardized location for schema authors to inline JSON Schemas into a
781-
more general schema.
782-
</t>
783-
784-
<t>
785-
As an example, here is a schema describing an array of positive
786-
integers, where the positive integer constraint is a subschema in
787-
"definitions":
788-
789-
<figure>
790-
<artwork>
791-
<![CDATA[
792-
{
793-
"type": "array",
794-
"items": { "$ref": "#/definitions/positiveInteger" },
795-
"definitions": {
796-
"positiveInteger": {
797-
"type": "integer",
798-
"exclusiveMinimum": 0
799-
}
800-
}
801-
}
802-
]]>
803-
</artwork>
804-
</figure>
805-
</t>
806-
</section>
807-
808-
<section title='"title" and "description"'>
809-
<t>
810-
The value of both of these keywords MUST be a string.
811-
</t>
812-
<t>
813-
Both of these keywords can be used to decorate a user interface with
814-
information about the data produced by this user interface. A title will
815-
preferably be short, whereas a description will provide explanation about
816-
the purpose of the instance described by this schema.
817-
</t>
818-
</section>
819-
820-
<section title='"default"'>
821-
<t>
822-
There are no restrictions placed on the value of this keyword.
823-
</t>
824-
<t>
825-
This keyword can be used to supply a default JSON value associated with a
826-
particular schema. It is RECOMMENDED that a default value be valid against
827-
the associated schema.
828-
</t>
829-
</section>
830-
831-
<section title='"readOnly"'>
832-
<t>
833-
The value of this keyword MUST be a boolean.
834-
</t>
835-
<t>
836-
If it has a value of boolean true, this keyword indicates that the value of the
837-
instance is managed exclusively by the owning authority, and attempts by an
838-
application to modify the value of this property are expected to be ignored or
839-
rejected by that owning authority.
840-
</t>
841-
<t>
842-
For example, this property would be used to mark a database-generated serial
843-
number as read-only.
844-
</t>
845-
<t>
846-
This keyword can be used to assist in user interface instance generation.
847-
</t>
848-
<t>
849-
Omitting this keyword has the same behavior as a value of false.
850-
</t>
851-
</section>
852-
853-
<section title='"examples"'>
854-
<t>
855-
The value of this keyword MUST be an array.
856-
There are no restrictions placed on the values within the array.
857-
</t>
858-
<t>
859-
This keyword can be used to provide sample JSON values associated with a
860-
particular schema, for the purpose of illustrating usage. It is
861-
RECOMMENDED that these values be valid against the associated schema.
862-
</t>
863-
<t>
864-
Implementations MAY use the value of "default", if present, as
865-
an additional example. If "examples" is absent, "default"
866-
MAY still be used in this manner.
867-
</t>
868-
</section>
869-
870-
</section>
871-
872772
<section title='Semantic validation with "format"'>
873773

874774
<section title="Foreword">
@@ -1200,6 +1100,106 @@
12001100

12011101
</section>
12021102

1103+
<section title="Metadata keywords">
1104+
<section title="definitions">
1105+
<t>
1106+
This keyword's value MUST be an object.
1107+
Each member value of this object MUST be a valid JSON Schema.
1108+
</t>
1109+
<t>
1110+
This keyword plays no role in validation per se. Its role is to provide
1111+
a standardized location for schema authors to inline JSON Schemas into a
1112+
more general schema.
1113+
</t>
1114+
1115+
<t>
1116+
As an example, here is a schema describing an array of positive
1117+
integers, where the positive integer constraint is a subschema in
1118+
"definitions":
1119+
1120+
<figure>
1121+
<artwork>
1122+
<![CDATA[
1123+
{
1124+
"type": "array",
1125+
"items": { "$ref": "#/definitions/positiveInteger" },
1126+
"definitions": {
1127+
"positiveInteger": {
1128+
"type": "integer",
1129+
"exclusiveMinimum": 0
1130+
}
1131+
}
1132+
}
1133+
]]>
1134+
</artwork>
1135+
</figure>
1136+
</t>
1137+
</section>
1138+
1139+
<section title='"title" and "description"'>
1140+
<t>
1141+
The value of both of these keywords MUST be a string.
1142+
</t>
1143+
<t>
1144+
Both of these keywords can be used to decorate a user interface with
1145+
information about the data produced by this user interface. A title will
1146+
preferably be short, whereas a description will provide explanation about
1147+
the purpose of the instance described by this schema.
1148+
</t>
1149+
</section>
1150+
1151+
<section title='"default"'>
1152+
<t>
1153+
There are no restrictions placed on the value of this keyword.
1154+
</t>
1155+
<t>
1156+
This keyword can be used to supply a default JSON value associated with a
1157+
particular schema. It is RECOMMENDED that a default value be valid against
1158+
the associated schema.
1159+
</t>
1160+
</section>
1161+
1162+
<section title='"readOnly"'>
1163+
<t>
1164+
The value of this keyword MUST be a boolean.
1165+
</t>
1166+
<t>
1167+
If it has a value of boolean true, this keyword indicates that the value of the
1168+
instance is managed exclusively by the owning authority, and attempts by an
1169+
application to modify the value of this property are expected to be ignored or
1170+
rejected by that owning authority.
1171+
</t>
1172+
<t>
1173+
For example, this property would be used to mark a database-generated serial
1174+
number as read-only.
1175+
</t>
1176+
<t>
1177+
This keyword can be used to assist in user interface instance generation.
1178+
</t>
1179+
<t>
1180+
Omitting this keyword has the same behavior as a value of false.
1181+
</t>
1182+
</section>
1183+
1184+
<section title='"examples"'>
1185+
<t>
1186+
The value of this keyword MUST be an array.
1187+
There are no restrictions placed on the values within the array.
1188+
</t>
1189+
<t>
1190+
This keyword can be used to provide sample JSON values associated with a
1191+
particular schema, for the purpose of illustrating usage. It is
1192+
RECOMMENDED that these values be valid against the associated schema.
1193+
</t>
1194+
<t>
1195+
Implementations MAY use the value of "default", if present, as
1196+
an additional example. If "examples" is absent, "default"
1197+
MAY still be used in this manner.
1198+
</t>
1199+
</section>
1200+
1201+
</section>
1202+
12031203
<section title="Security considerations">
12041204
<t>
12051205
JSON Schema validation defines a vocabulary for JSON Schema core and concerns all

0 commit comments

Comments
 (0)