Skip to content

Commit 18844c1

Browse files
committed
Add an intro for Keyword Behaviors
This attempts to explain the general framework for keywords and provide guidance on creating new keywords with respect to that framework.
1 parent 9740818 commit 18844c1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

jsonschema-core.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,20 @@
124124
</t>
125125

126126
<section title="Keyword Behaviors">
127+
<t>
128+
JSON Schema keywords fall into several general behavior categories.
129+
Assertions validate that an instance satisfies constraints, annotations
130+
attach information that applications may use in any way they see fit,
131+
and applicators allow for building more complex schemas than a single
132+
schema object would allow.
133+
</t>
134+
<t>
135+
Extension keywords SHOULD stay within these categories, keeping in mind
136+
that annotations in particular are extremely flexible. Complex behavior
137+
is usually better delegated to applications on the basis of annotation
138+
data than implemented directly as schema keywords. However, extension
139+
keywords MAY define other behaviors for specialized purposes.
140+
</t>
127141
<section title="Applicators" anchor="applicators">
128142
<t>
129143
Evaluation of an instance against a

0 commit comments

Comments
 (0)